Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fasthadv4.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file fasthadv4.h
1 #include <iostream>
2 #include <ostream>
3 #include <fstream>
4 #include <cctype>
5 #include <string>
6 #include <math.h>
7 #include <cstdlib>
8 
9 #include "TROOT.h"
10 #include "TF1.h"
11 #include "TH1.h"
12 #include "TH2.h"
13 #include "TH3.h"
14 #include "TNtuple.h"
15 #include "TFile.h"
16 #include "TRandom.h"
17 #include "TMath.h"
18 #include "TCanvas.h"
19 
20 
21 char title[100];
22 char cfile[100];
23 //char *cflag"";
24 
25 // length, width of the rectangular towers is now in "arbitrary units",
26 // essentially something about a Moliere-radius
27 
28 const double dlength = 20.0; // tower length, arb units
29 const double ddedx = 0.0025; // deposit in one step of mip
30 const double ddzmip = 0.2; // that is constant as opposed to had stepsize
31 
32 // The following parameters are the most crucial to play with
33 // for instance dmipstop=0.994 with 100 steps gives 55% probability that the particle
34 // will never start a shower, survives as MIP
35 const double dmipstop = 0.994; // if uniform ends up above this, stop MIP
36 const double dresol = 0.18; // resolution
37 //const double ddeem = 0.05; // deposit in one step of em part
38 //const double ddehad = 0.1; // deposit in one step of hadronic
39 // Width terms of the em and hadronic showers,
40 // irrelevant for total deposit (modulo edge effects), crucial for shape
41 const double dwidthem = 0.11;
42 const double dwidthhad = 0.3;
43 
44 const double dtothade = 12.0; // May want to make a runtime param
45 
46 
47 const int ntry=3000; // generate that many particles
48 const int ndefmipstep = 100; // max step of MIP
49 const int ndefshstep = 1000; // default number of steps for hadron showers
50 const int nlive = 100; // 1/frequency of live display
51 
52 
53 const int nbin=40;
54 const double xlo=-20.0;
55 const double xhi=20.0;
56 const double ylo=-20.0;
57 const double yhi=20.0;
58 const double zlo=0.0;
59 const double zhi=20.0;