22 {
"pos",
"neg",
"zero",
"undefined" };
39 "pip",
"pim",
"kap",
"kam",
40 "prp",
"prm",
"elp",
"elm",
42 "gam",
"k0s",
"lam",
"ala",
43 "rho",
"kst",
"aks",
"phi",
63 std::pair<int,int>(
k0s,
pip), std::pair<int,int>(k0s,
pim),
64 std::pair<int,int>(
lam,
prp), std::pair<int,int>(lam,
pim),
65 std::pair<int,int>(
ala,
prm), std::pair<int,int>(ala,
pip),
66 std::pair<int,int>(
sip,
prp), std::pair<int,int>(
asi,
prm),
67 std::pair<int,int>(
any,
pip), std::pair<int,int>(any,
pim),
68 std::pair<int,int>(
any,
kap), std::pair<int,int>(any,
kam),
69 std::pair<int,int>(
any,
prp), std::pair<int,int>(any,
prm),
70 std::pair<int,int>(
any,
elp), std::pair<int,int>(any,
elm),
71 std::pair<int,int>(
any,
hap), std::pair<int,int>(any,
ham)
77 std::pair<int,int>(
pip,
pim),
78 std::pair<int,int>(
kap,
pim),
79 std::pair<int,int>(
pip,
kam),
80 std::pair<int,int>(
kap,
kam)
89 std::string histoFileLabel = pset.
getParameter<std::string>(
"histoFile");
90 histoFile =
new TFile(histoFileLabel.c_str(),
"recreate");
92 std::string ntupleFileLabel = pset.
getParameter<std::string>(
"ntupleFile");
93 ntupleFile =
new TFile(ntupleFileLabel.c_str(),
"recreate");
108 case 211 :
return pip;
break;
109 case -211 :
return pim;
break;
111 case 321 :
return kap;
break;
112 case -321 :
return kam;
break;
114 case 2212 :
return prp;
break;
115 case -2212 :
return prm;
break;
117 case 11 :
return elp;
break;
118 case -11 :
return elm;
break;
126 case 22 :
return gam;
break;
127 case 310 :
return k0s;
break;
128 case 3122 :
return lam;
break;
129 case -3122 :
return ala;
break;
138 case 3222 :
return sip;
break;
139 case -3222 :
return asi;
break;
141 default :
return -1;
break;
148 if(charge > 0)
return pos;
159 trackTrees.push_back(
new TTree(
"simTrackTree",
"simTrackTree"));
160 leafStr =
"ids/I:etas/F:pts/F:acc/I:prim/I:nrec/I:ntrkr/I";
161 trackTrees[0]->Branch(
"simTrackValues", &simTrackValues, leafStr.Data());
163 trackTrees.push_back(
new TTree(
"recTrackTree",
"recTrackTree"));
164 leafStr =
"charge/I:etar/F:ptr/F:phir/F:zr/F:logpr/F:logde/F:nhitr/I:prim/I:nsim/I:ids/I:parids/I:etas/F:pts/F:ntrkr/I";
165 trackTrees[1]->Branch(
"recTrackValues", &recTrackValues, leafStr.Data());
167 trackTrees.push_back(
new TTree(
"recVzeroTree",
"recVzeroTree"));
168 leafStr =
"etar/F:ptr/F:ima/F:rhor/F";
169 trackTrees[2]->Branch(
"recVzeroValues", &recVzeroValues, leafStr.Data());
171 trackTrees.push_back(
new TTree(
"eventInfoTree",
"eventInfoTree"));
172 leafStr =
"proc/I:strk/I:ntrkr/I";
173 trackTrees[3]->Branch(
"eventInfoValues", &eventInfoValues, leafStr.Data());
180 const double small = 1
e-3;
183 for(pt = 0; pt < 1 - small; pt += 0.05)
ptBins.push_back(pt);
184 for(pt = 1; pt < 2 - small; pt += 0.1 )
ptBins.push_back(pt);
185 for(pt = 2; pt < 4 - small; pt += 0.2 )
ptBins.push_back(pt);
186 for(pt = 4; pt < 8 - small; pt += 0.5 )
ptBins.push_back(pt);
187 for(pt = 8; pt < 16 - small; pt += 1. )
ptBins.push_back(pt);
188 for(pt = 16; pt < 32 - small; pt += 2. )
ptBins.push_back(pt);
189 for(pt = 32; pt < 64 - small; pt += 4. )
ptBins.push_back(pt);
191 static float ratMin = 0.5;
192 static float ratMax = 1.5;
193 static float ratWidth = 1./200;
195 for(
double rat = ratMin; rat < ratMax + ratWidth/2; rat += ratWidth)
196 ratBins.push_back(rat);
200 static float etaMin = -3.0;
201 static float etaMax = 3.0;
202 static float etaWidth = 0.2;
204 for(
double eta = etaMin;
eta < etaMax + etaWidth/2;
eta += etaWidth)
208 for(
double eta = etaMin;
eta < etaMax + etaWidth/2;
eta += etaWidth/5)
209 metaBins.push_back(
eta);
211 static float zMin = -20.;
212 static float zMax = 20.;
214 static float zWidth = 0.2;
216 for(
double z = zMin;
z < zMax + zWidth/2;
z += zWidth)
221 static float ntrkMin = 0.5;
225 static float ntrkMax = 1000.;
226 static float ntrkWidth = 10.;
228 for(
double ntrk = ntrkMin; ntrk < ntrkMax + ntrkWidth; ntrk += ntrkWidth)
229 ntrkBins.push_back(ntrk);
236 sprintf(histName,
"heve");
237 heve.push_back(
new TH1F(histName,histName, 200, -0.5,199.5));
239 sprintf(histName,
"hsdx");
240 heve.push_back(
new TH1F(histName,histName, 200, -0.5,199.5));
242 sprintf(histName,
"hddx");
243 heve.push_back(
new TH1F(histName,histName, 200, -0.5,199.5));
245 sprintf(histName,
"hndx");
246 heve.push_back(
new TH1F(histName,histName, 200, -0.5,199.5));
248 sprintf(histName,
"hder");
249 hder.push_back(
new TH2F(histName,histName, 200, -0.5,199.5,
258 hsim.push_back(
new TH3F(histName,histName,
261 ntrkBins.size()-1, &ntrkBins[0]));
264 sprintf(histName,
"hacc_%s",
partName[part]);
265 hacc.push_back(
new TH3F(histName,histName,
268 ntrkBins.size()-1, &ntrkBins[0]));
271 sprintf(histName,
"href_%s",
partName[part]);
272 href.push_back(
new TH3F(histName,histName,
275 ntrkBins.size()-1, &ntrkBins[0]));
278 sprintf(histName,
"hmul_%s",
partName[part]);
279 hmul.push_back(
new TH3F(histName,histName,
282 ntrkBins.size()-1, &ntrkBins[0]));
290 hall.push_back(
new TH3F(histName,histName,
293 ntrkBins.size()-1, &ntrkBins[0]));
295 sprintf(histName,
"hdac_%s",
chargeName[charge]);
296 hdac.push_back(
new TH2F(histName,histName,
297 metaBins.size()-1, &metaBins[0],
298 zBins.size()-1, &zBins[0]));
302 sprintf(histName,
"hfak_%s",
chargeName[charge]);
303 hfak.push_back(
new TH3F(histName,histName,
306 ntrkBins.size()-1, &ntrkBins[0]));
315 hvpt.push_back(
new TH3F(histName,histName,
321 sprintf(histName,
"hrpt_%s",
partName[part]);
322 hrpt.push_back(
new TH3F(histName,histName,
325 ratBins.size()-1, &ratBins[0]));
327 sprintf(histName,
"hsp0_%s",
partName[part]);
328 hsp0.push_back(
new TH2F(histName,histName,
332 sprintf(histName,
"hsp1_%s",
partName[part]);
333 hsp1.push_back(
new TH2F(histName,histName,
337 sprintf(histName,
"hsp2_%s",
partName[part]);
338 hsp2.push_back(
new TH2F(histName,histName,
349 hpro.push_back(
new TH2F(histName,histName,
355 hdec.push_back(
new TH2F(histName,histName,
362 static float lpMin = -3;
363 static float lpMax = 2;
364 static float lpWidth = (lpMax - lpMin)/100;
365 for(
double lp = lpMin; lp < lpMax + lpWidth/2; lp += lpWidth)
366 lpBins.push_back(lp);
368 static float ldeMin =
log(1);
369 static float ldeMax =
log(100);
370 static float ldeWidth = (ldeMax - ldeMin)/250;
371 for(
double lde = ldeMin; lde < ldeMax + ldeWidth/2; lde += ldeWidth)
372 ldeBins.push_back(lde);
374 for(
double nhit = -0.5; nhit < 50; nhit += 1)
375 nhitBins.push_back(nhit);
382 helo.push_back(
new TH3F(histName,histName,
385 ldeBins.size()-1, &ldeBins[0]));
388 sprintf(histName,
"hnhi_%s",
chargeName[charge]);
389 hnhi.push_back(
new TH3F(histName,histName,
392 nhitBins.size()-1, &nhitBins[0]));
395 sprintf(histName,
"held_%s",
chargeName[charge]);
396 held.push_back(
new TH2F(histName,histName,
397 lpBins.size()-1, &lpBins[0],
398 ldeBins.size()-1, &ldeBins[0]));
429 static float rhoMin = 0.;
430 static float rhoMax = 5.;
431 static float rhoWidth = 0.2;
432 for(
double rho_ = rhoMin; rho_ < rhoMax + rhoWidth/2; rho_ += rhoWidth)
433 rhoBins.push_back(rho_);
442 if(
part ==
gam) { imMin = 0.0; imMax = 0.2; imWidth = 0.005; }
443 if(
part ==
k0s) { imMin = 0.3; imMax = 0.7; imWidth = 0.005; }
445 part ==
ala) { imMin = 1.0; imMax = 1.3; imWidth = 0.002; }
447 if(
part ==
rho) { imMin = 0.2; imMax = 1.2; imWidth = 0.010; }
449 part ==
aks) { imMin = 0.6; imMax = 1.6; imWidth = 0.010; }
450 if(
part ==
phi) { imMin = 0.9; imMax = 1.1; imWidth = 0.002; }
452 std::vector<double> imBins;
454 for(im = imMin; im < imMax + imWidth/2; im += imWidth)
455 imBins.push_back(im);
460 hima.push_back(
new TH3F(histName,histName,
463 imBins.size()-1, &imBins[0]));
465 if(part >=
rho && part <=
phi)
467 sprintf(histName,
"himp_%s",
partName[part]);
468 hima.push_back(
new TH3F(histName,histName,
471 imBins.size()-1, &imBins[0]));
473 sprintf(histName,
"himm_%s",
partName[part]);
474 hima.push_back(
new TH3F(histName,histName,
477 imBins.size()-1, &imBins[0]));
479 sprintf(histName,
"himx_%s",
partName[part]);
480 hima.push_back(
new TH3F(histName,histName,
483 imBins.size()-1, &imBins[0]));
486 sprintf(histName,
"hrho_%s",
partName[part]);
487 hrho.push_back(
new TH3F(histName,histName,
488 rhoBins.size()-1, &rhoBins[0],
490 imBins.size()-1, &imBins[0]));
508 trackTrees[3]->Fill();
515 if(proc == 92 || proc == 93)
521 if(!(proc == 92 || proc == 93 || proc == 94))
525 hder[0]->Fill(strk,ntrk);
537 trackTrees[0]->Fill();
580 trackTrees[1]->Fill();
602 int moth = getParticle(r.
parids);
604 if(
pip <= part && part <=
ala)
669 trackTrees[2]->Fill();
679 typedef std::vector<TH3F *>::const_iterator H3I;
680 typedef std::vector<TH2F *>::const_iterator H2I;
681 typedef std::vector<TH1F *>::const_iterator H1I;
682 typedef std::vector<TTree *>::const_iterator TI;
687 for(H1I
h = heve.begin();
h!= heve.end();
h++) (*h)->Write();
688 for(H2I
h = hder.begin();
h!= hder.end();
h++) (*h)->Write();
690 for(H3I
h = hsim.begin();
h!= hsim.end();
h++) (*h)->Write();
691 for(H3I
h = hacc.begin();
h!= hacc.end();
h++) (*h)->Write();
692 for(H3I
h = href.begin();
h!= href.end();
h++) (*h)->Write();
693 for(H3I
h = hmul.begin();
h!= hmul.end();
h++) (*h)->Write();
695 for(H3I
h = hall.begin();
h!= hall.end();
h++) (*h)->Write();
696 for(H2I
h = hdac.begin();
h!= hdac.end();
h++) (*h)->Write();
698 for(H3I
h = hvpt.begin();
h!= hvpt.end();
h++) (*h)->Write();
699 for(H3I
h = hrpt.begin();
h!= hrpt.end();
h++) (*h)->Write();
701 for(H2I
h = hsp0.begin();
h!= hsp0.end();
h++) (*h)->Write();
702 for(H2I
h = hsp1.begin();
h!= hsp1.end();
h++) (*h)->Write();
703 for(H2I
h = hsp2.begin();
h!= hsp2.end();
h++) (*h)->Write();
705 for(H3I
h = hfak.begin();
h!= hfak.end();
h++) (*h)->Write();
707 for(H2I
h = hpro.begin();
h!= hpro.end();
h++) (*h)->Write();
708 for(H2I
h = hdec.begin();
h!= hdec.end();
h++) (*h)->Write();
710 for(H3I
h = helo.begin();
h!= helo.end();
h++) (*h)->Write();
711 for(H3I
h = hnhi.begin();
h!= hnhi.end();
h++) (*h)->Write();
712 for(H2I
h = held.begin();
h!= held.end();
h++) (*h)->Write();
714 for(H3I
h = hima.begin();
h!= hima.end();
h++) (*h)->Write();
715 for(H3I
h = hrho.begin();
h!= hrho.end();
h++) (*h)->Write();
722 for(TI
t = trackTrees.begin();
t!= trackTrees.end();
t++) (*t)->Write();
T getParameter(std::string const &) const
TrainProcessor *const proc
const char * chargeName[nCharges+2]
const std::pair< int, int > resonance[nResonances]
U second(std::pair< T, U > const &p)
const int partCharge[nParticles]
const char * partName[nParticles]
int getCharge(int charge)
void fillSimHistograms(const SimTrack_t &s)
void fillVzeroHistograms(const RecVzero_t &r, int part)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
const std::pair< int, int > feedDown[nFeedDowns]
void fillEventInfo(int proc, int strk, int ntrkr)
void fillRecHistograms(const RecTrack_t &r)