22 3222, 3112, 3312, 3334,
24 int acha[
npid] = {-1,-1,+1,+1,+1,+1,+1,+1,+1,-1,-1,-1};
40 TH1F *
hrpass =
new TH1F(
"hrpass",
"hrpass; r [cm]",100,-15,+15);
41 TH1F *
hzpass =
new TH1F(
"hzpass",
"hzpass; z [cm]",100,-15,+15);
43 TH1F *
hptpass =
new TH1F(
"hptpass",
"hptpass; pt [GeV]",100,0,10);
44 TH1F *
hetapass =
new TH1F(
"hetapass",
"hetapass; eta",100,-3,+3);
45 TH1F *
hlengthpass=
new TH1F(
"hlengthpass",
"hlengthpass; length [cm]",100,0,150);
46 TH1F *
hbxing =
new TH1F(
"hbxing",
"hbxing",150,-0.5,300-0.5);
47 TH3F *
tracking =
new TH3F(
"tracking",
"Generated tracks: tracking;xi;yi;zi",120,-100,+100,120,-100,+100,120,-100,+100);
53 gStyle->SetOptStat(111111111);
60 float gs_ion_mobility = 4;
64 float tpc_magnetic_field = 1.5;
65 float tpc_electric_field = 400;
66 float tpc_drift_velocity_e = 8;
67 float tpc_drift_velocity_i = tpc_electric_field*gs_ion_mobility*1
e-3;
71 std::ifstream inputf(
"/Users/cperez//ampt/ana/ampt.dat");
75 4*
int(80/(tpc_drift_velocity_i*(lumi*106e-6)))+1,80,
76 tpc_drift_velocity_e,tpc_drift_velocity_i);
79 for(ncoll=0; ncoll!=3; ++ncoll) {
82 if(ncoll%100==0) std::cout << ncoll << std::endl;
84 int eventno, testno, nhadrons, npartA, npartB, npartElaA, npartIneA, npartElaB, npartIneB;
92 inputf.open(
"ampt.dat");
95 inputf >> testno >> nhadrons >> impactPar >> npartA >> npartB >> npartElaA >> npartIneA >> npartElaB >> npartIneB;
96 for(
int np=0; np!=nhadrons; ++np) {
97 inputf >> pid >> px >> py >> pz >> mass >> x >> y >> z >>
t;
98 if( TMath::AreEqualAbs(t,0,1e-3) )
continue;
103 for(
int n=0;
n!=
npid-1; ++
n)
if(
apid[
n]==TMath::Abs(pid)) fill =
n;
105 if(fill==
npid-1)
continue;
108 sHelix a(x,y,z,px,py,pz,q,tpc_magnetic_field);
114 if(length<1)
continue;
115 hrpass->Fill( sqrt(x*x+y*y) );
118 hptpass->Fill( sqrt(px*px+py*py) );
119 float pmom = sqrt(px*px+py*py+pz*pz);
121 if (pmom != TMath::Abs(pz)) eta = 0.5*
TMath::Log((pmom+pz)/(pmom-pz));
124 float nprim = gRandom->Poisson(gs_nt*length);
127 for(
int i=0;
i!=100; ++
i) {
128 float ri = TMath::Sqrt( track[
i][0]*track[
i][0] + track[
i][1]*track[
i][1] );
132 map->
Fill(ri, pi, track[i][2], -nprim/100);
133 map->
Fill(ri, pi, track[i][2], nprim/100);
139 tracking->Fill(track[i][0],track[i][1],track[i][2]);
154 int steps = gRandom->Poisson( lumi );
156 float lapse = 106*steps*1e-6;
164 TFile *qa =
new TFile(
"qa.root",
"RECREATE");
165 qa->WriteTObject(
hpid,
hpid->GetName());
173 tracking->SaveAs(
"tracking.root",
"root");