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;
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  if (s == -1) s = 1; // case of smde
2070  adc = rawHit[k]->adc();
2071  E = rawHit[k]->energy();
2072  emcGeom[i]->getEta(m, e, eta);
2073  emcGeom[i]->getPhi(m, s, phi);
2074  hists->m_emc_hits[i]->Fill(eta,phi);
2075  hists->m_emc_energy2D[i]->Fill(eta,phi,E);
2076  hists->m_emc_adc[i]->Fill(float(adc));
2077  hists->m_emc_energy[i]->Fill(E);
2078  energy += E;
2079  }
2080  }
2081  }
2082  if(nh>0) hists->m_emc_nhit->Fill(log10(1e-30+Double_t(nh)), Float_t(det));
2083  if(energy>0) hists->m_emc_etot->Fill(log10(1e-30+Double_t(energy)), Float_t(det));
2084  }
2085  }
2086 
2087  //if (Debug())
2088  // gMessMgr->Info(" *** in StEventQAMaker - filling EMC Clusters ");
2089 
2090  for(i=0; i<4; i++) {
2091  Int_t det = i+1, nh;
2092  StDetectorId id = StEmcMath::detectorId(det);
2093  StEmcDetector* detector = emccol->detector(id);
2094  if(detector)
2095  {
2096  StEmcClusterCollection* clusters=detector->cluster();
2097  if(clusters)
2098  {
2099  StSPtrVecEmcCluster& cluster = clusters->clusters();
2100 
2101  if(cluster.size()>0)
2102  {
2103  hists->m_emc_ncl->Fill(log10(1e-30+Double_t(cluster.size())),(Float_t)det);
2104  Float_t Etot=0.0, eta, phi, sigEta, sigPhi, eCl;
2105  for(UInt_t j=0;j<cluster.size();j++){
2106  nh = cluster[j]->nHits();
2107  eCl = cluster[j]->energy();
2108  eta = cluster[j]->eta();
2109  sigEta = cluster[j]->sigmaEta();
2110  phi = cluster[j]->phi();
2111  sigPhi = cluster[j]->sigmaPhi();
2112  if(sigEta > 0) hists->m_emc_sig_e->Fill(sigEta, Axis_t(det));
2113  if(sigPhi > 0.0) hists->m_emc_sig_p->Fill(sigPhi, Axis_t(det));
2114 
2115  hists->m_emc_cl[det-1]->Fill(Axis_t(eta), Axis_t(phi));
2116  hists->m_emc_energyCl[det-1]->Fill(Axis_t(eta), Axis_t(phi), eCl);
2117  hists->m_emc_HitsInCl[det-1]->Fill(Axis_t(nh));
2118  hists->m_emc_EnergyCl[det-1]->Fill(Axis_t(eCl));
2119  hists->m_emc_EtaInCl[det-1]->Fill(Axis_t(eta));
2120  hists->m_emc_PhiInCl[det-1]->Fill(Axis_t(phi));
2121  Etot += eCl;
2122  }
2123  hists->m_emc_etotCl->Fill(log10(1e-30+Etot), Axis_t(det));
2124  }
2125  }
2126  }
2127  }
2128 
2129  // Get the hists from StEmcPoints
2130  //if (Debug())
2131  // gMessMgr->Info(" *** in StEventQAMaker - filling EMC Points ");
2132 
2133  StSPtrVecEmcPoint& pointvec = emccol->barrelPoints();
2134 
2135  Int_t Point_Mult[4];
2136  for(i=0;i<4;i++) {Point_Mult[i]=0;}
2137 
2138  for(i=0;i<pointvec.size();i++) {
2139 
2140  StEmcPoint *point = (StEmcPoint*) pointvec[i];
2141 
2142  //const StThreeVectorF & posP = point->position();
2143  const StThreeVectorF & sizeP = point->size();
2144 
2145  Float_t eta=0.;
2146  Float_t phi=0.;
2147  if (primVtx) {
2148  eta=StEmcMath::eta(point,(StMeasuredPoint*)primVtx);
2149  phi=StEmcMath::phi(point,(StMeasuredPoint*)primVtx);
2150  }
2151 
2152  // Get category (ncat) for this point
2153 
2154  Float_t EnergyDet[4];
2155  for(UInt_t ie=0;ie<4;ie++) {EnergyDet[ie]=0.0;}
2156 
2157  for(Int_t j=0;j<4;j++) {
2158  StDetectorId detid = static_cast<StDetectorId>(j+kBarrelEmcTowerId);
2159  EnergyDet[j] = point->energyInDetector(detid);
2160  }
2161  Int_t ncat=0;
2162 
2163  if(EnergyDet[2]==0 && EnergyDet[3] ==0) {
2164  ncat=0;
2165  } else if(EnergyDet[2]>0 && EnergyDet[3] ==0) {
2166  ncat=1;
2167  } else if(EnergyDet[2]==0 && EnergyDet[3]>0) {
2168  ncat=2;
2169  } else{
2170  ncat=3;
2171  }
2172 
2173  //Fill the hists
2174  Float_t energy=point->energy();
2175  Float_t sigmaeta=sizeP.x();
2176  Float_t sigmaphi=sizeP.y();
2177  Float_t trackmom=point->chiSquare();
2178  Float_t deltaeta=point->deltaEta();
2179  Float_t deltaphi=point->deltaPhi();
2180  //if (ncat>3) ncat=3; // unnecessary
2181  Point_Mult[ncat]++;
2182  if (energy>0) hists->m_emc_point_energy[ncat]->Fill(energy);
2183  if (primVtx) {
2184  hists->m_emc_point_eta[ncat]->Fill(eta);
2185  hists->m_emc_point_phi[ncat]->Fill(phi);
2186  }
2187  hists->m_emc_point_sigeta[ncat]->Fill(sigmaeta);
2188  hists->m_emc_point_sigphi[ncat]->Fill(sigmaphi);
2189  hists->m_emc_point_flag->Fill(Float_t(ncat+1));
2190  if (trackmom>0) {
2191  hists->m_emc_point_trmom[ncat]->Fill(trackmom);
2192  hists->m_emc_point_deleta[ncat]->Fill(deltaeta);
2193  hists->m_emc_point_delphi[ncat]->Fill(deltaphi);
2194  }
2195  }
2196  for(i=0;i<4;i++) {hists->m_emc_points[i]->Fill(Float_t(Point_Mult[i]));}
2197 
2198  if (Debug())
2199  gMessMgr->Info(" *** in StEventQAMaker - Finished filling EMC histograms ");
2200 
2201 }
2202 //_____________________________________________________________________________
2203 void StEventQAMaker::MakeHistEval() {
2204 
2205  // requires StMcEvent
2206  if (Debug())
2207  gMessMgr->Info(" *** in StEventQAMaker - filling Eval histograms ");
2208 
2209  StMcEvent* mcEvent = (StMcEvent*) GetDataSet("StMcEvent");
2210  if (!mcEvent) return;
2211  StMcVertex* mcprimaryVertex = mcEvent->primaryVertex();
2212  if ((primVtx) && (mcprimaryVertex)) {
2213  Float_t geantX = mcprimaryVertex->position().x();
2214  Float_t geantY = mcprimaryVertex->position().y();
2215  Float_t geantZ = mcprimaryVertex->position().z();
2216  Float_t recoX = primVtx->position().x();
2217  Float_t recoY = primVtx->position().y();
2218  Float_t recoZ = primVtx->position().z();
2219  hists->m_geant_reco_pvtx_x->Fill(geantX-recoX);
2220  hists->m_geant_reco_pvtx_y->Fill(geantY-recoY);
2221  hists->m_geant_reco_pvtx_z->Fill(geantZ-recoZ);
2222  hists->m_geant_reco_vtx_z_z->Fill(geantZ-recoZ,recoZ);
2223  }
2224 
2225 }
2226 //_____________________________________________________________________________
2227 void StEventQAMaker::MakeHistBBC() {
2228 
2229  Int_t i;
2230  StTriggerDetectorCollection* trig = event->triggerDetectorCollection();
2231  if (!trig) return;
2232  StBbcTriggerDetector& bbc = trig->bbc();
2233 
2234  for (i=0; i<32; i++) {
2235  hists->m_bbc_adc[i/8]->Fill(bbc.adc(i),i%8);
2236  hists->m_bbc_tdc[i/8]->Fill(bbc.tdc(i),i%8);
2237  }
2238 
2239 }
2240 //_____________________________________________________________________________
2241 void StEventQAMaker::MakeHistFPD() {
2242 
2243  Int_t i;
2244  StFpdCollection* fpd = event->fpdCollection();
2245  if (!fpd) return;
2246  unsigned short* dfpd = fpd->adc();
2247  if (!dfpd) return;
2248 
2249  for (i=0; i<16; i++) {
2250  hists->m_fpd_top[i/8]->Fill((float) dfpd[i],i%8);
2251  hists->m_fpd_bottom[i/8]->Fill((float) dfpd[i+16],i%8);
2252  hists->m_fpd_south[i/8]->Fill((float) dfpd[i+32],i%8);
2253  if (i<12) hists->m_fpd_north[i/6]->Fill((float) dfpd[i+48],i%6);
2254  }
2255 
2256  hists->m_fpd_sums[0]->Fill((float) fpd->sumAdcTop());
2257  hists->m_fpd_sums[1]->Fill((float) fpd->sumAdcBottom());
2258  hists->m_fpd_sums[2]->Fill((float) fpd->sumAdcSouth());
2259  hists->m_fpd_sums[3]->Fill((float) fpd->sumAdcNorth());
2260  hists->m_fpd_sums[4]->Fill((float) fpd->sumAdcSmdX());
2261  hists->m_fpd_sums[5]->Fill((float) fpd->sumAdcSmdY());
2262  hists->m_fpd_sums[6]->Fill((float) fpd->sumAdcPreShower1());
2263  hists->m_fpd_sums[7]->Fill((float) fpd->sumAdcPreShower2());
2264 
2265 }
2266 //_____________________________________________________________________________
2267 void StEventQAMaker::MakeHistPMD() {
2268 
2269  // Code written by Subhasis, Nov. 2004
2270 
2271  StPhmdCollection* phmdcl = (StPhmdCollection*) (event->phmdCollection());
2272  if (!phmdcl) return;
2273  Int_t runNumber=event->runId();
2274  Int_t eventID=event->id();
2275  if (runNumber != mRunNumber) {
2276  mRunNumber = runNumber;
2277  if (!mPmdGeom) mPmdGeom = new StPmdGeom();
2278  mPmdGeom->readBoardDetail(mRunNumber);
2279  if (maputil) delete maputil;
2280  maputil = new StPmdMapUtil();
2281  maputil->StoreMapInfo(mRunNumber);
2282  }
2283  //get PhmdCollection
2284  //if phmdcollection exists then loop over two detectors (pmd and cpv)
2285  for (Int_t d=0;d<2;d++) {
2286 
2287  Int_t TOTAL_HIT_DETECTOR=0;
2288  Int_t TOTAL_ADC_DETECTOR=0;
2289 
2290  //kPhmdCpvId = enum for Cpv Id,(25) and kPhmdId enum for Pmd Id (26)
2291  StDetectorId pdet = static_cast<StDetectorId>(kPhmdCpvId+d);
2292  StPhmdDetector* detector = (StPhmdDetector*) (phmdcl->detector(StDetectorId(pdet)));
2293  if (detector) {
2294  for (UInt_t j=0;j<12;j++) {
2295  Float_t TotalAdc=0;
2296  Float_t TotalHit=0;
2297  StPhmdModule* module = detector->module(j);
2298  if (module) {
2299  StSPtrVecPhmdHit& rawHit=module->hits();
2300  if (rawHit.size()>0) {
2301  for (Int_t k=0;k<(Int_t)rawHit.size();k++) {
2302  Int_t sm=rawHit[k]->superModule();
2303  Int_t row=rawHit[k]->row();
2304  Int_t col=rawHit[k]->column();
2305  Int_t adc=rawHit[k]->adc();
2306  TotalAdc+=adc;
2307  TotalHit++;
2308  Int_t chainR, channelOR, channelCR;
2309  if (d==0) {
2310  maputil->ReverseChannelOriginal(sm+13,row+1,col+1,channelOR);
2311  maputil->ReverseChannelConverted(sm+13,row+1,col+1,channelCR);
2312  maputil->ChainNumber(sm+13,row+1,col+1,chainR);
2313  } else {
2314  maputil->ReverseChannelOriginal(sm+1,row+1,col+1,channelOR);
2315  maputil->ReverseChannelConverted(sm+1,row+1,col+1,channelCR);
2316  maputil->ChainNumber(sm+1,row+1,col+1,chainR);
2317  }
2318  // GVB 2016-05-13: chainR goes 1..48, but either 48 (or 49) would
2319  // give chainR/2 = 24, which overruns these arrays. I will comment
2320  // out this section for now
2321  /*
2322  if (chainR>0 && channelCR>=0 && chainR<=49) {
2323  hists->m_pmd_chain_adc[chainR/2]->Fill(channelCR,chainR%2,adc);
2324  hists->m_pmd_chain_hit[chainR/2]->Fill(channelCR,chainR%2);
2325  }
2326  */
2327  TOTAL_HIT_DETECTOR++;;
2328  TOTAL_ADC_DETECTOR+=adc;
2329  }
2330  } //rawHit.size()
2331  } //module
2332  Int_t smid=d*12+j;
2333  hists->m_pmd_sm_hit[smid/2]->Fill(TotalHit,smid%2);
2334  if (TotalHit<=0) continue;
2335  hists->m_pmd_sm_adc[smid/2]->Fill(TotalAdc/TotalHit,smid%2);
2336  }
2337  }
2338  if (d==0) {
2339  hists->m_pmd_total_hit->Fill(eventID,TMath::Log10(1e-30+TOTAL_HIT_DETECTOR));
2340  hists->m_pmd_total_adc->Fill(eventID,TMath::Log10(1e-30+TOTAL_ADC_DETECTOR));
2341  } else {
2342  hists->m_cpv_total_hit->Fill(eventID,TMath::Log10(1e-30+TOTAL_HIT_DETECTOR));
2343  hists->m_cpv_total_adc->Fill(eventID,TMath::Log10(1e-30+TOTAL_ADC_DETECTOR));
2344  }
2345  }
2346 }
2347 //_____________________________________________________________________________
2349 
2350  int runId = event->runId();
2351  if(runId>10000000) {
2352 
2353  StBTofCollection *btofcol = (StBTofCollection *)(event->btofCollection());
2354  if (!btofcol) return;
2355 
2356  int i;
2357  double vz_tpc = -999.;
2358  if(primVtx) vz_tpc = primVtx->position().z();
2359 
2360  // TOF and VPD hits
2361  StSPtrVecBTofHit &tofHits = btofcol->tofHits();
2362  Int_t nTofHits = tofHits.size();
2363  Int_t nHitsvsTray[120] = {0};
2364  Int_t nHitsvsModule[2][32] = {{0},{0}};
2365  Int_t nHitsTof = 0;
2366  Int_t nHitsVpd[2] = {0};
2367 
2368  Int_t nCellvsTray[120] = {0};
2369  Int_t nCellvsModule[2][32] = {{0},{0}};
2370  Int_t nCellTof = 0;
2371  for(i=0;i<nTofHits;i++) {
2372  StBTofHit *aHit = dynamic_cast<StBTofHit*>(tofHits[i]);
2373  if(!aHit) continue;
2374  int trayId = aHit->tray();
2375  int moduleId = aHit->module();
2376  if(trayId>0 && trayId<=120) { // tray
2377  nHitsvsTray[trayId-1]++;
2378  nHitsvsModule[(trayId-1)/60][moduleId]++;
2379  nHitsTof++;
2380 
2381  if(StTrack *trk = (StTrack*)aHit->associatedTrack()) {
2382  nCellvsTray[trayId-1]++;
2383  nCellvsModule[(trayId-1)/60][moduleId]++;
2384  nCellTof++;
2385  StPrimaryTrack *pTrk = dynamic_cast<StPrimaryTrack *>(trk->node()->track(primary));
2386  if(pTrk) {
2387  const StPtrVecTrackPidTraits& theTofPidTraits = pTrk->pidTraits(kTofId);
2388  if(!theTofPidTraits.size()) continue;
2389 
2390  StTrackPidTraits *theSelectedTrait = theTofPidTraits[theTofPidTraits.size()-1];
2391  if(!theSelectedTrait) continue;
2392 
2393  StBTofPidTraits *pidTof = dynamic_cast<StBTofPidTraits *>(theSelectedTrait);
2394  if(!pidTof) continue;
2395 
2396  double ptot = pTrk->geometry()->momentum().mag();
2397  double beta = pidTof->beta();
2398 
2399  hists->m_tof_PID->Fill(ptot, 1./beta);
2400  }
2401  }
2402  } else { // vpd
2403  nHitsVpd[trayId-121]++;
2404  }
2405  }
2406  for(i=0;i<120;i++) {
2408  hists->m_tof_hit_tray->Fill(i+1, nHitsvsTray[i]);
2410  hists->m_tof_match_tray->Fill(i+1, nCellvsTray[i]);
2411  }
2412  for(i=0;i<32;i++) {
2414  hists->m_tof_hit_module->Fill(i+1, nHitsvsModule[0][i]); // west side
2415  hists->m_tof_hit_module->Fill(-(i+1), nHitsvsModule[1][i]); // east side
2417  hists->m_tof_match_module->Fill(i+1, nCellvsModule[0][i]); // west side
2418  hists->m_tof_match_module->Fill(-(i+1), nCellvsModule[1][i]); // east side
2419  }
2420  hists->m_tof_vpd_hit->Fill(nHitsVpd[0]+nHitsVpd[1], nHitsTof);
2421 
2422  // Vpd vertex
2423  double TSumEast = 0.;
2424  double TSumWest = 0.;
2425  int nEast = 0;
2426  int nWest = 0;
2427  for(i=0;i<nTofHits;i++) {
2428  StBTofHit *aHit = dynamic_cast<StBTofHit*>(tofHits[i]);
2429  if(!aHit) continue;
2430  int trayId = aHit->tray();
2431  int tubeId = aHit->cell();
2432  if(trayId==mEastVpdTrayId) { // east
2433  TSumEast += aHit->leadingEdgeTime() - mEastVpdCorr[tubeId-1];
2434  nEast++;
2435  } else if (trayId==mWestVpdTrayId) { // west
2436  TSumWest += aHit->leadingEdgeTime() - mWestVpdCorr[tubeId-1];
2437  nWest++;
2438  }
2439  }
2440  double vz_vpd = -999.;
2441  if(nEast&&nWest) vz_vpd = (TSumEast/nEast - TSumWest/nWest)/2./29.979;
2442 
2443  hists->m_tof_vtx_z->Fill(vz_tpc, vz_vpd);
2444  return;
2445  }
2446 
2448 
2449  StTofCollection *tofcol = (StTofCollection *)(event->tofCollection());
2450  if (!tofcol) return;
2451 
2452  int i;
2453  double vz_tpc = -999.;
2454  if(primVtx) vz_tpc = primVtx->position().z();
2455 
2456  // TOF and VPD hits
2457  StSPtrVecTofData &tofData = tofcol->tofData();
2458  Int_t nTofData = tofData.size();
2459  Int_t nHitsvsTray[120] = {0};
2460  Int_t nHitsvsModule[2][32] = {{0},{0}};
2461  Int_t nHitsTof = 0;
2462  Int_t nHitsVpd[2] = {0};
2463  for(i=0;i<nTofData;i++) {
2464  StTofData *aHit = dynamic_cast<StTofData*>(tofData[i]);
2465  if(!aHit) continue;
2466  int index = aHit->dataIndex();
2467  int trayId = index/192 + 1;
2468  int moduleId = ( index%192 )/6 + 1;
2469  if(trayId>0 && trayId<=120) { // tray
2470  nHitsvsTray[trayId-1]++;
2471  nHitsvsModule[(trayId-1)/60][moduleId-1]++; // JDB corrected 2016-05-13
2472  nHitsTof++;
2473  } else { // vpd
2474  nHitsVpd[trayId-121]++;
2475  }
2476  }
2477  for(i=0;i<120;i++) {
2478  hists->m_tof_hit_tray->Fill(i+1, nHitsvsTray[i]);
2479  }
2480  for(i=0;i<32;i++) {
2481  hists->m_tof_hit_module->Fill(i+1, nHitsvsModule[0][i]); // west side
2482  hists->m_tof_hit_module->Fill(-(i+1), nHitsvsModule[1][i]); // east side
2483  }
2484  hists->m_tof_vpd_hit->Fill(nHitsVpd[0]+nHitsVpd[1], nHitsTof);
2485 
2486  // Matched TOF hits
2487  StSPtrVecTofCell &tofCell = tofcol->tofCells();
2488  Int_t nTofCell = tofCell.size();
2489  Int_t nCellvsTray[120] = {0};
2490  Int_t nCellvsModule[2][32] = {{0},{0}};
2491  Int_t nCellTof = 0;
2492  for(i=0;i<nTofCell;i++) {
2493  StTofCell *aCell = dynamic_cast<StTofCell*>(tofCell[i]);
2494  if(!aCell) continue;
2495  int trayId = aCell->trayIndex();
2496  int moduleId = aCell->moduleIndex();
2497  if(trayId>0 && trayId<=120) { // tray
2498  nCellvsTray[trayId-1]++;
2499  nCellvsModule[(trayId-1)/60][moduleId]++;
2500  nCellTof++;
2501 
2502  double tof = aCell->leadingEdgeTime(); // need an offset correction
2503 
2504  StTrack *trk = (StTrack *)aCell->associatedTrack();
2505  if(!trk) continue;
2506  StPrimaryTrack *pTrk = dynamic_cast<StPrimaryTrack *>(trk->node()->track(primary));
2507  if(!pTrk) continue;
2508  double ptot = pTrk->geometry()->momentum().mag();
2509 
2510  StTrackGeometry *theTrackGeometry = pTrk->outerGeometry();
2511  if(primVtx) {
2512  double L = tofPathLength(&primVtx->position(), &aCell->position(), theTrackGeometry->helix().curvature());
2513  double beta = L/(tof*29.979);
2514  hists->m_tof_PID->Fill(ptot, 1./beta);
2515  }
2516  }
2517  }
2518  for(i=0;i<120;i++) {
2519  hists->m_tof_match_tray->Fill(i+1, nCellvsTray[i]);
2520  }
2521  for(i=0;i<32;i++) {
2522  hists->m_tof_match_module->Fill(i+1, nCellvsModule[0][i]); // west side
2523  hists->m_tof_match_module->Fill(-(i+1), nCellvsModule[1][i]); // east side
2524  }
2525 
2526  // Vpd vertex
2527  double TSumEast = 0.;
2528  double TSumWest = 0.;
2529  int nEast = 0;
2530  int nWest = 0;
2531  for(i=0;i<nTofCell;i++) {
2532  StTofCell *aCell = dynamic_cast<StTofCell*>(tofCell[i]);
2533  if(!aCell) continue;
2534  int trayId = aCell->trayIndex();
2535  int tubeId = aCell->cellIndex();
2536  if(trayId==mEastVpdTrayId) { // east
2537  TSumEast += aCell->leadingEdgeTime() - mEastVpdCorr[tubeId-1];
2538  nEast++;
2539  } else if(trayId==mWestVpdTrayId) { // west
2540  TSumWest += aCell->leadingEdgeTime() - mWestVpdCorr[tubeId-1];
2541  nWest++;
2542  }
2543  }
2544  double vz_vpd = -999.;
2545  if(nEast&&nWest) vz_vpd = (TSumEast/nEast - TSumWest/nWest)/2./29.979;
2546 
2547  hists->m_tof_vtx_z->Fill(vz_tpc, vz_vpd);
2548 }
2549 //_____________________________________________________________________________
2550 Int_t StEventQAMaker::PCThits(StTrackDetectorInfo* detInfo) {
2551  Int_t PCT = 0; // # hits beyond central membrane: post-crossing trks
2552  if (hitsAvail) {
2553  StPtrVecHit tpc_hits = detInfo->hits(kTpcId);
2554  if (tpc_hits.size()) {
2555  for (UInt_t k=0;k<tpc_hits.size();k++) {
2556  StTpcHit* hit = (StTpcHit*) (tpc_hits[k]);
2557  if ((hit->position().z() > 1 && hit->sector() > 12) ||
2558  (hit->position().z() <-1 && hit->sector() < 13)) PCT++;
2559  }
2560  } else {
2561  LOG_WARN << "Tpc hits are not available - cannot check for PCTs" << endm;
2562  hitsAvail = kFALSE;
2563  }
2564  }
2565  return PCT;
2566 }
2567 //_____________________________________________________________________________
2568 void StEventQAMaker::MakeHistFMS() {
2569 
2570  // Get trigger data for the current event.
2571  StTriggerData* trigger = event->triggerData();
2572  if (!trigger) return;
2573  // We don't want to include LED events when filling the histograms.
2574  const unsigned short dsm = trigger->lastDSM(4);
2575  if(dsm & 0x1) {
2576  return;
2577  } // if
2578  // Loop over histograms for each QT crate (FMS and FPD are
2579  // accessed via the same method in StTriggerData).
2580  TH1PtrMap::iterator i;
2581  for(i = mFMShistograms.begin(); i not_eq mFMShistograms.end(); ++i) {
2582  TH1* histogram = i->second;
2583  // Fill the histogram for each channel by looping over
2584  // each slot and each channel-in-slot.
2585  int crate = i->first;
2586  for(int slot(0); slot < kNQtSlotsPerCrate; ++slot) {
2587  for(int channel(0); channel < kNQtChannelsPerSlot; ++channel) {
2588  int index = slot * kNQtChannelsPerSlot + channel;
2589  float adc = trigger->fmsADC(crate, slot, channel, 0);
2590  histogram->Fill(index, adc);
2591  } // for
2592  } // for
2593  } // for
2594 
2595 
2596 
2597 
2598 }
2599 //_____________________________________________________________________________
2600 void StEventQAMaker::MakeHistHFT() {
2601 
2602  StPxlHitCollection* pxlHitCollection= event->pxlHitCollection();
2603 
2604  if (!pxlHitCollection) {
2605  LOG_WARN << "No StPxlHitCollection" << endm;
2606  }
2607 
2608  StIstHitCollection* istHitCollection = event->istHitCollection();
2609 
2610  if (!istHitCollection) {
2611  LOG_WARN << "No StIstHitCollection" << endm;
2612  }
2613 
2614  StSstHitCollection *sstHitCollection = event->sstHitCollection();
2615 
2616  if (!sstHitCollection) {
2617  LOG_WARN << "No StSstHitCollection" << endm;
2618  }
2619 
2620  if(pxlHitCollection && istHitCollection){
2621  hists->m_nhit_Pxl_Ist->Fill(pxlHitCollection->numberOfHits(),istHitCollection->numberOfHits());
2622  }
2623  if(pxlHitCollection && sstHitCollection){
2624  hists->m_nhit_Pxl_Sst->Fill(pxlHitCollection->numberOfHits(),sstHitCollection->numberOfHits());
2625  }
2626  if(istHitCollection && sstHitCollection){
2627  hists->m_nhit_Ist_Sst->Fill(istHitCollection->numberOfHits(),sstHitCollection->numberOfHits());
2628  }
2629 
2630 
2631 }
2632 //_____________________________________________________________________________
2633 void StEventQAMaker::MakeHistPXL() {
2634 
2635  StPxlHitCollection* pxlHitCollection= event->pxlHitCollection();
2636 
2637  if (!pxlHitCollection) {
2638  LOG_WARN << "No PXL hit collection" << endm;
2639  return;
2640  }
2641 
2642  Int_t nHitsPxl1 = 0;
2643  Int_t nHitsPxl2 = 0;
2644 
2645  UInt_t numberOfSectors = pxlHitCollection->numberOfSectors();
2646  for (UInt_t sectorIdx = 0; sectorIdx < numberOfSectors; sectorIdx++) {
2647  StPxlSectorHitCollection* PxlSectorHitCollection = pxlHitCollection->sector(sectorIdx);
2648  if (!PxlSectorHitCollection) {
2649  LOG_WARN << "MakeHistPXL: No PxlSectorHitCollection" << endm;
2650  return;
2651  }
2652  UInt_t numberOfLadders = PxlSectorHitCollection->numberOfLadders();
2653  for (UInt_t ladderIdx = 0; ladderIdx < numberOfLadders; ladderIdx++) {
2654  StPxlLadderHitCollection* PxlLadderHitCollection = PxlSectorHitCollection->ladder(ladderIdx);
2655  if (!PxlLadderHitCollection) {
2656  LOG_WARN << "MakeHistPXL: No PXLLadder hit collection" << endm;
2657  return;
2658  }
2659 
2660  UInt_t numberOfHits = PxlLadderHitCollection->numberOfHits();
2661  hists->m_pxl_hit_ladder->Fill(ladderIdx,numberOfHits);
2662  UInt_t numberOfSensors = PxlLadderHitCollection->numberOfSensors();
2663 
2664  for (UInt_t sensorIdx = 0; sensorIdx < numberOfSensors; sensorIdx++) {
2665  StPxlSensorHitCollection* PxlSensorHitCollection = PxlLadderHitCollection->sensor(sensorIdx);
2666  StSPtrVecPxlHit& vec = PxlSensorHitCollection->hits();
2667 
2668  UInt_t NoHits = vec.size();
2669  Int_t sensorId = sensorIdx + 1;
2670  Int_t ladderId = sectorIdx*4 + ladderIdx + 1;
2671  Int_t sectorId = sectorIdx + 1;
2672 
2673 
2674  if(ladderIdx==0)
2675  hists->m_pxl_hit_sector_sensor_Pxl1->Fill(sectorId,sensorId,NoHits); //inner PIXEL layer
2676  else
2677  hists->m_pxl_hit_sector_sensor_Pxl2->Fill(ladderId,sensorId,NoHits); // outer PIXEL layer
2678 
2679  if (NoHits > 0) {
2680  LOG_DEBUG << "MakeHistPXL: StiPixelHitLoader size: " << NoHits << endm;
2681 
2682  for (UInt_t ll = 0; ll < NoHits; ll++) {
2683  StPxlHit *hit = vec[ll];
2684  if (hit) {
2685 
2686  const StThreeVectorF &pos = hit->position();
2687 
2688  Int_t ladder = hit->ladder();
2689 
2690  // x,y position in the HFT, re-use SSD histogram since it is the most layer
2691  hists->m_pnt_xyS->Fill(pos.x(),pos.y());
2692 
2693  int layer = (ladder == 1) ? 1 : 2; // inner or outer PIXEL layer
2694 
2695  if(layer==1){
2696  nHitsPxl1++;
2697  hists->m_pxl_hit_phi_z_Pxl1->Fill(pos.z(), pos.phi());
2698  }
2699 
2700  if(layer==2){
2701  nHitsPxl2++;
2702  hists->m_pxl_hit_phi_z_Pxl2->Fill(pos.z(), pos.phi());
2703  }
2704  }
2705  }
2706  }
2707  }
2708  }
2709  }
2710 
2711  StBTofCollection *btofcol = (StBTofCollection *)(event->btofCollection());
2712  if (btofcol) {
2713  Int_t nTofHits = btofcol->tofHits().size();
2714  hists->m_pxl_nhit_Pxl1_tof_mult->Fill(nHitsPxl1, nTofHits);
2715  hists->m_pxl_nhit_Pxl2_tof_mult->Fill(nHitsPxl2, nTofHits);
2716  }
2717  hists->m_pxl_nhit_Pxl1_Pxl2->Fill(nHitsPxl1,nHitsPxl2);
2718 
2719  Int_t tpcMult = event->trackNodes().size();
2720  hists->m_pxl_nhit_Pxl1_tpc_mult->Fill(nHitsPxl1,tpcMult);
2721  hists->m_pxl_nhit_Pxl2_tpc_mult->Fill(nHitsPxl2,tpcMult);
2722 
2723 
2724  // Normalizations
2725  Int_t Nevents = - hists->m_primtrk_tot->GetEntries();
2726  hists->m_pxl_hit_phi_z_Pxl1->SetBinContent(0,Nevents);
2727  hists->m_pxl_hit_phi_z_Pxl2->SetBinContent(0,Nevents);
2728  hists->m_pxl_hit_ladder->SetBinContent(0,Nevents);
2729  hists->m_pxl_hit_sector_sensor_Pxl1->SetBinContent(0,Nevents);
2730  hists->m_pxl_hit_sector_sensor_Pxl2->SetBinContent(0,Nevents);
2731  hists->m_pxl_nhit_Pxl1_Pxl2->SetBinContent(0,Nevents);
2732  hists->m_pxl_hit_phi_z_Pxl1->SetEntries(hists->m_pxl_hit_phi_z_Pxl1->GetEntries()-1);
2733  hists->m_pxl_hit_phi_z_Pxl2->SetEntries(hists->m_pxl_hit_phi_z_Pxl2->GetEntries()-1);
2734  hists->m_pxl_hit_ladder->SetEntries(hists->m_pxl_hit_ladder->GetEntries()-1);
2737  hists->m_pxl_nhit_Pxl1_Pxl2->SetEntries(hists->m_pxl_nhit_Pxl1_Pxl2->GetEntries()-1);
2738 }
2739 
2740 //_____________________________________________________________________________
2741 void StEventQAMaker::MakeHistIST() {
2742 
2743  StIstHitCollection* istHitCollection = event->istHitCollection();
2744 
2745  if (!istHitCollection) {
2746  LOG_WARN << "Error getting pointer to StIstHitCollection" << endm;
2747  return;
2748  }
2749 
2750  for (UInt_t ladderIdx = 0; /* ladderIdx < istHitCollection->numberOfLadders() && */ ladderIdx < (UInt_t) kIstNumLadders; ladderIdx++) {
2751  StIstLadderHitCollection* ladderHitCollection = istHitCollection->ladder(ladderIdx);
2752 
2753  UInt_t numberOfHits = ladderHitCollection->numberOfHits();
2754  hists->m_ist_hit_ladder->Fill(ladderIdx,numberOfHits);
2755 
2756  for (UInt_t sensorIdx = 0; /* sensorIdx < ladderHitCollection->numberOfSensors() && */ sensorIdx < (UInt_t) kIstNumSensorsPerLadder; sensorIdx++) {
2757  StIstSensorHitCollection* sensorHitCollection = ladderHitCollection->sensor(sensorIdx);
2758 
2759  UInt_t nHitsSensor = sensorHitCollection->hits().size();
2760 
2761  //Int_t SensorId = ladderIdx*kIstNumSensorsPerLadder + sensorIdx + 1;
2762  //hists->m_ist_hit_ladder_sensor->Fill(sensorIdx+1,ladderIdx+1, nHitsSensor);
2763  hists->m_ist_hit_ladder_sensor->Fill(ladderIdx+1, sensorIdx+1, nHitsSensor);
2764 
2765  for (UInt_t idx = 0; idx < nHitsSensor; idx++) {
2766 
2767  StIstHit* hit = sensorHitCollection->hits()[idx];
2768  if (hit) {
2769  const StThreeVectorF &pos = hit->position();
2770  hists->m_ist_hit_phi_z->Fill(pos.z(), pos.phi());
2771  // x,y position in the HFT, re-use SSD histogram since it is the most outer layer
2772  hists->m_pnt_xyS->Fill(pos.x(),pos.y());
2773  }
2774  } //end loop over hits
2775  } //loop over sensors
2776  } //loop over ladders
2777 
2778  UInt_t nIstHits = istHitCollection->numberOfHits();
2779  StBTofCollection *btofcol = (StBTofCollection *)(event->btofCollection());
2780  if (btofcol){
2781  Int_t nTofHits = btofcol->tofHits().size();
2782  hists->m_ist_nhit_tof_mult->Fill(nIstHits, nTofHits);
2783  }
2784 
2785  Int_t tpcMult = event->trackNodes().size();
2786  hists->m_ist_nhit_tpc_mult->Fill(nIstHits,tpcMult);
2787 
2788  // Normalizations
2789  Int_t Nevents = - hists->m_primtrk_tot->GetEntries();
2790  hists->m_ist_hit_phi_z->SetBinContent(0,Nevents);
2791  hists->m_ist_hit_ladder->SetBinContent(0,Nevents);
2792  hists->m_ist_hit_ladder_sensor->SetBinContent(0,Nevents);
2793  hists->m_ist_hit_phi_z->SetEntries(hists->m_ist_hit_phi_z->GetEntries()-1);
2794  hists->m_ist_hit_ladder->SetEntries(hists->m_ist_hit_ladder->GetEntries()-1);
2795  hists->m_ist_hit_ladder_sensor->SetEntries(hists->m_ist_hit_ladder_sensor->GetEntries()-1);
2796 }
2797 //_____________________________________________________________________________
2798 void StEventQAMaker::MakeHistSST(){
2799  StSstHitCollection* sstHitCollection = event->sstHitCollection();
2800 
2801  if (!sstHitCollection) {
2802  LOG_WARN << "Error getting pointer to StSstHitCollection" << endm;
2803  return;
2804  }
2805  hists->m_pnt_sst->Fill(sstHitCollection->numberOfHits());
2806  for (UInt_t ladder=0; ladder<sstHitCollection->numberOfLadders(); ladder++) {
2807  StSstLadderHitCollection* sstladder = sstHitCollection->ladder(ladder);
2808  for (UInt_t wafer=0; wafer<sstladder->numberOfWafers(); wafer++) {
2809  StSPtrVecSstHit& sstwaferhits = sstladder->wafer(wafer)->hits();
2810  for (UInt_t l=0; l<sstwaferhits.size(); l++) {
2811  StSstHit* ssthit = sstwaferhits[l];
2812  const StThreeVectorF &hitPos = ssthit->position();
2813  // hitPos = ssthit->position();
2814  Float_t x = hitPos.x();
2815  Float_t y = hitPos.y();
2816  Float_t phi = hitPos.phi()/degree;
2817  if (phi<0) phi += 360.;
2818  hists->m_pnt_phiSST->Fill(phi);
2819  hists->m_pnt_lwSST->Fill(ladder+1,wafer+1);
2820  hists->m_pnt_xyS->Fill(x,y);
2821  hists->m_pnt_sizeSST->Fill(ssthit->clusterSizePSide(),0);
2822  hists->m_pnt_sizeSST->Fill(ssthit->clusterSizeNSide(),1);
2823  hists->m_pnt_eSST->Fill(TMath::Log10(fabs(ssthit->charge())+1e-33));
2824  }
2825  }
2826  }
2827  // Normalizations
2828  Int_t Nevents = - hists->m_primtrk_tot->GetEntries();
2829  hists->m_pnt_phiSST->SetBinContent(0,Nevents);
2830  hists->m_pnt_lwSST->SetBinContent(0,Nevents);
2831  hists->m_pnt_phiSST->SetEntries(hists->m_pnt_phiSST->GetEntries()-1);
2832  hists->m_pnt_lwSST->SetEntries(hists->m_pnt_lwSST->GetEntries()-1);
2833 }
2834 //_____________________________________________________________________________
2835 void StEventQAMaker::MakeHistMTD() {
2836 
2837  StMtdCollection *mtdCollection = event->mtdCollection();
2838  if(mtdCollection)
2839  {
2840  StSPtrVecMtdHit& mtdHits = mtdCollection->mtdHits();
2841  Int_t nMtdHits = mtdHits.size();
2842  hists->m_MtdNHits->Fill(nMtdHits);
2843  Int_t nMthMtdHits = 0;
2844  for(Int_t i=0; i<nMtdHits; i++)
2845  {
2846  StMtdHit *hit = mtdHits[i];
2847  if(!hit) continue;
2848  Int_t backleg = hit->backleg();
2849  Int_t module = hit->module();
2850  Int_t channel = hit->cell();
2851  hists->m_MtdHitMap->Fill(backleg,(module-1)*12+channel);
2852  StTrack *gTrack = hit->associatedTrack();
2853  if(!gTrack) continue;
2854  nMthMtdHits++;
2855  hists->m_MtdMatchHitMap->Fill(backleg,(module-1)*12+channel);
2856  }
2857  hists->m_MtdNMatchHits->Fill(nMthMtdHits);
2858  }
2859 
2860 }
2861 //_____________________________________________________________________________
2862 void StEventQAMaker::MakeHistRP() {
2863 
2864  const Int_t MAXHITS = 10 ; // maximum no. of hits per plane/chain to consider
2865  Double_t POS[kRP_MAXSEQ][kRP_MAXCHAIN][MAXHITS] ;
2866  Int_t NCluster[kRP_MAXSEQ][kRP_MAXCHAIN] ;
2867  Int_t i, j, k, l, m ;
2868 
2869  StRpsCollection *RpsColl = event->rpsCollection();
2870 
2871  if( RpsColl ) {
2872  if ( RpsColl->siliconBunch()==0 || RpsColl->siliconBunch()>8 ) {
2873 
2874  for ( i=0; i<kRP_MAXSEQ ; i++ ) {
2875 
2876  for ( j=0; j<kRP_MAXCHAIN ; j++ ) {
2877 
2878  NCluster[i][j] = 0 ;
2879 
2880  for ( k=0; k<(Int_t) RpsColl->romanPot(i)->plane(j)->numberOfClusters() ; k++ ) {
2881  // m_RP_ClusterLength->Fill( RpsColl->romanPot(i)->plane(j)->cluster(k)->length() ) ;
2882  if ( k<MAXHITS ) {
2883  NCluster[i][j]++ ;
2884  if ( (j%2)==0 )
2885  // A or C : pitch_4svx = 0.00974 cm
2886  POS[i][j][k] = RpsColl->romanPot(i)->plane(j)->cluster(k)->position()/9.74E-5 ;
2887  else
2888  // B or D : pitch_6svx = 0.01050 cm
2889  POS[i][j][k] = RpsColl->romanPot(i)->plane(j)->cluster(k)->position()/1.050E-4 ;
2890  } // if ( k<MAXHITS )
2891  } // for ( Int_t k=0; k<RpsColl->romanPot(i)->plane(j)->numberOfClusters() ; k++ )
2892 
2893  } // for ( j=0; j<kRP_MAXCHAIN ; j++ )
2894 
2895  for ( l = 0; l<kRP_MAXCHAIN; l+=2 ) // 0 or 2
2896  for ( m = 1; m<kRP_MAXCHAIN; m+=2 ) // 1 or 3
2897  for ( k=0; k<NCluster[i][l] && k<MAXHITS ; k++ ) // A and C
2898  for ( j=0; j<NCluster[i][m] && j<MAXHITS ; j++ ) // B and D
2899  m_RP_clusters_xy[i]->Fill( POS[i][m][j] , POS[i][l][k]) ;
2900 
2901  } // for ( i=0; i<kRP_MAXSEQ ; i++ )
2902 
2903  } // if ( RpsColl->siliconBunch()==0 && RpsColl->siliconBunch()>8 ) {
2904  } // if( RpsColl ) {
2905 
2906 }
2907 //_____________________________________________________________________________
2908 void StEventQAMaker::MakeHistEPD() {
2909 
2910  StEpdCollection *epdcol = (StEpdCollection *)(event->epdCollection());
2911  if (!epdcol) return;
2912 
2913  // EPD hits
2914  StSPtrVecEpdHit &epdHits = epdcol->epdHits();
2915  Int_t nEpdHits = epdHits.size();
2916 
2917  for(Int_t i=0;i<nEpdHits;i++) {
2918  StEpdHit *aHit = dynamic_cast<StEpdHit*>(epdHits[i]);
2919  if(!aHit) continue;
2920  if(!(aHit->isGood())) continue;
2921  short side = aHit->side(); //+1/-1 for West/East
2922  int position = aHit->position(); //1....12
2923  int tile = aHit->tile(); //1....31
2924  int adc = aHit->adc();
2925  int histId = (position - 1);
2926  if (side == 1) histId += 12; //0-11 for East, 12-23 for West
2927 
2928  hists->m_epd_adc[histId]->Fill(tile, adc);
2929  if (tile < 10) {
2930  int tac = aHit->tac();
2931  hists->m_epd_tac[histId]->Fill(tile,tac);
2932  }
2933  }
2934 
2935 }
2936 //_____________________________________________________________________________
2937 void StEventQAMaker::MakeHistTPC() {
2938  TDataSet* rawDataSet = FindDataSet("TpxRaw/.data/Event");
2939  if (rawDataSet) {
2940  StTpcRawData* tpcRawData = (StTpcRawData *) rawDataSet->GetObject();
2941  if (tpcRawData) {
2942  for (unsigned int sector = 1; sector <= tpcRawData->getNoSectors(); sector++) {//for sectors
2943  StTpcDigitalSector *digitalSector = tpcRawData->GetSector(sector);
2944  if (digitalSector) {
2945  // digitalSector->Print();
2946  unsigned int nrows = digitalSector->numberOfRows();
2947  unsigned int innerRows = St_tpcPadConfigC::instance()->numberOfInnerRows(sector);
2948  for (unsigned int rowi = 1; rowi <= nrows; rowi ++) {//for rows
2949  StVectPixel pixV;
2950  unsigned int npix = tpcRawData->getVecOfPixels(pixV, (int) sector, rowi);
2951  for (unsigned int iii = 0; iii<npix; iii++) {//for pixels
2952  m_tpc_adc_chargevsrowvstb[sector-1]->Fill(pixV[iii].timebin(),rowi,pixV[iii].adc());
2953  m_tpc_adc_numhitsvsrowvssector->Fill(sector,rowi);
2954  if (rowi < innerRows) {//iTPC rows
2955  m_tpc_adc_chargevstb[sector-1]->Fill(pixV[iii].timebin(),pixV[iii].adc());
2956  if((pixV[iii].timebin() > tblow) && (pixV[iii].timebin() < tbhigh)) {
2957  m_tpc_adc_chargesum[sector-1]->Fill(pixV[iii].pad(),rowi,pixV[iii].adc());
2958  if (pixV[iii].adc() > 3) {
2959  m_tpc_adc_chargepersector->Fill(sector,pixV[iii].adc());
2960  }
2961  }
2962  }
2963  else {//TPX rows
2964  m_tpc_adc_chargevstbTPX[sector-1]->Fill(pixV[iii].timebin(),pixV[iii].adc());
2965  if((pixV[iii].timebin() > tblow) && (pixV[iii].timebin() < tbhigh)) {
2966  m_tpc_adc_chargesum[sector-1]->Fill(pixV[iii].pad(),rowi,pixV[iii].adc());
2967  if (pixV[iii].adc() > 3) {
2968  m_tpc_adc_chargepersectorTPX->Fill(sector,pixV[iii].adc());
2969  }
2970  }
2971  //pixV[iii].Print();
2972  }
2973  }//for pixels
2974  }//for rows
2975  }
2976  }//for sectors
2977  }
2978  }
2979 }
2980 //_____________________________________________________________________________
2981 void StEventQAMaker::MakeHistiTPC() {
2982  StSPtrVecTrackNode & trackNode = event->trackNodes();
2983  int nTracks = trackNode.size();
2984 
2985  StTrackNode * node = 0;
2986  //cout << "Number of tracks : " << nTracks << endl;
2987  for (int track = 0; track < nTracks; track++) {
2988  node = trackNode[track];
2989  if (!node) continue;
2990  // GLOBAL TRACKS
2991  StGlobalTrack* gTrack = static_cast<StGlobalTrack*>(node->track(global));
2992  if (!gTrack) continue;
2993  if (! gTrack->detectorInfo()) continue;
2994  StPtrVecHit ghvec = gTrack->detectorInfo()->hits();
2995  StTrackGeometry * gTrackParams = gTrack->geometry();
2996  if (!gTrackParams) continue;
2997 
2998  for (unsigned int hit = 0; hit < ghvec.size(); hit++) {
2999  //if (hvec[hit]->detector() == kTpcId) {
3000  StTpcHit *tpcHit = static_cast<StTpcHit *> (ghvec[hit]);
3001 
3002  //if (!tpcHit || tpcHit->sector() != 20) continue;
3003 
3004  if (!tpcHit) continue;
3005  if (tpcHit->flag() != 0) continue;
3006  int sec_index = tpcHit -> sector() - 1;
3007  hists->m_TPC_ch_nrow[sec_index]-> Fill(tpcHit->padrow(), tpcHit->adc());
3008 
3009  //alternative way: map.hasHitInDetector(kTpcId) else
3010  /*Int_t minpadrow = 0;
3011  if ((minpadrow <= 45 && map.hasHitInRow(kTpcId,minpadrow)) ||
3012  map.hasHitInRow(kiTpcId,minpadrow))
3013  break;
3014  }
3015  */
3016 
3017  if(tpcHit->padrow()>=45)
3018  {
3019  hists->m_TPC_ch_time_outer[sec_index]-> Fill(tpcHit->timeBucket(), tpcHit->adc());
3020  hists->m_TPC_adc_sec_outer->Fill(tpcHit->sector(), tpcHit->adc());
3021  }
3022  else
3023  {
3024  hists->m_TPC_ch_time_inner[sec_index]-> Fill(tpcHit->timeBucket(), tpcHit->adc());
3025  hists->m_TPC_adc_sec_inner->Fill(tpcHit->sector(), tpcHit->adc());
3026  }
3027 
3028  }
3029  }
3030 }
3031 
3032 //_____________________________________________________________________________
3033 // $Id: StEventQAMaker.cxx,v 2.141 2021/03/20 16:10:54 genevb Exp $
3034 // $Log: StEventQAMaker.cxx,v $
3035 // Revision 2.141 2021/03/20 16:10:54 genevb
3036 // Trigger ID names only available from year 2001 on
3037 //
3038 // Revision 2.140 2021/03/19 15:21:29 genevb
3039 // Only look at trigger information if trigger word is valid
3040 //
3041 // Revision 2.139 2021/03/18 21:35:48 genevb
3042 // Re-work the trigger bits plot to have actual trigger names
3043 //
3044 // Revision 2.138 2019/05/22 21:24:31 genevb
3045 // Add sDCA vs. time-in-run
3046 //
3047 // Revision 2.137 2019/03/14 02:31:52 genevb
3048 // Introduce iTPC plots
3049 //
3050 // Revision 2.136 2019/03/03 06:27:42 genevb
3051 // Oops - left in a debugging line - removing
3052 //
3053 // Revision 2.135 2019/03/01 19:40:37 genevb
3054 // Some minor Run 19 preparations, including first padrow hit
3055 //
3056 // Revision 2.134 2018/07/06 22:13:04 smirnovd
3057 // [Cosmetic] Changes in white space
3058 //
3059 // Revision 2.133 2018/07/06 22:10:26 smirnovd
3060 // [Cosmetic] Inverse test conditions to skip loop iterations
3061 //
3062 // Revision 2.132 2018/07/03 21:33:34 genevb
3063 // Introduce EPD (code provided by J. Ewigleben)
3064 //
3065 // Revision 2.131 2018/06/13 00:14:24 smirnovd
3066 // StEventQAMaker: Use the number of hits associated with the track
3067 //
3068 // The class StEvent/StTrackDetectorInfo looks very confusing to me. But what we
3069 // are interested here is the total number of hits on track which is just the size
3070 // of the internal vector of track hits returned by
3071 // StTrackDetectorInfo::numberOfReferencedPoints()
3072 //
3073 // Revision 2.130 2018/05/02 21:07:40 genevb
3074 // Initial accomodation for iTPC
3075 //
3076 // Revision 2.129 2017/02/25 03:24:30 genevb
3077 // Run 17: remove HFT
3078 //
3079 // Revision 2.128 2016/05/13 22:04:49 genevb
3080 // Address coverity findings: uninit vars, dead code, one PMD error, and one TOF error
3081 //
3082 // Revision 2.127 2016/02/24 22:14:49 genevb
3083 // Use kMaxDetectorId
3084 //
3085 // Revision 2.126 2016/02/24 22:14:05 genevb
3086 // Use kMaxDetectorId
3087 //
3088 // Revision 2.125 2016/02/19 03:54:41 genevb
3089 // Expand track detector ID histograms (compact syntax)
3090 //
3091 // Revision 2.124 2016/02/19 03:52:14 genevb
3092 // Expand track detector ID histograms
3093 //
3094 // Revision 2.123 2016/02/01 23:46:21 genevb
3095 // Add a mode for printing out TPC hits
3096 //
3097 // Revision 2.122 2015/07/20 18:00:41 genevb
3098 // isnan => std::isnan
3099 //
3100 // Revision 2.121 2015/07/17 20:18:14 genevb
3101 // More SSD=>SST (on tracks)
3102 //
3103 // Revision 2.120 2015/07/17 19:09:03 genevb
3104 // SSD copied for SST, and HFT histogams use SST now too
3105 //
3106 // Revision 2.119 2015/04/02 19:53:47 genevb
3107 // TPC dE/dx changes: Bethe-Bloch => Bichsel, and tighter cuts against pile-up tracks
3108 //
3109 // Revision 2.118 2015/03/18 21:43:17 genevb
3110 // Introduce Roman Pots histograms (K. Yip)
3111 //
3112 // Revision 2.117 2015/01/21 17:49:40 genevb
3113 // Fix missing run14 cases, remove unused firstEventClass, re-work normalizations with StHistUtil
3114 //
3115 // Revision 2.116 2015/01/16 21:08:28 genevb
3116 // Initial versions of HFT histograms
3117 //
3118 // Revision 2.115 2014/07/22 20:39:28 genevb
3119 // Add MTD to Offline QA
3120 //
3121 // Revision 2.114 2014/03/17 14:06:18 fisyak
3122 // Add check on ssd_hits.size()
3123 //
3124 // Revision 2.113 2013/03/20 20:17:37 genevb
3125 // Run 13 edits
3126 //
3127 // Revision 2.112 2013/03/12 03:06:02 genevb
3128 // Add FMS/FPD histograms for Run 13+
3129 //
3130 // Revision 2.111 2012/04/23 02:54:36 genevb
3131 // Reduce pile-up contributions in impact parameter plots
3132 //
3133 // Revision 2.110 2012/03/23 23:15:26 genevb
3134 // Include eemcMatch,btofMatch,crossCM in looking for good vertices
3135 //
3136 // Revision 2.109 2012/03/19 02:58:45 genevb
3137 // Using updated trigger type convention
3138 //
3139 // Revision 2.108 2012/03/05 03:42:32 genevb
3140 // Remove TPC XY dist, add TPC RPhi charge
3141 //
3142 // Revision 2.107 2012/02/14 04:02:34 genevb
3143 // fix for run12
3144 //
3145 // Revision 2.106 2012/02/09 03:01:05 genevb
3146 // No FTPC histograms for Run 12+
3147 //
3148 // Revision 2.105 2012/02/08 22:10:35 genevb
3149 // Updates for Run 12
3150 //
3151 // Revision 2.104 2011/07/29 21:52:41 genevb
3152 // Fixed improper initialization of event classes affecting future simulations
3153 //
3154 // Revision 2.103 2011/05/31 21:35:49 genevb
3155 // TPC request: add time bucket distribution of hits
3156 //
3157 // Revision 2.102 2011/05/26 19:59:38 genevb
3158 // Cleanup in destructors
3159 //
3160 // Revision 2.101 2011/05/02 02:26:47 genevb
3161 // QAallTrigs should allow even questionable events
3162 //
3163 // Revision 2.100 2011/04/14 15:31:11 perev
3164 // 1/0 fix
3165 //
3166 // Revision 2.99 2011/03/15 23:08:12 genevb
3167 // Adjust MB for Run 11
3168 //
3169 // Revision 2.98 2011/02/22 20:00:54 genevb
3170 // PCT check and dcaGeom only for TPC tracks
3171 //
3172 // Revision 2.97 2011/02/19 02:20:46 genevb
3173 // Pile-up cuts
3174 //
3175 // Revision 2.96 2011/02/04 02:34:06 genevb
3176 // Replace firsthit position-to-padrow with minimum padrow in topo map
3177 //
3178 // Revision 2.95 2009/11/19 20:34:38 genevb
3179 // Remove Event Summary (using defunct old software monitors)
3180 //
3181 // Revision 2.94 2009/11/19 20:12:10 genevb
3182 // Clean up compiler warnings
3183 //
3184 // Revision 2.93 2009/03/27 21:18:36 genevb
3185 // Add Jet Patch trigger histograms
3186 //
3187 // Revision 2.92 2009/03/19 01:08:08 genevb
3188 // Show both xy and rphi TPC hit hists
3189 //
3190 // Revision 2.91 2009/03/17 19:35:21 genevb
3191 // Weight the TPC xy hit hists
3192 //
3193 // Revision 2.90 2009/03/13 19:27:24 genevb
3194 // Now draw TPC xy hits in polar coords
3195 //
3196 // Revision 2.89 2009/02/21 00:42:52 genevb
3197 // TOF updates (BTOF classes), and single primVtx pointer
3198 //
3199 // Revision 2.88 2009/01/26 15:11:50 fisyak
3200 // Add protection for missing event->info()
3201 //
3202 // Revision 2.87 2008/01/14 17:57:29 genevb
3203 // Get OtherPhysics triggers working
3204 //
3205 // Revision 2.86 2007/12/12 19:50:55 genevb
3206 // Update for trigger words
3207 //
3208 // Revision 2.85 2007/12/10 19:58:20 genevb
3209 // Use log10 for number of secondary vertices
3210 //
3211 // Revision 2.84 2007/11/30 05:38:49 genevb
3212 // Changes for Run8: mostly silicon removal, TOF addition
3213 //
3214 // Revision 2.83 2007/11/07 22:43:00 genevb
3215 // Use highest rank primary vertex (one more)
3216 //
3217 // Revision 2.82 2007/11/07 22:39:07 genevb
3218 // Use highest rank primary vertex (missed a spot on last commit)
3219 //
3220 // Revision 2.81 2007/11/07 20:49:13 genevb
3221 // Use highest rank primary vertex
3222 //
3223 // Revision 2.80 2007/07/19 22:20:41 perev
3224 // FPEfix
3225 //
3226 // Revision 2.79 2007/05/26 00:42:18 perev
3227 // Do Pmd only if exists
3228 //
3229 // Revision 2.78 2007/04/25 18:35:56 genevb
3230 // Additional SSD hists
3231 //
3232 // Revision 2.77 2007/04/24 00:33:58 genevb
3233 // SSD hists
3234 //
3235 // Revision 2.76 2007/04/13 21:25:06 genevb
3236 // Modify window for SVT lasers
3237 //
3238 // Revision 2.75 2007/04/12 20:39:48 genevb
3239 // Cleanup (removal) of CalibVtx, Nfitpnt, Chisq1, Rich, histograms
3240 //
3241 // Revision 2.74 2007/04/07 04:40:30 genevb
3242 // Remove fit pnts/tot; retitle log as log10
3243 //
3244 // Revision 2.73 2007/03/13 18:47:22 genevb
3245 // Added Svt Laser Diff
3246 //
3247 // Revision 2.72 2007/02/26 20:45:01 genevb
3248 // SVT drift hist
3249 //
3250 // Revision 2.71 2006/02/16 20:37:03 perev
3251 // 1/0
3252 //
3253 // Revision 2.70 2005/09/27 20:32:22 genevb
3254 // New method for StMcEvent access
3255 //
3256 // Revision 2.69 2005/05/13 19:38:05 perev
3257 // Defence agains 1/0 added
3258 //
3259 // Revision 2.68 2005/05/11 18:16:06 genevb
3260 // Fixed problem of not using estPrimary tracks
3261 //
3262 // Revision 2.67 2005/02/22 19:38:05 genevb
3263 // Global tracks: use estGlobal if it exists, otherwise fall back to global
3264 //
3265 // Revision 2.66 2005/02/08 17:22:46 genevb
3266 // PMD histo changes, handle estGlobal/ITTF tracks
3267 //
3268 // Revision 2.65 2005/02/05 01:12:25 perev
3269 // test for zero pt added
3270 //
3271 // Revision 2.64 2005/01/27 05:28:25 genevb
3272 // PMD changes
3273 //
3274 // Revision 2.63 2004/12/13 15:52:36 genevb
3275 // Numerous updates: PMD, primtrk, FPD, QAShift lists
3276 //
3277 // Revision 2.62 2004/10/04 16:40:42 genevb
3278 // FTPC radial histos
3279 //
3280 // Revision 2.61 2004/05/29 12:41:42 genevb
3281 // handle absence of tpc & ftpc software monitors
3282 //
3283 // Revision 2.60 2004/04/23 23:15:29 genevb
3284 // Added signedDCA (Impact) plots for globals
3285 //
3286 // Revision 2.59 2004/03/25 21:11:10 genevb
3287 // Fixed filling of eventClass=1 null vertex hist (generally minbias)
3288 //
3289 // Revision 2.58 2004/03/03 01:22:31 genevb
3290 // Small addendum to previous checkin
3291 //
3292 // Revision 2.57 2004/03/03 01:19:29 genevb
3293 // Updated triggerIDs for Jeff Landgraf's scheme
3294 //
3295 // Revision 2.56 2004/02/12 05:03:05 genevb
3296 // Year 4 AuAu changes. New SVT histos.
3297 //
3298 // Revision 2.55 2004/02/05 19:04:30 genevb
3299 // math touchup for arc length calcs
3300 //
3301 // Revision 2.54 2004/01/10 01:10:17 genevb
3302 // Preparations for Year 5, added some svt plots
3303 //
3304 // Revision 2.53 2003/12/04 03:56:26 perev
3305 // 1/0 fix
3306 //
3307 // Revision 2.52 2003/11/25 04:19:38 perev
3308 // FPE protection
3309 //
3310 // Revision 2.51 2003/11/20 03:13:55 perev
3311 // Fix FPE
3312 //
3313 // Revision 2.50 2003/10/25 00:48:49 perev
3314 // Protect chrg_ftpc_tot[0]=0 (1/0)
3315 //
3316 // Revision 2.49 2003/09/19 22:58:11 genevb
3317 // Initialize pointers to zero, some doxygenization
3318 //
3319 // Revision 2.48 2003/09/02 17:59:21 perev
3320 // gcc 3.2 updates + WarnOff
3321 //
3322 // Revision 2.47 2003/04/14 15:20:38 genevb
3323 // Add pp 2003 trigger (first attempt)
3324 //
3325 // Revision 2.46 2003/02/28 16:01:07 genevb
3326 // Further improvements for previous check-in
3327 //
3328 // Revision 2.45 2003/02/28 06:17:55 genevb
3329 // Allow StQAMakerBase::Make to be called for all events
3330 //
3331 // Revision 2.44 2003/02/20 20:09:53 genevb
3332 // Several changes for new trigger scheme, dAu data
3333 //
3334 // Revision 2.43 2003/02/19 06:38:28 genevb
3335 // Rework trigger and mult/event class sections
3336 //
3337 // Revision 2.42 2003/02/15 22:00:52 genevb
3338 // Add tpcSectors, fix ftpc east/west charge
3339 //
3340 // Revision 2.41 2003/01/23 20:53:10 genevb
3341 // Additional dAu changes
3342 //
3343 // Revision 2.40 2003/01/23 04:08:22 jeromel
3344 // Include fixed
3345 //
3346 // Revision 2.39 2003/01/17 15:15:47 genevb
3347 // Add AllTriggers() function to ignore trigger words
3348 //
3349 // Revision 2.38 2002/05/29 13:54:30 genevb
3350 // Some changes to FTPC chisq histos
3351 //
3352 // Revision 2.37 2002/04/23 01:59:55 genevb
3353 // Addition of BBC/FPD histos
3354 //
3355 // Revision 2.36 2002/04/03 21:13:11 lansdell
3356 // primary track first, last point residuals now use outerGeometry() for helix parameters
3357 //
3358 // Revision 2.35 2002/02/23 00:31:26 lansdell
3359 // bug fix: primary vertex check histograms for a multiplicity class did not reflect the correct number of good events
3360 //
3361 // Revision 2.34 2002/02/12 18:41:59 genevb
3362 // Additional FTPC histograms
3363 //
3364 // Revision 2.33 2002/02/10 16:48:28 jeromel
3365 // Attempt to prevent re-creation of mHitHist.
3366 //
3367 // Revision 2.32 2002/02/05 22:27:30 jeromel
3368 // Modifications from David H. Int() -> InitRun().
3369 //
3370 // Revision 2.31 2001/12/28 09:19:12 genevb
3371 // Adjustments for pp running
3372 //
3373 // Revision 2.30 2001/12/20 03:11:07 genevb
3374 // pp trigger words 0x2XXX
3375 //
3376 // Revision 2.29 2001/11/20 21:53:45 lansdell
3377 // added x-y dist of hits, tpc east&west histos
3378 //
3379 // Revision 2.28 2001/11/02 21:57:44 genevb
3380 // Fix mistake in trigger word histogram
3381 //
3382 // Revision 2.27 2001/11/02 20:50:03 genevb
3383 // Changed histogram ranges for momenta
3384 //
3385 // Revision 2.26 2001/10/31 22:08:40 suaide
3386 // fixed EMC histograms
3387 //
3388 // Revision 2.25 2001/10/24 20:11:49 genevb
3389 // Fixed trigger issue for year 1
3390 //
3391 // Revision 2.24 2001/10/15 16:15:02 pavlinov
3392 // Clenup EMC stuff for production
3393 //
3394 // Revision 2.23 2001/09/10 18:00:12 genevb
3395 // Another trigger word
3396 //
3397 // Revision 2.22 2001/09/01 14:24:40 genevb
3398 // Allow trigger word=0 for MC data
3399 //
3400 // Revision 2.21 2001/08/31 21:29:50 genevb
3401 // Check if trigger info exists
3402 //
3403 // Revision 2.20 2001/08/29 20:45:15 genevb
3404 // Trigger word histos
3405 //
3406 // Revision 2.19 2001/08/23 17:57:36 genevb
3407 // Added SVT hit flag
3408 //
3409 // Revision 2.18 2001/08/07 07:51:27 lansdell
3410 // primvtx check for different multiplicities crashed for MC data, now fixed
3411 //
3412 // Revision 2.17 2001/08/03 20:33:55 lansdell
3413 // added primvtx check histos for different multiplicities; separated x-y plot of first point on track, tpc into east and west histos
3414 //
3415 // Revision 2.16 2001/07/31 23:21:42 lansdell
3416 // added last point, hit-helix histos
3417 //
3418 // Revision 2.15 2001/05/25 17:46:59 lansdell
3419 // commented out unnecessary emccol cout statement
3420 //
3421 // Revision 2.14 2001/05/25 16:31:20 lansdell
3422 // more updates to qa shift histograms
3423 //
3424 // Revision 2.13 2001/05/24 01:48:13 lansdell
3425 // qa_shift histograms updated
3426 //
3427 // Revision 2.12 2001/05/23 00:14:52 lansdell
3428 // more changes for qa_shift histograms
3429 //
3430 // Revision 2.11 2001/05/16 20:57:03 lansdell
3431 // new histograms added for qa_shift printlist; some histogram ranges changed; StMcEvent now used in StEventQA
3432 //
3433 // Revision 2.10 2001/05/02 16:10:46 lansdell
3434 // changed some histogram limits
3435 //
3436 // Revision 2.9 2001/05/01 15:17:36 genevb
3437 // Execute EMC code only if EMC libs loaded
3438 //
3439 // Revision 2.8 2001/04/30 19:09:27 genevb
3440 // Catch missing EMC info
3441 //
3442 // Revision 2.7 2001/04/28 22:05:13 genevb
3443 // Added EMC histograms
3444 //
3445 // Revision 2.6 2001/04/25 21:35:25 genevb
3446 // Added V0 phi distributions
3447 //
3448 // Revision 2.5 2001/04/24 22:53:51 lansdell
3449 // Removed redundant radial position of first hit histograms
3450 //
3451 // Revision 2.4 2001/04/24 21:33:05 genevb
3452 // Use det_id to identify detectors, and some cleanup
3453 //
3454 // Revision 2.3 2000/12/08 18:37:22 genevb
3455 // Change kTofPatchId->kTofId
3456 //
3457 // Revision 2.2 2000/09/08 18:55:53 lansdell
3458 // turned on FTPC primary track histograms
3459 //
3460 // Revision 2.1 2000/09/01 16:59:02 genevb
3461 // Change for V0 plots
3462 //
3463 // Revision 2.0 2000/08/25 16:02:39 genevb
3464 // New revision: new structure, multiplicity classes
3465 //
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:710
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:765
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:759
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:757
TH1F * m_global_hft_hit
of hits in ITS vs hits in ITS
Definition: StQABookHist.h:736
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:737
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:750
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:767
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:764
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:678
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:749
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:681
TH1F * m_ist_hit_ladder
of hits vs phi vs z position
Definition: StQABookHist.h:755
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:769
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:747
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:770
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:756
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:714
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:748
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:683
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:766
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:715
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:740
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:743
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:751
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:734
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:711
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:735
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:682
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:746
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:679
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:709
TH2F * m_tof_vpd_hit
of matched hits vs module
Definition: StQABookHist.h:768
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:754
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:687
TH1F * m_emc_point_deleta[4]
Point SigmaPhi spectra.
Definition: StQABookHist.h:680
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:744
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:677
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:772
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:724
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:758
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:676
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:760
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:742
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:741
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:684
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:745
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