StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEventQAMaker.cxx
1 // //
3 // StEventQAMaker class for QA Histograms using StEvent //
4 // adapted from St_QA_Maker //
5 // //
7 
8 #include "PhysicalConstants.h"
9 #include <math.h>
10 #include "TROOT.h"
11 #include "TMath.h"
12 #include "SystemOfUnits.h"
13 #include "StQABookHist.h"
14 #include "TH2.h"
15 #include "TH3.h"
16 //#include "TSpectrum.h"
17 #include "StEventQAMaker.h"
18 #include "StEventTypes.h"
19 #include "StDcaGeometry.h"
20 #include "StMcEventTypes.hh"
21 #include "StTpcDedxPidAlgorithm.h"
22 #include "HitHistograms.h"
23 #include "StTpcDb/StTpcDb.h"
24 #include "StarClassLibrary/StTimer.hh"
25 #include "StMessMgr.h"
26 #include "StEmcUtil/geometry/StEmcGeom.h"
27 #include "StEmcUtil/others/StEmcMath.h"
28 #include "StBichsel/Bichsel.h"
29 #include "StDetectorDbMaker/StDetectorDbTriggerID.h"
30 
31 #include "StPmdUtil/StPmdCollection.h"
32 #include "StPmdUtil/StPmdDetector.h"
33 #include "StPmdUtil/StPmdMapUtil.h"
34 #include "StPhmdCollection.h"
35 #include "StPhmdDetector.h"
36 #include "StPhmdModule.h"
37 
38 #include "StTofUtil/tofPathLength.hh"
39 #include "tables/St_tofTotCorr_Table.h"
40 // btof
41 #include "StBTofCollection.h"
42 #include "StBTofHit.h"
43 #include "StBTofPidTraits.h"
44 
45 //epd
46 #include "StEpdCollection.h"
47 
48 //fcs
49 #include "StFcsPi0FinderForEcal/StFcsPi0FinderForEcal.h"
50 
51 #include "StEvent/StTpcRawData.h"
52 
53 static int tblow = 31;
54 static int tbhigh = 431;
55 
56 static StEmcGeom* emcGeom[4];
57 
58 // These are the mean z positions of the FTPC padrows (1-20).
59 // The width of each padrow in z is 2 cm.
60 static float ftpcPadrowZPos[20] = {162.75,171.25,184.05,192.55,205.35,
61  213.85,226.65,235.15,247.95,256.45,
62  -162.75,-171.25,-184.05,-192.55,-205.35,
63  -213.85,-226.65,-235.15,-247.95,-256.45};
64 
65 ClassImp(StEventQAMaker)
66 
67 Bool_t isTriggerInSubRange(const StTriggerId* tr, UInt_t lo, UInt_t hi) {
68  // Only the last three digits matter...
69  // ...according to Jeff Landgraf's triggerID scheme
70  // (only for triggerIDs >= 10000)
71  vector<unsigned int> idVec = tr->triggerIds();
72  for (UInt_t i=lo; i<=hi; i++) {
73  UInt_t j = i - ((i/1000)*1000);
74  for (UInt_t k=0; k<idVec.size(); k++)
75  if (idVec[k] >= 10000 &&
76  j == (idVec[k] - ((idVec[k]/1000)*1000))) return kTRUE;
77  }
78  return kFALSE;
79 }
80 Bool_t isTriggerInRange(const StTriggerId* tr, UInt_t lo, UInt_t hi) {
81  for (UInt_t i=lo; i<=hi; i++)
82  if (tr->isTrigger(i)) return kTRUE;
83  return kFALSE;
84 }
85 Bool_t isTriggerAmong(const StTriggerId* tr, UInt_t n, ... ) {
86  va_list ap;
87  va_start(ap,n);
88  Bool_t is=kFALSE;
89  for (UInt_t i=0; (!is) && (i<n); i++)
90  if (tr->isTrigger(va_arg(ap, unsigned int))) is=kTRUE;
91  va_end(ap);
92  return is;
93 }
94 
95 //_____________________________________________________________________________
96 StEventQAMaker::StEventQAMaker(const char *name, const char *title) :
97 StQAMakerBase(name,title,"StE"), event(0), primVtx(0), mHitHist(0), mPmdGeom(0), maputil(0) {
98  mRunNumber = -1;
99  silHists = kFALSE;
100  ftpHists = kFALSE;
101  hitsAvail = kTRUE;
102  vertExists = -1.;
103  printTpcHits = kFALSE;
104 
105  n_prim_good = 0;
106  n_glob_good = 0;
107  multiplicity = 0;
108  qaEvents = 0;
109  evtTime = -1;
110  if (GetMaker("fcsDbMkr") && GetMaker("StFcsClusterMaker")) AddMaker(new StFcsPi0FinderForEcal());
111 }
112 
113 //_____________________________________________________________________________
114 StEventQAMaker::~StEventQAMaker() {
115  if (mHitHist) delete mHitHist;
116  if (mPmdGeom) delete mPmdGeom;
117  if (maputil) delete maputil;
118  for (Int_t i=0; i<4; i++) {if (emcGeom[i]) delete emcGeom[i];}
119 }
120 
121 
122 //_____________________________________________________________________________
123 Int_t StEventQAMaker::Init() {
124 
125  qaEvents = 0;
126  if (printTpcHits) allTrigs = kTRUE;
127  return StQAMakerBase::Init();
128 }
129 
130 
131 //_____________________________________________________________________________
133 Int_t StEventQAMaker::InitRun(int runnumber) {
134 
135  if(! mHitHist){
136  TString hname = QAMakerType;
137  hname += "QaDedxAllSectors";
138  mHitHist = new HitHistograms(hname.Data(),"dE/dx for all TPC sectors",
139  100,0.,1.e-5,2,this);
140  }
141 
142  if ((gROOT->GetClass("StEmcMath")) && (gROOT->GetClass("StEmcGeom"))) {
143  for(Int_t i=0; i<4; i++) {emcGeom[i] = StEmcGeom::getEmcGeom(i+1);} // 3-oct-2001 by PAI
144  }
145 
146  // vpd calibration parameters
147  St_tofTotCorr* tofTotCorr = static_cast<St_tofTotCorr*>(GetDataBase("Calibrations/tof/tofTotCorr"));
148  if(!tofTotCorr) {
149  gMessMgr->Error("unable to get tof TotCorr table parameters","OS");
150  return kStWarn;
151  }
152  tofTotCorr_st* totCorr = static_cast<tofTotCorr_st*>(tofTotCorr->GetArray());
153 
154  for(Int_t i=0;i<mNVPD;i++) {
155  short trayId = totCorr[i].trayId;
156  short cellId = totCorr[i].cellId;
157 
158  if(trayId==mEastVpdTrayId) mEastVpdCorr[cellId-1] = totCorr[i].corr[0];
159  if(trayId==mWestVpdTrayId) mWestVpdCorr[cellId-1] = totCorr[i].corr[0];
160  }
161 
162  return kStOK;
163 }
164 
165 //_____________________________________________________________________________
168 
169  hitsAvail = kTRUE;
170  n_prim_good = 0;
171  n_glob_good = 0;
172 
173  event = (StEvent*) GetInputDS("StEvent");
174  if (!event) {
175  gMessMgr->Error("StEventQAMaker::Make(): no event found!");
176  return kStErr;
177  }
178  Bool_t realData = event->info() && (event->info()->type() == "NONE" ||
179  event->info()->type() == "Collision");
180  if (eventCount==0) {
181  if (histsSet == StQA_Undef) {
182  if (realData) {
183  histsSet = StQA_AuAuOld;
184  } else {
185  // process Monte Carlo events
186  histsSet = StQA_MC;
187  }
188  }
189  BookHistTrigger();
190  }
191  uint64_t tword = 0;
192  Bool_t doEvent = kTRUE;
193  Int_t evClasses[32];
194  memset(evClasses,0,32*sizeof(Int_t));
195  Int_t nEvClasses = 1;
196  StTriggerData* trg = event->triggerData();
197  evtTime = (trg ?
198  ((double) (trg->bunchCounter())) / ((double) (St_starClockOnlC::instance()->Frequency())) :
199  -1);
200  Int_t run_num = event->runId();
201  // Determine run year from run # (Oct. 1 goes to next year)
202  // e.g run 8350999 is run year 9, as is run 9071999
203  Int_t run_year = (run_num+727000)/1000000;
204  if (allTrigs) {
205 
206  histsSet = StQA_pp;
207 
208  } else if (run_year <= 3) {
209 
210  // Old way of determining the trigger (from L0 trigger word)
211  StTrigger* l0Trig = event->l0Trigger();
212  if ((l0Trig) && (run_year != 1)) { // Don't use year 1 trigger word
213  if (realData) doEvent = kFALSE;
214  tword = l0Trig->triggerWord();
215  if (tword) {
216  if ((tword >= 0x1000) && (tword < 0x1100)) {
217  mTrigWord->Fill(1.); // "MinBias"
218  doEvent = kTRUE;
219  } else if ((tword >= 0x1100) && (tword < 0x1200)) {
220  mTrigWord->Fill(2.); // "Central"
221  doEvent = kTRUE;
222  } else if ((tword >= 0x1200) && (tword < 0x2000)) {
223  mTrigWord->Fill(3.); // "Other Physics"
224  doEvent = kTRUE;
225  } else if ((tword >= 0x2000) && (tword < 0x3000)) {
226  mTrigWord->Fill(4.); // "pp Physics"
227  doEvent = kTRUE;
228  if ((eventCount==0) && (histsSet==StQA_AuAuOld)) histsSet = StQA_pp;
229  } else if (tword == 0xF200) {
230  mTrigWord->Fill(7.); // "Laser"
231  } else {
232  mTrigWord->Fill(8.); // "Other"
233  }
234  } else { // tword
235  if (realData)
236  gMessMgr->Warning("StEventQAMaker::Make(): trigger word=0 !!!!!");
237  } // tword
238  } else { // No trigger info or year 1 data!
239  gMessMgr->Warning("StEventQAMaker::Make(): No trigger info...processing anyhow");
240  }
241 
242  } else { // run_year >= 4
243 
244 
245  StTriggerIdCollection* trigIdColl = event->triggerIdCollection();
246  const StTriggerId* trigId = ((trigIdColl) ? trigIdColl->nominal() : 0);
247  if (trigId) {
248  histsSet = StQA_Undef;
249  if (run_num < 4363000) histsSet = StQA_dAu;
250  else if (run_num < 5120000) histsSet = StQA_AuAu;
251  else if (run_num < 5999999) histsSet = StQA_pp;
252  if (realData) doEvent = kFALSE;
253  nEvClasses=0;
254  tword = trigId->mask();
255 
256  // Defining a new standard convention as of Run 12 pp500 (day 77)
257  // 000-099 => MB-like triggers
258  // 100-199 => CL-like triggers
259  // 200-399 => HT-like triggers
260  // 400-599 => JP-like triggers
261  // 600-999 => Other physics triggers
262  // Documentation: http://drupal.star.bnl.gov/STAR/comp/qa/offline/currentqadocs/offline-qa-histogram-trigger-types
263  Bool_t CONVENTION2012 = (run_num > 13077000);
264 
265  // dAu
266 
267  if (isTriggerAmong(trigId,4,2001,2002,2003,2004)) {
268  mTrigWord->Fill(1.); // "MinBias"
269  doEvent = kTRUE;
270  evClasses[nEvClasses] = 1;
271  nEvClasses++;
272  histsSet = StQA_dAu;
273  }
274  if (isTriggerAmong(trigId,2,2201,2202)) {
275  mTrigWord->Fill(3.); // "High pt"
276  doEvent = kTRUE;
277  evClasses[nEvClasses] = 2;
278  nEvClasses++;
279  histsSet = StQA_dAu;
280  }
281  if ((nEvClasses==0) && (isTriggerInRange(trigId,2000,2999))) {
282  mTrigWord->Fill(8.); // "Other"
283  evClasses[nEvClasses] = 3;
284  nEvClasses++;
285  histsSet = StQA_dAu;
286  }
287 
288  // pp
289 
290  if ((nEvClasses==0) && (isTriggerInRange(trigId,1000,1999))) {
291  mTrigWord->Fill(1.); // "pp Physics" => Minbias trig word
292  doEvent = kTRUE;
293  evClasses[nEvClasses] = 1;
294  nEvClasses++;
295  histsSet = StQA_pp;
296  }
297 
298  // AuAu or generic
299 
300  if (isTriggerInSubRange(trigId,0,99) ||
301  ((!CONVENTION2012) && run_year >= 12 && isTriggerInSubRange(trigId,100,199))) {
302  mTrigWord->Fill(1.); // "MinBias"
303  doEvent = kTRUE;
304  evClasses[nEvClasses] = 1;
305  nEvClasses++;
306  histsSet = StQA_AuAu;
307  }
308  if (isTriggerInSubRange(trigId,100,199) && (CONVENTION2012 || run_year < 12)) {
309  mTrigWord->Fill(2.); // "Central"
310  doEvent = kTRUE;
311  evClasses[nEvClasses] = 2;
312  nEvClasses++;
313  histsSet = StQA_AuAu;
314  }
315  if (isTriggerInSubRange(trigId,200,299) ||
316  ((!CONVENTION2012) && run_year >= 9 && isTriggerInSubRange(trigId,500,599)) ||
317  (CONVENTION2012 && isTriggerInSubRange(trigId,300,399))) {
318  mTrigWord->Fill(5.); // "High Tower"
319  doEvent = kTRUE;
320  evClasses[nEvClasses] = 3;
321  nEvClasses++;
322  histsSet = StQA_AuAu;
323  }
324  if (isTriggerInSubRange(trigId,600,999)) {
325  mTrigWord->Fill(6.); // "Other Physics"
326  if (run_year >= 9) doEvent = kTRUE;
327  evClasses[nEvClasses] = 4;
328  nEvClasses++;
329  histsSet = StQA_AuAu;
330  }
331  if ((run_year >= 10 && isTriggerInSubRange(trigId,400,499)) ||
332  (CONVENTION2012 && isTriggerInSubRange(trigId,500,599))) {
333  mTrigWord->Fill(4.); // "Jet patch"
334  doEvent = kTRUE;
335  evClasses[nEvClasses] = 5;
336  nEvClasses++;
337  histsSet = StQA_AuAu;
338  }
339 
340  } else { // No trigger info!
341  gMessMgr->Warning("StEventQAMaker::Make(): No trigger info");
342  }
343  } // allTrigs
344 
345  // some identified StQAHistSetType values
346  if (run_year >=23) {
347  if (realData) histsSet = StQA_run22; // for now, everything from run22 on uses this set
348  } else if (run_year >=20) {
349  if (realData) histsSet = StQA_run19; // for now, everything from run19 on uses this set
350  } else if (run_year >=19) {
351  if (realData) histsSet = StQA_run18; // for now, everything from run18 on uses this set
352  } else if (run_year >=18) {
353  if (realData) histsSet = StQA_run17; // for now, everything from run17 on uses this set
354  } else if (run_year >=16) {
355  if (realData) histsSet = StQA_run15; // for now, everything from run15 on uses this set
356  } else if (run_year >=15) {
357  if (realData) histsSet = StQA_run14; // for now, everything from run14 on uses this set
358  } else if (run_year >=14) {
359  if (realData) histsSet = StQA_run13; // for now, everything from run13 on uses this set
360  } else if (run_year >=13) {
361  if (realData) histsSet = StQA_run12; // for now, everything from run12 on uses this set
362  } else if (run_year >=9) {
363  if (realData) histsSet = StQA_run8; // for now, everything from run8 on uses this set
364  } else silHists = kTRUE;
365  if (run_year < 13) ftpHists = kTRUE; // Removed for run12 on
366 
367 
368  if (!doEvent) {
369  gMessMgr->Message() << "StEventQAMaker::Make(): "
370  << "skipping because trigger word=" << tword << endm;
371  return kStOk;
372  }
373 
374  StDetectorDbTriggerID* dbTriggerId = StDetectorDbTriggerID::instance();
375  for (unsigned int iTrg=0; iTrg < (dbTriggerId ? dbTriggerId->getIDNumRows() : 0); iTrg++) {
376  UInt_t daqid = dbTriggerId->getDaqTrgId(iTrg);
377  if (tword>>(daqid) & 1U)
378  mTrigBits->Fill((Float_t) daqid);
379  // getName() via L0 doesn't work in year 2000 (run_year=1)
380  if (run_year > 1 && strlen(mTrigBits->GetXaxis()->GetBinLabel(daqid+1))<2)
381  mTrigBits->GetXaxis()->SetBinLabel(daqid+1,dbTriggerId->getName(iTrg));
382  }
383 
384  if (!mNullPrimVtx) BookHist();
385 
386  multiplicity = event->trackNodes().size();
387  if (allTrigs) {
388  evClasses[0] = 1;
389  } else {
390  switch (histsSet) {
391  case (StQA_AuAuOld): {
392  if (multiplicity < 50) evClasses[0] = 0;
393  else if (multiplicity < 500) evClasses[0] = 1;
394  else if (multiplicity < 2500) evClasses[0] = 2;
395  else evClasses[0] = 3;
396  break;
397  }
398  // other identified StQAHistSetType values
399  case (StQA_run8) :
400  case (StQA_run12):
401  case (StQA_run13):
402  case (StQA_run14):
403  case (StQA_run15):
404  case (StQA_run17):
405  case (StQA_run18):
406  case (StQA_run19):
407  case (StQA_run22):
408  case (StQA_AuAu) :
409  case (StQA_dAu) : break;
410  default: nEvClasses=1; evClasses[0] = 1;
411  }
412  }
413 
414  int makeStat = kStOk;
415 
416  // only process if a primary vertex exists
417  // and appears not to be pileup!!!
418  primVtx = event->primaryVertex();
419  if (printTpcHits) {
420  // mode for printing TPC hits ignores vertices
421  fillHists = kTRUE;
422  vertExists = -1;
423  } else
424  if (primVtx) {
425  Float_t min_rank = -1e6;
426  switch (primVtx->vertexFinderId()) {
427  case minuitVertexFinder : min_rank = -5; break;
428  case ppvVertexFinder :
429  case ppvNoCtbVertexFinder : min_rank = 0; break;
430  default : break;
431  }
432  if (primVtx->ranking() >= min_rank &&
433  ((float) (primVtx->numMatchesWithBEMC() +
434  primVtx->numMatchesWithEEMC() +
435  primVtx->numMatchesWithBTOF() +
436  primVtx->numTracksCrossingCentralMembrane())) >
437  ((float) (primVtx->numberOfDaughters())) * 0.199) {
438  // loose criteria for non-pileup passed
439  vertExists = 1.;
440  } else {
441  LOG_WARN << "questionable primary vertex found" << endm;
442  vertExists = 0.;
443  }
444  fillHists = kTRUE;
445  } else {
446  vertExists = -1.;
447  fillHists = kFALSE;
448  LOG_WARN << "no primary vertex found!" << endm;
449  }
450  mNullPrimVtx->Fill(vertExists);
451 
452  for (eventClassIdx=0; eventClassIdx<nEvClasses; eventClassIdx++) {
453  eventClass = evClasses[eventClassIdx];
454  makeStat = StQAMakerBase::Make();
455  if ((evClasses[eventClassIdx]) && (histsSet != StQA_MC) && (hists))
456  hists->mNullPrimVtxClass->Fill(vertExists);
457  if (makeStat != kStOk) break;
458  }
459  qaEvents++;
460  return (makeStat == kStOk ? StMaker::Make() : makeStat);
461 }
462 
463 
464 //-----------------------------------------------------------------
465 void StEventQAMaker::MakeHistGlob() {
466 
467  if (Debug())
468  gMessMgr->Info(" *** in StEventQAMaker - filling global track histograms ");
469 
470  if (!allTrigs && vertExists <= 0) return;
471 
472  StSPtrVecTrackNode &theNodes = event->trackNodes();
473  StThreeVectorF pvert;
474  if (primVtx) pvert = primVtx->position();
475 
476  Int_t cnttrk=0;
477  Int_t cnttrkT=0;
478  Int_t cnttrkTS=0;
479  Int_t cnttrkg=0;
480  Int_t cnttrkgT=0;
481  Int_t cnttrkgTS=0;
482  Int_t cnttrkgTTS=0;
483  Int_t cnttrkgFE=0;
484  Int_t cnttrkgFW=0;
485 
486  for (UInt_t i=0; i<theNodes.size(); i++) {
487  StTrackType estOrGlobal = estGlobal;
488  StTrack *globtrk = theNodes[i]->track(estOrGlobal);
489  if (!globtrk) {
490  estOrGlobal = global;
491  globtrk = theNodes[i]->track(estOrGlobal);
492  if (!globtrk) continue;
493  }
494  cnttrk += theNodes[i]->entries(estOrGlobal);
495  hists->m_globtrk_iflag->Fill(globtrk->flag());
496  const StTrackTopologyMap& map=globtrk->topologyMap();
497  if (map.trackTpcOnly()) cnttrkT++;
498  if (map.trackTpcSvt()) cnttrkTS++;
499  if (globtrk->flag() <= 0) continue;
500 
501  StTrackDetectorInfo* detInfo = globtrk->detectorInfo();
502  if ((map.hasHitInDetector(kTpcId) || map.hasHitInDetector(kiTpcId))
503  && PCThits(detInfo)) continue;
504 
505  StTrackGeometry* geom = globtrk->geometry();
506  StDcaGeometry* dcageom = ((StGlobalTrack*) globtrk)->dcaGeometry();
507  StTrackFitTraits& fTraits = globtrk->fitTraits();
508 
509  n_glob_good++;
510  cnttrkg++;
511  Float_t pT = -999.;
512  pT = geom->momentum().perp();
513  if (pT <= 1.e-10) continue;
514  Float_t lmevpt = TMath::Log10(1e-30+pT*1000.0);
515  Float_t theta = TMath::ASin(1.) - geom->dipAngle();
516  Float_t thetad = theta/degree;
517  Float_t eta = geom->momentum().pseudoRapidity();
518  Float_t gmom = abs(geom->momentum());
519  Float_t lmevmom = TMath::Log10(1e-30+gmom*1000.0);
520  Float_t chisq0 = fTraits.chi2(0);
521  Float_t chisq1 = fTraits.chi2(1);
522  Float_t nfitnmax = (Float_t(fTraits.numberOfFitPoints())) /
523  (Float_t(globtrk->numberOfPossiblePoints())+1.e-10);
524  const StThreeVectorF& firstPoint = detInfo->firstPoint();
525  const StThreeVectorF& lastPoint = detInfo->lastPoint();
526  const StThreeVectorF& origin = geom->origin();
527  Float_t psi = geom->psi()/degree;
528  if (psi<0) psi+=360;
529  Float_t orphi = origin.phi()/degree;
530  if (orphi<0) orphi+=360;
531  Float_t fphi = firstPoint.phi()/degree;
532  if (fphi<0) fphi+=360;
533  StPhysicalHelixD hx = geom->helix();
534  StPhysicalHelixD dcahx = (dcageom ? dcageom->helix() : hx);
535  // get the helix position closest to the first point on track
536  double sFirst = hx.pathLength(firstPoint);
537  // get the helix position closest to the last point on track
538  double sLast = hx.pathLength(lastPoint);
539 
540  StThreeVectorF dif = firstPoint - hx.at(sFirst);
541  StThreeVectorF difl = lastPoint - hx.at(sLast);
542  Float_t xcenter = hx.xcenter();
543  Float_t ycenter = hx.ycenter();
544  Float_t rcircle = 1./hx.curvature();
545  Float_t centerOfCircleToFP = ::sqrt(::pow(xcenter-firstPoint.x(),2) +
546  ::pow(ycenter-firstPoint.y(),2));
547  Float_t centerOfCircleToLP = ::sqrt(::pow(xcenter-lastPoint.x(),2) +
548  ::pow(ycenter-lastPoint.y(),2));
549  Float_t azimdif = dif.perp();
550  if (rcircle<centerOfCircleToFP) azimdif *= -1.;
551  Float_t azimdifl = difl.perp();
552  if (rcircle<centerOfCircleToLP) azimdifl *= -1.;
553  Float_t radf = firstPoint.perp();
554 
555  Float_t logImpact = TMath::Log10(1e-30+globtrk->impactParameter());
556 
557  Float_t sImpact = (primVtx ? dcahx.geometricSignedDistance(pvert.x(),pvert.y()) : -999);
558  Float_t logCurvature = TMath::Log10(1e-30+geom->curvature());
559 
560  // pathLength(double x,double y) should return path length at
561  // DCA in the xy-plane to a given point
562  double S = dcahx.pathLength(0,0);
563  StThreeVectorD dcaToBeam = dcahx.at(S);
564 
565  // from Lanny on 2 Jul 1999 9:56:03
566  //1. x0,y0,z0 are coordinates on the helix at the starting point, which
567  // should be close to the first TPC hit position assigned to the track.
568  // The latter, different quantity is in x_first[3].
569 
570  // from Helen on 14 Jul 1999 - she now fills chisq0,1 with chisq/dof
571  // so it doesn't need to be calculated here
572 
573  // check if the track has hits in a detector -CPL
574  for (int detId=0; detId<kMaxDetectorId; detId++)
575  if (map.hasHitInDetector(static_cast<StDetectorId>(detId)))
576  hists->m_det_id->Fill(detId);
577 
578  // these histogram additions are for Lanny's evr QA histograms
579  hists->m_dcaToBeamXY->Fill(dcaToBeam.x(),dcaToBeam.y());
580  hists->m_dcaToBeamZ1->Fill(dcaToBeam.z());
581  hists->m_dcaToBeamZ2->Fill(dcaToBeam.z());
582  hists->m_dcaToBeamZ3->Fill(dcaToBeam.z());
583  if (map.trackTpcOnly()) {
584  hists->m_zDcaTanl->Fill(dcaToBeam.z(),TMath::Tan(geom->dipAngle()));
585  hists->m_zDcaZf->Fill(dcaToBeam.z(),firstPoint.z());
586  }
587  if (map.trackTpcSvt())
588  hists->m_zDcaTanl->Fill(dcaToBeam.z(),TMath::Tan(geom->dipAngle()));
589  if (map.trackTpcSvt() && radf>40)
590  hists->m_zDcaZf->Fill(dcaToBeam.z(),firstPoint.z());
591  hists->m_zDcaPsi->Fill(dcaToBeam.z(),psi);
592  hists->m_zDcaPhi0->Fill(dcaToBeam.z(),orphi);
593 
594  // calculate the probability of a fit being correct
595  // number of degrees of freedom = fitpoints-5 (5 params constrain track)
596  Double_t ndf = 2*fTraits.numberOfFitPoints()-5;
597  Double_t probability = TMath::Prob(chisq0*ndf,(int) ndf);
598  hists->m_globtrk_fit_prob->Fill(probability);
599 
600  // now fill all TPC histograms ------------------------------------------------
601  if (map.trackTpcOnly()) {
602 
603  cnttrkgT++;
604  cnttrkgTTS++;
605  // these are TPC only
606  // m_glb_f0 uses hist class StMultiH1F
607  hists->m_glb_f0->Fill(dif.x(),0.);
608  hists->m_glb_f0->Fill(dif.y(),1.);
609  hists->m_glb_f0->Fill(dif.z(),2.);
610 
611  hists->m_glb_xf0->Fill(dif.x());
612  hists->m_glb_yf0->Fill(dif.y());
613  hists->m_glb_zf0->Fill(dif.z());
614  hists->m_glb_rzf0->Fill(azimdif,0.);
615  hists->m_glb_rzf0->Fill(dif.z(),1.);
616  hists->m_glb_rzl0->Fill(azimdifl,0.);
617  hists->m_glb_rzl0->Fill(difl.z(),1.);
618 
619  if (TMath::Abs(dcaToBeam.z()-pvert.z())<6) {
620  // Fill impact parameters only for tracks near vtx in z
621  // to reduce pile-up contributions
622 
623  hists->m_glb_impactT->Fill(logImpact,2.);
624  hists->m_glb_simpactT->Fill(sImpact,2.);
625  if (!eventClassIdx) m_glb_simpactTime->Fill(evtTime,sImpact);
626  if ((firstPoint.z() < 0) && (lastPoint.z() < 0)) { // east-only
627  hists->m_glb_impactT->Fill(logImpact,0.);
628  hists->m_glb_simpactT->Fill(sImpact,0.);
629  }
630  if ((firstPoint.z() > 0) && (lastPoint.z() > 0)) { // west-only
631  hists->m_glb_impactT->Fill(logImpact,1.);
632  hists->m_glb_simpactT->Fill(sImpact,1.);
633  }
634  hists->m_glb_impactrT->Fill(globtrk->impactParameter());
635  if (silHists) {
636  hists->m_glb_impactTTS->Fill(logImpact,1.);
637  hists->m_glb_impactrTTS->Fill(globtrk->impactParameter(),1.);
638  }
639 
640  } // vtx z cut for impact parameter
641 
642  // TPC padrow histogram
643  Int_t minpadrow = 0;
644  if (hitsAvail) {
645  minpadrow = 999;
646  StPtrVecHit tpc_hits = detInfo->hits(kTpcId);
647  for (UInt_t k=0;k<tpc_hits.size();k++) {
648  StTpcHit* hit = (StTpcHit*) (tpc_hits[k]);
649  if ((Int_t) hit->padrow() < minpadrow) minpadrow = (Int_t) hit->padrow();
650  }
651  } else {
652  if (histsSet>=StQA_run19) {
653  while (minpadrow < 72) {
654  minpadrow++;
655  if ((minpadrow <= 40 && map.hasHitInRow(kiTpcId,minpadrow)) ||
656  (minpadrow > 40 && map.hasHitInRow(kTpcId,minpadrow-27)))
657  break;
658  }
659  } else {
660  // won't work for sector 20 in Run 18 if iTPC tracking is on!
661  while (minpadrow < 45) {
662  minpadrow++;
663  if (map.hasHitInRow(kTpcId,minpadrow)) break;
664  }
665  }
666  }
667  hists->m_glb_padfT->Fill(minpadrow);
668 
669  hists->m_pointT->Fill(detInfo->numberOfPoints());
670  hists->m_max_pointT->Fill(globtrk->numberOfPossiblePoints());
671  hists->m_fit_pointT->Fill(fTraits.numberOfFitPoints());
672  if (silHists)
673  hists->m_fit_pointTTS->Fill(fTraits.numberOfFitPoints(),1.);
674  hists->m_glb_chargeT->Fill(geom->charge());
675 
676  hists->m_glb_r0T->Fill(origin.perp());
677  hists->m_glb_phi0T->Fill(orphi);
678 
679  if (firstPoint.z() < 0) {
680  hists->m_glb_padfTEW->Fill(minpadrow,0.);
681  hists->m_glb_phifT->Fill(fphi,0.);
682  }
683  else if (firstPoint.z() > 0) {
684  hists->m_glb_padfTEW->Fill(minpadrow,1.);
685  hists->m_glb_phifT->Fill(fphi,1.);
686  }
687 
688  hists->m_glb_z0T->Fill(origin.z());
689  hists->m_glb_curvT->Fill(logCurvature);
690 
691  hists->m_glb_xfT->Fill(firstPoint.x());
692  hists->m_glb_yfT->Fill(firstPoint.y());
693  hists->m_glb_zfT->Fill(firstPoint.z());
694  hists->m_glb_radfT->Fill(radf);
695  hists->m_glb_ratiomT->Fill(nfitnmax);
696  if (silHists)
697  hists->m_glb_ratiomTTS->Fill(nfitnmax,1.);
698  hists->m_psiT->Fill(psi);
699  if (silHists)
700  hists->m_psiTTS->Fill(psi,1.);
701  hists->m_tanlT->Fill(TMath::Tan(geom->dipAngle()));
702  hists->m_glb_thetaT->Fill(thetad);
703  hists->m_etaT->Fill(eta);
704  if (silHists)
705  hists->m_etaTTS->Fill(eta,1.);
706  hists->m_pTT->Fill(pT);
707  if (silHists)
708  hists->m_pTTTS->Fill(lmevpt,1.);
709  hists->m_momT->Fill(gmom);
710  hists->m_lengthT->Fill(globtrk->length());
711  hists->m_chisq0T->Fill(chisq0);
712  if (silHists)
713  hists->m_chisq0TTS->Fill(chisq0,1.);
714 
715  if (firstPoint.z()<0)
716  hists->m_globtrk_xf_yfTE->Fill(firstPoint.x(),
717  firstPoint.y());
718  else
719  hists->m_globtrk_xf_yfTW->Fill(firstPoint.x(),
720  firstPoint.y());
721  hists->m_eta_trklengthT->Fill(eta,globtrk->length());
722  hists->m_npoint_lengthT->Fill(globtrk->length(),
723  Float_t(detInfo->numberOfPoints()));
724  hists->m_fpoint_lengthT->Fill(globtrk->length(),
725  Float_t(fTraits.numberOfFitPoints()));
726  if (silHists)
727  hists->m_fpoint_lengthTTS->Fill(globtrk->length(),
728  Float_t(fTraits.numberOfFitPoints()));
729 
730  hists->m_pT_eta_recT->Fill(eta,lmevpt);
731  if (primVtx && fabs(rcircle)>0.) {
732  double qwe = ::pow(firstPoint.x()-pvert.x(),2)
733  + ::pow(firstPoint.y()-pvert.y(),2);
734  qwe = ::sqrt(qwe)/(2*rcircle);
735  if (qwe>0.9999) qwe = 0.999;
736  Float_t denom = 2*rcircle*(::asin(qwe));
737  if (denom>0)hists->m_tanl_zfT->Fill((firstPoint.z()-pvert.z())/denom,
738  Float_t(TMath::Tan(geom->dipAngle())));
739  }
740  hists->m_mom_trklengthT->Fill(globtrk->length(),lmevmom);
741  hists->m_chisq0_momT->Fill(lmevmom,chisq0);
742  hists->m_chisq0_etaT->Fill(eta,chisq0);
743  hists->m_chisq0_dipT->Fill(TMath::Tan(geom->dipAngle()),chisq0);
744  hists->m_chisq0_zfT->Fill(firstPoint.z(),chisq0);
745  hists->m_chisq0_phiT->Fill(orphi,chisq0);
746  hists->m_psi_phiT->Fill(orphi,psi);
747  }
748 
749  // now fill all TPC+(SVT or SSD) histograms ------------------------------
750 
751  else if (silHists && (map.hasHitInDetector(kSvtId) || map.hasHitInDetector(kSsdId))) {
752 
753  if (map.hasHitInDetector(kSsdId)) {
754  if (primVtx && TMath::Abs(pvert.z())<10 && TMath::Abs(eta)<1 &&
755  map.numberOfHits(kTpcId)>15) {
756  StPtrVecHit ssd_hits = detInfo->hits(kSsdId);
757  if (ssd_hits.size()) {
758  Float_t sphi = ssd_hits[0]->position().phi()/degree;
759  if (sphi<0) sphi+=360.;
760  hists->m_glb_ssd_phi->Fill(sphi);
761  }
762  }
763  } // SSD Requirement
764 
765  if (map.trackTpcSvt()) {
766  // now fill all TPC+SVT histograms -------------------------------------
767 
768  cnttrkgTS++;
769  cnttrkgTTS++;
770 
771  hists->m_glb_sptsTS->Fill(map.numberOfHits(kSvtId));
772 
773  hists->m_glb_f0TS->Fill(dif.x(),0.);
774  hists->m_glb_f0TS->Fill(dif.y(),1.);
775  hists->m_glb_f0TS->Fill(dif.z(),2.);
776 
777  hists->m_glb_xf0TS->Fill(dif.x());
778  hists->m_glb_yf0TS->Fill(dif.y());
779  hists->m_glb_zf0TS->Fill(dif.z());
780  hists->m_glb_rzf0TS->Fill(azimdif,0.);
781  hists->m_glb_rzf0TS->Fill(dif.z(),1.);
782  hists->m_glb_rzl0TS->Fill(azimdifl,0.);
783  hists->m_glb_rzl0TS->Fill(difl.z(),1.);
784  hists->m_glb_impactTS->Fill(logImpact,2.);
785  hists->m_glb_simpactTS->Fill(sImpact,2.);
786  if ((firstPoint.z() < 0) && (lastPoint.z() < 0)) { // east-only
787  hists->m_glb_impactTS->Fill(logImpact,0.);
788  hists->m_glb_simpactTS->Fill(sImpact,0.);
789  }
790  if ((firstPoint.z() > 0) && (lastPoint.z() > 0)) { // west-only
791  hists->m_glb_impactTS->Fill(logImpact,1.);
792  hists->m_glb_simpactTS->Fill(sImpact,1.);
793  }
794  hists->m_glb_impactrTS->Fill(globtrk->impactParameter());
795  hists->m_glb_impactTTS->Fill(logImpact,0.);
796  hists->m_glb_impactrTTS->Fill(globtrk->impactParameter(),0.);
797 
798  hists->m_pointTS->Fill(detInfo->numberOfPoints());
799  hists->m_max_pointTS->Fill(globtrk->numberOfPossiblePoints());
800  hists->m_fit_pointTS->Fill(fTraits.numberOfFitPoints());
801  hists->m_fit_pointTTS->Fill(fTraits.numberOfFitPoints(),0.);
802  hists->m_glb_chargeTS->Fill(geom->charge());
803 
804  hists->m_glb_r0TS->Fill(origin.perp());
805  hists->m_glb_phi0TS->Fill(orphi);
806  hists->m_glb_z0TS->Fill(origin.z());
807  hists->m_glb_curvTS->Fill(logCurvature);
808 
809  hists->m_glb_xfTS->Fill(firstPoint.x());
810  hists->m_glb_yfTS->Fill(firstPoint.y());
811  if (radf<40) {
812  hists->m_glb_zfTS->Fill(firstPoint.z());
813  hists->m_glb_phifTS->Fill(fphi);
814  }
815 
816  hists->m_glb_radfTS->Fill(radf);
817  hists->m_glb_ratiomTS->Fill(nfitnmax);
818  hists->m_glb_ratiomTTS->Fill(nfitnmax,0.);
819  hists->m_psiTS->Fill(psi);
820  hists->m_psiTTS->Fill(psi,0.);
821  hists->m_tanlTS->Fill(TMath::Tan(geom->dipAngle()));
822  hists->m_glb_thetaTS->Fill(thetad);
823  hists->m_etaTS->Fill(eta);
824  hists->m_etaTTS->Fill(eta,0.);
825  hists->m_pTTS->Fill(pT);
826  hists->m_pTTTS->Fill(lmevpt,0.);
827  hists->m_momTS->Fill(gmom);
828  hists->m_lengthTS->Fill(globtrk->length());
829  hists->m_chisq0TS->Fill(chisq0);
830  hists->m_chisq0TTS->Fill(chisq0,0.);
831  hists->m_globtrk_xf_yfTS->Fill(firstPoint.x(),
832  firstPoint.y());
833  hists->m_eta_trklengthTS->Fill(eta,globtrk->length());
834  hists->m_npoint_lengthTS->Fill(globtrk->length(),
835  Float_t(detInfo->numberOfPoints()));
836  hists->m_fpoint_lengthTS->Fill(globtrk->length(),
837  Float_t(fTraits.numberOfFitPoints()));
838  hists->m_fpoint_lengthTTS->Fill(globtrk->length(),
839  Float_t(fTraits.numberOfFitPoints()));
840 
841  hists->m_pT_eta_recTS->Fill(eta,lmevpt);
842  if (primVtx) {
843  double qwe = ::pow(firstPoint.x()-pvert.x(),2)
844  + ::pow(firstPoint.y()-pvert.y(),2);
845  qwe = ::sqrt(qwe)/(2*rcircle);
846  if (qwe>0.9999) qwe = 0.999;
847  Float_t denom = 2*rcircle*(::asin(qwe));
848  if (radf>40 && denom>0) {
849  hists->m_tanl_zfT->Fill((firstPoint.z()-pvert.z())/denom,
850  Float_t(TMath::Tan(geom->dipAngle())));
851  }
852  if (radf<40 && denom>0) {
853  hists->m_tanl_zfTS->Fill((firstPoint.z()-pvert.z())/denom,
854  Float_t(TMath::Tan(geom->dipAngle())));
855  }
856  }
857  hists->m_mom_trklengthTS->Fill(globtrk->length(),lmevmom);
858  hists->m_chisq0_momTS->Fill(lmevmom,chisq0);
859  hists->m_chisq0_etaTS->Fill(eta,chisq0);
860  hists->m_chisq0_dipTS->Fill(TMath::Tan(geom->dipAngle()),chisq0);
861  hists->m_chisq0_zfTS->Fill(firstPoint.z(),chisq0);
862  hists->m_chisq0_phiTS->Fill(orphi,chisq0);
863 
864  hists->m_psi_phiTS->Fill(orphi,psi);
865  } // SVT requirement
866  } // SVT || SSD requirement
867 
868  // now fill all FTPC East histograms ------------------------------------------
869  else if (ftpHists && map.trackFtpcEast()) {
870 
871  cnttrkgFE++;
872 
873  // east and west in same histogram
874  hists->m_pointF->Fill(detInfo->numberOfPoints(),0.);
875  hists->m_max_pointF->Fill(globtrk->numberOfPossiblePoints(),0.);
876  hists->m_glb_chargeF->Fill(geom->charge(),0.);
877  hists->m_glb_xfF->Fill(firstPoint.x(),0.);
878  hists->m_glb_yfF->Fill(firstPoint.y(),0.);
879  hists->m_glb_zfF->Fill(firstPoint.z(),0.);
880  hists->m_glb_radfF->Fill(radf,0.);
881  hists->m_glb_ratiomF->Fill(nfitnmax,0.);
882  hists->m_psiF->Fill(psi,0.);
883  hists->m_etaF->Fill(fabs(eta),0.);
884  hists->m_pTF->Fill(pT,0.);
885  hists->m_momF->Fill(gmom,0.);
886  hists->m_lengthF->Fill(globtrk->length(),0.);
887  hists->m_chisq0F->Fill(chisq0,0.);
888  hists->m_chisq1F->Fill(chisq1,0.);
889  hists->m_glb_impactF->Fill(logImpact,0.);
890  hists->m_glb_impactrF->Fill(globtrk->impactParameter(),0.);
891 
892  if (fabs(firstPoint.z()-ftpcPadrowZPos[10])<=1)
893  hists->m_glb_planefF->Fill(11,0.);
894  if (fabs(firstPoint.z()-ftpcPadrowZPos[11])<=1)
895  hists->m_glb_planefF->Fill(12,0.);
896  if (fabs(firstPoint.z()-ftpcPadrowZPos[12])<=1)
897  hists->m_glb_planefF->Fill(13,0.);
898  if (fabs(firstPoint.z()-ftpcPadrowZPos[13])<=1)
899  hists->m_glb_planefF->Fill(14,0.);
900  if (fabs(firstPoint.z()-ftpcPadrowZPos[14])<=1)
901  hists->m_glb_planefF->Fill(15,0.);
902  if (fabs(firstPoint.z()-ftpcPadrowZPos[15])<=1)
903  hists->m_glb_planefF->Fill(16,0.);
904  if (fabs(firstPoint.z()-ftpcPadrowZPos[16])<=1)
905  hists->m_glb_planefF->Fill(17,0.);
906  if (fabs(firstPoint.z()-ftpcPadrowZPos[17])<=1)
907  hists->m_glb_planefF->Fill(18,0.);
908  if (fabs(firstPoint.z()-ftpcPadrowZPos[18])<=1)
909  hists->m_glb_planefF->Fill(19,0.);
910  if (fabs(firstPoint.z()-ftpcPadrowZPos[19])<=1)
911  hists->m_glb_planefF->Fill(20,0.);
912 
913  // east and west in separate histograms
914  hists->m_pointFE->Fill(detInfo->numberOfPoints());
915  hists->m_max_pointFE->Fill(globtrk->numberOfPossiblePoints());
916  hists->m_glb_chargeFE->Fill(geom->charge());
917  hists->m_glb_xfFE->Fill(firstPoint.x());
918  hists->m_glb_yfFE->Fill(firstPoint.y());
919  hists->m_glb_zfFE->Fill(firstPoint.z());
920  hists->m_glb_radfFE->Fill(radf);
921  hists->m_glb_ratiomFE->Fill(nfitnmax);
922  hists->m_psiFE->Fill(psi);
923  hists->m_etaFE->Fill(eta);
924  hists->m_pTFE->Fill(pT);
925  hists->m_momFE->Fill(gmom);
926  hists->m_lengthFE->Fill(globtrk->length());
927  hists->m_chisq0FE->Fill(chisq0);
928  hists->m_chisq1FE->Fill(chisq1);
929 
930  hists->m_pT_eta_recFE->Fill(eta,lmevpt);
931  hists->m_globtrk_xf_yfFE->Fill(firstPoint.x(),
932  firstPoint.y());
933  hists->m_eta_trklengthFE->Fill(eta,globtrk->length());
934  hists->m_npoint_lengthFE->Fill(globtrk->length(),
935  Float_t(detInfo->numberOfPoints()));
936  }
937  // now fill all FTPC West histograms ------------------------------------------
938  else if (ftpHists && map.trackFtpcWest()) {
939 
940  cnttrkgFW++;
941 
942  // east and west in same histogram
943  hists->m_pointF->Fill(detInfo->numberOfPoints(),1.);
944  hists->m_max_pointF->Fill(globtrk->numberOfPossiblePoints(),1.);
945  hists->m_glb_chargeF->Fill(geom->charge(),1.);
946  hists->m_glb_xfF->Fill(firstPoint.x(),1.);
947  hists->m_glb_yfF->Fill(firstPoint.y(),1.);
948  hists->m_glb_zfF->Fill(firstPoint.z(),1.);
949  hists->m_glb_radfF->Fill(radf,1.);
950  hists->m_glb_ratiomF->Fill(nfitnmax,1.);
951  hists->m_psiF->Fill(psi,1.);
952  hists->m_etaF->Fill(fabs(eta),1.);
953  hists->m_pTF->Fill(pT,1.);
954  hists->m_momF->Fill(gmom,1.);
955  hists->m_lengthF->Fill(globtrk->length(),1.);
956  hists->m_chisq0F->Fill(chisq0,1.);
957  hists->m_chisq1F->Fill(chisq1,1.);
958  hists->m_glb_impactF->Fill(logImpact,1.);
959  hists->m_glb_impactrF->Fill(globtrk->impactParameter(),1.);
960 
961  if (fabs(firstPoint.z()-ftpcPadrowZPos[0])<=1)
962  hists->m_glb_planefF->Fill(1,1.);
963  if (fabs(firstPoint.z()-ftpcPadrowZPos[1])<=1)
964  hists->m_glb_planefF->Fill(2,1.);
965  if (fabs(firstPoint.z()-ftpcPadrowZPos[2])<=1)
966  hists->m_glb_planefF->Fill(3,1.);
967  if (fabs(firstPoint.z()-ftpcPadrowZPos[3])<=1)
968  hists->m_glb_planefF->Fill(4,1.);
969  if (fabs(firstPoint.z()-ftpcPadrowZPos[4])<=1)
970  hists->m_glb_planefF->Fill(5,1.);
971  if (fabs(firstPoint.z()-ftpcPadrowZPos[5])<=1)
972  hists->m_glb_planefF->Fill(6,1.);
973  if (fabs(firstPoint.z()-ftpcPadrowZPos[6])<=1)
974  hists->m_glb_planefF->Fill(7,1.);
975  if (fabs(firstPoint.z()-ftpcPadrowZPos[7])<=1)
976  hists->m_glb_planefF->Fill(8,1.);
977  if (fabs(firstPoint.z()-ftpcPadrowZPos[8])<=1)
978  hists->m_glb_planefF->Fill(9,1.);
979  if (fabs(firstPoint.z()-ftpcPadrowZPos[9])<=1)
980  hists->m_glb_planefF->Fill(10,1.);
981 
982  // east and west in separate histograms
983  hists->m_pointFW->Fill(detInfo->numberOfPoints());
984  hists->m_max_pointFW->Fill(globtrk->numberOfPossiblePoints());
985  hists->m_glb_chargeFW->Fill(geom->charge());
986  hists->m_glb_xfFW->Fill(firstPoint.x());
987  hists->m_glb_yfFW->Fill(firstPoint.y());
988  hists->m_glb_zfFW->Fill(firstPoint.z());
989  hists->m_glb_radfFW->Fill(radf);
990  hists->m_glb_ratiomFW->Fill(nfitnmax);
991  hists->m_psiFW->Fill(psi);
992  hists->m_etaFW->Fill(eta);
993  hists->m_pTFW->Fill(pT);
994  hists->m_momFW->Fill(gmom);
995  hists->m_lengthFW->Fill(globtrk->length());
996  hists->m_chisq0FW->Fill(chisq0);
997  hists->m_chisq1FW->Fill(chisq1);
998 
999  hists->m_pT_eta_recFW->Fill(eta,lmevpt);
1000  hists->m_globtrk_xf_yfFW->Fill(firstPoint.x(),
1001  firstPoint.y());
1002  hists->m_eta_trklengthFW->Fill(eta,globtrk->length());
1003  hists->m_npoint_lengthFW->Fill(globtrk->length(),
1004  Float_t(detInfo->numberOfPoints()));
1005  }
1006 
1007  if (histsSet>=StQA_run14 && histsSet<StQA_run17) {
1008  // HFT Histograms
1009  hists->m_global_pxl_hit->Fill(map.numberOfHits(kPxlId)); // number of PIXEL hits per global track
1010  hists->m_global_ist_hit->Fill(map.numberOfHits(kIstId)); // number of IST hits per global track
1011  if(map.hasHitInPxlLayer(1))hists->m_global_hft_hit->Fill(1); // PXL layer=1
1012  if(map.hasHitInPxlLayer(2))hists->m_global_hft_hit->Fill(2); // PXL layer=2
1013  hists->m_global_hft_hit->Fill(3,map.numberOfHits(kIstId));
1014  hists->m_global_hft_hit->Fill(4,map.numberOfHits(kSstId));
1015  }
1016  }
1017  hists->m_globtrk_tot->Fill(cnttrk);
1018  hists->m_globtrk_good->Fill(cnttrkg);
1019  hists->m_globtrk_good_sm->Fill(cnttrkg);
1020  if (silHists)
1021  hists->m_globtrk_goodTTS->Fill(cnttrkgTTS);
1022  hists->m_globtrk_goodF->Fill(cnttrkgFE,cnttrkgFW);
1023 
1024  // Normalizations
1025  if (histsSet>=StQA_run14 && histsSet<StQA_run17) {
1026  Int_t NglobTrk = - hists->m_globtrk_fit_prob->GetEntries();
1027  hists->m_global_hft_hit->SetBinContent(0,NglobTrk);
1028  hists->m_global_pxl_hit->SetBinContent(0,NglobTrk);
1029  hists->m_global_ist_hit->SetBinContent(0,NglobTrk);
1030  hists->m_global_hft_hit->SetEntries(hists->m_global_hft_hit->GetEntries()-1);
1031  hists->m_global_pxl_hit->SetEntries(hists->m_global_pxl_hit->GetEntries()-1);
1032  hists->m_global_ist_hit->SetEntries(hists->m_global_ist_hit->GetEntries()-1);
1033  }
1034  if (hists->m_glb_ssd_phi) {
1035  Int_t Nevents = - hists->m_primtrk_tot->GetEntries();
1036  hists->m_glb_ssd_phi->SetBinContent(0,Nevents);
1037  hists->m_glb_ssd_phi->SetEntries(hists->m_glb_ssd_phi->GetEntries()-1);
1038  }
1039 }
1040 
1041 //_____________________________________________________________________________
1044 
1045 }
1046 
1047 //_____________________________________________________________________________
1048 void StEventQAMaker::MakeHistPrim() {
1049 
1050  if (Debug())
1051  gMessMgr->Info(" *** in StEventQAMaker - filling primary track histograms ");
1052 
1053  if (!allTrigs && vertExists <= 0) return;
1054 
1055  Int_t cnttrk=0;
1056  Int_t cnttrkg=0;
1057  Int_t cnttrkgT=0;
1058  Int_t cnttrkgTS=0;
1059  Int_t cnttrkgFE=0;
1060  Int_t cnttrkgFW=0;
1061  Int_t pTcnttrkgFE=0;
1062  Int_t pTcnttrkgFW=0;
1063  Float_t mean_ptT=0;
1064  Float_t mean_ptTS=0;
1065  Float_t mean_ptFE=0;
1066  Float_t mean_ptFW=0;
1067  Float_t mean_etaT=0;
1068  Float_t mean_etaTS=0;
1069  Float_t mean_etaFE=0;
1070  Float_t mean_etaFW=0;
1071 
1072  if (primVtx) {
1073  StThreeVectorF pvert = primVtx->position();
1074 
1075  cnttrk = primVtx->numberOfDaughters();
1076  hists->m_primtrk_tot->Fill(cnttrk);
1077  hists->m_primtrk_tot_sm->Fill(cnttrk);
1078 
1079  for (UInt_t i=0; i<primVtx->numberOfDaughters(); i++) {
1080  StTrack *primtrk = primVtx->daughter(i);
1081  if (!primtrk) continue;
1082 
1083  // May 11, 2005: currently, primVtx->daughter(i) returns only
1084  // track from "primary" collection. Must see if there is also
1085  // an "estPrimary" version of track.
1086  // T. Ullrich says "every estPrimary has a primary", so asking
1087  // for estPrimary from node of primary should work.
1088  StTrack* estprimtrk = primtrk->node()->track(estPrimary);
1089  if (estprimtrk) primtrk = estprimtrk;
1090  if (primtrk->bad()) continue;
1091  hists->m_primtrk_iflag->Fill(primtrk->flag());
1092 
1093  if (primtrk->flag()>0) {
1094  StTrackDetectorInfo* detInfo = primtrk->detectorInfo();
1095  const StTrackTopologyMap& map=primtrk->topologyMap();
1096  if ((map.hasHitInDetector(kTpcId) || map.hasHitInDetector(kiTpcId))
1097  && PCThits(detInfo)) continue;
1098 
1099  StTrackGeometry* geom = primtrk->geometry();
1100  // due to variation on "kalman fitting" of primary tracks
1101  // we want to look at the hit residuals using the outerGeometry()
1102  // helix parameters (parameters at last point on track)
1103  StTrackGeometry* outerGeom = primtrk->outerGeometry();
1104  StTrackFitTraits& fTraits = primtrk->fitTraits();
1105  StPhysicalHelixD hx = geom->helix();
1106  StPhysicalHelixD ohx = outerGeom->helix();
1107 
1108  StTrack *gtrack = primtrk->node()->track(estGlobal);
1109  if (!gtrack || gtrack->bad()) {
1110  gtrack = primtrk->node()->track(global);
1111  if (!gtrack || gtrack->bad()) continue;
1112  }
1113  StTrackFitTraits& gfTraits = gtrack->fitTraits();
1114  Int_t nhit_prim_fit = fTraits.numberOfFitPoints();
1115  Int_t nhit_glob_fit = gfTraits.numberOfFitPoints();
1116  hists->m_primglob_fit->Fill((Float_t)nhit_prim_fit/((Float_t)nhit_glob_fit+1.e-10));
1117 
1118  n_prim_good++;
1119  cnttrkg++;
1120  Float_t pT = -999.;
1121  pT = geom->momentum().perp();
1122  Float_t lmevpt = TMath::Log10(1e-30+pT*1000.0);
1123  Float_t theta = TMath::ASin(1.) - geom->dipAngle();
1124  Float_t thetad = theta/degree;
1125  Float_t eta = geom->momentum().pseudoRapidity();
1126  Float_t gmom = abs(geom->momentum());
1127  Float_t lmevmom = TMath::Log10(1e-30+gmom*1000.0);
1128  Float_t chisq0 = fTraits.chi2(0);
1129  Float_t chisq1 = fTraits.chi2(1);
1130  Float_t nfitnmax = (Float_t(fTraits.numberOfFitPoints())) /
1131  (Float_t(primtrk->numberOfPossiblePoints())+1.e-10);
1132  Float_t logCurvature = TMath::Log10(1e-30+geom->curvature());
1133 
1134  const StThreeVectorF& firstPoint = detInfo->firstPoint();
1135  const StThreeVectorF& lastPoint = detInfo->lastPoint();
1136  const StThreeVectorF& origin = geom->origin();
1137  Float_t psi = geom->psi()/degree;
1138  if (psi<0) psi+=360;
1139  Float_t orphi = origin.phi()/degree;
1140  if (orphi<0) orphi+=360;
1141  //const StThreeVectorF& outerOrigin = outerGeom->origin();
1142 
1143  // need to find position on helix closest to first point on track since
1144  // the primary vertex is used as the first point on helix for primary
1145  // tracks -CPL
1146  double sFirst = hx.pathLength(firstPoint);
1147  // get the helix position closest to the last point on track
1148  double sLast = hx.pathLength(lastPoint);
1149 
1150  StThreeVectorF dif = firstPoint - hx.at(sFirst);
1151  StThreeVectorF difl = lastPoint - hx.at(sLast);
1152 
1153  Float_t xcenter = hx.xcenter();
1154  Float_t ycenter = hx.ycenter();
1155  Float_t rcircle = 1./hx.curvature();
1156  Float_t centerOfCircleToFP = ::sqrt(::pow(xcenter-firstPoint.x(),2) +
1157  ::pow(ycenter-firstPoint.y(),2));
1158  Float_t centerOfCircleToLP = ::sqrt(::pow(xcenter-lastPoint.x(),2) +
1159  ::pow(ycenter-lastPoint.y(),2));
1160  Float_t azimdif = dif.perp();
1161  if (rcircle<centerOfCircleToFP) azimdif *= -1.;
1162  Float_t azimdifl = difl.perp();
1163  if (rcircle<centerOfCircleToLP) azimdifl *= -1.;
1164 
1165  // get the same information as above but from the outerGeometry()
1166  // ... this is so we can look at the hit residuals using the helix
1167  // parameters at the last point on a track
1168  double sFirstOuter = ohx.pathLength(firstPoint);
1169  double sLastOuter = ohx.pathLength(lastPoint);
1170  StThreeVectorF outerDif = firstPoint - ohx.at(sFirstOuter);
1171  StThreeVectorF outerDifl = lastPoint - ohx.at(sLastOuter);
1172  Float_t outerXcenter = ohx.xcenter();
1173  Float_t outerYcenter = ohx.ycenter();
1174  Float_t outerRcircle = 1./(ohx.curvature()+1.e-10);
1175  Float_t outerCenterOfCircleToFP = ::sqrt(::pow(outerXcenter-firstPoint.x(),2) +
1176  ::pow(outerYcenter-firstPoint.y(),2));
1177  Float_t outerCenterOfCircleToLP = ::sqrt(::pow(outerXcenter-lastPoint.x(),2) +
1178  ::pow(outerYcenter-lastPoint.y(),2));
1179  Float_t outerAzimdif = outerDif.perp();
1180  if (outerRcircle<outerCenterOfCircleToFP) outerAzimdif *= -1.;
1181  Float_t outerAzimdifl = outerDifl.perp();
1182  if (outerRcircle<outerCenterOfCircleToLP) outerAzimdifl *= -1.;
1183 
1184  Float_t radf = firstPoint.perp();
1185 
1186  // check if the track has hits in a detector -CPL
1187  for (int detId=0; detId<kMaxDetectorId; detId++)
1188  if (map.hasHitInDetector(static_cast<StDetectorId>(detId)))
1189  hists->m_pdet_id->Fill(detId);
1190 
1191  // now fill all TPC histograms ------------------------------------------------
1192  if (map.trackTpcOnly()) {
1193 
1194  cnttrkgT++;
1195  mean_ptT += geom->momentum().perp();
1196  mean_etaT += eta;
1197  // these are TPC only
1198  hists->m_prim_f0->Fill(outerDif.x(),0.);
1199  hists->m_prim_f0->Fill(outerDif.y(),1.);
1200  hists->m_prim_f0->Fill(outerDif.z(),2.);
1201 
1202  hists->m_prim_xf0->Fill(outerDif.x());
1203  hists->m_prim_yf0->Fill(outerDif.y());
1204  hists->m_prim_zf0->Fill(outerDif.z());
1205  hists->m_prim_rzf0->Fill(outerAzimdif,0.);
1206  hists->m_prim_rzf0->Fill(outerDif.z(),1.);
1207  hists->m_prim_rzl0->Fill(outerAzimdifl,0.);
1208  hists->m_prim_rzl0->Fill(outerDifl.z(),1.);
1209 
1210  // TPC gains histograms
1211  if (event->summary()) {
1212  mHitHist->clear();
1213  mHitHist->setTrack(primtrk);
1214  mHitHist->setBField(event->summary()->magneticField());
1215  mHitHist->findHits();
1216  mHitHist->fillHistograms();
1217  }
1218 
1219  // these are TPC & FTPC
1220  hists->m_ppointT->Fill(detInfo->numberOfPoints());
1221  hists->m_pmax_pointT->Fill(primtrk->numberOfPossiblePoints());
1222  hists->m_pfit_pointT->Fill(fTraits.numberOfFitPoints());
1223  hists->m_prim_chargeT->Fill(geom->charge());
1224 
1225  hists->m_prim_r0T->Fill(origin.perp());
1226  hists->m_prim_phi0T->Fill(orphi);
1227  hists->m_prim_z0T->Fill(origin.z());
1228  hists->m_prim_curvT->Fill(logCurvature);
1229 
1230  hists->m_prim_xfT->Fill(firstPoint.x());
1231  hists->m_prim_yfT->Fill(firstPoint.y());
1232  hists->m_prim_zfT->Fill(firstPoint.z());
1233  hists->m_prim_radfT->Fill(radf);
1234  hists->m_prim_ratiomT->Fill(nfitnmax);
1235  hists->m_ppsiT->Fill(psi);
1236  if (silHists)
1237  hists->m_ppsiTTS->Fill(psi,1.);
1238  hists->m_ptanlT->Fill(TMath::Tan(geom->dipAngle()));
1239  hists->m_prim_thetaT->Fill(thetad);
1240  hists->m_petaT->Fill(eta);
1241  if (silHists)
1242  hists->m_petaTTS->Fill(eta,1.);
1243  hists->m_ppTT->Fill(pT);
1244  if (silHists)
1245  hists->m_ppTTTS->Fill(pT,1.);
1246  hists->m_pmomT->Fill(gmom);
1247  hists->m_plengthT->Fill(primtrk->length());
1248  hists->m_pchisq0T->Fill(chisq0);
1249  if (silHists)
1250  hists->m_pchisq0TTS->Fill(chisq0,1.);
1251 
1252  // these are for TPC & FTPC
1253  if (firstPoint.z()<0)
1254  hists->m_primtrk_xf_yfTE->Fill(firstPoint.x(),
1255  firstPoint.y());
1256  else
1257  hists->m_primtrk_xf_yfTW->Fill(firstPoint.x(),
1258  firstPoint.y());
1259  hists->m_peta_trklengthT->Fill(eta,primtrk->length());
1260  hists->m_pnpoint_lengthT->Fill(primtrk->length(),
1261  Float_t(detInfo->numberOfPoints()));
1262  hists->m_pfpoint_lengthT->Fill(primtrk->length(),
1263  Float_t(fTraits.numberOfFitPoints()));
1264  if (silHists)
1265  hists->m_pfpoint_lengthTTS->Fill(primtrk->length(),
1266  Float_t(fTraits.numberOfFitPoints()));
1267 
1268  // these are TPC only
1269  hists->m_ppT_eta_recT->Fill(eta,lmevpt);
1270  double qwe = ::pow(firstPoint.x()-pvert.x(),2)
1271  + ::pow(firstPoint.y()-pvert.y(),2);
1272  qwe = ::sqrt(qwe)/(2*rcircle);
1273  if (qwe>0.9999) qwe = 0.999;
1274  Float_t denom = 2*rcircle*(::asin(qwe));
1275  if (denom>0)hists->m_ptanl_zfT->Fill((firstPoint.z()-pvert.z())/denom,
1276  Float_t(TMath::Tan(geom->dipAngle())));
1277  hists->m_pmom_trklengthT->Fill(primtrk->length(),lmevmom);
1278  hists->m_pchisq0_momT->Fill(lmevmom,chisq0);
1279  hists->m_pchisq0_etaT->Fill(eta,chisq0);
1280  hists->m_pchisq0_dipT->Fill(TMath::Tan(geom->dipAngle()),chisq0);
1281  hists->m_pchisq0_zfT->Fill(firstPoint.z(),chisq0);
1282  hists->m_ppsi_phiT->Fill(orphi,psi);
1283  }
1284 
1285  // now fill all TPC+(SVT or SSD) histograms ------------------------------
1286 
1287  else if (silHists && (map.hasHitInDetector(kSvtId) || map.hasHitInDetector(kSsdId))) {
1288 
1289  if (map.hasHitInDetector(kSsdId)) {
1290  if (TMath::Abs(pvert.z())<10 && TMath::Abs(eta)<1 &&
1291  map.numberOfHits(kTpcId)>15) {
1292  StPtrVecHit ssd_hits = detInfo->hits(kSsdId);
1293  if (ssd_hits.size()) {
1294  Float_t sphi = ssd_hits[0]->position().phi()/degree;
1295  if (sphi<0) sphi+=360.;
1296  hists->m_prim_ssd_phi->Fill(sphi);
1297  }
1298  }
1299  } // SSD Requirement
1300 
1301  if (map.trackTpcSvt()) {
1302  // now fill all TPC+SVT histograms -------------------------------------
1303 
1304  cnttrkgTS++;
1305  mean_ptTS += geom->momentum().perp();
1306  mean_etaTS += eta;
1307 
1308  hists->m_prim_f0TS->Fill(outerDif.x(),0.);
1309  hists->m_prim_f0TS->Fill(outerDif.y(),1.);
1310  hists->m_prim_f0TS->Fill(outerDif.z(),2.);
1311 
1312  hists->m_prim_xf0TS->Fill(outerDif.x());
1313  hists->m_prim_yf0TS->Fill(outerDif.y());
1314  hists->m_prim_zf0TS->Fill(outerDif.z());
1315  hists->m_prim_rzf0TS->Fill(outerAzimdif,0.);
1316  hists->m_prim_rzf0TS->Fill(outerDif.z(),1.);
1317  hists->m_prim_rzl0TS->Fill(outerAzimdifl,0.);
1318  hists->m_prim_rzl0TS->Fill(outerDifl.z(),1.);
1319 
1320  hists->m_ppointTS->Fill(detInfo->numberOfPoints());
1321  hists->m_pmax_pointTS->Fill(primtrk->numberOfPossiblePoints());
1322  hists->m_pfit_pointTS->Fill(fTraits.numberOfFitPoints());
1323  hists->m_prim_chargeTS->Fill(geom->charge());
1324 
1325  hists->m_prim_r0TS->Fill(origin.perp());
1326  hists->m_prim_phi0TS->Fill(orphi);
1327  hists->m_prim_z0TS->Fill(origin.z());
1328  hists->m_prim_curvTS->Fill(logCurvature);
1329 
1330  hists->m_prim_xfTS->Fill(firstPoint.x());
1331  hists->m_prim_yfTS->Fill(firstPoint.y());
1332  hists->m_prim_zfTS->Fill(firstPoint.z());
1333  hists->m_prim_radfTS->Fill(radf);
1334  hists->m_prim_ratiomTS->Fill(nfitnmax);
1335  hists->m_ppsiTS->Fill(psi);
1336  hists->m_ppsiTTS->Fill(psi,0.);
1337  hists->m_ptanlTS->Fill(TMath::Tan(geom->dipAngle()));
1338  hists->m_prim_thetaTS->Fill(thetad);
1339  hists->m_petaTS->Fill(eta);
1340  hists->m_petaTTS->Fill(eta,0.);
1341  hists->m_ppTTS->Fill(pT);
1342  hists->m_ppTTTS->Fill(pT,0.);
1343  hists->m_pmomTS->Fill(gmom);
1344  hists->m_plengthTS->Fill(primtrk->length());
1345  hists->m_pchisq0TS->Fill(chisq0);
1346  hists->m_pchisq0TTS->Fill(chisq0,0.);
1347 
1348  hists->m_primtrk_xf_yfTS->Fill(firstPoint.x(),
1349  firstPoint.y());
1350  hists->m_peta_trklengthTS->Fill(eta,primtrk->length());
1351  hists->m_pnpoint_lengthTS->Fill(primtrk->length(),
1352  Float_t(detInfo->numberOfPoints()));
1353  hists->m_pfpoint_lengthTS->Fill(primtrk->length(),
1354  Float_t(fTraits.numberOfFitPoints()));
1355  hists->m_pfpoint_lengthTTS->Fill(primtrk->length(),
1356  Float_t(fTraits.numberOfFitPoints()));
1357 
1358  hists->m_ppT_eta_recTS->Fill(eta,lmevpt);
1359  double qwe = ::pow(firstPoint.x()-pvert.x(),2)
1360  + ::pow(firstPoint.y()-pvert.y(),2);
1361  qwe = ::sqrt(qwe)/(2*rcircle);
1362  if (qwe>0.9999) qwe = 0.999;
1363  Float_t denom = 2*rcircle*(::asin(qwe));
1364  if (radf>40 && denom>0) hists->m_ptanl_zfT->
1365  Fill((firstPoint.z() - pvert.z())/denom,
1366  Float_t(TMath::Tan(geom->dipAngle())));
1367  if (radf<40 && denom>0) hists->m_ptanl_zfTS->
1368  Fill((firstPoint.z() - pvert.z())/denom,
1369  Float_t(TMath::Tan(geom->dipAngle())));
1370  hists->m_pmom_trklengthTS->Fill(primtrk->length(),lmevmom);
1371  hists->m_pchisq0_momTS->Fill(lmevmom,chisq0);
1372  hists->m_pchisq0_etaTS->Fill(eta,chisq0);
1373  hists->m_pchisq0_dipTS->Fill(TMath::Tan(geom->dipAngle()),chisq0);
1374  hists->m_pchisq0_zfTS->Fill(firstPoint.z(),chisq0);
1375  hists->m_ppsi_phiTS->Fill(orphi,psi);
1376 
1377  // SVT drift plots
1378  if (pT > 0.2) {
1379  StPtrVecHit svt_hits = detInfo->hits(kSvtId);
1380  for (UInt_t k=0; k<svt_hits.size(); k++) {
1381  StSvtHit* svt_hit = (StSvtHit*) (svt_hits[k]);
1382  hists->m_svt_loc->Fill(svt_hit->timebucket(),svt_hit->index());
1383  }
1384  }
1385  } // SVT Requirement
1386  } // SVT || SSD Requirement
1387 
1388  // now fill all FTPC East histograms ------------------------------------------
1389  else if (map.trackFtpcEast()) {
1390 
1391  if ( pT<2 ) {
1392  mean_ptFE += geom->momentum().perp();
1393  pTcnttrkgFE++;
1394  }
1395  cnttrkgFE++;
1396  mean_etaFE += eta;
1397  // these are TPC & FTPC
1398  // east and west in same histogram
1399  hists->m_ppointF->Fill(detInfo->numberOfPoints(),0.);
1400  hists->m_pmax_pointF->Fill(primtrk->numberOfPossiblePoints(),0.);
1401  hists->m_prim_chargeF->Fill(geom->charge(),0.);
1402  hists->m_prim_xfF->Fill(firstPoint.x(),0.);
1403  hists->m_prim_yfF->Fill(firstPoint.y(),0.);
1404  hists->m_prim_zfF->Fill(firstPoint.z(),0.);
1405  hists->m_prim_radfF->Fill(radf,0.);
1406  hists->m_prim_ratiomF->Fill(nfitnmax,0.);
1407  hists->m_ppsiF->Fill(psi,0.);
1408  hists->m_petaF->Fill(fabs(eta),0.);
1409  hists->m_ppTF->Fill(pT,0.);
1410  hists->m_pmomF->Fill(gmom,0.);
1411  hists->m_plengthF->Fill(primtrk->length(),0.);
1412  hists->m_pchisq0F->Fill(chisq0,0.);
1413  hists->m_pchisq1F->Fill(chisq1,0.);
1414  // east and west in separate histograms
1415  hists->m_ppointFE->Fill(detInfo->numberOfPoints());
1416  hists->m_pmax_pointFE->Fill(primtrk->numberOfPossiblePoints());
1417  hists->m_prim_chargeFE->Fill(geom->charge());
1418  hists->m_prim_xfFE->Fill(firstPoint.x());
1419  hists->m_prim_yfFE->Fill(firstPoint.y());
1420  hists->m_prim_zfFE->Fill(firstPoint.z());
1421  hists->m_prim_radfFE->Fill(radf);
1422  hists->m_prim_ratiomFE->Fill(nfitnmax);
1423  hists->m_ppsiFE->Fill(psi);
1424  hists->m_petaFE->Fill(eta);
1425  hists->m_ppTFE->Fill(pT);
1426  hists->m_pmomFE->Fill(gmom);
1427  hists->m_plengthFE->Fill(primtrk->length());
1428  hists->m_pchisq0FE->Fill(chisq0);
1429  hists->m_pchisq1FE->Fill(chisq1);
1430 
1431  // these are for TPC & FTPC
1432  hists->m_ppT_eta_recFE->Fill(eta,lmevpt);
1433  hists->m_primtrk_xf_yfFE->Fill(firstPoint.x(),
1434  firstPoint.y());
1435  hists->m_peta_trklengthFE->Fill(eta,primtrk->length());
1436  hists->m_pnpoint_lengthFE->Fill(primtrk->length(),
1437  Float_t(detInfo->numberOfPoints()));
1438  }
1439 
1440  // now fill all FTPC West histograms ------------------------------------------
1441  else if (map.trackFtpcWest()) {
1442 
1443  if ( pT<2 ) {
1444  mean_ptFW += geom->momentum().perp();
1445  pTcnttrkgFW++;
1446  }
1447  cnttrkgFW++;
1448  mean_etaFW += eta;
1449  // these are TPC & FTPC
1450  // east and west in same histogram
1451  hists->m_ppointF->Fill(detInfo->numberOfPoints(),1.);
1452  hists->m_pmax_pointF->Fill(primtrk->numberOfPossiblePoints(),1.);
1453  hists->m_prim_chargeF->Fill(geom->charge(),1.);
1454  hists->m_prim_xfF->Fill(firstPoint.x(),1.);
1455  hists->m_prim_yfF->Fill(firstPoint.y(),1.);
1456  hists->m_prim_zfF->Fill(firstPoint.z(),1.);
1457  hists->m_prim_radfF->Fill(radf,1.);
1458  hists->m_prim_ratiomF->Fill(nfitnmax,1.);
1459  hists->m_ppsiF->Fill(psi,1.);
1460  hists->m_petaF->Fill(fabs(eta),1.);
1461  hists->m_ppTF->Fill(pT,1.);
1462  hists->m_pmomF->Fill(gmom,1.);
1463  hists->m_plengthF->Fill(primtrk->length(),1.);
1464  hists->m_pchisq0F->Fill(chisq0,1.);
1465  hists->m_pchisq1F->Fill(chisq1,1.);
1466  // east and west in separate histograms
1467  hists->m_ppointFW->Fill(detInfo->numberOfPoints());
1468  hists->m_pmax_pointFW->Fill(primtrk->numberOfPossiblePoints());
1469  hists->m_prim_chargeFW->Fill(geom->charge());
1470  hists->m_prim_xfFW->Fill(firstPoint.x());
1471  hists->m_prim_yfFW->Fill(firstPoint.y());
1472  hists->m_prim_zfFW->Fill(firstPoint.z());
1473  hists->m_prim_radfFW->Fill(radf);
1474  hists->m_prim_ratiomFW->Fill(nfitnmax);
1475  hists->m_ppsiFW->Fill(psi);
1476  hists->m_petaFW->Fill(eta);
1477  hists->m_ppTFW->Fill(pT);
1478  hists->m_pmomFW->Fill(gmom);
1479  hists->m_plengthFW->Fill(primtrk->length());
1480  hists->m_pchisq0FW->Fill(chisq0);
1481  hists->m_pchisq1FW->Fill(chisq1);
1482 
1483  // these are for TPC & FTPC
1484  hists->m_ppT_eta_recFW->Fill(eta,lmevpt);
1485  hists->m_primtrk_xf_yfFW->Fill(firstPoint.x(),
1486  firstPoint.y());
1487  hists->m_peta_trklengthFW->Fill(eta,primtrk->length());
1488  hists->m_pnpoint_lengthFW->Fill(primtrk->length(),
1489  Float_t(detInfo->numberOfPoints()));
1490  }
1491 
1492  if (histsSet>=StQA_run14 && histsSet<StQA_run17) {
1493  // HFT Histograms
1494  hists->m_primary_pxl_hit->Fill(map.numberOfHits(kPxlId)); // number of PIXEL hits per primary track
1495  hists->m_primary_ist_hit->Fill(map.numberOfHits(kIstId)); // number of IST hits per primary track
1496  if(map.hasHitInPxlLayer(1))hists->m_primary_hft_hit->Fill(1); // PXL layer=1
1497  if(map.hasHitInPxlLayer(2))hists->m_primary_hft_hit->Fill(2); // PXL layer=2
1498  hists->m_primary_hft_hit->Fill(3,map.numberOfHits(kIstId));
1499  hists->m_primary_hft_hit->Fill(4,map.numberOfHits(kSstId));
1500  }
1501 
1502  }
1503  }
1504  hists->m_primtrk_good->Fill(cnttrkg);
1505  hists->m_primtrk_good_sm->Fill(cnttrkg);
1506  if (silHists)
1507  hists->m_primtrk_goodTTS->Fill(cnttrkgT+cnttrkgTS);
1508  hists->m_primtrk_goodF->Fill(cnttrkgFE,cnttrkgFW);
1509  }
1510  mean_ptT /= (cnttrkgT +1.e-10);
1511  mean_ptFE /= (pTcnttrkgFE+1.e-10);
1512  mean_ptFW /= (pTcnttrkgFW+1.e-10);
1513  mean_etaT /= (cnttrkgT +1.e-10);
1514  mean_etaFE /= (cnttrkgFE +1.e-10);
1515  mean_etaFW /= (cnttrkgFW +1.e-10);
1516  if (silHists) {
1517  mean_ptTS /= (cnttrkgTS +1.e-10);
1518  mean_etaTS /= (cnttrkgTS +1.e-10);
1519  hists->m_primtrk_meanptTTS->Fill(mean_ptTS,0.);
1520  hists->m_primtrk_meanptTTS->Fill(mean_ptT,1.);
1521  hists->m_primtrk_meanetaTTS->Fill(mean_etaTS,0.);
1522  hists->m_primtrk_meanetaTTS->Fill(mean_etaT,1.);
1523  }
1524  hists->m_primtrk_meanptF->Fill(mean_ptFE,0.);
1525  hists->m_primtrk_meanptF->Fill(mean_ptFW,1.);
1526  hists->m_primtrk_meanetaF->Fill(fabs(mean_etaFE),0.);
1527  hists->m_primtrk_meanetaF->Fill(fabs(mean_etaFW),1.);
1528 
1529  // MakeHistPrim() must be called after MakeHistGlob for the following to work
1530  hists->m_primglob_good->Fill((Float_t)n_prim_good/((Float_t)n_glob_good+1.e-10));
1531 
1532  // Normalizations
1533  if (histsSet>=StQA_run14 && histsSet<StQA_run17) {
1534  Int_t NprimTrk = - hists->m_primglob_fit->GetEntries();
1535  hists->m_primary_hft_hit->SetBinContent(0,NprimTrk);
1536  hists->m_primary_pxl_hit->SetBinContent(0,NprimTrk);
1537  hists->m_primary_ist_hit->SetBinContent(0,NprimTrk);
1538  hists->m_primary_hft_hit->SetEntries(hists->m_primary_hft_hit->GetEntries()-1);
1539  hists->m_primary_pxl_hit->SetEntries(hists->m_primary_pxl_hit->GetEntries()-1);
1540  hists->m_primary_ist_hit->SetEntries(hists->m_primary_ist_hit->GetEntries()-1);
1541  }
1542  if (hists->m_prim_ssd_phi) {
1543  Int_t Nevents = - hists->m_primtrk_tot->GetEntries();
1544  hists->m_prim_ssd_phi->SetBinContent(0,Nevents);
1545  hists->m_prim_ssd_phi->SetEntries(hists->m_prim_ssd_phi->GetEntries()-1);
1546  }
1547 }
1548 
1549 
1550 //_____________________________________________________________________________
1551 void StEventQAMaker::MakeHistPID() {
1552 
1553  if (Debug())
1554  gMessMgr->Info(" *** in StEventQAMaker - filling dE/dx histograms ");
1555 
1556  if (vertExists <= 0) return;
1557 
1558  StSPtrVecTrackNode &theNodes = event->trackNodes();
1559  Int_t cntrows=0;
1560  for (UInt_t i=0; i<theNodes.size(); i++) {
1561  StTrack *theTrack = theNodes[i]->track(global);
1562  if (!theTrack || theTrack->bad()) continue;
1563  StPrimaryTrack *pTrack = static_cast<StPrimaryTrack*>(theNodes[i]->track(primary));
1564  if (!pTrack || pTrack->bad() || pTrack->vertex() != primVtx) continue;
1565 
1566  cntrows++;
1567  StSPtrVecTrackPidTraits &trkPidTr = theTrack->pidTraits();
1568  StDedxPidTraits *dedxPidTr;
1569 
1570  for (unsigned int itrait=0; itrait<trkPidTr.size();itrait++) {
1571  dedxPidTr = 0;
1572  StTrackPidTraits *thisTrait = trkPidTr[itrait];
1573  dedxPidTr = dynamic_cast<StDedxPidTraits*>(thisTrait);
1574 
1575  if (dedxPidTr && dedxPidTr->method() == kTruncatedMeanId) {
1576  int ndedx = dedxPidTr->numberOfPoints();
1577  double dedx = dedxPidTr->mean();
1578  double error = dedxPidTr->errorOnMean();
1579  double p = abs(theTrack->geometry()->momentum());
1580  if (dedxPidTr->detector() == kTpcId) {
1581  Float_t pionExpected = Bichsel::Instance()->GetI70M(
1582  TMath::Log10(theTrack->geometry()->momentum().mag()/pion_minus_mass_c2));
1583  pionExpected *= 1.e-6;
1584  hists->m_dedxTTS->Fill(dedx/(pionExpected+1.e-10));
1585  hists->m_ndedxT->Fill(ndedx);
1586  hists->m_dedx0T->Fill(dedx);
1587  hists->m_dedx1T->Fill(error);
1588  if (ndedx > 15) {
1589  hists->m_p_dedx_rec->Fill((float)(p),(float)(dedx*1.e6));
1590  }
1591  }
1592  if (dedxPidTr->detector() == kTpcSvtId) {
1593  Float_t pionExpected = Bichsel::Instance()->GetI70M(
1594  TMath::Log10(theTrack->geometry()->momentum().mag()/pion_minus_mass_c2));
1595  pionExpected *= 1.e-6;
1596  hists->m_dedxTTS->Fill(dedx/(pionExpected+1.e-10));
1597  }
1598  if (dedxPidTr->detector() == kFtpcWestId) {
1599  // east and west in same histogram
1600  hists->m_ndedxF->Fill(ndedx,1.);
1601  hists->m_dedx0F->Fill(dedx,1.);
1602  // east and west in separate histograms
1603  hists->m_ndedxFW->Fill(ndedx);
1604  hists->m_dedx0FW->Fill(dedx);
1605  }
1606  if (dedxPidTr->detector() == kFtpcEastId) {
1607  // east and west in same histogram
1608  hists->m_ndedxF->Fill(ndedx,0.);
1609  hists->m_dedx0F->Fill(dedx,0.);
1610  // east and west in separate histograms
1611  hists->m_ndedxFE->Fill(ndedx);
1612  hists->m_dedx0FE->Fill(dedx);
1613  }
1614  }
1615  }
1616  }
1617  hists->m_ndedxr->Fill(cntrows);
1618 }
1619 
1620 //_____________________________________________________________________________
1621 void StEventQAMaker::MakeHistVertex() {
1622 
1623  if (Debug())
1624  gMessMgr->Info(" *** in StEventQAMaker - filling vertex histograms ");
1625 
1626  if (!allTrigs && vertExists <= 0) return;
1627 
1628  Float_t m_prmass2 = (proton_mass_c2*proton_mass_c2);
1629  Float_t m_pimass2 = (pion_minus_mass_c2*pion_minus_mass_c2);
1630  Float_t m_lamass2 = (lambda_mass_c2*lambda_mass_c2);
1631 
1632  StThreeVectorF pvert;
1633  if (primVtx) {
1634 
1635  pvert = primVtx->position();
1636 
1637  for (UInt_t j=0; j<event->numberOfPrimaryVertices(); j++) {
1638  StPrimaryVertex *aPrimVtx = event->primaryVertex(j);
1639 
1640  if (aPrimVtx == primVtx) {
1641  hists->m_pv_vtxid->Fill(primVtx->type());
1642  if (!std::isnan(double(pvert.x())))
1643  hists->m_pv_x->Fill(pvert.x());
1644  if (!std::isnan(double(pvert.y())))
1645  hists->m_pv_y->Fill(pvert.y());
1646  if (!std::isnan(double(pvert.z())))
1647  hists->m_pv_z->Fill(pvert.z());
1648  hists->m_pv_pchi2->Fill(primVtx->chiSquared());
1649  hists->m_pv_r->Fill(pvert.x()*pvert.x() +
1650  pvert.y()*pvert.y());
1651  hists->m_pv_xy->Fill(pvert.x(),pvert.y());
1652  } else {
1653  StThreeVectorF apvert = aPrimVtx->position();
1654  hists->m_v_vtxid->Fill(aPrimVtx->type());
1655  if (!std::isnan(double(apvert.x())))
1656  hists->m_v_x->Fill(apvert.x());
1657  if (!std::isnan(double(apvert.y())))
1658  hists->m_v_y->Fill(apvert.y());
1659  if (!std::isnan(double(apvert.z())))
1660  hists->m_v_z->Fill(apvert.z());
1661  hists->m_v_pchi2->Fill(aPrimVtx->chiSquared());
1662  hists->m_v_r->Fill(apvert.x()*apvert.x() +
1663  apvert.y()*apvert.y());
1664  }
1665  }
1666  }
1667 
1668  for (UInt_t j=0; j<event->numberOfCalibrationVertices(); j++) {
1669  StCalibrationVertex *aCalibVtx = event->calibrationVertex(j);
1670  if (aCalibVtx->type() == 6 ) {
1671  hists->m_vtx_FtpcEastTpc_xy->Fill(aCalibVtx->position().x() - pvert.x(),
1672  aCalibVtx->position().y() - pvert.y());
1673  hists->m_vtx_FtpcEastTpc_z->Fill(aCalibVtx->position().z() - pvert.z());
1674  }
1675  if (aCalibVtx->type() == 7 ) {
1676  hists->m_vtx_FtpcWestTpc_xy->Fill(aCalibVtx->position().x() - pvert.x(),
1677  aCalibVtx->position().y() - pvert.y());
1678  hists->m_vtx_FtpcWestTpc_z->Fill(aCalibVtx->position().z() - pvert.z());
1679  }
1680  }
1681 
1682  // V0 vertices
1683  if (Debug())
1684  gMessMgr->Info(" *** in StEventQAMaker - filling dst_v0_vertex histograms ");
1685 
1686  StSPtrVecV0Vertex &v0Vtx = event->v0Vertices();
1687  UInt_t v0Vtxs = v0Vtx.size();
1688  hists->m_v0->Fill( v0Vtxs ? TMath::Log10(v0Vtxs) : -0.5 );
1689 
1690  for (UInt_t k=0; k<v0Vtxs; k++) {
1691  StV0Vertex *v0 = v0Vtx[k];
1692  if ((v0) && (v0->dcaParentToPrimaryVertex() >= 0.)) {
1693  Float_t e1a = ::pow(abs(v0->momentumOfDaughter(positive)),2);
1694  Float_t e2 = ::pow(abs(v0->momentumOfDaughter(negative)),2);
1695  Float_t e1 = e1a + m_prmass2;
1696  e2 += m_pimass2;
1697  e1 = TMath::Sqrt(e1);
1698  e2 = TMath::Sqrt(e2);
1699  Float_t p = ::pow(abs(v0->momentum()),2);
1700  Float_t inv_mass_la = TMath::Sqrt((e1+e2)*(e1+e2) - p);
1701  e1 = e1a + m_pimass2;
1702  e1 = TMath::Sqrt(e1);
1703  Float_t inv_mass_k0 = TMath::Sqrt((e1+e2)*(e1+e2) - p);
1704 
1705  hists->m_ev0_lama_hist->Fill(inv_mass_la);
1706  hists->m_ev0_k0ma_hist->Fill(inv_mass_k0);
1707 
1708  hists->m_v_vtxid->Fill(v0->type());
1709  if (!std::isnan(double(v0->position().x())))
1710  hists->m_v_x->Fill(v0->position().x());
1711  if (!std::isnan(double(v0->position().y())))
1712  hists->m_v_y->Fill(v0->position().y());
1713  if (!std::isnan(double(v0->position().z())))
1714  hists->m_v_z->Fill(v0->position().z());
1715  hists->m_v_pchi2->Fill(v0->chiSquared());
1716  hists->m_v_r->Fill(v0->position().x()*v0->position().x() +
1717  v0->position().y()*v0->position().y());
1718 
1719  if (!(std::isnan(double(v0->position().x())) ||
1720  std::isnan(double(v0->position().y())))) {
1721  Float_t phi = atan2(v0->position().y() - pvert.y(),
1722  v0->position().x() - pvert.x())
1723  * 180./M_PI;
1724  if (phi<0.) phi += 360.;
1725  hists->m_vtx_phi_dist->Fill(phi);
1726  hists->m_vtx_z_dist->Fill(v0->position().z() - pvert.z());
1727  Float_t r_dist = ::sqrt(::pow(v0->position().x()-pvert.x(),2)+
1728  ::pow(v0->position().y()-pvert.y(),2));
1729  hists->m_vtx_r_dist->Fill(r_dist);
1730  }
1731  }
1732  }
1733 
1734  // Xi vertices
1735  if (Debug())
1736  gMessMgr->Info(" *** in StEventQAMaker - filling dst_xi_vertex histograms ");
1737 
1738  StSPtrVecXiVertex &xiVtx = event->xiVertices();
1739  UInt_t xiVtxs = xiVtx.size();
1740  hists->m_xi_tot->Fill( xiVtxs ? TMath::Log10(xiVtxs) : -0.5 );
1741 
1742  for (UInt_t l=0; l<xiVtxs; l++) {
1743  StXiVertex *xi = xiVtx[l];
1744  if (xi) {
1745  const StThreeVectorF& pMom = xi->momentumOfBachelor();
1746  StThreeVectorF lMom = xi->momentumOfV0();
1747  StThreeVectorF xMom = lMom + pMom;
1748  Float_t pP2 = pMom.mag2();
1749  Float_t pL2 = lMom.mag2();
1750  Float_t pX2 = xMom.mag2();
1751  Float_t epi = ::sqrt(pP2 + m_pimass2);
1752  Float_t ela = ::sqrt(pL2 + m_lamass2);
1753  Float_t eXi = ela + epi;
1754  Float_t inv_mass_xi = ::sqrt(eXi*eXi - pX2);
1755 
1756  hists->m_xi_ma_hist->Fill(inv_mass_xi);
1757 
1758  hists->m_v_vtxid->Fill(xi->type());
1759  if (!std::isnan(double(xi->position().x())))
1760  hists->m_v_x->Fill(xi->position().x());
1761  if (!std::isnan(double(xi->position().y())))
1762  hists->m_v_y->Fill(xi->position().y());
1763  if (!std::isnan(double(xi->position().z())))
1764  hists->m_v_z->Fill(xi->position().z());
1765  hists->m_v_pchi2->Fill(xi->chiSquared());
1766  hists->m_v_r->Fill(xi->position().x()*xi->position().x() +
1767  xi->position().y()*xi->position().y());
1768  }
1769  }
1770 
1771  // Kink vertices
1772  if (Debug())
1773  gMessMgr->Info(" *** in StEventQAMaker - filling kink histograms ");
1774 
1775  StSPtrVecKinkVertex &kinkVtx = event->kinkVertices();
1776  UInt_t kinkVtxs = kinkVtx.size();
1777  hists->m_kink_tot->Fill( kinkVtxs ? TMath::Log10(kinkVtxs) : -0.5 );
1778 
1779  for (UInt_t m=0; m<kinkVtxs; m++) {
1780  StKinkVertex *kink = kinkVtx[m];
1781  if (kink) {
1782  //hists->m_v_detid->Fill(kink->det_id);
1783  hists->m_v_vtxid->Fill(kink->type());
1784  if (!std::isnan(double(kink->position().x())))
1785  hists->m_v_x->Fill(kink->position().x());
1786  if (!std::isnan(double(kink->position().y())))
1787  hists->m_v_y->Fill(kink->position().y());
1788  if (!std::isnan(double(kink->position().z())))
1789  hists->m_v_z->Fill(kink->position().z());
1790  hists->m_v_pchi2->Fill(kink->chiSquared());
1791  hists->m_v_r->Fill(kink->position().x()*kink->position().x() +
1792  kink->position().y()*kink->position().y());
1793  }
1794  }
1795 
1796  UInt_t cntrows = event->numberOfPrimaryVertices() +
1797  v0Vtxs + xiVtxs + kinkVtxs;
1798  //this gives 3 less than the DSTs!! ->needs to be fixed !!!
1799 
1800  hists->m_v_num->Fill(cntrows);
1801  hists->m_v_num_sm->Fill(cntrows);
1802 }
1803 
1804 //_____________________________________________________________________________
1805 void StEventQAMaker::MakeHistPoint() {
1806 
1807  if (Debug())
1808  gMessMgr->Info(" *** in StEventQAMaker - filling point histograms ");
1809 
1810  StTpcHitCollection *tpcHits = event->tpcHitCollection();
1811  StSvtHitCollection *svtHits = event->svtHitCollection();
1812  StFtpcHitCollection *ftpcHits = event->ftpcHitCollection();
1813  StSsdHitCollection *ssdHits = event->ssdHitCollection();
1814 
1815  ULong_t totalHits = 0;
1816  ULong_t ftpcHitsE = 0;
1817  ULong_t ftpcHitsW = 0;
1818  StThreeVectorF hitPos;
1819  Int_t rotator;
1820 
1821  if (tpcHits) {
1822  // z and phi dist of hits
1823  for (UInt_t i=0; i<tpcHits->numberOfSectors(); i++) {
1824  StTpcSectorHitCollection* tpcHitsSector = tpcHits->sector(i);
1825  unsigned int innerRows = St_tpcPadConfigC::instance()->numberOfInnerRows(i+1);
1826  for (UInt_t j=0; j<tpcHitsSector->numberOfPadrows(); j++) {
1827  StSPtrVecTpcHit& tpcHitsVec = tpcHitsSector->padrow(j)->hits();
1828  for (UInt_t k=0; k<tpcHitsVec.size(); k++) {
1829  hitPos = tpcHitsVec[k]->position();
1830  Float_t phi = hitPos.phi()/degree;
1831  if (phi<0) phi+=360.;
1832  hists->m_z_hits->Fill(hitPos.z());
1833  Float_t tb = tpcHitsVec[k]->timeBucket();
1834  if (printTpcHits) printf("HHHH %d %d %d %f %f %f %f %f %d\n",qaEvents,
1835  tpcHitsVec[k]->sector(),tpcHitsVec[k]->padrow(),
1836  hitPos.x(),hitPos.y(),hitPos.z(),
1837  tpcHitsVec[k]->pad(),tb,tpcHitsVec[k]->flag());
1838  // Normalize scalings to outer sectors:
1839  // correct for padrow density (1/1.6cm, 1/4.8cm, and 1/2.0cm) for polar xy plots
1840  float density_correction = (j<innerRows ? (innerRows == 13 ? 4.8/2.0 : 1.6/2.0) : 2.0/2.0);
1841  // scale charge by length of pads (1/1.55cm, 1/1.15cm, and 1/1.95cm)
1842  float hit_charge = tpcHitsVec[k]->charge() * density_correction * (j<innerRows ? (innerRows == 13 ? 1.95/1.15 : 1.95/1.55) : 1.95/1.95);
1843 
1844  //clusters
1845  if (!eventClassIdx) { // don't fill for multiple event classes
1846  m_tpc_clust_statsvsrow[i]->Fill(j+1,tpcHitsVec[k]->flag());
1847  m_tpc_clust_stats[i]->Fill(tpcHitsVec[k]->flag());
1848  if (j < innerRows) {//iTPC
1849  if ((tpcHitsVec[k]->flag() == 0 || tpcHitsVec[k]->flag() == 2) && (tpcHitsVec[k]->adc() > 40)) {
1850  m_tpc_clust_pxltb->Fill(i+1,tpcHitsVec[k]->maxTmbk() - tpcHitsVec[k]->minTmbk()+1);
1851  m_tpc_clust_pxlp->Fill(i+1,tpcHitsVec[k]->maxPad() - tpcHitsVec[k]->minPad()+1);
1852  if ((tb > tblow) && (tb < tbhigh)) {
1853  m_tpc_clust_charge[i]->Fill(tpcHitsVec[k]->adc());
1854  m_tpc_clust_chargesum[i]->Fill(tpcHitsVec[k]->pad(),j+1,tpcHitsVec[k]->adc());
1855  m_tpc_clust_chargevstb[i]->Fill(tb,tpcHitsVec[k]->adc());
1856  m_tpc_clust_chargevsrow[i]->Fill(j+1,tpcHitsVec[k]->adc());
1857  }
1858  }
1859  }
1860  else {//TPX
1861  if ((tpcHitsVec[k]->flag() == 0) && (tpcHitsVec[k]->adc() > 15)) {
1862  m_tpc_clust_pxltbTPX->Fill(i+1,tpcHitsVec[k]->maxTmbk() - tpcHitsVec[k]->minTmbk()+1);
1863  m_tpc_clust_pxlpTPX->Fill(i+1,tpcHitsVec[k]->maxPad() - tpcHitsVec[k]->minPad()+1);
1864  if ((tb > tblow) && (tb < tbhigh)) {
1865  m_tpc_clust_chargeTPX[i]->Fill(tpcHitsVec[k]->adc());
1866  m_tpc_clust_chargesum[i]->Fill(tpcHitsVec[k]->pad(),j+1,tpcHitsVec[k]->adc());
1867  m_tpc_clust_chargevstbTPX[i]->Fill(tb,tpcHitsVec[k]->adc());
1868  m_tpc_clust_chargevsrow[i]->Fill(j+1,tpcHitsVec[k]->adc());
1869  }
1870  }
1871  }
1872  }
1873 
1874  // TPC East is sectors 13-24, and (generally) z<0
1875  // TPC West is sectors 1-12, and (generally) z>0
1876  // In StEvent, sectors are mapped starting at 0 instead of 1
1877  if (i>11) {
1878  rotator = 11-i;
1879  hists->m_pnt_timeT->Fill(tb,0);
1880  hists->m_pnt_phiT->Fill(phi,0.);
1881  hists->m_pnt_padrowT->Fill(j+1,0.); // physical padrow numbering starts at 1
1882  hists->m_pnt_rpTE->Fill(hitPos.perp(),phi*degree,density_correction);
1883  if (!eventClassIdx) m_pnt_rpTQE->Fill(hitPos.perp(),phi*degree,hit_charge);
1884  } else {
1885  rotator = i-11;
1886  hists->m_pnt_timeT->Fill(tb,1);
1887  hists->m_pnt_phiT->Fill(phi,1.);
1888  hists->m_pnt_padrowT->Fill(j+1,1.); // physical padrow numbering starts at 1
1889  hists->m_pnt_rpTW->Fill(hitPos.perp(),phi*degree,density_correction);
1890  if (!eventClassIdx) m_pnt_rpTQW->Fill(hitPos.perp(),phi*degree,hit_charge);
1891  }
1892  if (!eventClassIdx) {
1893  hitPos.rotateZ(((float) rotator)*TMath::Pi()/6.0);
1894  mTpcSectorPlot[i]->Fill(hitPos.x(),(float) (j+1));
1895  }
1896  }
1897  }
1898  }
1899  hists->m_pnt_tpc->Fill(tpcHits->numberOfHits());
1900  totalHits += tpcHits->numberOfHits();
1901  }
1902  if (svtHits) {
1903  Int_t SvtLaser1 = 0;
1904  Int_t SvtLaser2 = 0;
1905  Float_t SvtLaser1t[32];
1906  Float_t SvtLaser2t[32];
1907  ULong_t totalSvtHits = 0;
1908  for (UInt_t i=0; i<svtHits->numberOfBarrels(); i++) {
1909  StSvtBarrelHitCollection* svtbarrel = svtHits->barrel(i);
1910  for (UInt_t j=0; j<svtbarrel->numberOfLadders(); j++) {
1911  StSvtLadderHitCollection* svtladder = svtbarrel->ladder(j);
1912  for (UInt_t k=0; k<svtladder->numberOfWafers(); k++) {
1913  StSPtrVecSvtHit& svtwaferhits = svtladder->wafer(k)->hits();
1914  for (UInt_t l=0; l<svtwaferhits.size(); l++) {
1915  StSvtHit* svthit = svtwaferhits[l];
1916  if (svthit->flag() < 4) {
1917  hitPos = svthit->position();
1918  Float_t x = hitPos.x();
1919  Float_t y = hitPos.y();
1920  Float_t z = hitPos.z();
1921  Float_t phi = hitPos.phi()/degree;
1922  if (phi<0) phi+=360.;
1923  hists->m_pnt_zS->Fill(z);
1924  hists->m_pnt_phiS->Fill(phi);
1925  hists->m_pnt_barrelS->Fill(i+1); // physical barrel numbering starts at 1
1926  hists->m_pnt_xyS->Fill(x,y);
1927  totalSvtHits++;
1928 
1929  }
1930  // Laser spots:
1931  // barrel 3, ladder 15, wafer 7
1932  if (i==2 && j==14 && k==6 && svthit->hybrid() == 1 &&
1933  svthit->anode() >= 195 && svthit->anode() <= 204 &&
1934  svthit->timebucket() >= 90) {
1935  hists->m_pnt_svtLaser->Fill(eventCount,svthit->timebucket());
1936  SvtLaser1t[SvtLaser1] = svthit->timebucket();
1937  for (Int_t m=0;m<SvtLaser1;m++)
1938  hists->m_pnt_svtLaserDiff->Fill(eventCount,
1939  TMath::Abs(SvtLaser1t[SvtLaser1]-SvtLaser1t[m]),0);
1940  SvtLaser1++;
1941  }
1942  // barrel 3, ladder 7, wafer 1
1943  if (i==2 && j==6 && k==0 && svthit->hybrid() == 2 &&
1944  svthit->anode() >= 195 && svthit->anode() <= 204 &&
1945  svthit->timebucket() >= 90) {
1946  hists->m_pnt_svtLaser->Fill(eventCount,svthit->timebucket()/2.);
1947  SvtLaser2t[SvtLaser2] = svthit->timebucket();
1948  for (Int_t m=0;m<SvtLaser2;m++)
1949  hists->m_pnt_svtLaserDiff->Fill(eventCount,
1950  TMath::Abs(SvtLaser2t[SvtLaser2]-SvtLaser2t[m]),1);
1951  SvtLaser2++;
1952  }
1953  }
1954  }
1955  }
1956  }
1957  // totalSvtHits = svtHits->numberOfHits();
1958  hists->m_pnt_svt->Fill(totalSvtHits);
1959  totalHits += totalSvtHits;
1960  }
1961  if (ssdHits) {
1962  for (UInt_t j=0; j<ssdHits->numberOfLadders(); j++) {
1963  StSsdLadderHitCollection* ssdladder = ssdHits->ladder(j);
1964  for (UInt_t k=0; k<ssdladder->numberOfWafers(); k++) {
1965  StSPtrVecSsdHit& ssdwaferhits = ssdladder->wafer(k)->hits();
1966  for (UInt_t l=0; l<ssdwaferhits.size(); l++) {
1967  StSsdHit* ssdhit = ssdwaferhits[l];
1968  hitPos = ssdhit->position();
1969  Float_t x = hitPos.x();
1970  Float_t y = hitPos.y();
1971  Float_t phi = hitPos.phi()/degree;
1972  if (phi<0) phi += 360.;
1973  hists->m_pnt_phiSSD->Fill(phi);
1974  hists->m_pnt_lwSSD->Fill(j+1,k+1);
1975  hists->m_pnt_xyS->Fill(x,y);
1976  hists->m_pnt_sizeSSD->Fill(ssdhit->clusterSizePSide(),0);
1977  hists->m_pnt_sizeSSD->Fill(ssdhit->clusterSizeNSide(),1);
1978  hists->m_pnt_eSSD->Fill(TMath::Log10(fabs(ssdhit->charge())+1e-33));
1979  }
1980  }
1981  }
1982  // Normalizations
1983  Int_t Nevents = - hists->m_primtrk_tot->GetEntries();
1984  hists->m_pnt_phiSSD->SetBinContent(0,Nevents);
1985  hists->m_pnt_lwSSD->SetBinContent(0,Nevents);
1986  hists->m_pnt_phiSSD->SetEntries(hists->m_pnt_phiSSD->GetEntries()-1);
1987  hists->m_pnt_lwSSD->SetEntries(hists->m_pnt_lwSSD->GetEntries()-1);
1988  }
1989  if (ftpcHits) {
1990  // StFtpcHitCollection doesn't differentiate between W and E FTPCs
1991  // so it is up to the user to check this via plane number -CPL
1992  for (UInt_t i=0; i<ftpcHits->numberOfPlanes(); i++) {
1993  for (UInt_t j=0; j<ftpcHits->plane(i)->numberOfSectors(); j++)
1994  for (UInt_t k=0; k<ftpcHits->plane(i)->sector(j)->hits().size(); k++) {
1995  Float_t x = ftpcHits->plane(i)->sector(j)->hits()[k]->position().x();
1996  Float_t y = ftpcHits->plane(i)->sector(j)->hits()[k]->position().y();
1997  Int_t npads = ftpcHits->plane(i)->sector(j)->hits()[k]->padsInHit();
1998  Int_t ntimebins = ftpcHits->plane(i)->sector(j)->hits()[k]->timebinsInHit();
1999  UInt_t trackReferenceCount = ftpcHits->plane(i)->sector(j)->hits()[k]->trackReferenceCount();
2000  if (i<10) {
2001  hists->m_pnt_planeF->Fill(i+1,1.); // physical numbering starts at 1
2002  hists->m_pnt_xyFW->Fill(x,y);
2003  hists->m_pnt_padtimeFW->Fill(ntimebins,npads);
2004  if (trackReferenceCount !=0 )hists->m_globtrk_padtimeFW->Fill(ntimebins,npads);
2005  } else {
2006  hists->m_pnt_planeF->Fill(i+1,0.); // physical numbering starts at 1
2007  hists->m_pnt_xyFE->Fill(x,y);
2008  hists->m_pnt_padtimeFE->Fill(ntimebins,npads);
2009  if (trackReferenceCount !=0 )hists->m_globtrk_padtimeFE->Fill(ntimebins,npads);
2010  }
2011  }
2012  if (i<10)
2013  ftpcHitsW += ftpcHits->plane(i)->numberOfHits();
2014  else
2015  ftpcHitsE += ftpcHits->plane(i)->numberOfHits();
2016  }
2017  // east and west in same histogram
2018  hists->m_pnt_ftpc->Fill(ftpcHitsE,0.);
2019  hists->m_pnt_ftpc->Fill(ftpcHitsW,1.);
2020  // east and west in separate histograms
2021  hists->m_pnt_ftpcW->Fill(ftpcHitsW);
2022  hists->m_pnt_ftpcE->Fill(ftpcHitsE);
2023  totalHits += ftpcHits->numberOfHits();
2024  }
2025  if (ssdHits) {
2026  hists->m_pnt_ssd->Fill(ssdHits->numberOfHits());
2027  totalHits += ssdHits->numberOfHits();
2028  }
2029  hists->m_pnt_tot->Fill(totalHits);
2030  hists->m_pnt_tot_med->Fill(totalHits);
2031  hists->m_pnt_tot_sm->Fill(totalHits);
2032 }
2033 
2034 
2035 //_____________________________________________________________________________
2036 void StEventQAMaker::MakeHistEMC() {
2037 
2038  if (Debug())
2039  gMessMgr->Info(" *** in StEventQAMaker - filling EMC histograms ");
2040 
2041  StEmcCollection* emccol = event->emcCollection();
2042  //cout <<"emccol = "<<emccol<<"\n";
2043  if (!emccol) return;
2044 
2045  UInt_t i;
2046 
2047  //if (Debug())
2048  // gMessMgr->Info(" *** in StEventQAMaker - filling EMC HITS ");
2049 
2050  for(i=0; i<4; i++){
2051  Int_t det = i+1;
2052  StDetectorId id = StEmcMath::detectorId(det);
2053  StEmcDetector* detector=emccol->detector(id);
2054  if(detector) {
2055  Float_t energy=0.0; // Energy for whole detector
2056  UInt_t nh=0; // Hits for whole detectors
2057  for(UInt_t j=1;j<121;j++){
2058  StEmcModule* module = detector->module(j);
2059  if(module) {
2060  StSPtrVecEmcRawHit& rawHit=module->hits();
2061 
2062  Int_t m,e,s,adc,sId,stripInMod;
2063  Float_t eta(0),phi(0),E(0);
2064  nh += rawHit.size();
2065  for(UInt_t k=0;k<rawHit.size();k++){
2066  m = rawHit[k]->module();
2067  e = rawHit[k]->eta();
2068  s = rawHit[k]->sub();
2069  emcGeom[i]->getId(m, e, s, sId);
2070  stripInMod = sId % 150; // only used for BSMD
2071  if (stripInMod==0) stripInMod=150;
2072  // cout << "strip Id = " << sId << ", strip in Module = " << stripInMod << endl;
2073  if (s == -1) s = 1; // case of smde
2074  adc = rawHit[k]->adc();
2075  E = rawHit[k]->energy();
2076  emcGeom[i]->getEta(m, e, eta);
2077  emcGeom[i]->getPhi(m, s, phi);
2078  hists->m_emc_hits[i]->Fill(eta,phi);
2079  hists->m_emc_energy2D[i]->Fill(eta,phi,E);
2080  hists->m_emc_adc[i]->Fill(float(adc));
2081  hists->m_emc_energy[i]->Fill(E);
2082 
2083  if (i>1) { // BSMD module hists
2084 
2085  Int_t modIndex = (m-1)/30;
2086  Int_t histIndex = modIndex;
2087  if (i>2) histIndex = modIndex + 4;
2088 
2089  hists->m_emc_hits_per_module[histIndex]->Fill(m);
2090  hists->m_emc_energy_per_module[histIndex]->Fill(m,E);
2091  hists->m_emc_strip_hits_per_module[histIndex]->Fill(m,stripInMod);
2092  hists->m_emc_strip_energy_per_module[histIndex]->Fill(m,stripInMod,E);
2093 
2094  }
2095 
2096 
2097  energy += E;
2098  }
2099  }
2100  }
2101  if(nh>0) hists->m_emc_nhit->Fill(log10(1e-30+Double_t(nh)), Float_t(det));
2102  if(energy>0) hists->m_emc_etot->Fill(log10(1e-30+Double_t(energy)), Float_t(det));
2103  }
2104  }
2105 
2106  //if (Debug())
2107  // gMessMgr->Info(" *** in StEventQAMaker - filling EMC Clusters ");
2108 
2109  for(i=0; i<4; i++) {
2110  Int_t det = i+1, nh;
2111  StDetectorId id = StEmcMath::detectorId(det);
2112  StEmcDetector* detector = emccol->detector(id);
2113  if(detector)
2114  {
2115  StEmcClusterCollection* clusters=detector->cluster();
2116  if(clusters)
2117  {
2118  StSPtrVecEmcCluster& cluster = clusters->clusters();
2119 
2120  if(cluster.size()>0)
2121  {
2122  hists->m_emc_ncl->Fill(log10(1e-30+Double_t(cluster.size())),(Float_t)det);
2123  Float_t Etot=0.0, eta, phi, sigEta, sigPhi, eCl;
2124  for(UInt_t j=0;j<cluster.size();j++){
2125  nh = cluster[j]->nHits();
2126  eCl = cluster[j]->energy();
2127  eta = cluster[j]->eta();
2128  sigEta = cluster[j]->sigmaEta();
2129  phi = cluster[j]->phi();
2130  sigPhi = cluster[j]->sigmaPhi();
2131  if(sigEta > 0) hists->m_emc_sig_e->Fill(sigEta, Axis_t(det));
2132  if(sigPhi > 0.0) hists->m_emc_sig_p->Fill(sigPhi, Axis_t(det));
2133 
2134  hists->m_emc_cl[det-1]->Fill(Axis_t(eta), Axis_t(phi));
2135  hists->m_emc_energyCl[det-1]->Fill(Axis_t(eta), Axis_t(phi), eCl);
2136  hists->m_emc_HitsInCl[det-1]->Fill(Axis_t(nh));
2137  hists->m_emc_EnergyCl[det-1]->Fill(Axis_t(eCl));
2138  hists->m_emc_EtaInCl[det-1]->Fill(Axis_t(eta));
2139  hists->m_emc_PhiInCl[det-1]->Fill(Axis_t(phi));
2140  Etot += eCl;
2141  }
2142  hists->m_emc_etotCl->Fill(log10(1e-30+Etot), Axis_t(det));
2143  }
2144  }
2145  }
2146  }
2147 
2148  // Get the hists from StEmcPoints
2149  //if (Debug())
2150  // gMessMgr->Info(" *** in StEventQAMaker - filling EMC Points ");
2151 
2152  StSPtrVecEmcPoint& pointvec = emccol->barrelPoints();
2153 
2154  Int_t Point_Mult[4];
2155  for(i=0;i<4;i++) {Point_Mult[i]=0;}
2156 
2157  for(i=0;i<pointvec.size();i++) {
2158 
2159  StEmcPoint *point = (StEmcPoint*) pointvec[i];
2160 
2161  //const StThreeVectorF & posP = point->position();
2162  const StThreeVectorF & sizeP = point->size();
2163 
2164  Float_t eta=0.;
2165  Float_t phi=0.;
2166  if (primVtx) {
2167  eta=StEmcMath::eta(point,(StMeasuredPoint*)primVtx);
2168  phi=StEmcMath::phi(point,(StMeasuredPoint*)primVtx);
2169  }
2170 
2171  // Get category (ncat) for this point
2172 
2173  Float_t EnergyDet[4];
2174  for(UInt_t ie=0;ie<4;ie++) {EnergyDet[ie]=0.0;}
2175 
2176  for(Int_t j=0;j<4;j++) {
2177  StDetectorId detid = static_cast<StDetectorId>(j+kBarrelEmcTowerId);
2178  EnergyDet[j] = point->energyInDetector(detid);
2179  }
2180  Int_t ncat=0;
2181 
2182  if(EnergyDet[2]==0 && EnergyDet[3] ==0) {
2183  ncat=0;
2184  } else if(EnergyDet[2]>0 && EnergyDet[3] ==0) {
2185  ncat=1;
2186  } else if(EnergyDet[2]==0 && EnergyDet[3]>0) {
2187  ncat=2;
2188  } else{
2189  ncat=3;
2190  }
2191 
2192  //Fill the hists
2193  Float_t energy=point->energy();
2194  Float_t sigmaeta=sizeP.x();
2195  Float_t sigmaphi=sizeP.y();
2196  Float_t trackmom=point->chiSquare();
2197  Float_t deltaeta=point->deltaEta();
2198  Float_t deltaphi=point->deltaPhi();
2199  //if (ncat>3) ncat=3; // unnecessary
2200  Point_Mult[ncat]++;
2201  if (energy>0) hists->m_emc_point_energy[ncat]->Fill(energy);
2202  if (primVtx) {
2203  hists->m_emc_point_eta[ncat]->Fill(eta);
2204  hists->m_emc_point_phi[ncat]->Fill(phi);
2205  }
2206  hists->m_emc_point_sigeta[ncat]->Fill(sigmaeta);
2207  hists->m_emc_point_sigphi[ncat]->Fill(sigmaphi);
2208  hists->m_emc_point_flag->Fill(Float_t(ncat+1));
2209  if (trackmom>0) {
2210  hists->m_emc_point_trmom[ncat]->Fill(trackmom);
2211  hists->m_emc_point_deleta[ncat]->Fill(deltaeta);
2212  hists->m_emc_point_delphi[ncat]->Fill(deltaphi);
2213  }
2214  }
2215  for(i=0;i<4;i++) {hists->m_emc_points[i]->Fill(Float_t(Point_Mult[i]));}
2216 
2217  if (Debug())
2218  gMessMgr->Info(" *** in StEventQAMaker - Finished filling EMC histograms ");
2219 
2220 }
2221 //_____________________________________________________________________________
2222 void StEventQAMaker::MakeHistEval() {
2223 
2224  // requires StMcEvent
2225  if (Debug())
2226  gMessMgr->Info(" *** in StEventQAMaker - filling Eval histograms ");
2227 
2228  StMcEvent* mcEvent = (StMcEvent*) GetDataSet("StMcEvent");
2229  if (!mcEvent) return;
2230  StMcVertex* mcprimaryVertex = mcEvent->primaryVertex();
2231  if ((primVtx) && (mcprimaryVertex)) {
2232  Float_t geantX = mcprimaryVertex->position().x();
2233  Float_t geantY = mcprimaryVertex->position().y();
2234  Float_t geantZ = mcprimaryVertex->position().z();
2235  Float_t recoX = primVtx->position().x();
2236  Float_t recoY = primVtx->position().y();
2237  Float_t recoZ = primVtx->position().z();
2238  hists->m_geant_reco_pvtx_x->Fill(geantX-recoX);
2239  hists->m_geant_reco_pvtx_y->Fill(geantY-recoY);
2240  hists->m_geant_reco_pvtx_z->Fill(geantZ-recoZ);
2241  hists->m_geant_reco_vtx_z_z->Fill(geantZ-recoZ,recoZ);
2242  }
2243 
2244 }
2245 //_____________________________________________________________________________
2246 void StEventQAMaker::MakeHistBBC() {
2247 
2248  Int_t i;
2249  StTriggerDetectorCollection* trig = event->triggerDetectorCollection();
2250  if (!trig) return;
2251  StBbcTriggerDetector& bbc = trig->bbc();
2252 
2253  for (i=0; i<32; i++) {
2254  hists->m_bbc_adc[i/8]->Fill(bbc.adc(i),i%8);
2255  hists->m_bbc_tdc[i/8]->Fill(bbc.tdc(i),i%8);
2256  }
2257 
2258 }
2259 //_____________________________________________________________________________
2260 void StEventQAMaker::MakeHistFPD() {
2261 
2262  Int_t i;
2263  StFpdCollection* fpd = event->fpdCollection();
2264  if (!fpd) return;
2265  unsigned short* dfpd = fpd->adc();
2266  if (!dfpd) return;
2267 
2268  for (i=0; i<16; i++) {
2269  hists->m_fpd_top[i/8]->Fill((float) dfpd[i],i%8);
2270  hists->m_fpd_bottom[i/8]->Fill((float) dfpd[i+16],i%8);
2271  hists->m_fpd_south[i/8]->Fill((float) dfpd[i+32],i%8);
2272  if (i<12) hists->m_fpd_north[i/6]->Fill((float) dfpd[i+48],i%6);
2273  }
2274 
2275  hists->m_fpd_sums[0]->Fill((float) fpd->sumAdcTop());
2276  hists->m_fpd_sums[1]->Fill((float) fpd->sumAdcBottom());
2277  hists->m_fpd_sums[2]->Fill((float) fpd->sumAdcSouth());
2278  hists->m_fpd_sums[3]->Fill((float) fpd->sumAdcNorth());
2279  hists->m_fpd_sums[4]->Fill((float) fpd->sumAdcSmdX());
2280  hists->m_fpd_sums[5]->Fill((float) fpd->sumAdcSmdY());
2281  hists->m_fpd_sums[6]->Fill((float) fpd->sumAdcPreShower1());
2282  hists->m_fpd_sums[7]->Fill((float) fpd->sumAdcPreShower2());
2283 
2284 }
2285 //_____________________________________________________________________________
2286 void StEventQAMaker::MakeHistPMD() {
2287 
2288  // Code written by Subhasis, Nov. 2004
2289 
2290  StPhmdCollection* phmdcl = (StPhmdCollection*) (event->phmdCollection());
2291  if (!phmdcl) return;
2292  Int_t runNumber=event->runId();
2293  Int_t eventID=event->id();
2294  if (runNumber != mRunNumber) {
2295  mRunNumber = runNumber;
2296  if (!mPmdGeom) mPmdGeom = new StPmdGeom();
2297  mPmdGeom->readBoardDetail(mRunNumber);
2298  if (maputil) delete maputil;
2299  maputil = new StPmdMapUtil();
2300  maputil->StoreMapInfo(mRunNumber);
2301  }
2302  //get PhmdCollection
2303  //if phmdcollection exists then loop over two detectors (pmd and cpv)
2304  for (Int_t d=0;d<2;d++) {
2305 
2306  Int_t TOTAL_HIT_DETECTOR=0;
2307  Int_t TOTAL_ADC_DETECTOR=0;
2308 
2309  //kPhmdCpvId = enum for Cpv Id,(25) and kPhmdId enum for Pmd Id (26)
2310  StDetectorId pdet = static_cast<StDetectorId>(kPhmdCpvId+d);
2311  StPhmdDetector* detector = (StPhmdDetector*) (phmdcl->detector(StDetectorId(pdet)));
2312  if (detector) {
2313  for (UInt_t j=0;j<12;j++) {
2314  Float_t TotalAdc=0;
2315  Float_t TotalHit=0;
2316  StPhmdModule* module = detector->module(j);
2317  if (module) {
2318  StSPtrVecPhmdHit& rawHit=module->hits();
2319  if (rawHit.size()>0) {
2320  for (Int_t k=0;k<(Int_t)rawHit.size();k++) {
2321  Int_t sm=rawHit[k]->superModule();
2322  Int_t row=rawHit[k]->row();
2323  Int_t col=rawHit[k]->column();
2324  Int_t adc=rawHit[k]->adc();
2325  TotalAdc+=adc;
2326  TotalHit++;
2327  Int_t chainR, channelOR, channelCR;
2328  if (d==0) {
2329  maputil->ReverseChannelOriginal(sm+13,row+1,col+1,channelOR);
2330  maputil->ReverseChannelConverted(sm+13,row+1,col+1,channelCR);
2331  maputil->ChainNumber(sm+13,row+1,col+1,chainR);
2332  } else {
2333  maputil->ReverseChannelOriginal(sm+1,row+1,col+1,channelOR);
2334  maputil->ReverseChannelConverted(sm+1,row+1,col+1,channelCR);
2335  maputil->ChainNumber(sm+1,row+1,col+1,chainR);
2336  }
2337  // GVB 2016-05-13: chainR goes 1..48, but either 48 (or 49) would
2338  // give chainR/2 = 24, which overruns these arrays. I will comment
2339  // out this section for now
2340  /*
2341  if (chainR>0 && channelCR>=0 && chainR<=49) {
2342  hists->m_pmd_chain_adc[chainR/2]->Fill(channelCR,chainR%2,adc);
2343  hists->m_pmd_chain_hit[chainR/2]->Fill(channelCR,chainR%2);
2344  }
2345  */
2346  TOTAL_HIT_DETECTOR++;;
2347  TOTAL_ADC_DETECTOR+=adc;
2348  }
2349  } //rawHit.size()
2350  } //module
2351  Int_t smid=d*12+j;
2352  hists->m_pmd_sm_hit[smid/2]->Fill(TotalHit,smid%2);
2353  if (TotalHit<=0) continue;
2354  hists->m_pmd_sm_adc[smid/2]->Fill(TotalAdc/TotalHit,smid%2);
2355  }
2356  }
2357  if (d==0) {
2358  hists->m_pmd_total_hit->Fill(eventID,TMath::Log10(1e-30+TOTAL_HIT_DETECTOR));
2359  hists->m_pmd_total_adc->Fill(eventID,TMath::Log10(1e-30+TOTAL_ADC_DETECTOR));
2360  } else {
2361  hists->m_cpv_total_hit->Fill(eventID,TMath::Log10(1e-30+TOTAL_HIT_DETECTOR));
2362  hists->m_cpv_total_adc->Fill(eventID,TMath::Log10(1e-30+TOTAL_ADC_DETECTOR));
2363  }
2364  }
2365 }
2366 //_____________________________________________________________________________
2368 
2369  int runId = event->runId();
2370  if(runId>10000000) {
2371 
2372  StBTofCollection *btofcol = (StBTofCollection *)(event->btofCollection());
2373  if (!btofcol) return;
2374 
2375  int i;
2376  double vz_tpc = -999.;
2377  if(primVtx) vz_tpc = primVtx->position().z();
2378 
2379  // TOF and VPD hits
2380  StSPtrVecBTofHit &tofHits = btofcol->tofHits();
2381  Int_t nTofHits = tofHits.size();
2382  Int_t nHitsvsTray[120] = {0};
2383  Int_t nHitsvsModule[2][32] = {{0},{0}};
2384  Int_t nHitsTof = 0;
2385  Int_t nHitsVpd[2] = {0};
2386 
2387  Int_t nCellvsTray[120] = {0};
2388  Int_t nCellvsModule[2][32] = {{0},{0}};
2389  Int_t nCellTof = 0;
2390  for(i=0;i<nTofHits;i++) {
2391  StBTofHit *aHit = dynamic_cast<StBTofHit*>(tofHits[i]);
2392  if(!aHit) continue;
2393  int trayId = aHit->tray();
2394  int moduleId = aHit->module();
2395  if(trayId>0 && trayId<=120) { // tray
2396  nHitsvsTray[trayId-1]++;
2397  nHitsvsModule[(trayId-1)/60][moduleId]++;
2398  nHitsTof++;
2399 
2400  if(StTrack *trk = (StTrack*)aHit->associatedTrack()) {
2401  nCellvsTray[trayId-1]++;
2402  nCellvsModule[(trayId-1)/60][moduleId]++;
2403  nCellTof++;
2404  StPrimaryTrack *pTrk = dynamic_cast<StPrimaryTrack *>(trk->node()->track(primary));
2405  if(pTrk) {
2406  const StPtrVecTrackPidTraits& theTofPidTraits = pTrk->pidTraits(kTofId);
2407  if(!theTofPidTraits.size()) continue;
2408 
2409  StTrackPidTraits *theSelectedTrait = theTofPidTraits[theTofPidTraits.size()-1];
2410  if(!theSelectedTrait) continue;
2411 
2412  StBTofPidTraits *pidTof = dynamic_cast<StBTofPidTraits *>(theSelectedTrait);
2413  if(!pidTof) continue;
2414 
2415  double ptot = pTrk->geometry()->momentum().mag();
2416  double beta = pidTof->beta();
2417 
2418  hists->m_tof_PID->Fill(ptot, 1./beta);
2419  }
2420  }
2421  } else { // vpd
2422  nHitsVpd[trayId-121]++;
2423  }
2424  }
2425  for(i=0;i<120;i++) {
2427  hists->m_tof_hit_tray->Fill(i+1, nHitsvsTray[i]);
2429  hists->m_tof_match_tray->Fill(i+1, nCellvsTray[i]);
2430  }
2431  for(i=0;i<32;i++) {
2433  hists->m_tof_hit_module->Fill(i+1, nHitsvsModule[0][i]); // west side
2434  hists->m_tof_hit_module->Fill(-(i+1), nHitsvsModule[1][i]); // east side
2436  hists->m_tof_match_module->Fill(i+1, nCellvsModule[0][i]); // west side
2437  hists->m_tof_match_module->Fill(-(i+1), nCellvsModule[1][i]); // east side
2438  }
2439  hists->m_tof_vpd_hit->Fill(nHitsVpd[0]+nHitsVpd[1], nHitsTof);
2440 
2441  // Vpd vertex
2442  double TSumEast = 0.;
2443  double TSumWest = 0.;
2444  int nEast = 0;
2445  int nWest = 0;
2446  for(i=0;i<nTofHits;i++) {
2447  StBTofHit *aHit = dynamic_cast<StBTofHit*>(tofHits[i]);
2448  if(!aHit) continue;
2449  int trayId = aHit->tray();
2450  int tubeId = aHit->cell();
2451  if(trayId==mEastVpdTrayId) { // east
2452  TSumEast += aHit->leadingEdgeTime() - mEastVpdCorr[tubeId-1];
2453  nEast++;
2454  } else if (trayId==mWestVpdTrayId) { // west
2455  TSumWest += aHit->leadingEdgeTime() - mWestVpdCorr[tubeId-1];
2456  nWest++;
2457  }
2458  }
2459  double vz_vpd = -999.;
2460  if(nEast&&nWest) vz_vpd = (TSumEast/nEast - TSumWest/nWest)/2./29.979;
2461 
2462  hists->m_tof_vtx_z->Fill(vz_tpc, vz_vpd);
2463  return;
2464  }
2465 
2467 
2468  StTofCollection *tofcol = (StTofCollection *)(event->tofCollection());
2469  if (!tofcol) return;
2470 
2471  int i;
2472  double vz_tpc = -999.;
2473  if(primVtx) vz_tpc = primVtx->position().z();
2474 
2475  // TOF and VPD hits
2476  StSPtrVecTofData &tofData = tofcol->tofData();
2477  Int_t nTofData = tofData.size();
2478  Int_t nHitsvsTray[120] = {0};
2479  Int_t nHitsvsModule[2][32] = {{0},{0}};
2480  Int_t nHitsTof = 0;
2481  Int_t nHitsVpd[2] = {0};
2482  for(i=0;i<nTofData;i++) {
2483  StTofData *aHit = dynamic_cast<StTofData*>(tofData[i]);
2484  if(!aHit) continue;
2485  int index = aHit->dataIndex();
2486  int trayId = index/192 + 1;
2487  int moduleId = ( index%192 )/6 + 1;
2488  if(trayId>0 && trayId<=120) { // tray
2489  nHitsvsTray[trayId-1]++;
2490  nHitsvsModule[(trayId-1)/60][moduleId-1]++; // JDB corrected 2016-05-13
2491  nHitsTof++;
2492  } else { // vpd
2493  nHitsVpd[trayId-121]++;
2494  }
2495  }
2496  for(i=0;i<120;i++) {
2497  hists->m_tof_hit_tray->Fill(i+1, nHitsvsTray[i]);
2498  }
2499  for(i=0;i<32;i++) {
2500  hists->m_tof_hit_module->Fill(i+1, nHitsvsModule[0][i]); // west side
2501  hists->m_tof_hit_module->Fill(-(i+1), nHitsvsModule[1][i]); // east side
2502  }
2503  hists->m_tof_vpd_hit->Fill(nHitsVpd[0]+nHitsVpd[1], nHitsTof);
2504 
2505  // Matched TOF hits
2506  StSPtrVecTofCell &tofCell = tofcol->tofCells();
2507  Int_t nTofCell = tofCell.size();
2508  Int_t nCellvsTray[120] = {0};
2509  Int_t nCellvsModule[2][32] = {{0},{0}};
2510  Int_t nCellTof = 0;
2511  for(i=0;i<nTofCell;i++) {
2512  StTofCell *aCell = dynamic_cast<StTofCell*>(tofCell[i]);
2513  if(!aCell) continue;
2514  int trayId = aCell->trayIndex();
2515  int moduleId = aCell->moduleIndex();
2516  if(trayId>0 && trayId<=120) { // tray
2517  nCellvsTray[trayId-1]++;
2518  nCellvsModule[(trayId-1)/60][moduleId]++;
2519  nCellTof++;
2520 
2521  double tof = aCell->leadingEdgeTime(); // need an offset correction
2522 
2523  StTrack *trk = (StTrack *)aCell->associatedTrack();
2524  if(!trk) continue;
2525  StPrimaryTrack *pTrk = dynamic_cast<StPrimaryTrack *>(trk->node()->track(primary));
2526  if(!pTrk) continue;
2527  double ptot = pTrk->geometry()->momentum().mag();
2528 
2529  StTrackGeometry *theTrackGeometry = pTrk->outerGeometry();
2530  if(primVtx) {
2531  double L = tofPathLength(&primVtx->position(), &aCell->position(), theTrackGeometry->helix().curvature());
2532  double beta = L/(tof*29.979);
2533  hists->m_tof_PID->Fill(ptot, 1./beta);
2534  }
2535  }
2536  }
2537  for(i=0;i<120;i++) {
2538  hists->m_tof_match_tray->Fill(i+1, nCellvsTray[i]);
2539  }
2540  for(i=0;i<32;i++) {
2541  hists->m_tof_match_module->Fill(i+1, nCellvsModule[0][i]); // west side
2542  hists->m_tof_match_module->Fill(-(i+1), nCellvsModule[1][i]); // east side
2543  }
2544 
2545  // Vpd vertex
2546  double TSumEast = 0.;
2547  double TSumWest = 0.;
2548  int nEast = 0;
2549  int nWest = 0;
2550  for(i=0;i<nTofCell;i++) {
2551  StTofCell *aCell = dynamic_cast<StTofCell*>(tofCell[i]);
2552  if(!aCell) continue;
2553  int trayId = aCell->trayIndex();
2554  int tubeId = aCell->cellIndex();
2555  if(trayId==mEastVpdTrayId) { // east
2556  TSumEast += aCell->leadingEdgeTime() - mEastVpdCorr[tubeId-1];
2557  nEast++;
2558  } else if(trayId==mWestVpdTrayId) { // west
2559  TSumWest += aCell->leadingEdgeTime() - mWestVpdCorr[tubeId-1];
2560  nWest++;
2561  }
2562  }
2563  double vz_vpd = -999.;
2564  if(nEast&&nWest) vz_vpd = (TSumEast/nEast - TSumWest/nWest)/2./29.979;
2565 
2566  hists->m_tof_vtx_z->Fill(vz_tpc, vz_vpd);
2567 }
2568 //_____________________________________________________________________________
2569 Int_t StEventQAMaker::PCThits(StTrackDetectorInfo* detInfo) {
2570  Int_t PCT = 0; // # hits beyond central membrane: post-crossing trks
2571  if (hitsAvail) {
2572  StPtrVecHit tpc_hits = detInfo->hits(kTpcId);
2573  if (tpc_hits.size()) {
2574  for (UInt_t k=0;k<tpc_hits.size();k++) {
2575  StTpcHit* hit = (StTpcHit*) (tpc_hits[k]);
2576  if ((hit->position().z() > 1 && hit->sector() > 12) ||
2577  (hit->position().z() <-1 && hit->sector() < 13)) PCT++;
2578  }
2579  } else {
2580  LOG_WARN << "Tpc hits are not available - cannot check for PCTs" << endm;
2581  hitsAvail = kFALSE;
2582  }
2583  }
2584  return PCT;
2585 }
2586 //_____________________________________________________________________________
2587 void StEventQAMaker::MakeHistFMS() {
2588 
2589  // Get trigger data for the current event.
2590  StTriggerData* trigger = event->triggerData();
2591  if (!trigger) return;
2592  // We don't want to include LED events when filling the histograms.
2593  const unsigned short dsm = trigger->lastDSM(4);
2594  if(dsm & 0x1) {
2595  return;
2596  } // if
2597  // Loop over histograms for each QT crate (FMS and FPD are
2598  // accessed via the same method in StTriggerData).
2599  TH1PtrMap::iterator i;
2600  for(i = mFMShistograms.begin(); i not_eq mFMShistograms.end(); ++i) {
2601  TH1* histogram = i->second;
2602  // Fill the histogram for each channel by looping over
2603  // each slot and each channel-in-slot.
2604  int crate = i->first;
2605  for(int slot(0); slot < kNQtSlotsPerCrate; ++slot) {
2606  for(int channel(0); channel < kNQtChannelsPerSlot; ++channel) {
2607  int index = slot * kNQtChannelsPerSlot + channel;
2608  float adc = trigger->fmsADC(crate, slot, channel, 0);
2609  histogram->Fill(index, adc);
2610  } // for
2611  } // for
2612  } // for
2613 
2614 
2615 
2616 
2617 }
2618 //_____________________________________________________________________________
2619 void StEventQAMaker::MakeHistHFT() {
2620 
2621  StPxlHitCollection* pxlHitCollection= event->pxlHitCollection();
2622 
2623  if (!pxlHitCollection) {
2624  LOG_WARN << "No StPxlHitCollection" << endm;
2625  }
2626 
2627  StIstHitCollection* istHitCollection = event->istHitCollection();
2628 
2629  if (!istHitCollection) {
2630  LOG_WARN << "No StIstHitCollection" << endm;
2631  }
2632 
2633  StSstHitCollection *sstHitCollection = event->sstHitCollection();
2634 
2635  if (!sstHitCollection) {
2636  LOG_WARN << "No StSstHitCollection" << endm;
2637  }
2638 
2639  if(pxlHitCollection && istHitCollection){
2640  hists->m_nhit_Pxl_Ist->Fill(pxlHitCollection->numberOfHits(),istHitCollection->numberOfHits());
2641  }
2642  if(pxlHitCollection && sstHitCollection){
2643  hists->m_nhit_Pxl_Sst->Fill(pxlHitCollection->numberOfHits(),sstHitCollection->numberOfHits());
2644  }
2645  if(istHitCollection && sstHitCollection){
2646  hists->m_nhit_Ist_Sst->Fill(istHitCollection->numberOfHits(),sstHitCollection->numberOfHits());
2647  }
2648 
2649 
2650 }
2651 //_____________________________________________________________________________
2652 void StEventQAMaker::MakeHistPXL() {
2653 
2654  StPxlHitCollection* pxlHitCollection= event->pxlHitCollection();
2655 
2656  if (!pxlHitCollection) {
2657  LOG_WARN << "No PXL hit collection" << endm;
2658  return;
2659  }
2660 
2661  Int_t nHitsPxl1 = 0;
2662  Int_t nHitsPxl2 = 0;
2663 
2664  UInt_t numberOfSectors = pxlHitCollection->numberOfSectors();
2665  for (UInt_t sectorIdx = 0; sectorIdx < numberOfSectors; sectorIdx++) {
2666  StPxlSectorHitCollection* PxlSectorHitCollection = pxlHitCollection->sector(sectorIdx);
2667  if (!PxlSectorHitCollection) {
2668  LOG_WARN << "MakeHistPXL: No PxlSectorHitCollection" << endm;
2669  return;
2670  }
2671  UInt_t numberOfLadders = PxlSectorHitCollection->numberOfLadders();
2672  for (UInt_t ladderIdx = 0; ladderIdx < numberOfLadders; ladderIdx++) {
2673  StPxlLadderHitCollection* PxlLadderHitCollection = PxlSectorHitCollection->ladder(ladderIdx);
2674  if (!PxlLadderHitCollection) {
2675  LOG_WARN << "MakeHistPXL: No PXLLadder hit collection" << endm;
2676  return;
2677  }
2678 
2679  UInt_t numberOfHits = PxlLadderHitCollection->numberOfHits();
2680  hists->m_pxl_hit_ladder->Fill(ladderIdx,numberOfHits);
2681  UInt_t numberOfSensors = PxlLadderHitCollection->numberOfSensors();
2682 
2683  for (UInt_t sensorIdx = 0; sensorIdx < numberOfSensors; sensorIdx++) {
2684  StPxlSensorHitCollection* PxlSensorHitCollection = PxlLadderHitCollection->sensor(sensorIdx);
2685  StSPtrVecPxlHit& vec = PxlSensorHitCollection->hits();
2686 
2687  UInt_t NoHits = vec.size();
2688  Int_t sensorId = sensorIdx + 1;
2689  Int_t ladderId = sectorIdx*4 + ladderIdx + 1;
2690  Int_t sectorId = sectorIdx + 1;
2691 
2692 
2693  if(ladderIdx==0)
2694  hists->m_pxl_hit_sector_sensor_Pxl1->Fill(sectorId,sensorId,NoHits); //inner PIXEL layer
2695  else
2696  hists->m_pxl_hit_sector_sensor_Pxl2->Fill(ladderId,sensorId,NoHits); // outer PIXEL layer
2697 
2698  if (NoHits > 0) {
2699  LOG_DEBUG << "MakeHistPXL: StiPixelHitLoader size: " << NoHits << endm;
2700 
2701  for (UInt_t ll = 0; ll < NoHits; ll++) {
2702  StPxlHit *hit = vec[ll];
2703  if (hit) {
2704 
2705  const StThreeVectorF &pos = hit->position();
2706 
2707  Int_t ladder = hit->ladder();
2708 
2709  // x,y position in the HFT, re-use SSD histogram since it is the most layer
2710  hists->m_pnt_xyS->Fill(pos.x(),pos.y());
2711 
2712  int layer = (ladder == 1) ? 1 : 2; // inner or outer PIXEL layer
2713 
2714  if(layer==1){
2715  nHitsPxl1++;
2716  hists->m_pxl_hit_phi_z_Pxl1->Fill(pos.z(), pos.phi());
2717  }
2718 
2719  if(layer==2){
2720  nHitsPxl2++;
2721  hists->m_pxl_hit_phi_z_Pxl2->Fill(pos.z(), pos.phi());
2722  }
2723  }
2724  }
2725  }
2726  }
2727  }
2728  }
2729 
2730  StBTofCollection *btofcol = (StBTofCollection *)(event->btofCollection());
2731  if (btofcol) {
2732  Int_t nTofHits = btofcol->tofHits().size();
2733  hists->m_pxl_nhit_Pxl1_tof_mult->Fill(nHitsPxl1, nTofHits);
2734  hists->m_pxl_nhit_Pxl2_tof_mult->Fill(nHitsPxl2, nTofHits);
2735  }
2736  hists->m_pxl_nhit_Pxl1_Pxl2->Fill(nHitsPxl1,nHitsPxl2);
2737 
2738  Int_t tpcMult = event->trackNodes().size();
2739  hists->m_pxl_nhit_Pxl1_tpc_mult->Fill(nHitsPxl1,tpcMult);
2740  hists->m_pxl_nhit_Pxl2_tpc_mult->Fill(nHitsPxl2,tpcMult);
2741 
2742 
2743  // Normalizations
2744  Int_t Nevents = - hists->m_primtrk_tot->GetEntries();
2745  hists->m_pxl_hit_phi_z_Pxl1->SetBinContent(0,Nevents);
2746  hists->m_pxl_hit_phi_z_Pxl2->SetBinContent(0,Nevents);
2747  hists->m_pxl_hit_ladder->SetBinContent(0,Nevents);
2748  hists->m_pxl_hit_sector_sensor_Pxl1->SetBinContent(0,Nevents);
2749  hists->m_pxl_hit_sector_sensor_Pxl2->SetBinContent(0,Nevents);
2750  hists->m_pxl_nhit_Pxl1_Pxl2->SetBinContent(0,Nevents);
2751  hists->m_pxl_hit_phi_z_Pxl1->SetEntries(hists->m_pxl_hit_phi_z_Pxl1->GetEntries()-1);
2752  hists->m_pxl_hit_phi_z_Pxl2->SetEntries(hists->m_pxl_hit_phi_z_Pxl2->GetEntries()-1);
2753  hists->m_pxl_hit_ladder->SetEntries(hists->m_pxl_hit_ladder->GetEntries()-1);
2756  hists->m_pxl_nhit_Pxl1_Pxl2->SetEntries(hists->m_pxl_nhit_Pxl1_Pxl2->GetEntries()-1);
2757 }
2758 
2759 //_____________________________________________________________________________
2760 void StEventQAMaker::MakeHistIST() {
2761 
2762  StIstHitCollection* istHitCollection = event->istHitCollection();
2763 
2764  if (!istHitCollection) {
2765  LOG_WARN << "Error getting pointer to StIstHitCollection" << endm;
2766  return;
2767  }
2768 
2769  for (UInt_t ladderIdx = 0; /* ladderIdx < istHitCollection->numberOfLadders() && */ ladderIdx < (UInt_t) kIstNumLadders; ladderIdx++) {
2770  StIstLadderHitCollection* ladderHitCollection = istHitCollection->ladder(ladderIdx);
2771 
2772  UInt_t numberOfHits = ladderHitCollection->numberOfHits();
2773  hists->m_ist_hit_ladder->Fill(ladderIdx,numberOfHits);
2774 
2775  for (UInt_t sensorIdx = 0; /* sensorIdx < ladderHitCollection->numberOfSensors() && */ sensorIdx < (UInt_t) kIstNumSensorsPerLadder; sensorIdx++) {
2776  StIstSensorHitCollection* sensorHitCollection = ladderHitCollection->sensor(sensorIdx);
2777 
2778  UInt_t nHitsSensor = sensorHitCollection->hits().size();
2779 
2780  //Int_t SensorId = ladderIdx*kIstNumSensorsPerLadder + sensorIdx + 1;
2781  //hists->m_ist_hit_ladder_sensor->Fill(sensorIdx+1,ladderIdx+1, nHitsSensor);
2782  hists->m_ist_hit_ladder_sensor->Fill(ladderIdx+1, sensorIdx+1, nHitsSensor);
2783 
2784  for (UInt_t idx = 0; idx < nHitsSensor; idx++) {
2785 
2786  StIstHit* hit = sensorHitCollection->hits()[idx];
2787  if (hit) {
2788  const StThreeVectorF &pos = hit->position();
2789  hists->m_ist_hit_phi_z->Fill(pos.z(), pos.phi());
2790  // x,y position in the HFT, re-use SSD histogram since it is the most outer layer
2791  hists->m_pnt_xyS->Fill(pos.x(),pos.y());
2792  }
2793  } //end loop over hits
2794  } //loop over sensors
2795  } //loop over ladders
2796 
2797  UInt_t nIstHits = istHitCollection->numberOfHits();
2798  StBTofCollection *btofcol = (StBTofCollection *)(event->btofCollection());
2799  if (btofcol){
2800  Int_t nTofHits = btofcol->tofHits().size();
2801  hists->m_ist_nhit_tof_mult->Fill(nIstHits, nTofHits);
2802  }
2803 
2804  Int_t tpcMult = event->trackNodes().size();
2805  hists->m_ist_nhit_tpc_mult->Fill(nIstHits,tpcMult);
2806 
2807  // Normalizations
2808  Int_t Nevents = - hists->m_primtrk_tot->GetEntries();
2809  hists->m_ist_hit_phi_z->SetBinContent(0,Nevents);
2810  hists->m_ist_hit_ladder->SetBinContent(0,Nevents);
2811  hists->m_ist_hit_ladder_sensor->SetBinContent(0,Nevents);
2812  hists->m_ist_hit_phi_z->SetEntries(hists->m_ist_hit_phi_z->GetEntries()-1);
2813  hists->m_ist_hit_ladder->SetEntries(hists->m_ist_hit_ladder->GetEntries()-1);
2814  hists->m_ist_hit_ladder_sensor->SetEntries(hists->m_ist_hit_ladder_sensor->GetEntries()-1);
2815 }
2816 //_____________________________________________________________________________
2817 void StEventQAMaker::MakeHistSST(){
2818  StSstHitCollection* sstHitCollection = event->sstHitCollection();
2819 
2820  if (!sstHitCollection) {
2821  LOG_WARN << "Error getting pointer to StSstHitCollection" << endm;
2822  return;
2823  }
2824  hists->m_pnt_sst->Fill(sstHitCollection->numberOfHits());
2825  for (UInt_t ladder=0; ladder<sstHitCollection->numberOfLadders(); ladder++) {
2826  StSstLadderHitCollection* sstladder = sstHitCollection->ladder(ladder);
2827  for (UInt_t wafer=0; wafer<sstladder->numberOfWafers(); wafer++) {
2828  StSPtrVecSstHit& sstwaferhits = sstladder->wafer(wafer)->hits();
2829  for (UInt_t l=0; l<sstwaferhits.size(); l++) {
2830  StSstHit* ssthit = sstwaferhits[l];
2831  const StThreeVectorF &hitPos = ssthit->position();
2832  // hitPos = ssthit->position();
2833  Float_t x = hitPos.x();
2834  Float_t y = hitPos.y();
2835  Float_t phi = hitPos.phi()/degree;
2836  if (phi<0) phi += 360.;
2837  hists->m_pnt_phiSST->Fill(phi);
2838  hists->m_pnt_lwSST->Fill(ladder+1,wafer+1);
2839  hists->m_pnt_xyS->Fill(x,y);
2840  hists->m_pnt_sizeSST->Fill(ssthit->clusterSizePSide(),0);
2841  hists->m_pnt_sizeSST->Fill(ssthit->clusterSizeNSide(),1);
2842  hists->m_pnt_eSST->Fill(TMath::Log10(fabs(ssthit->charge())+1e-33));
2843  }
2844  }
2845  }
2846  // Normalizations
2847  Int_t Nevents = - hists->m_primtrk_tot->GetEntries();
2848  hists->m_pnt_phiSST->SetBinContent(0,Nevents);
2849  hists->m_pnt_lwSST->SetBinContent(0,Nevents);
2850  hists->m_pnt_phiSST->SetEntries(hists->m_pnt_phiSST->GetEntries()-1);
2851  hists->m_pnt_lwSST->SetEntries(hists->m_pnt_lwSST->GetEntries()-1);
2852 }
2853 //_____________________________________________________________________________
2854 void StEventQAMaker::MakeHistMTD() {
2855 
2856  StMtdCollection *mtdCollection = event->mtdCollection();
2857  if(mtdCollection)
2858  {
2859  StSPtrVecMtdHit& mtdHits = mtdCollection->mtdHits();
2860  Int_t nMtdHits = mtdHits.size();
2861  hists->m_MtdNHits->Fill(nMtdHits);
2862  Int_t nMthMtdHits = 0;
2863  for(Int_t i=0; i<nMtdHits; i++)
2864  {
2865  StMtdHit *hit = mtdHits[i];
2866  if(!hit) continue;
2867  Int_t backleg = hit->backleg();
2868  Int_t module = hit->module();
2869  Int_t channel = hit->cell();
2870  hists->m_MtdHitMap->Fill(backleg,(module-1)*12+channel);
2871  StTrack *gTrack = hit->associatedTrack();
2872  if(!gTrack) continue;
2873  nMthMtdHits++;
2874  hists->m_MtdMatchHitMap->Fill(backleg,(module-1)*12+channel);
2875  }
2876  hists->m_MtdNMatchHits->Fill(nMthMtdHits);
2877  }
2878 
2879 }
2880 //_____________________________________________________________________________
2881 void StEventQAMaker::MakeHistRP() {
2882 
2883  const Int_t MAXHITS = 10 ; // maximum no. of hits per plane/chain to consider
2884  Double_t POS[kRP_MAXSEQ][kRP_MAXCHAIN][MAXHITS] ;
2885  Int_t NCluster[kRP_MAXSEQ][kRP_MAXCHAIN] ;
2886  Int_t i, j, k, l, m ;
2887 
2888  StRpsCollection *RpsColl = event->rpsCollection();
2889 
2890  if( RpsColl ) {
2891  if ( RpsColl->siliconBunch()==0 || RpsColl->siliconBunch()>8 ) {
2892 
2893  for ( i=0; i<kRP_MAXSEQ ; i++ ) {
2894 
2895  for ( j=0; j<kRP_MAXCHAIN ; j++ ) {
2896 
2897  NCluster[i][j] = 0 ;
2898 
2899  for ( k=0; k<(Int_t) RpsColl->romanPot(i)->plane(j)->numberOfClusters() ; k++ ) {
2900  // m_RP_ClusterLength->Fill( RpsColl->romanPot(i)->plane(j)->cluster(k)->length() ) ;
2901  if ( k<MAXHITS ) {
2902  NCluster[i][j]++ ;
2903  if ( (j%2)==0 )
2904  // A or C : pitch_4svx = 0.00974 cm
2905  POS[i][j][k] = RpsColl->romanPot(i)->plane(j)->cluster(k)->position()/9.74E-5 ;
2906  else
2907  // B or D : pitch_6svx = 0.01050 cm
2908  POS[i][j][k] = RpsColl->romanPot(i)->plane(j)->cluster(k)->position()/1.050E-4 ;
2909  } // if ( k<MAXHITS )
2910  } // for ( Int_t k=0; k<RpsColl->romanPot(i)->plane(j)->numberOfClusters() ; k++ )
2911 
2912  } // for ( j=0; j<kRP_MAXCHAIN ; j++ )
2913 
2914  for ( l = 0; l<kRP_MAXCHAIN; l+=2 ) // 0 or 2
2915  for ( m = 1; m<kRP_MAXCHAIN; m+=2 ) // 1 or 3
2916  for ( k=0; k<NCluster[i][l] && k<MAXHITS ; k++ ) // A and C
2917  for ( j=0; j<NCluster[i][m] && j<MAXHITS ; j++ ) // B and D
2918  m_RP_clusters_xy[i]->Fill( POS[i][m][j] , POS[i][l][k]) ;
2919 
2920  } // for ( i=0; i<kRP_MAXSEQ ; i++ )
2921 
2922  } // if ( RpsColl->siliconBunch()==0 && RpsColl->siliconBunch()>8 ) {
2923  } // if( RpsColl ) {
2924 
2925 }
2926 //_____________________________________________________________________________
2927 void StEventQAMaker::MakeHistEPD() {
2928 
2929  StEpdCollection *epdcol = (StEpdCollection *)(event->epdCollection());
2930  if (!epdcol) return;
2931 
2932  // EPD hits
2933  StSPtrVecEpdHit &epdHits = epdcol->epdHits();
2934  Int_t nEpdHits = epdHits.size();
2935 
2936  for(Int_t i=0;i<nEpdHits;i++) {
2937  StEpdHit *aHit = dynamic_cast<StEpdHit*>(epdHits[i]);
2938  if(!aHit) continue;
2939  if(!(aHit->isGood())) continue;
2940  short side = aHit->side(); //+1/-1 for West/East
2941  int position = aHit->position(); //1....12
2942  int tile = aHit->tile(); //1....31
2943  int adc = aHit->adc();
2944  int histId = (position - 1);
2945  if (side == 1) histId += 12; //0-11 for East, 12-23 for West
2946 
2947  hists->m_epd_adc[histId]->Fill(tile, adc);
2948  if (tile < 10) {
2949  int tac = aHit->tac();
2950  hists->m_epd_tac[histId]->Fill(tile,tac);
2951  }
2952  }
2953 
2954 }
2955 //_____________________________________________________________________________
2956 void StEventQAMaker::MakeHistTPC() {
2957  TDataSet* rawDataSet = FindDataSet("TpxRaw/.data/Event");
2958  if (rawDataSet) {
2959  StTpcRawData* tpcRawData = (StTpcRawData *) rawDataSet->GetObject();
2960  if (tpcRawData) {
2961  for (unsigned int sector = 1; sector <= tpcRawData->getNoSectors(); sector++) {//for sectors
2962  StTpcDigitalSector *digitalSector = tpcRawData->GetSector(sector);
2963  if (digitalSector) {
2964  // digitalSector->Print();
2965  unsigned int nrows = digitalSector->numberOfRows();
2966  unsigned int innerRows = St_tpcPadConfigC::instance()->numberOfInnerRows(sector);
2967  for (unsigned int rowi = 1; rowi <= nrows; rowi ++) {//for rows
2968  StVectPixel pixV;
2969  unsigned int npix = tpcRawData->getVecOfPixels(pixV, (int) sector, rowi);
2970  for (unsigned int iii = 0; iii<npix; iii++) {//for pixels
2971  m_tpc_adc_chargevsrowvstb[sector-1]->Fill(pixV[iii].timebin(),rowi,pixV[iii].adc());
2972  m_tpc_adc_numhitsvsrowvssector->Fill(sector,rowi);
2973  if (rowi < innerRows) {//iTPC rows
2974  m_tpc_adc_chargevstb[sector-1]->Fill(pixV[iii].timebin(),pixV[iii].adc());
2975  if((pixV[iii].timebin() > tblow) && (pixV[iii].timebin() < tbhigh)) {
2976  m_tpc_adc_chargesum[sector-1]->Fill(pixV[iii].pad(),rowi,pixV[iii].adc());
2977  if (pixV[iii].adc() > 3) {
2978  m_tpc_adc_chargepersector->Fill(sector,pixV[iii].adc());
2979  }
2980  }
2981  }
2982  else {//TPX rows
2983  m_tpc_adc_chargevstbTPX[sector-1]->Fill(pixV[iii].timebin(),pixV[iii].adc());
2984  if((pixV[iii].timebin() > tblow) && (pixV[iii].timebin() < tbhigh)) {
2985  m_tpc_adc_chargesum[sector-1]->Fill(pixV[iii].pad(),rowi,pixV[iii].adc());
2986  if (pixV[iii].adc() > 3) {
2987  m_tpc_adc_chargepersectorTPX->Fill(sector,pixV[iii].adc());
2988  }
2989  }
2990  //pixV[iii].Print();
2991  }
2992  }//for pixels
2993  }//for rows
2994  }
2995  }//for sectors
2996  }
2997  }
2998 }
2999 //_____________________________________________________________________________
3000 void StEventQAMaker::MakeHistiTPC() {
3001  StSPtrVecTrackNode & trackNode = event->trackNodes();
3002  int nTracks = trackNode.size();
3003 
3004  StTrackNode * node = 0;
3005  //cout << "Number of tracks : " << nTracks << endl;
3006  for (int track = 0; track < nTracks; track++) {
3007  node = trackNode[track];
3008  if (!node) continue;
3009  // GLOBAL TRACKS
3010  StGlobalTrack* gTrack = static_cast<StGlobalTrack*>(node->track(global));
3011  if (!gTrack) continue;
3012  if (! gTrack->detectorInfo()) continue;
3013  StPtrVecHit ghvec = gTrack->detectorInfo()->hits();
3014  StTrackGeometry * gTrackParams = gTrack->geometry();
3015  if (!gTrackParams) continue;
3016 
3017  for (unsigned int hit = 0; hit < ghvec.size(); hit++) {
3018  //if (hvec[hit]->detector() == kTpcId) {
3019  StTpcHit *tpcHit = static_cast<StTpcHit *> (ghvec[hit]);
3020 
3021  //if (!tpcHit || tpcHit->sector() != 20) continue;
3022 
3023  if (!tpcHit) continue;
3024  if (tpcHit->flag() != 0) continue;
3025  int sec_index = tpcHit -> sector() - 1;
3026  hists->m_TPC_ch_nrow[sec_index]-> Fill(tpcHit->padrow(), tpcHit->adc());
3027 
3028  //alternative way: map.hasHitInDetector(kTpcId) else
3029  /*Int_t minpadrow = 0;
3030  if ((minpadrow <= 45 && map.hasHitInRow(kTpcId,minpadrow)) ||
3031  map.hasHitInRow(kiTpcId,minpadrow))
3032  break;
3033  }
3034  */
3035 
3036  if(tpcHit->padrow()>=45)
3037  {
3038  hists->m_TPC_ch_time_outer[sec_index]-> Fill(tpcHit->timeBucket(), tpcHit->adc());
3039  hists->m_TPC_adc_sec_outer->Fill(tpcHit->sector(), tpcHit->adc());
3040  }
3041  else
3042  {
3043  hists->m_TPC_ch_time_inner[sec_index]-> Fill(tpcHit->timeBucket(), tpcHit->adc());
3044  hists->m_TPC_adc_sec_inner->Fill(tpcHit->sector(), tpcHit->adc());
3045  }
3046 
3047  }
3048  }
3049 }
3050 
3051 //_____________________________________________________________________________
3052 // $Id: StEventQAMaker.cxx,v 2.141 2021/03/20 16:10:54 genevb Exp $
3053 // $Log: StEventQAMaker.cxx,v $
3054 // Revision 2.141 2021/03/20 16:10:54 genevb
3055 // Trigger ID names only available from year 2001 on
3056 //
3057 // Revision 2.140 2021/03/19 15:21:29 genevb
3058 // Only look at trigger information if trigger word is valid
3059 //
3060 // Revision 2.139 2021/03/18 21:35:48 genevb
3061 // Re-work the trigger bits plot to have actual trigger names
3062 //
3063 // Revision 2.138 2019/05/22 21:24:31 genevb
3064 // Add sDCA vs. time-in-run
3065 //
3066 // Revision 2.137 2019/03/14 02:31:52 genevb
3067 // Introduce iTPC plots
3068 //
3069 // Revision 2.136 2019/03/03 06:27:42 genevb
3070 // Oops - left in a debugging line - removing
3071 //
3072 // Revision 2.135 2019/03/01 19:40:37 genevb
3073 // Some minor Run 19 preparations, including first padrow hit
3074 //
3075 // Revision 2.134 2018/07/06 22:13:04 smirnovd
3076 // [Cosmetic] Changes in white space
3077 //
3078 // Revision 2.133 2018/07/06 22:10:26 smirnovd
3079 // [Cosmetic] Inverse test conditions to skip loop iterations
3080 //
3081 // Revision 2.132 2018/07/03 21:33:34 genevb
3082 // Introduce EPD (code provided by J. Ewigleben)
3083 //
3084 // Revision 2.131 2018/06/13 00:14:24 smirnovd
3085 // StEventQAMaker: Use the number of hits associated with the track
3086 //
3087 // The class StEvent/StTrackDetectorInfo looks very confusing to me. But what we
3088 // are interested here is the total number of hits on track which is just the size
3089 // of the internal vector of track hits returned by
3090 // StTrackDetectorInfo::numberOfReferencedPoints()
3091 //
3092 // Revision 2.130 2018/05/02 21:07:40 genevb
3093 // Initial accomodation for iTPC
3094 //
3095 // Revision 2.129 2017/02/25 03:24:30 genevb
3096 // Run 17: remove HFT
3097 //
3098 // Revision 2.128 2016/05/13 22:04:49 genevb
3099 // Address coverity findings: uninit vars, dead code, one PMD error, and one TOF error
3100 //
3101 // Revision 2.127 2016/02/24 22:14:49 genevb
3102 // Use kMaxDetectorId
3103 //
3104 // Revision 2.126 2016/02/24 22:14:05 genevb
3105 // Use kMaxDetectorId
3106 //
3107 // Revision 2.125 2016/02/19 03:54:41 genevb
3108 // Expand track detector ID histograms (compact syntax)
3109 //
3110 // Revision 2.124 2016/02/19 03:52:14 genevb
3111 // Expand track detector ID histograms
3112 //
3113 // Revision 2.123 2016/02/01 23:46:21 genevb
3114 // Add a mode for printing out TPC hits
3115 //
3116 // Revision 2.122 2015/07/20 18:00:41 genevb
3117 // isnan => std::isnan
3118 //
3119 // Revision 2.121 2015/07/17 20:18:14 genevb
3120 // More SSD=>SST (on tracks)
3121 //
3122 // Revision 2.120 2015/07/17 19:09:03 genevb
3123 // SSD copied for SST, and HFT histogams use SST now too
3124 //
3125 // Revision 2.119 2015/04/02 19:53:47 genevb
3126 // TPC dE/dx changes: Bethe-Bloch => Bichsel, and tighter cuts against pile-up tracks
3127 //
3128 // Revision 2.118 2015/03/18 21:43:17 genevb
3129 // Introduce Roman Pots histograms (K. Yip)
3130 //
3131 // Revision 2.117 2015/01/21 17:49:40 genevb
3132 // Fix missing run14 cases, remove unused firstEventClass, re-work normalizations with StHistUtil
3133 //
3134 // Revision 2.116 2015/01/16 21:08:28 genevb
3135 // Initial versions of HFT histograms
3136 //
3137 // Revision 2.115 2014/07/22 20:39:28 genevb
3138 // Add MTD to Offline QA
3139 //
3140 // Revision 2.114 2014/03/17 14:06:18 fisyak
3141 // Add check on ssd_hits.size()
3142 //
3143 // Revision 2.113 2013/03/20 20:17:37 genevb
3144 // Run 13 edits
3145 //
3146 // Revision 2.112 2013/03/12 03:06:02 genevb
3147 // Add FMS/FPD histograms for Run 13+
3148 //
3149 // Revision 2.111 2012/04/23 02:54:36 genevb
3150 // Reduce pile-up contributions in impact parameter plots
3151 //
3152 // Revision 2.110 2012/03/23 23:15:26 genevb
3153 // Include eemcMatch,btofMatch,crossCM in looking for good vertices
3154 //
3155 // Revision 2.109 2012/03/19 02:58:45 genevb
3156 // Using updated trigger type convention
3157 //
3158 // Revision 2.108 2012/03/05 03:42:32 genevb
3159 // Remove TPC XY dist, add TPC RPhi charge
3160 //
3161 // Revision 2.107 2012/02/14 04:02:34 genevb
3162 // fix for run12
3163 //
3164 // Revision 2.106 2012/02/09 03:01:05 genevb
3165 // No FTPC histograms for Run 12+
3166 //
3167 // Revision 2.105 2012/02/08 22:10:35 genevb
3168 // Updates for Run 12
3169 //
3170 // Revision 2.104 2011/07/29 21:52:41 genevb
3171 // Fixed improper initialization of event classes affecting future simulations
3172 //
3173 // Revision 2.103 2011/05/31 21:35:49 genevb
3174 // TPC request: add time bucket distribution of hits
3175 //
3176 // Revision 2.102 2011/05/26 19:59:38 genevb
3177 // Cleanup in destructors
3178 //
3179 // Revision 2.101 2011/05/02 02:26:47 genevb
3180 // QAallTrigs should allow even questionable events
3181 //
3182 // Revision 2.100 2011/04/14 15:31:11 perev
3183 // 1/0 fix
3184 //
3185 // Revision 2.99 2011/03/15 23:08:12 genevb
3186 // Adjust MB for Run 11
3187 //
3188 // Revision 2.98 2011/02/22 20:00:54 genevb
3189 // PCT check and dcaGeom only for TPC tracks
3190 //
3191 // Revision 2.97 2011/02/19 02:20:46 genevb
3192 // Pile-up cuts
3193 //
3194 // Revision 2.96 2011/02/04 02:34:06 genevb
3195 // Replace firsthit position-to-padrow with minimum padrow in topo map
3196 //
3197 // Revision 2.95 2009/11/19 20:34:38 genevb
3198 // Remove Event Summary (using defunct old software monitors)
3199 //
3200 // Revision 2.94 2009/11/19 20:12:10 genevb
3201 // Clean up compiler warnings
3202 //
3203 // Revision 2.93 2009/03/27 21:18:36 genevb
3204 // Add Jet Patch trigger histograms
3205 //
3206 // Revision 2.92 2009/03/19 01:08:08 genevb
3207 // Show both xy and rphi TPC hit hists
3208 //
3209 // Revision 2.91 2009/03/17 19:35:21 genevb
3210 // Weight the TPC xy hit hists
3211 //
3212 // Revision 2.90 2009/03/13 19:27:24 genevb
3213 // Now draw TPC xy hits in polar coords
3214 //
3215 // Revision 2.89 2009/02/21 00:42:52 genevb
3216 // TOF updates (BTOF classes), and single primVtx pointer
3217 //
3218 // Revision 2.88 2009/01/26 15:11:50 fisyak
3219 // Add protection for missing event->info()
3220 //
3221 // Revision 2.87 2008/01/14 17:57:29 genevb
3222 // Get OtherPhysics triggers working
3223 //
3224 // Revision 2.86 2007/12/12 19:50:55 genevb
3225 // Update for trigger words
3226 //
3227 // Revision 2.85 2007/12/10 19:58:20 genevb
3228 // Use log10 for number of secondary vertices
3229 //
3230 // Revision 2.84 2007/11/30 05:38:49 genevb
3231 // Changes for Run8: mostly silicon removal, TOF addition
3232 //
3233 // Revision 2.83 2007/11/07 22:43:00 genevb
3234 // Use highest rank primary vertex (one more)
3235 //
3236 // Revision 2.82 2007/11/07 22:39:07 genevb
3237 // Use highest rank primary vertex (missed a spot on last commit)
3238 //
3239 // Revision 2.81 2007/11/07 20:49:13 genevb
3240 // Use highest rank primary vertex
3241 //
3242 // Revision 2.80 2007/07/19 22:20:41 perev
3243 // FPEfix
3244 //
3245 // Revision 2.79 2007/05/26 00:42:18 perev
3246 // Do Pmd only if exists
3247 //
3248 // Revision 2.78 2007/04/25 18:35:56 genevb
3249 // Additional SSD hists
3250 //
3251 // Revision 2.77 2007/04/24 00:33:58 genevb
3252 // SSD hists
3253 //
3254 // Revision 2.76 2007/04/13 21:25:06 genevb
3255 // Modify window for SVT lasers
3256 //
3257 // Revision 2.75 2007/04/12 20:39:48 genevb
3258 // Cleanup (removal) of CalibVtx, Nfitpnt, Chisq1, Rich, histograms
3259 //
3260 // Revision 2.74 2007/04/07 04:40:30 genevb
3261 // Remove fit pnts/tot; retitle log as log10
3262 //
3263 // Revision 2.73 2007/03/13 18:47:22 genevb
3264 // Added Svt Laser Diff
3265 //
3266 // Revision 2.72 2007/02/26 20:45:01 genevb
3267 // SVT drift hist
3268 //
3269 // Revision 2.71 2006/02/16 20:37:03 perev
3270 // 1/0
3271 //
3272 // Revision 2.70 2005/09/27 20:32:22 genevb
3273 // New method for StMcEvent access
3274 //
3275 // Revision 2.69 2005/05/13 19:38:05 perev
3276 // Defence agains 1/0 added
3277 //
3278 // Revision 2.68 2005/05/11 18:16:06 genevb
3279 // Fixed problem of not using estPrimary tracks
3280 //
3281 // Revision 2.67 2005/02/22 19:38:05 genevb
3282 // Global tracks: use estGlobal if it exists, otherwise fall back to global
3283 //
3284 // Revision 2.66 2005/02/08 17:22:46 genevb
3285 // PMD histo changes, handle estGlobal/ITTF tracks
3286 //
3287 // Revision 2.65 2005/02/05 01:12:25 perev
3288 // test for zero pt added
3289 //
3290 // Revision 2.64 2005/01/27 05:28:25 genevb
3291 // PMD changes
3292 //
3293 // Revision 2.63 2004/12/13 15:52:36 genevb
3294 // Numerous updates: PMD, primtrk, FPD, QAShift lists
3295 //
3296 // Revision 2.62 2004/10/04 16:40:42 genevb
3297 // FTPC radial histos
3298 //
3299 // Revision 2.61 2004/05/29 12:41:42 genevb
3300 // handle absence of tpc & ftpc software monitors
3301 //
3302 // Revision 2.60 2004/04/23 23:15:29 genevb
3303 // Added signedDCA (Impact) plots for globals
3304 //
3305 // Revision 2.59 2004/03/25 21:11:10 genevb
3306 // Fixed filling of eventClass=1 null vertex hist (generally minbias)
3307 //
3308 // Revision 2.58 2004/03/03 01:22:31 genevb
3309 // Small addendum to previous checkin
3310 //
3311 // Revision 2.57 2004/03/03 01:19:29 genevb
3312 // Updated triggerIDs for Jeff Landgraf's scheme
3313 //
3314 // Revision 2.56 2004/02/12 05:03:05 genevb
3315 // Year 4 AuAu changes. New SVT histos.
3316 //
3317 // Revision 2.55 2004/02/05 19:04:30 genevb
3318 // math touchup for arc length calcs
3319 //
3320 // Revision 2.54 2004/01/10 01:10:17 genevb
3321 // Preparations for Year 5, added some svt plots
3322 //
3323 // Revision 2.53 2003/12/04 03:56:26 perev
3324 // 1/0 fix
3325 //
3326 // Revision 2.52 2003/11/25 04:19:38 perev
3327 // FPE protection
3328 //
3329 // Revision 2.51 2003/11/20 03:13:55 perev
3330 // Fix FPE
3331 //
3332 // Revision 2.50 2003/10/25 00:48:49 perev
3333 // Protect chrg_ftpc_tot[0]=0 (1/0)
3334 //
3335 // Revision 2.49 2003/09/19 22:58:11 genevb
3336 // Initialize pointers to zero, some doxygenization
3337 //
3338 // Revision 2.48 2003/09/02 17:59:21 perev
3339 // gcc 3.2 updates + WarnOff
3340 //
3341 // Revision 2.47 2003/04/14 15:20:38 genevb
3342 // Add pp 2003 trigger (first attempt)
3343 //
3344 // Revision 2.46 2003/02/28 16:01:07 genevb
3345 // Further improvements for previous check-in
3346 //
3347 // Revision 2.45 2003/02/28 06:17:55 genevb
3348 // Allow StQAMakerBase::Make to be called for all events
3349 //
3350 // Revision 2.44 2003/02/20 20:09:53 genevb
3351 // Several changes for new trigger scheme, dAu data
3352 //
3353 // Revision 2.43 2003/02/19 06:38:28 genevb
3354 // Rework trigger and mult/event class sections
3355 //
3356 // Revision 2.42 2003/02/15 22:00:52 genevb
3357 // Add tpcSectors, fix ftpc east/west charge
3358 //
3359 // Revision 2.41 2003/01/23 20:53:10 genevb
3360 // Additional dAu changes
3361 //
3362 // Revision 2.40 2003/01/23 04:08:22 jeromel
3363 // Include fixed
3364 //
3365 // Revision 2.39 2003/01/17 15:15:47 genevb
3366 // Add AllTriggers() function to ignore trigger words
3367 //
3368 // Revision 2.38 2002/05/29 13:54:30 genevb
3369 // Some changes to FTPC chisq histos
3370 //
3371 // Revision 2.37 2002/04/23 01:59:55 genevb
3372 // Addition of BBC/FPD histos
3373 //
3374 // Revision 2.36 2002/04/03 21:13:11 lansdell
3375 // primary track first, last point residuals now use outerGeometry() for helix parameters
3376 //
3377 // Revision 2.35 2002/02/23 00:31:26 lansdell
3378 // bug fix: primary vertex check histograms for a multiplicity class did not reflect the correct number of good events
3379 //
3380 // Revision 2.34 2002/02/12 18:41:59 genevb
3381 // Additional FTPC histograms
3382 //
3383 // Revision 2.33 2002/02/10 16:48:28 jeromel
3384 // Attempt to prevent re-creation of mHitHist.
3385 //
3386 // Revision 2.32 2002/02/05 22:27:30 jeromel
3387 // Modifications from David H. Int() -> InitRun().
3388 //
3389 // Revision 2.31 2001/12/28 09:19:12 genevb
3390 // Adjustments for pp running
3391 //
3392 // Revision 2.30 2001/12/20 03:11:07 genevb
3393 // pp trigger words 0x2XXX
3394 //
3395 // Revision 2.29 2001/11/20 21:53:45 lansdell
3396 // added x-y dist of hits, tpc east&west histos
3397 //
3398 // Revision 2.28 2001/11/02 21:57:44 genevb
3399 // Fix mistake in trigger word histogram
3400 //
3401 // Revision 2.27 2001/11/02 20:50:03 genevb
3402 // Changed histogram ranges for momenta
3403 //
3404 // Revision 2.26 2001/10/31 22:08:40 suaide
3405 // fixed EMC histograms
3406 //
3407 // Revision 2.25 2001/10/24 20:11:49 genevb
3408 // Fixed trigger issue for year 1
3409 //
3410 // Revision 2.24 2001/10/15 16:15:02 pavlinov
3411 // Clenup EMC stuff for production
3412 //
3413 // Revision 2.23 2001/09/10 18:00:12 genevb
3414 // Another trigger word
3415 //
3416 // Revision 2.22 2001/09/01 14:24:40 genevb
3417 // Allow trigger word=0 for MC data
3418 //
3419 // Revision 2.21 2001/08/31 21:29:50 genevb
3420 // Check if trigger info exists
3421 //
3422 // Revision 2.20 2001/08/29 20:45:15 genevb
3423 // Trigger word histos
3424 //
3425 // Revision 2.19 2001/08/23 17:57:36 genevb
3426 // Added SVT hit flag
3427 //
3428 // Revision 2.18 2001/08/07 07:51:27 lansdell
3429 // primvtx check for different multiplicities crashed for MC data, now fixed
3430 //
3431 // Revision 2.17 2001/08/03 20:33:55 lansdell
3432 // added primvtx check histos for different multiplicities; separated x-y plot of first point on track, tpc into east and west histos
3433 //
3434 // Revision 2.16 2001/07/31 23:21:42 lansdell
3435 // added last point, hit-helix histos
3436 //
3437 // Revision 2.15 2001/05/25 17:46:59 lansdell
3438 // commented out unnecessary emccol cout statement
3439 //
3440 // Revision 2.14 2001/05/25 16:31:20 lansdell
3441 // more updates to qa shift histograms
3442 //
3443 // Revision 2.13 2001/05/24 01:48:13 lansdell
3444 // qa_shift histograms updated
3445 //
3446 // Revision 2.12 2001/05/23 00:14:52 lansdell
3447 // more changes for qa_shift histograms
3448 //
3449 // Revision 2.11 2001/05/16 20:57:03 lansdell
3450 // new histograms added for qa_shift printlist; some histogram ranges changed; StMcEvent now used in StEventQA
3451 //
3452 // Revision 2.10 2001/05/02 16:10:46 lansdell
3453 // changed some histogram limits
3454 //
3455 // Revision 2.9 2001/05/01 15:17:36 genevb
3456 // Execute EMC code only if EMC libs loaded
3457 //
3458 // Revision 2.8 2001/04/30 19:09:27 genevb
3459 // Catch missing EMC info
3460 //
3461 // Revision 2.7 2001/04/28 22:05:13 genevb
3462 // Added EMC histograms
3463 //
3464 // Revision 2.6 2001/04/25 21:35:25 genevb
3465 // Added V0 phi distributions
3466 //
3467 // Revision 2.5 2001/04/24 22:53:51 lansdell
3468 // Removed redundant radial position of first hit histograms
3469 //
3470 // Revision 2.4 2001/04/24 21:33:05 genevb
3471 // Use det_id to identify detectors, and some cleanup
3472 //
3473 // Revision 2.3 2000/12/08 18:37:22 genevb
3474 // Change kTofPatchId->kTofId
3475 //
3476 // Revision 2.2 2000/09/08 18:55:53 lansdell
3477 // turned on FTPC primary track histograms
3478 //
3479 // Revision 2.1 2000/09/01 16:59:02 genevb
3480 // Change for V0 plots
3481 //
3482 // Revision 2.0 2000/08/25 16:02:39 genevb
3483 // New revision: new structure, multiplicity classes
3484 //
TH2F * m_glb_xfF
x-coord. of first hit on trk, tpc+svt
Definition: StQABookHist.h:277
Int_t histsSet
event class-dependent histograms
TH2F * m_npoint_lengthTS
tot num points vs length, tpc
Definition: StQABookHist.h:385
TH1F * m_glb_impactrTS
log impact parameter from primary vertex, ftpc
Definition: StQABookHist.h:311
TH1F * m_lengthFE
length of track, ftpc
Definition: StQABookHist.h:346
TH1F * m_glb_yfFW
y-coord. of first hit on trk, ftpc east
Definition: StQABookHist.h:284
TH3F * m_pnt_svtLaserDiff
laser spots in svt
Definition: StQABookHist.h:714
TH1F * m_ndedxFW
dE/dx [0], ftpcE
Definition: StQABookHist.h:415
TH1F * m_plengthFE
length of track, ftpc
Definition: StQABookHist.h:527
TH2F * m_primtrk_meanptTTS
detector id of track
Definition: StQABookHist.h:429
TH1F * m_chisq0T
length of track, ftpc west
Definition: StQABookHist.h:348
virtual void MakeHistTOF()
TH2F * m_pT_eta_recT
overlayed hist of first point - helix point
Definition: StQABookHist.h:362
TH1F * m_primglob_good
tracks in table with iflag&gt;0, ftpc
Definition: StQABookHist.h:425
TH1F * m_glb_xf0TS
x-coord. of first hit - at start of helix
Definition: StQABookHist.h:292
TH2F * m_globtrk_padtimeFE
Y vs X of first hit on trk, ftpc west.
Definition: StQABookHist.h:371
TH2F * m_tpc_adc_numhitsvsrowvssector
charge per sector (TPX)
TH1F * m_vtx_FtpcWestTpc_z
FtpcWest prim vtx - TPC prim vtx, x vs y.
Definition: StQABookHist.h:617
TH1F * m_pv_x
row1-vertex type
Definition: StQABookHist.h:590
TH2F * m_pmom_trklengthT
tanl(dip angle) vs zfirst-zvtx, tpc+svt
Definition: StQABookHist.h:552
TH1F * m_ndedxr
psi vs phi, tpc+svt
Definition: StQABookHist.h:402
TH2F * m_pchisq0_zfTS
chisq0 vs zfirst, tpc
Definition: StQABookHist.h:572
TH2F * m_tof_hit_module
of hits vs tray # (int over modules)
Definition: StQABookHist.h:769
TH1F * m_dcaToBeamZ1
xy-dca to beam axis
Definition: StQABookHist.h:232
TH1F * m_geant_reco_pvtx_z
prim vtx y, diff geant - reco
Definition: StQABookHist.h:649
TH1F * m_prim_zfT
y-coord. of first hit on trk, ftpc west
Definition: StQABookHist.h:477
TH1F * m_global_ist_hit
of hits in IST vs TOF track multiplicity
Definition: StQABookHist.h:763
TH2F * m_glb_impactF
log impact parameter from primary vertex, tpc,tpc+svt
Definition: StQABookHist.h:310
TH1F * m_kink_tot
xi Mass
Definition: StQABookHist.h:611
TH1F * m_vtx_FtpcEastTpc_z
FtpcEast prim vtx - TPC prim vtx, x vs y.
Definition: StQABookHist.h:615
TH1F * m_glb_chargeFW
particle charge in units of |e| - ftpc east
Definition: StQABookHist.h:264
TH1F * m_ppsiT
radial (xy) coordinate of first hit, ftpc west
Definition: StQABookHist.h:497
TH2F * m_prim_f0
chi square [1], ftpc west
Definition: StQABookHist.h:539
TH2F * m_primtrk_xf_yfTW
Y vs X of first hit on trk, tpc east.
Definition: StQABookHist.h:546
TH1F * m_glb_xf0
plane of first hit on trk, ftpc
Definition: StQABookHist.h:291
TH1F * m_petaTS
eta, tpc
Definition: StQABookHist.h:508
TH1F * m_dedx0FW
number of point to find dE/dx, ftpcW
Definition: StQABookHist.h:416
TH1F * m_etaTS
eta, tpc
Definition: StQABookHist.h:328
TH2F * m_pTTTS
pT, tpc+svt
Definition: StQABookHist.h:340
TH1F * m_pnt_tot_med
number of hits total
Definition: StQABookHist.h:637
TH1F * m_petaT
theta - tpc+svt
Definition: StQABookHist.h:507
TH1F * m_pchisq0T
length of track, ftpc west
Definition: StQABookHist.h:529
TH1F * m_pnt_tot_sm
number of hits total, med range
Definition: StQABookHist.h:638
TH2F * m_chisq0_zfTS
chisq0 vs zfirst, tpc
Definition: StQABookHist.h:395
TH2F * m_peta_trklengthT
mom vs. trk length, tpc+svt
Definition: StQABookHist.h:554
TH1F * m_ppointFE
number of points on the track - ftpc
Definition: StQABookHist.h:437
TH2F * m_glb_rzf0
z-coord. of first hit - at start of helix+svt
Definition: StQABookHist.h:297
TH2F * m_primtrk_meanetaTTS
&lt;pT&gt;, ftpc
Definition: StQABookHist.h:431
TH2F * m_petaF
eta, tpc,tpc+svt
Definition: StQABookHist.h:510
TH1F * m_prim_zfFE
z-coord. of first hit on trk, ftpc
Definition: StQABookHist.h:480
TH2F * m_pnt_timeT
z dist. of hits, svt
Definition: StQABookHist.h:623
TH1F * m_pTFW
pT, ftpc east
Definition: StQABookHist.h:343
TH2F * m_ist_nhit_tpc_mult
of hits vs ladder vs sensor
Definition: StQABookHist.h:761
TH1F * m_global_hft_hit
of hits in ITS vs hits in ITS
Definition: StQABookHist.h:740
TH2F * m_pfpoint_lengthTS
num fit points vs length, tpc
Definition: StQABookHist.h:559
virtual Int_t Make()
TH1F * m_primary_hft_hit
HFT hits per global track.
Definition: StQABookHist.h:741
TH1F * m_glb_yfT
x-coord. of first hit on trk, ftpc west
Definition: StQABookHist.h:280
TH2F * m_pnt_xyFE
barrel dist. of hits, svt
Definition: StQABookHist.h:631
TH1F * m_prim_xfFW
x-coord. of first hit on trk, ftpc east
Definition: StQABookHist.h:471
TH2F * m_chisq0_phiT
chisq0 vs zfirst, tpc+svt
Definition: StQABookHist.h:396
TH2F * m_pmomF
momentum, tpc+svt
Definition: StQABookHist.h:515
TH2F * m_glb_impactT
chi square [1], ftpc west
Definition: StQABookHist.h:356
TH2F * m_chisq0_momTS
chisq0 vs momentum, tpc
Definition: StQABookHist.h:389
TH1F * m_prim_xf0TS
x-coord. of first hit - at start of helix
Definition: StQABookHist.h:483
TH2F * m_primtrk_xf_yfTE
pT versus eta, ftpcW
Definition: StQABookHist.h:545
TH1F * m_prim_radfFE
radial (xy) coordinate of first hit, ftpc
Definition: StQABookHist.h:495
TH1F * m_glb_radfT
transverse &amp; longitudinal helix center of last hit - helix hit+svt
Definition: StQABookHist.h:301
TH2F * m_pT_eta_recTS
pT versus eta, tpc
Definition: StQABookHist.h:363
TH1F * m_primtrk_good_sm
tracks in table with iflag&gt;0
Definition: StQABookHist.h:422
TH1F * m_prim_radfFW
radial (xy) coordinate of first hit, ftpc east
Definition: StQABookHist.h:496
TH1F * m_prim_xfFE
x-coord. of first hit on trk, ftpc
Definition: StQABookHist.h:470
TH2F * m_pT_eta_recFE
pT versus eta, tpc+svt
Definition: StQABookHist.h:364
TH1F * m_pTT
momentum, ftpc west
Definition: StQABookHist.h:338
TH1F * m_prim_radfTS
radial (xy) coordinate of first hit, tpc
Definition: StQABookHist.h:493
TH1F * m_v_pchi2
system
Definition: StQABookHist.h:586
TH2F * m_prim_rzf0TS
transverse &amp; longitudinal helix center of last hit - helix hit
Definition: StQABookHist.h:490
TH1F * m_xi_tot
K0 mass.
Definition: StQABookHist.h:607
TH2F * m_ppTF
pT, tpc,tpc+svt
Definition: StQABookHist.h:521
TH1F * m_global_pxl_hit
of hits in inner vs outer PIXEL layer
Definition: StQABookHist.h:754
TH1F * m_v_z
STAR reference.
Definition: StQABookHist.h:585
TH2F * m_glb_impactTTS
signed impact parameter from primary vertex, tpc+svt
Definition: StQABookHist.h:309
TH1F * m_ppointFW
number of points on the track - ftpc east
Definition: StQABookHist.h:438
TH2F * m_tof_match_module
of matched hits vs tray
Definition: StQABookHist.h:771
TH2F * m_npoint_lengthT
num fit points vs length, tpc,tpc+svt
Definition: StQABookHist.h:384
TH2F * m_tof_hit_tray
of IST hits per primary track
Definition: StQABookHist.h:768
TH1F * m_dcaToBeamZ2
z-dca to beam axis -210 to -105
Definition: StQABookHist.h:233
TH2F * m_ppT_eta_recTS
pT versus eta, tpc
Definition: StQABookHist.h:542
TH2F * m_chisq0_phiTS
chisq0 vs phi, tpc
Definition: StQABookHist.h:397
TH1F * m_prim_z0T
azimuthal angle at start (deg), tpc+svt
Definition: StQABookHist.h:463
TH1F * m_emc_point_sigeta[4]
Point Phi spectra.
Definition: StQABookHist.h:682
TH1F * m_chisq1FE
chi square [1], ftpc
Definition: StQABookHist.h:354
TH2F * m_ppsi_phiT
chisq0 vs zfirst, tpc+svt
Definition: StQABookHist.h:573
TH1F * m_glb_thetaT
tan(dip) =pz/pt at start, tpc+svt
Definition: StQABookHist.h:325
TH2F * m_prim_ratiomF
ratio of n fit pnts over max n pnts - tpc+svt
Definition: StQABookHist.h:451
TH1F * m_pchisq0FW
chi square [0], ftpc east
Definition: StQABookHist.h:534
TH1F * m_v0
z distribution of V0s relative to primVtx
Definition: StQABookHist.h:602
TH1F * m_pmax_pointTS
number of max possible track points - tpc
Definition: StQABookHist.h:440
TH1F * m_v_num_sm
number of vertices
Definition: StQABookHist.h:581
TH1F * m_prim_yf0TS
y-coord. of first hit - at start of helix
Definition: StQABookHist.h:485
TH1F * m_pTFE
pT, ftpc
Definition: StQABookHist.h:342
TH2F * m_pchisq0_dipTS
chisq0 vs dip angle, tpc
Definition: StQABookHist.h:570
TH2F * m_mom_trklengthTS
mom vs. trk length, tpc
Definition: StQABookHist.h:376
TH1F * m_chisq0FE
chi square [0], ftpc
Definition: StQABookHist.h:351
TH2F * m_ppT_eta_recFW
pT versus eta, ftpcE
Definition: StQABookHist.h:544
TH2F * m_chisq0F
chi square [0], tpc,svt
Definition: StQABookHist.h:350
TH2F * m_eta_trklengthFE
trk length vs. eta, tpc+svt
Definition: StQABookHist.h:379
TH1F * m_dedx1T
dE/dx [0], tpc
Definition: StQABookHist.h:406
TH1F * m_ppTFE
pT, ftpc
Definition: StQABookHist.h:522
TH2F * m_pxl_nhit_Pxl1_Pxl2
of hits in outer PIXEL layer vs TOF track multiplicity
Definition: StQABookHist.h:753
TH2F * m_globtrk_xf_yfTE
pT versus eta, ftpcW
Definition: StQABookHist.h:366
TH2F * m_pchisq1F
chi square [0], ftpc west
Definition: StQABookHist.h:535
TH1F * m_emc_point_delphi[4]
Point DeltaEta spectra.
Definition: StQABookHist.h:685
TH1F * m_ist_hit_ladder
of hits vs phi vs z position
Definition: StQABookHist.h:759
TH1F * m_psiTS
psi reconstructed, tpc
Definition: StQABookHist.h:318
TH1F * m_pnt_tpc
detector ID of the hit
Definition: StQABookHist.h:641
TH1F * m_vtx_phi_dist
radius to primary vertex
Definition: StQABookHist.h:597
TH2F * m_globtrk_padtimeFW
padlength vs timelength of hits on track, ftpcE
Definition: StQABookHist.h:372
TH2F * m_pnt_rpTE
rphi dist. of hits, tpcW
Definition: StQABookHist.h:626
TH1F * m_primtrk_tot_sm
tracks in table
Definition: StQABookHist.h:420
void StoreMapInfo()
A destructor.
short side() const
+1 if tile is on West side; -1 if on East side
Definition: StEpdHit.h:145
TH1F * m_v_y
vertex coordinates in
Definition: StQABookHist.h:584
TH2F * m_pfpoint_lengthTTS
num fit points vs length, tpc+svt
Definition: StQABookHist.h:560
TH2F * m_petaTTS
eta, tpc+svt
Definition: StQABookHist.h:509
TH2F * m_tof_vtx_z
of tof hits vs # of vpd hits
Definition: StQABookHist.h:773
TH2F * m_fit_pointTTS
number of track points used for fitting - tpc+svt
Definition: StQABookHist.h:252
TH2F * m_primtrk_meanptF
&lt;pT&gt;, tpc, tpc+svt
Definition: StQABookHist.h:430
Definition: tof.h:15
TH2F * m_chisq0_dipT
chisq0 vs eta, tpc+svt
Definition: StQABookHist.h:392
TH2F * m_tpc_clust_statsvsrow[24]
status of clusters
TH1F * m_glb_xfFW
x-coord. of first hit on trk, ftpc east
Definition: StQABookHist.h:279
TH2F * m_ptanl_zfTS
tanl(dip angle) vs zfirst-zvtx, tpc
Definition: StQABookHist.h:551
TH2F * m_geant_reco_vtx_z_z
prim vtx z, diff geant - reco
Definition: StQABookHist.h:650
TH1F * m_etaFE
eta, ftpc
Definition: StQABookHist.h:331
TH1F * m_pchisq0TS
chi square [0], tpc
Definition: StQABookHist.h:530
TH1F * m_pv_y
row1-vertex coordinates in
Definition: StQABookHist.h:591
TH2F * m_chisq0_dipTS
chisq0 vs dip angle, tpc
Definition: StQABookHist.h:393
TH1F * m_prim_zf0
y-coord. of first hit - at start of helix+svt
Definition: StQABookHist.h:486
TH1F * m_pfit_pointTS
number of track points used for fitting - tpc
Definition: StQABookHist.h:445
TH1F * m_prim_radfT
transverse &amp; longitudinal helix center of last hit - helix hit+svt
Definition: StQABookHist.h:492
TH1F * m_glb_zfFW
z-coord. of first hit on trk, ftpc east
Definition: StQABookHist.h:289
TH2F * m_vtx_FtpcEastTpc_xy
number of kinks
Definition: StQABookHist.h:614
TH1F * m_glb_zf0TS
z-coord. of first hit - at start of helix
Definition: StQABookHist.h:296
TH1F * m_dcaToBeamZ3
z-dca to beam axis -105 to 0
Definition: StQABookHist.h:234
TH2F * m_fpoint_lengthT
trk length vs. eta, ftpc west
Definition: StQABookHist.h:381
TH1F * m_pv_pchi2
x versus y
Definition: StQABookHist.h:594
TH1F * m_glb_phi0TS
azimuthal angle at start (deg), tpc
Definition: StQABookHist.h:268
TH1F * m_pfit_pointT
number of max possible track points - ftpc west
Definition: StQABookHist.h:444
TH1PtrMap mFMShistograms
signed impact parameter from primary vertex vs. time
TH1F * m_max_pointFW
number of max possible track points - ftpc east
Definition: StQABookHist.h:249
const int kIstNumLadders
24 IST Ladders
TH2F * m_glb_radfF
impact parameter from primary vertex, ftpc
Definition: StQABookHist.h:314
TH1F * m_prim_chargeFW
particle charge in units of |e| - ftpc east
Definition: StQABookHist.h:458
TH1F * m_pointFW
number of points on the track - ftpc east
Definition: StQABookHist.h:244
TH1F * m_pnt_zS
z dist. of hits, tpc
Definition: StQABookHist.h:622
TH2F * m_pxl_nhit_Pxl1_tof_mult
of hits in outer PIXEL layer vs TPC track multiplicity
Definition: StQABookHist.h:751
TH2F * m_chisq0_momT
tot num points vs length, ftpc west
Definition: StQABookHist.h:388
TH1F * m_chisq1FW
chi square [1], ftpc east
Definition: StQABookHist.h:355
TH1F * m_glb_ratiomT
ratio of n fit pnts over max n pnts - tpc,tpc+svt
Definition: StQABookHist.h:255
TH2F * m_tpc_clust_pxltb
adc hits vs row vs sector
TH2F * m_p_dedx_rec
psi vs phi, tpc+svt
Definition: StQABookHist.h:577
TH2F * m_tpc_clust_chargevstb[24]
cluster sum over all events
TH1F * m_glb_padfT
z-coord at start (cm), tpc+svt
Definition: StQABookHist.h:271
TH1F * m_ppTT
momentum, ftpc west
Definition: StQABookHist.h:518
int position() const
position of supersector on a wheel [1,12]
Definition: StEpdHit.h:147
TH2F * m_tof_PID
vertex z from vpd vs verex z from TPC
Definition: StQABookHist.h:774
TH2F * m_glb_simpactT
log impact parameter from primary vertex, tpc
Definition: StQABookHist.h:357
TH2F * m_pchisq0_dipT
chisq0 vs eta, tpc+svt
Definition: StQABookHist.h:569
TH1F * m_globtrk_fit_prob
Definition: StQABookHist.h:223
TH2F * m_ppTTTS
pT, tpc+svt
Definition: StQABookHist.h:520
TH2F * m_glb_padfTEW
padrow of first hit on trk, tpc
Definition: StQABookHist.h:272
TH2F * m_glb_impactTS
chi square [0], tpc+svt
Definition: StQABookHist.h:307
TH2F * m_prim_radfF
radial (xy) coordinate of first hit, tpc+svt
Definition: StQABookHist.h:494
TH1F * m_pnt_barrelS
padrow dist. of hits, tpc
Definition: StQABookHist.h:630
TH1F * m_ppsiFW
psi reconstructed, ftpc east
Definition: StQABookHist.h:502
TH2F * m_ist_hit_ladder_sensor
of hits vs x ladder (integrated over ladder, per event)
Definition: StQABookHist.h:760
TH1F * m_prim_yfFE
y-coord. of first hit on trk, ftpc
Definition: StQABookHist.h:475
TH2F * m_pnt_planeF
padlength vs timelength of hits, ftpcW
Definition: StQABookHist.h:635
TH1F * m_prim_curvTS
curvature (1/cm), tpc
Definition: StQABookHist.h:466
TH1F * m_prim_zfTS
z-coord. of first hit on trk, tpc
Definition: StQABookHist.h:478
TH1F * m_prim_zfFW
z-coord. of first hit on trk, ftpc east
Definition: StQABookHist.h:481
TH2F * m_glb_chargeF
particle charge in units of |e| - tpc+svt
Definition: StQABookHist.h:262
TH1F * m_ppointT
&lt;eta&gt;, ftpc
Definition: StQABookHist.h:434
TH1F * m_glb_xfT
curvature (1/cm), tpc+svt
Definition: StQABookHist.h:275
TH1F * m_prim_chargeFE
particle charge in units of |e| - ftpc
Definition: StQABookHist.h:457
TH1F * m_tpc_clust_chargeTPX[24]
charge per cluster (inner)
TH1F * m_glb_phifTS
phi dist. of first point on trk, tpc
Definition: StQABookHist.h:304
TH2F * m_ppT_eta_recFE
pT versus eta, tpc+svt
Definition: StQABookHist.h:543
TH1F * m_petaFE
eta, ftpc
Definition: StQABookHist.h:511
TH2F * m_vtx_FtpcWestTpc_xy
FtpcEast prim vtx z - TPC prim vtx z.
Definition: StQABookHist.h:616
TH2F * m_glb_rzf0TS
transverse &amp; longitudinal helix center of last hit - helix hit
Definition: StQABookHist.h:299
TH2F * m_glb_impactrTTS
impact parameter from primary vertex, tpc+svt
Definition: StQABookHist.h:312
TH2F * m_glb_zfF
z-coord. of first hit on trk, tpc+svt
Definition: StQABookHist.h:287
TH1F * m_pointFE
number of points on the track - ftpc
Definition: StQABookHist.h:243
TH2F * m_eta_trklengthTS
trk length vs. eta, tpc
Definition: StQABookHist.h:378
TH1F * m_globtrk_goodTTS
tracks in table with iflag&gt;0,small range
Definition: StQABookHist.h:227
int adc() const
ADC value [0,4095].
Definition: StEpdHit.h:149
TH1F * m_psiFE
psi reconstructed, ftpc
Definition: StQABookHist.h:321
TH1F * m_glb_phi0T
radius at start (cm), tpc+svt
Definition: StQABookHist.h:267
TH2F * m_eta_trklengthT
mom vs. trk length, tpc+svt
Definition: StQABookHist.h:377
virtual Int_t Make()
Definition: StMaker.cxx:898
TH2F * m_tpc_clust_chargevstbTPX[24]
charge vs. time bucket (inner)
TH1F * m_ppTTS
pT, tpc
Definition: StQABookHist.h:519
TH1F * m_glb_xfFE
x-coord. of first hit on trk, ftpc
Definition: StQABookHist.h:278
TH2F * m_eta_trklengthFW
trk length vs. eta, ftpc east
Definition: StQABookHist.h:380
TH2F * m_pnt_padtimeFW
padlength vs timelength of hits, ftpcE
Definition: StQABookHist.h:634
TH1F * m_prim_ratiomT
ratio of n fit pnts over tot n pnts - ftpc west
Definition: StQABookHist.h:449
TH1F * m_prim_xf0
z-coord. of first hit on trk, ftpc west
Definition: StQABookHist.h:482
TH1F * m_pnt_ssd
SVT drift.
Definition: StQABookHist.h:718
TH2F * m_pchisq0F
chi square [0], tpc,tpc+svt
Definition: StQABookHist.h:532
TH2F * m_pointF
number of points on the track - tpc+svt
Definition: StQABookHist.h:242
TH1F * m_pmax_pointFE
number of max possible track points - ftpc
Definition: StQABookHist.h:442
TH1F * m_v_x
vertex type
Definition: StQABookHist.h:583
TH2F * m_glb_f0
impact parameter from primary vertex, tpc
Definition: StQABookHist.h:360
TH2F * m_globtrk_xf_yfFE
Y vs X of first hit on trk, tpc+svt.
Definition: StQABookHist.h:369
pair< double, double > pathLength(double r) const
path length at given r (cylindrical r)
Definition: StHelix.cc:351
TH1F * m_glb_xfTS
x-coord. of first hit on trk, tpc
Definition: StQABookHist.h:276
TH1F * m_prim_zf0TS
z-coord. of first hit - at start of helix
Definition: StQABookHist.h:487
TH1F * m_dedx0T
number of point to find dE/dx, tpc
Definition: StQABookHist.h:405
TH1F * m_pmomTS
momentum, tpc
Definition: StQABookHist.h:514
TH2F * m_primtrk_goodF
tracks in table with iflag&gt;0, tpc,svt
Definition: StQABookHist.h:424
TH2F * m_ptanl_zfT
Y vs X of first hit on trk, ftpc west.
Definition: StQABookHist.h:550
Accessor to the database for trigger id information.
double ycenter() const
x-center of circle in xy-plane
Definition: StHelix.cc:215
TH1F * m_pnt_phiS
phi dist. of hits, tpc
Definition: StQABookHist.h:628
TH1F * m_glb_radfFW
radial (xy) coordinate of first hit, ftpc east
Definition: StQABookHist.h:316
TH1F * m_prim_xfTS
x-coord. of first hit on trk, tpc
Definition: StQABookHist.h:468
TH1F * m_glb_yf0
x-coord. of first hit - at start of helix+svt
Definition: StQABookHist.h:293
TH1F * m_glb_impactrT
signed impact parameter from primary vertex, tpc
Definition: StQABookHist.h:358
TH1F * m_ndedxFE
dE/dx [0], ftpc
Definition: StQABookHist.h:412
TH2F * m_prim_f0TS
overlayed hist of first point - helix point
Definition: StQABookHist.h:540
TH1F * m_momT
eta, ftpc west
Definition: StQABookHist.h:333
TH1F * m_glb_chargeTS
particle charge in units of |e| - tpc
Definition: StQABookHist.h:261
TH1F * m_ev0_k0ma_hist
Lambda mass.
Definition: StQABookHist.h:604
TH2F * m_glb_rzl0
transverse &amp; longitudinal helix center of first hit - helix hit
Definition: StQABookHist.h:298
TH2F * m_peta_trklengthTS
trk length vs. eta, tpc
Definition: StQABookHist.h:555
TH2F * m_pxl_nhit_Pxl2_tof_mult
of hits in inner PIXEL layer vs TOF track multiplicity
Definition: StQABookHist.h:752
TH1F * m_chisq0TS
length of track, tpc+svt
Definition: StQABookHist.h:306
TH2F * m_primtrk_xf_yfFW
Y vs X of first hit on trk, ftpc east.
Definition: StQABookHist.h:549
TH2F * m_tpc_adc_chargevsrowvstb[24]
ADC charge vs. time bucket (outer)
TH1F * m_globtrk_iflag
tracks in table with iflag&gt;0, ftpc
Definition: StQABookHist.h:229
TH1F * m_pmomT
eta, ftpc west
Definition: StQABookHist.h:513
Collection of trigger ids as stored in StEvent.
TH1F * m_v_num
dedx vs p
Definition: StQABookHist.h:580
TH2F * m_zDcaZf
z-dca vs tanl
Definition: StQABookHist.h:236
TH1F * m_petaFW
eta, ftpc east
Definition: StQABookHist.h:512
TH1F * m_glb_radfTS
radial (xy) coordinate of first hit, tpc
Definition: StQABookHist.h:302
TH1F * m_emc_points[4]
Point TrMom spectra.
Definition: StQABookHist.h:687
TH2F * m_ppsiTTS
psi reconstructed, tpc+svt
Definition: StQABookHist.h:499
TH1F * m_primtrk_goodTTS
tracks in table with iflag&gt;0, small range
Definition: StQABookHist.h:423
TH2F * m_tpc_clust_pxlp
cluster pixel time bucket size (outer)
TH1F * m_vtx_z_dist
radial distribution of V0s relative to primVtx
Definition: StQABookHist.h:599
TH1F * m_pmax_pointT
number of points on the track - ftpc west
Definition: StQABookHist.h:439
TH2F * m_tof_match_tray
of hits vs module # (int over trays, east side use -32 - -1)
Definition: StQABookHist.h:770
TH1F * m_tanlTS
tan(dip) =pz/pt at start, tpc
Definition: StQABookHist.h:324
TH2F * m_chisq0_etaTS
chisq0 vs eta, tpc
Definition: StQABookHist.h:391
TH2F * m_fpoint_lengthTS
num fit points vs length, tpc
Definition: StQABookHist.h:382
TH2F * m_prim_yfF
y-coord. of first hit on trk, tpc+svt
Definition: StQABookHist.h:474
TH2F * m_pnt_ftpc
number of hits tpc
Definition: StQABookHist.h:642
TH1F * m_prim_thetaT
tan(dip) =pz/pt at start, tpc+svt
Definition: StQABookHist.h:505
TH1F * m_max_pointFE
number of max possible track points - ftpc
Definition: StQABookHist.h:248
TH2F * m_glb_f0TS
overlayed hist of first point - helix point
Definition: StQABookHist.h:361
TH1F * m_glb_zf0
y-coord. of first hit - at start of helix+svt
Definition: StQABookHist.h:295
TH2F * m_pv_xy
system
Definition: StQABookHist.h:593
TH2F * m_glb_impactrF
impact parameter from primary vertex, tpc,tpc+svt
Definition: StQABookHist.h:313
TH1F * m_det_id
iflag value
Definition: StQABookHist.h:230
TH1F * m_pnt_phiSSD
number of hits ssd
Definition: StQABookHist.h:719
TH2F * m_pnt_xyFW
xy dist. of hits, ftpcE
Definition: StQABookHist.h:632
TH1F * m_pv_z
STAR reference.
Definition: StQABookHist.h:592
TH2F * m_prim_rzl0TS
transverse &amp; longitudinal helix center of first hit - helix hit+svt
Definition: StQABookHist.h:491
virtual void MakeHistDE()
histograms filled in MakeHistPID() method
TH2F * m_dcaToBeamXY
detector id of track
Definition: StQABookHist.h:231
TH1F * m_pv_vtxid
radius to vertex
Definition: StQABookHist.h:589
TH1F * m_pointTS
number of points on the track - tpc
Definition: StQABookHist.h:241
TH2F * m_psiTTS
psi reconstructed, tpc+svt
Definition: StQABookHist.h:319
TH1F * m_glb_yfTS
y-coord. of first hit on trk, tpc
Definition: StQABookHist.h:281
TH2F * m_prim_chargeF
particle charge in units of |e| - tpc+svt
Definition: StQABookHist.h:456
TH2F * m_zDcaTanl
z-dca to beam axis 0 to 105
Definition: StQABookHist.h:235
TH1F * m_etaFW
eta, ftpc east
Definition: StQABookHist.h:332
TH2F * m_glb_phifT
radial (xy) coordinate of first hit, tpc+svt
Definition: StQABookHist.h:303
StQABookHist * hists
pointers to the histogram classes for the
TH2F * m_chisq0_zfT
chisq0 vs dip angle, tpc+svt
Definition: StQABookHist.h:394
TH2F * m_pT_eta_recFW
pT versus eta, ftpcE
Definition: StQABookHist.h:365
TH1F * m_pmomFE
momentum, ftpc
Definition: StQABookHist.h:516
TH2F * m_prim_rzl0
transverse &amp; longitudinal helix center of first hit - helix hit
Definition: StQABookHist.h:489
TH1F * m_momTS
momentum, tpc
Definition: StQABookHist.h:334
TH1F * m_pchisq1FE
chi square [1], ftpc
Definition: StQABookHist.h:536
TH1F * m_glb_ratiomFE
ratio of n fit pnts over max n pnts - ftpc
Definition: StQABookHist.h:258
TH2F * m_tpc_clust_pxltbTPX
cluster pixel time bucket size (inner)
TH1F * m_glb_curvTS
curvature (1/cm), tpc
Definition: StQABookHist.h:274
TH1F * m_plengthFW
length of track, ftpc east
Definition: StQABookHist.h:528
TH1F * m_momFW
momentum, ftpc east
Definition: StQABookHist.h:337
TH1F * m_ev0_lama_hist
v0 vertices
Definition: StQABookHist.h:603
TH2F * m_pchisq0_etaTS
chisq0 vs eta, tpc
Definition: StQABookHist.h:568
TH2F * m_primtrk_xf_yfTS
Y vs X of first hit on trk, tpc west.
Definition: StQABookHist.h:547
TH2F * m_pxl_hit_phi_z_Pxl1
HFT hits per primary track.
Definition: StQABookHist.h:744
TH1F * m_plengthTS
length of track, tpc
Definition: StQABookHist.h:525
TH2F * m_pxl_hit_sector_sensor_Pxl1
of hits vs x ladder (integrated over ladder, per event)
Definition: StQABookHist.h:747
TH2F * m_tpc_clust_chargevsrow[24]
charge vs. time bucket (outer)
TH1F * m_lengthFW
length of track, ftpc east
Definition: StQABookHist.h:347
TH1F * m_primary_pxl_hit
of PIXEL hits per global track
Definition: StQABookHist.h:755
TH1F * m_glb_curvT
padrow of first hit on trk, tpc east and west
Definition: StQABookHist.h:273
TH1F * m_pnt_tot
plane dist. of hits, ftpc
Definition: StQABookHist.h:636
TH1F * m_prim_chargeT
ratio of n fit pnts over max n pnts - ftpc west
Definition: StQABookHist.h:454
virtual TObject * GetObject() const
The depricated method (left here for the sake of the backward compatibility)
Definition: TDataSet.cxx:428
TH2F * m_globtrk_goodF
tracks in table with iflag&gt;0, tpc, tpc+svt
Definition: StQABookHist.h:228
TH1F * m_primtrk_good
tracks in table, small range
Definition: StQABookHist.h:421
TH2F * m_pnpoint_lengthTS
tot num points vs length, tpc
Definition: StQABookHist.h:562
TH2F * m_nhit_Pxl_Sst
of hits in PIXEL vs hits in IST
Definition: StQABookHist.h:738
TH1F * m_glb_ratiomFW
ratio of n fit pnts over max n pnts - ftpc east
Definition: StQABookHist.h:259
TH1F * m_prim_yfTS
y-coord. of first hit on trk, tpc
Definition: StQABookHist.h:473
TH2F * m_glb_yfF
y-coord. of first hit on trk, tpc+svt
Definition: StQABookHist.h:282
TH2F * m_pnpoint_lengthT
num fit points vs length, tpc
Definition: StQABookHist.h:561
TH2F * m_svt_loc
diff of laser spots in svt
Definition: StQABookHist.h:715
TH2F * m_pnpoint_lengthFE
tot num points vs length, tpc+svt
Definition: StQABookHist.h:563
TH1F * m_pdet_id
iflag value
Definition: StQABookHist.h:428
TH1F * m_pTTS
pT, tpc
Definition: StQABookHist.h:339
TH2F * m_glb_rzl0TS
transverse &amp; longitudinal helix center of first hit - helix hit+svt
Definition: StQABookHist.h:300
TH1F * m_ppointTS
number of points on the track - tpc
Definition: StQABookHist.h:435
Stores information for tiles in STAR Event Plane Detector.
Definition: StEpdHit.h:43
TH1F * m_glb_r0TS
radius at start (cm), tpc
Definition: StQABookHist.h:266
TH1F * m_pchisq1FW
chi square [1], ftpc east
Definition: StQABookHist.h:537
TH1F * m_primtrk_tot
dE/dx [0], ftpcW
Definition: StQABookHist.h:419
TH2F * m_nhit_Ist_Sst
of hits in PIXEL vs hits in SST
Definition: StQABookHist.h:739
TH1F * m_prim_r0TS
radius at start (cm), tpc
Definition: StQABookHist.h:460
TH2F * m_pchisq0_etaT
chisq0 vs momentum, tpc+svt
Definition: StQABookHist.h:567
TH1F * m_glb_yfFE
y-coord. of first hit on trk, ftpc
Definition: StQABookHist.h:283
TH2F * m_ppsi_phiTS
psi vs phi, tpc
Definition: StQABookHist.h:574
TH1F * m_emc_point_trmom[4]
Point DeltaPhi spectra.
Definition: StQABookHist.h:686
TH1F * m_pmomFW
momentum, ftpc east
Definition: StQABookHist.h:517
TH1F * m_pointT
z-dca vs phi0
Definition: StQABookHist.h:240
TH1F * m_ptanlTS
tan(dip) =pz/pt at start, tpc
Definition: StQABookHist.h:504
TH1F * m_glb_zfT
y-coord. of first hit on trk, ftpc west
Definition: StQABookHist.h:285
TH2F * m_prim_zfF
z-coord. of first hit on trk, tpc+svt
Definition: StQABookHist.h:479
TH2F * m_pnt_xyS
time dist. of hits, tpc
Definition: StQABookHist.h:624
TH2F * m_glb_planefF
z-coord. of first hit on trk, ftpc west
Definition: StQABookHist.h:290
TH2F * m_pxl_nhit_Pxl2_tpc_mult
of hits in inner PIXEL layer vs TPC track multiplicity
Definition: StQABookHist.h:750
TH2F * m_lengthF
length of track, tpc
Definition: StQABookHist.h:345
Definition: Stypes.h:42
TH2F * m_ppsiF
psi reconstructed, tpc,tpc+svt
Definition: StQABookHist.h:500
TH1F * m_glb_thetaTS
theta - tpc
Definition: StQABookHist.h:326
TH2F * m_ppT_eta_recT
overlayed hist of first point - helix point
Definition: StQABookHist.h:541
Definition: Stypes.h:40
TH2F * m_tpc_clust_chargesum[24]
charge per cluster (outer)
TH2F * m_chisq0_etaT
chisq0 vs momentum, tpc+svt
Definition: StQABookHist.h:390
int tile() const
tile on the supersector [1,31]
Definition: StEpdHit.h:148
TH2F * m_etaF
eta, tpc,tpc+svt
Definition: StQABookHist.h:330
TH1F * m_tpc_clust_charge[24]
status of clusters vs. row
TH2F * m_etaTTS
eta, tpc+svt
Definition: StQABookHist.h:329
TH2F * m_chisq0TTS
chi square [0], tpc
Definition: StQABookHist.h:349
TH1F * m_xi_ma_hist
number of xi vertices
Definition: StQABookHist.h:608
TH1F * m_tpc_adc_chargepersectorTPX
charge per sector
TH1F * m_prim_yfFW
y-coord. of first hit on trk, ftpc east
Definition: StQABookHist.h:476
TH1F * m_ppTFW
pT, ftpc east
Definition: StQABookHist.h:523
TH2F * m_plengthF
length of track, tpc+svt
Definition: StQABookHist.h:526
TH2F * m_pmax_pointF
number of max possible track points - tpc+svt
Definition: StQABookHist.h:441
TH2F * m_tanl_zfTS
tanl(dip angle) vs zfirst-zvtx, tpc
Definition: StQABookHist.h:374
TH2F * m_pchisq0_momT
tot num points vs length, ftpc west
Definition: StQABookHist.h:565
TH2F * m_pmom_trklengthTS
mom vs. trk length, tpc
Definition: StQABookHist.h:553
virtual Int_t Make()
StEventQAMaker - Make; fill histograms.
TH1F * m_ptanlT
psi reconstructed, ftpc west
Definition: StQABookHist.h:503
TH2F * m_psi_phiT
chisq0 vs phi, tpc+svt
Definition: StQABookHist.h:398
TH1F * m_emc_point_sigphi[4]
Point SigmaEta spectra.
Definition: StQABookHist.h:683
TH2F * m_dedx0F
number of point to find dE/dx, ftpc
Definition: StQABookHist.h:410
TH2F * m_pchisq0_zfT
chisq0 vs dip angle, tpc+svt
Definition: StQABookHist.h:571
TH1F * m_tpc_adc_chargepersector
charge vs. row
TH1F * m_lengthTS
phi dist. of first point on trk, tpc+svt
Definition: StQABookHist.h:305
TH1F * m_prim_phi0TS
azimuthal angle at start (deg), tpc
Definition: StQABookHist.h:462
TH1F * m_pnt_ftpcE
number of hits ftpc
Definition: StQABookHist.h:643
TH1F * m_psiT
radial (xy) coordinate of first hit, ftpc west
Definition: StQABookHist.h:317
TH1F * m_primtrk_iflag
fit points ratio prim/glob, all detectors
Definition: StQABookHist.h:427
TH2F * m_max_pointF
number of max possible track points - tpc+svt
Definition: StQABookHist.h:247
TH1F * m_prim_yf0
x-coord. of first hit - at start of helix+svt
Definition: StQABookHist.h:484
TH1F * m_prim_curvT
z-coord at start (cm), tpc+svt
Definition: StQABookHist.h:465
TH2F * m_glb_ratiomF
ratio of n fit pnts over max n pnts - tpc+svt
Definition: StQABookHist.h:257
TH1F * m_ndedxT
number of tracks with dedx info
Definition: StQABookHist.h:404
TH2F * m_primtrk_meanetaF
&lt;eta&gt;, tpc, tpc+svt
Definition: StQABookHist.h:432
TH1F * m_globtrk_good_sm
tracks in table with iflag&gt;0
Definition: StQABookHist.h:226
TH2F * m_prim_rzf0
z-coord. of first hit - at start of helix+svt
Definition: StQABookHist.h:488
TH2F * m_pnt_svtLaser
number of hits svt
Definition: StQABookHist.h:713
TH2F * m_tof_vpd_hit
of matched hits vs module
Definition: StQABookHist.h:772
TH1F * m_lengthT
pT, ftpc west
Definition: StQABookHist.h:344
TH1F * m_dedxTTS
dE/dx [1], tpc
Definition: StQABookHist.h:407
TH1F * m_tpc_adc_chargevstbTPX[24]
ADC charge vs. time bucket (inner)
TH2F * m_fpoint_lengthTTS
num fit points vs length, tpc+svt
Definition: StQABookHist.h:383
TH1F * m_glb_chargeT
ratio of n fit pnts over max n pnts - ftpc west
Definition: StQABookHist.h:260
TH1F * m_prim_ratiomTS
ratio of n fit pnts over max n pnts - tpc
Definition: StQABookHist.h:450
TH1F * m_plengthT
pT, ftpc west
Definition: StQABookHist.h:524
TH1F * m_prim_ratiomFE
ratio of n fit pnts over max n pnts - ftpc
Definition: StQABookHist.h:452
TH1F * m_dedx0FE
number of point to find dE/dx, ftpcE
Definition: StQABookHist.h:413
TH2F * m_tanl_zfT
padlength vs timelength of hits on track, ftpcW
Definition: StQABookHist.h:373
TH2F * m_ist_hit_phi_z
of PIXEL hits per primary track
Definition: StQABookHist.h:758
TH2F * m_emc_nhit
prim vtx z, diff geant - reco vs reco z
Definition: StQABookHist.h:655
TH1F * m_glb_zfFE
z-coord. of first hit on trk, ftpc
Definition: StQABookHist.h:288
TH2F * m_bbc_adc[4]
Point Flag spectra.
Definition: StQABookHist.h:691
TH1F * m_emc_point_deleta[4]
Point SigmaPhi spectra.
Definition: StQABookHist.h:684
TH1F * m_pmax_pointFW
number of max possible track points - ftpc east
Definition: StQABookHist.h:443
TH1F * m_glb_z0T
azimuthal angle at start (deg), tpc+svt
Definition: StQABookHist.h:269
TH2F * m_glb_ratiomTTS
number of track pnts on svt - tpc+svt
Definition: StQABookHist.h:254
TH2F * m_pxl_hit_sector_sensor_Pxl2
of hits vs sector vs sensor, inner PIXEL layer
Definition: StQABookHist.h:748
TH1F * m_glb_zfTS
z-coord. of first hit on trk, tpc
Definition: StQABookHist.h:286
TH1F * m_glb_r0T
particle charge in units of |e| - ftpc west
Definition: StQABookHist.h:265
TH1F * m_z_hits
FtpcWest prim vtx z - TPC prim vtx z.
Definition: StQABookHist.h:621
TH1F * m_primglob_fit
trks w/ iflag&gt;0, ratio prim/glob, all detectors
Definition: StQABookHist.h:426
TH2F * m_globtrk_xf_yfTW
Y vs X of first hit on trk, tpc east.
Definition: StQABookHist.h:367
TH1F * m_prim_r0T
particle charge in units of |e| - ftpc west
Definition: StQABookHist.h:459
TH1F * m_glb_chargeFE
particle charge in units of |e| - ftpc
Definition: StQABookHist.h:263
TH2F * m_pnt_phiT
rphi dist. of hits, tpcE
Definition: StQABookHist.h:627
TH1F * m_emc_point_phi[4]
Point Eta spectra.
Definition: StQABookHist.h:681
TH1F * m_max_pointT
number of points on the track - ftpc west
Definition: StQABookHist.h:245
TH1F * m_MtdNHits
TOF PID: 1/beta vs p.
Definition: StQABookHist.h:776
TH1F * m_tanlT
psi reconstructed, ftpc west
Definition: StQABookHist.h:323
TH2F * m_mom_trklengthT
tanl(dip angle) vs zfirst-zvtx, tpc+svt
Definition: StQABookHist.h:375
TH2F * m_npoint_lengthFE
tot num points vs length, tpc+svt
Definition: StQABookHist.h:386
TH2F * m_pnt_padrowT
phi dist. of hits, svt
Definition: StQABookHist.h:629
TH1F * m_geant_reco_pvtx_y
prim vtx x, diff geant - reco
Definition: StQABookHist.h:648
TH1F * m_pchisq0FE
chi square [0], ftpc
Definition: StQABookHist.h:533
TH1F * m_momFE
momentum, ftpc
Definition: StQABookHist.h:336
TH1F * m_fit_pointTS
number of track points used for fitting - tpc
Definition: StQABookHist.h:251
TH2F * m_peta_trklengthFE
trk length vs. eta, tpc+svt
Definition: StQABookHist.h:556
TH1F * m_v_vtxid
number of vertices,small range
Definition: StQABookHist.h:582
TH1F * m_glb_radfFE
radial (xy) coordinate of first hit, ftpc
Definition: StQABookHist.h:315
TH2F * m_npoint_lengthFW
tot num points vs length, ftpc east
Definition: StQABookHist.h:387
TH1F * m_fit_pointT
number of max possible track points - ftpc west
Definition: StQABookHist.h:250
TH1F * m_pnt_phiSST
number of hits sst
Definition: StQABookHist.h:728
TH2F * m_globtrk_xf_yfTS
Y vs X of first hit on trk, tpc west.
Definition: StQABookHist.h:368
TH2F * m_pTF
pT, tpc,tpc+svt
Definition: StQABookHist.h:341
TH2F * m_prim_xfF
x-coord. of first hit on trk, tpc+svt
Definition: StQABookHist.h:469
const int kIstNumSensorsPerLadder
6 sensor per one IST Ladder
TH2F * m_ppointF
number of points on the track - tpc+svt
Definition: StQABookHist.h:436
TH1F * m_ppsiFE
psi reconstructed, ftpc
Definition: StQABookHist.h:501
TH2F * m_ist_nhit_tof_mult
of hits in IST vs TPC track multiplicity
Definition: StQABookHist.h:762
TH1F * m_ppsiTS
psi reconstructed, tpc
Definition: StQABookHist.h:498
TH1F * m_max_pointTS
number of max possible track points - tpc
Definition: StQABookHist.h:246
TH1F * m_prim_chargeTS
particle charge in units of |e| - tpc
Definition: StQABookHist.h:455
TH2F * m_tpc_adc_chargesum[24]
charge vs. row vs. time bucket
TH2F * m_zDcaPhi0
z-dca vs psi
Definition: StQABookHist.h:238
Definition: Stypes.h:44
TH2F * m_pchisq0_momTS
chisq0 vs momentum, tpc
Definition: StQABookHist.h:566
TH1F * m_prim_thetaTS
theta - tpc
Definition: StQABookHist.h:506
TH2F * m_psiF
psi reconstructed, tpc,tpc+svt
Definition: StQABookHist.h:320
TH1F * m_etaT
theta - tpc+svt
Definition: StQABookHist.h:327
TH1F * m_prim_yfT
x-coord. of first hit on trk, ftpc west
Definition: StQABookHist.h:472
virtual Int_t InitRun(int runnumber)
StEventQAMaker - InitRun; Book histograms, set defaults for member functions.
TH2F * m_glb_simpactTS
log impact parameter from primary vertex, tpc+svt
Definition: StQABookHist.h:308
TH2F * m_pfpoint_lengthT
trk length vs. eta, ftpc west
Definition: StQABookHist.h:558
double xcenter() const
aziumth in xy-plane measured from ring center
Definition: StHelix.cc:207
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...
Definition: StMcEvent.hh:169
bool isGood() const
false if tile is bad or missing, according to (time-dependent) database
Definition: StEpdHit.h:153
TH1F * m_pnt_ftpcW
number of hits ftpcE
Definition: StQABookHist.h:644
TH2F * m_psi_phiTS
psi vs phi, tpc
Definition: StQABookHist.h:399
TH2F * m_zDcaPsi
z-dca vs z-first
Definition: StQABookHist.h:237
TH2F * m_pnt_padtimeFE
xy dist. of hits, ftpcW
Definition: StQABookHist.h:633
TH1F * m_tpc_adc_chargevstb[24]
ftpc east cluster radial position
TH1F * m_glb_z0TS
z-coord at start (cm), tpc
Definition: StQABookHist.h:270
TH2F * m_tpc_clust_pxlpTPX
cluster pixel pad size (inner)
TH1F * m_emc_point_eta[4]
Point Energy spectra.
Definition: StQABookHist.h:680
TH2F * m_peta_trklengthFW
trk length vs. eta, ftpc east
Definition: StQABookHist.h:557
TH1F * m_vtx_r_dist
azimuthal distribution of V0s relative to primVtx
Definition: StQABookHist.h:598
TH1F * m_pv_r
row1-chisq per dof of vertex fit
Definition: StQABookHist.h:595
TH1F * m_prim_z0TS
z-coord at start (cm), tpc
Definition: StQABookHist.h:464
TH2F * m_pnpoint_lengthFW
tot num points vs length, ftpc east
Definition: StQABookHist.h:564
TH2F * m_globtrk_xf_yfFW
Y vs X of first hit on trk, ftpc east.
Definition: StQABookHist.h:370
TH1F * m_prim_ratiomFW
ratio of n fit pnts over max n pnts - ftpc east
Definition: StQABookHist.h:453
TH2F * m_pchisq0TTS
chi square [0], tpc+svt
Definition: StQABookHist.h:531
Definition: Stypes.h:41
TH1F * m_chisq0FW
chi square [0], ftpc east
Definition: StQABookHist.h:352
TH1F * m_primary_ist_hit
of IST hits per global track
Definition: StQABookHist.h:764
TH1F * m_globtrk_good
tracks in table
Definition: StQABookHist.h:225
TH1F * m_pxl_hit_ladder
of hits vs phi vs z position, outer PIXEL layer
Definition: StQABookHist.h:746
TH1F * m_tpc_clust_stats[24]
ADC sum over all events.
TH1F * m_psiFW
psi reconstructed, ftpc east
Definition: StQABookHist.h:322
TH2F * m_pxl_hit_phi_z_Pxl2
of hits vs phi vs z position, inner PIXEL layer
Definition: StQABookHist.h:745
TH2F * m_ndedxF
&lt;dE/dx&gt;/(Bichsel &lt;dE/dx&gt;), tpc,tpc+svt
Definition: StQABookHist.h:409
TH2F * m_pnt_rpTW
xy dist. of hits, svt
Definition: StQABookHist.h:625
TH1F * m_emc_point_flag
Emc Point multiplicity.
Definition: StQABookHist.h:688
TH1F * m_glb_ratiomTS
ratio of n fit pnts over max n pnts - tpc
Definition: StQABookHist.h:256
TH2F * m_momF
momentum, tpc+svt
Definition: StQABookHist.h:335
TH1F * m_geant_reco_pvtx_x
number of hits ftpcW
Definition: StQABookHist.h:647
int tac() const
TAC value [0,4095].
Definition: StEpdHit.h:150
TH1F * m_glb_yf0TS
y-coord. of first hit - at start of helix
Definition: StQABookHist.h:294
TH1F * m_glb_sptsTS
number of track points used for fitting - tpc,tpc+svt
Definition: StQABookHist.h:253
TH2F * m_pxl_nhit_Pxl1_tpc_mult
of hits vs sector vs sensor, outer PIXEL layer
Definition: StQABookHist.h:749
TH1F * m_prim_phi0T
radius at start (cm), tpc+svt
Definition: StQABookHist.h:461
TH1F * m_prim_xfT
curvature (1/cm), tpc+svt
Definition: StQABookHist.h:467
TH2F * m_chisq1F
chi square [0], ftpc west
Definition: StQABookHist.h:353
TH2F * m_primtrk_xf_yfFE
Y vs X of first hit on trk, tpc+svt.
Definition: StQABookHist.h:548
TH1F * m_v_r
chisq per dof of vertex fit
Definition: StQABookHist.h:587