StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StQAMakerBase.cxx
1 // $Id: StQAMakerBase.cxx,v 2.56 2021/03/18 21:35:48 genevb Exp $
2 // $Log: StQAMakerBase.cxx,v $
3 // Revision 2.56 2021/03/18 21:35:48 genevb
4 // Re-work the trigger bits plot to have actual trigger names
5 //
6 // Revision 2.55 2019/12/17 19:08:01 genevb
7 // Add more ETOF histograms
8 //
9 // Revision 2.54 2019/05/22 21:24:31 genevb
10 // Add sDCA vs. time-in-run
11 //
12 // Revision 2.53 2019/03/26 15:29:38 genevb
13 // Introduce ETOF
14 //
15 // Revision 2.52 2019/03/14 02:31:53 genevb
16 // Introduce iTPC plots
17 //
18 // Revision 2.51 2019/03/01 19:40:38 genevb
19 // Some minor Run 19 preparations, including first padrow hit
20 //
21 // Revision 2.50 2018/07/03 21:33:34 genevb
22 // Introduce EPD (code provided by J. Ewigleben)
23 //
24 // Revision 2.49 2018/05/02 21:07:40 genevb
25 // Initial accomodation for iTPC
26 //
27 // Revision 2.48 2017/02/25 03:24:30 genevb
28 // Run 17: remove HFT
29 //
30 // Revision 2.47 2016/05/13 22:04:49 genevb
31 // Address coverity findings: uninit vars, dead code, one PMD error, and one TOF error
32 //
33 // Revision 2.46 2015/07/17 19:09:03 genevb
34 // SSD copied for SST, and HFT histogams use SST now too
35 //
36 // Revision 2.45 2015/03/18 21:43:17 genevb
37 // Introduce Roman Pots histograms (K. Yip)
38 //
39 // Revision 2.44 2015/01/21 17:49:40 genevb
40 // Fix missing run14 cases, remove unused firstEventClass, re-work normalizations with StHistUtil
41 //
42 // Revision 2.43 2015/01/17 23:16:12 genevb
43 // protection from missing data/histograms
44 //
45 // Revision 2.42 2015/01/16 21:08:28 genevb
46 // Initial versions of HFT histograms
47 //
48 // Revision 2.41 2014/07/22 20:39:28 genevb
49 // Add MTD to Offline QA
50 //
51 // Revision 2.40 2014/01/30 19:44:06 genevb
52 // Additional TPC histogram for monitoring gas contamination
53 //
54 // Revision 2.39 2013/03/12 03:06:02 genevb
55 // Add FMS/FPD histograms for Run 13+
56 //
57 // Revision 2.38 2012/03/05 03:42:32 genevb
58 // Remove TPC XY dist, add TPC RPhi charge
59 //
60 // Revision 2.37 2012/02/08 22:10:35 genevb
61 // Updates for Run 12
62 //
63 // Revision 2.36 2011/05/26 19:59:38 genevb
64 // Cleanup in destructors
65 //
66 // Revision 2.35 2009/11/19 20:34:38 genevb
67 // Remove Event Summary (using defunct old software monitors)
68 //
69 // Revision 2.34 2009/03/27 21:18:36 genevb
70 // Add Jet Patch trigger histograms
71 //
72 // Revision 2.33 2007/12/12 19:50:55 genevb
73 // Update for trigger words
74 //
75 // Revision 2.32 2007/11/30 05:38:50 genevb
76 // Changes for Run8: mostly silicon removal, TOF addition
77 //
78 // Revision 2.31 2007/04/24 00:33:38 genevb
79 // Always do PMD hists now
80 //
81 // Revision 2.30 2005/02/22 19:38:39 genevb
82 // Do PMD hists only for year 4 and later (real data)
83 //
84 // Revision 2.29 2005/02/08 17:22:46 genevb
85 // PMD histo changes, handle estGlobal/ITTF tracks
86 //
87 // Revision 2.28 2004/12/13 15:52:37 genevb
88 // Numerous updates: PMD, primtrk, FPD, QAShift lists
89 //
90 // Revision 2.27 2004/02/12 16:54:24 genevb
91 // Separate MinBias histos
92 //
93 // Revision 2.26 2004/02/12 05:03:14 genevb
94 // Year 4 AuAu changes. New SVT histos.
95 //
96 // Revision 2.25 2004/01/10 01:10:18 genevb
97 // Preparations for Year 5, added some svt plots
98 //
99 // Revision 2.24 2003/04/19 00:17:50 genevb
100 // Updated for dAu/pp running
101 //
102 // Revision 2.23 2003/02/28 16:01:09 genevb
103 // Further improvements for previous check-in
104 //
105 // Revision 2.22 2003/02/28 06:17:56 genevb
106 // Allow StQAMakerBase::Make to be called for all events
107 //
108 // Revision 2.21 2003/02/20 20:09:54 genevb
109 // Several changes for new trigger scheme, dAu data
110 //
111 // Revision 2.20 2003/02/19 06:38:29 genevb
112 // Rework trigger and mult/event class sections
113 //
114 // Revision 2.19 2003/02/15 22:00:52 genevb
115 // Add tpcSectors, fix ftpc east/west charge
116 //
117 // Revision 2.18 2002/04/23 01:59:56 genevb
118 // Addition of BBC/FPD histos
119 //
120 // Revision 2.17 2002/03/11 20:59:58 genevb
121 // Fixed bug with placement of trigger hists
122 //
123 // Revision 2.16 2002/03/01 22:51:20 genevb
124 // Small set-to-zero possible bug fix
125 //
126 // Revision 2.15 2002/02/12 18:42:00 genevb
127 // Additional FTPC histograms
128 //
129 // Revision 2.14 2002/01/26 03:04:07 genevb
130 // Fixed some problems with fcl histos
131 //
132 // Revision 2.13 2002/01/21 22:09:24 genevb
133 // Include some ftpc histograms from StFtpcClusterMaker
134 //
135 // Revision 2.12 2001/12/28 09:19:13 genevb
136 // Adjustments for pp running
137 //
138 // Revision 2.11 2001/12/20 03:11:08 genevb
139 // pp trigger words 0x2XXX
140 //
141 // Revision 2.10 2001/09/10 18:00:13 genevb
142 // Another trigger word
143 //
144 // Revision 2.9 2001/08/29 20:45:15 genevb
145 // Trigger word histos
146 //
147 // Revision 2.8 2001/08/07 07:51:28 lansdell
148 // primvtx check for different multiplicities crashed for MC data, now fixed
149 //
150 // Revision 2.7 2001/05/23 00:14:53 lansdell
151 // more changes for qa_shift histograms
152 //
153 // Revision 2.6 2001/05/16 20:57:03 lansdell
154 // new histograms added for qa_shift printlist; some histogram ranges changed; StMcEvent now used in StEventQA
155 //
156 // Revision 2.5 2001/04/28 22:05:13 genevb
157 // Added EMC histograms
158 //
159 // Revision 2.4 2001/04/26 16:34:40 genevb
160 // Fixed some histogram ranges
161 //
162 // Revision 2.3 2000/08/25 22:06:15 genevb
163 // Raised high mult bin to 2500 global tracks
164 //
165 // Revision 2.2 2000/08/25 20:29:34 lansdell
166 // year1 print list changed slightly; cosmetic improvement of some event summary histograms
167 //
168 // Revision 2.1 2000/08/25 16:04:10 genevb
169 // Introduction of files
170 //
171 //
173 // //
174 // StQAMakerBase base class for QA Histogram Makers //
175 // //
177 
178 #include "StMessMgr.h"
179 #include "StQAMakerBase.h"
180 #include "StQABookHist.h"
181 #include "QAH.h"
182 #include "TList.h"
183 #include "StDetectorDbMaker/St_tpcPadConfigC.h"
184 #include "StarRoot/TH1Helper.h"
185 
186 ClassImp(StQAMakerBase)
187 
188 //_____________________________________________________________________________
189 StQAMakerBase::StQAMakerBase(const char *name, const char *title, const char* type) :
190  StMaker(name,title), QAMakerType(type) {
191 
192  hists = 0;
193  histsList.Expand(32);
194  histsList.SetOwner();
195  Int_t i;
196  for (i=0;i<32;i++) histsList.AddAt(0,i);
197  histsSet = StQA_Undef;
198  fillHists = kFALSE;
199  eventCount = 0;
200  eventClass = 3;
201  eventClassIdx = 0;
202  ITTF = kFALSE;
203  EST = -1; // -1 = unknown
204  allTrigs = kFALSE;
205 
206 // - Set all the histogram booking constants
207 
208  ntrk = 50;
209  nmnpt = 50;
210  nmneta = 50;
211  nxyz = 50;
212 
213 // - Zero all histogram pointers
214  mNullPrimVtx = 0; // histogram for number of events without primary vertex
215  mMultClass = 0; // histogram for number of events in mult classes
216  mTrigWord = 0; // histogram for event trigger words
217  mTrigBits = 0; // histogram for event trigger bits
218 
219 // FTPC histograms
220  m_ftpc_chargestepW=0;
221  m_ftpc_chargestepE=0;
222  m_ftpc_fcl_radialW=0;
223  m_ftpc_fcl_radialE=0;
224 
225 // TPC Raw
226  m_pnt_rpTQW = 0;
227  m_pnt_rpTQE = 0;
228  for (int i =0; i < 24; ++ i) {
229  mTpcSectorPlot[i] = 0;
230  m_tpc_adc_chargevstb[i] = 0;
231  m_tpc_adc_chargevstbTPX[i] = 0;
232  m_tpc_adc_chargevsrowvstb[i] = 0;
233  m_tpc_adc_chargesum[i] = 0;
234  m_tpc_clust_stats[i] = 0;
235  m_tpc_clust_statsvsrow[i] = 0;
236  m_tpc_clust_charge[i] = 0;
237  m_tpc_clust_chargeTPX[i] = 0;
238  m_tpc_clust_chargesum[i] = 0;
239  m_tpc_clust_chargevstb[i] = 0;
240  m_tpc_clust_chargevstbTPX[i] = 0;
241  m_tpc_clust_chargevsrow[i] = 0;
242  }
243  m_tpc_adc_chargepersector = 0;
244  m_tpc_adc_chargepersectorTPX = 0;
245  m_tpc_adc_numhitsvsrowvssector = 0;
246  m_tpc_clust_pxltb = 0;
247  m_tpc_clust_pxltbTPX = 0;
248  m_tpc_clust_pxlp = 0;
249  m_tpc_clust_pxlpTPX = 0;
250  m_tpc_clust_numclust = 0;
251  m_tpc_clust_numclustTPX = 0;
252 
253 // TPC dE/dx over time
254  m_dedx_Z3A=0; // dE/dx vs. drift distance
255 
256 // FCS
257  m_h1_inv_mass_cluster = 0;
258  m_h1_dgg_cluster = 0;
259  m_h1_two_cluster_energy_allcut = 0;
260  m_h2_cluster_dgg_vs_E1pE2 = 0;
261 
262 // signed DCA (impact parameter) over time
263  m_glb_simpactTime=0;
264 
265 // Roman-Pot histograms
266 // m_RP_ClusterLength=0; // testing
267  for (i=0; i<kRP_MAXSEQ; i++) m_RP_clusters_xy[i] = 0 ;
268 
269 // ETOF histograms
270  for (i=0; i<10; i++) m_etofHist[i] = 0;
271 
272 }
273 //_____________________________________________________________________________
274 StQAMakerBase::~StQAMakerBase() {
275  if (mNullPrimVtx) delete mNullPrimVtx;
276  if (mMultClass) delete mMultClass;
277  if (mTrigWord) delete mTrigWord;
278  if (mTrigBits) delete mTrigBits;
279  if (m_pnt_rpTQW) {
280  delete m_pnt_rpTQW;
281  delete m_pnt_rpTQE;
282  for (Int_t i=0; i<24; i++) {
283  delete mTpcSectorPlot[i];
284  delete m_tpc_adc_chargevstb[i];
285  delete m_tpc_adc_chargevstbTPX[i];
286  delete m_tpc_adc_chargevsrowvstb[i];
287  delete m_tpc_adc_chargesum[i];
288  delete m_tpc_clust_stats[i];
289  delete m_tpc_clust_statsvsrow[i];
290  delete m_tpc_clust_charge[i];
291  delete m_tpc_clust_chargeTPX[i];
292  delete m_tpc_clust_chargesum[i];
293  delete m_tpc_clust_chargevstb[i];
294  delete m_tpc_clust_chargevstbTPX[i];
295  delete m_tpc_clust_chargevsrow[i];
296  }
300  delete m_tpc_clust_pxltb;
301  delete m_tpc_clust_pxltbTPX;
302  delete m_tpc_clust_pxlp;
303  delete m_tpc_clust_pxlpTPX;
304  delete m_tpc_clust_numclust;
306  }
307 }
308 //_____________________________________________________________________________
309 Int_t StQAMakerBase::Init() {
310 // Histogram booking must wait until first event Make() to determine event type
311  eventCount = 0;
312  return StMaker::Init();
313 }
314 //_____________________________________________________________________________
315 void StQAMakerBase::Clear(Option_t* opt) {
316  StMaker::Clear(opt);
317 }
318 //_____________________________________________________________________________
320 
321  if (Debug())
322  gMessMgr->Info(" In StQAMakerBase::Make()");
323 
324  if (!mNullPrimVtx) BookHist();
325  // See BookHist() for definitions of histsSet values,
326  // which should be set during Make() of the derived QA Maker class
327  // event class also decided in derived Make()
328  switch (histsSet) {
329  case (StQA_AuAuOld) :
330  mMultClass->Fill((float) eventClass);
331  break;
332  default : {}
333  }
334  if (!eventClass) { hists=0; return kStOk; }
335  hists = (StQABookHist*) histsList.At((--eventClass));
336  if (!hists) NewQABookHist();
337 
338 
339 
340  if (!fillHists) return kStOk;
341  // Call methods to fill histograms
342 
343  // Those divided by event class:
344  // histograms from table globtrk
345  MakeHistGlob();
346  // histograms from table primtrk - must be done after global tracks
347  MakeHistPrim();
348  // histograms from table primtrk & dst_dedx
349  MakeHistPID();
350  // histograms from TPC raw data
351  if (!eventClassIdx) MakeHistTPC();
352  // histograms from table dst_dedx
353  MakeHistDE();
354  // histograms from table point
355  MakeHistPoint();
356  // histograms from table dst_vertex,dst_v0_vertex,dst_xi_vertex,dst_kinkVertex
357  MakeHistVertex();
358  // histograms from EMC in StEvent
359  MakeHistEMC();
360  // histograms from geant and reco tables
361  if (histsSet==StQA_MC) MakeHistEval();
362  // histograms from BBC in StEvent
363  if (histsSet==StQA_AuAuOld) MakeHistBBC();
364  // histograms from FPD in StEvent
365  if (histsSet==StQA_AuAuOld) MakeHistFPD();
366  // histograms from PMD in StEvent
367  if (histsSet<StQA_run12all) MakeHistPMD();
368  // histograms from TOF in StEvent
369  if (histsSet>=StQA_run8) MakeHistTOF();
370  // histograms from FMS in StEvent
371  if (histsSet>=StQA_run13 && !eventClassIdx) MakeHistFMS();
372  // histograms from MTD in StEvent
373  if (histsSet>=StQA_run12all) MakeHistMTD();
374  // histograms from HFT (PXL, IST, SST) in StEvent
375  if (histsSet>=StQA_run14 && histsSet<StQA_run17) {
376  MakeHistHFT();
377  MakeHistPXL();
378  MakeHistIST();
379  MakeHistSST();
380  }
381  // histograms from Roman-Pot in StEvent
382  if (histsSet>=StQA_run15 && !eventClassIdx) MakeHistRP();
383  // histograms from EPD in StEvent
384  if (histsSet>=StQA_run18) {
385  MakeHistEPD();
386  MakeHistiTPC();
387  }
388 
389  eventCount++;
390  return kStOk;
391 }
392 //_____________________________________________________________________________
393 void StQAMakerBase::NewQABookHist() {
394  const char* pre = prefix[eventClass].Data();
395  if (Debug())
396  gMessMgr->Info() <<
397  "StQAMakerBase: booking histograms with prefix: " <<
398  pre << endm;
399  QAH::maker = (StMaker*) (this);
400  hists = new StQABookHist(pre);
401  histsList.AddAt(hists,eventClass);
402  hists->BookHist(histsSet);
403 }
404 //_____________________________________________________________________________
405 TH2F* StQAMakerBase::MH1F(const Text_t* name, const Text_t* title,
406  Int_t nbinsx, Axis_t xlow, Axis_t xup) {
407  TH2F* h = QAH::MH1F(name,title,nbinsx,xlow,xup,eventClass);
408  if (eventClass>1) {
409  h->Rebin(0,"low mult");
410  h->Rebin(1,"mid mult");
411  h->Rebin(2,"high mult");
412  }
413  return h;
414 }
415 //_____________________________________________________________________________
416 void StQAMakerBase::BookHist() {
417 // book histograms
418 
419  Int_t tempClass = eventClass;
420 
421  if (allTrigs) {
422  prefix[0] = QAMakerType;
423  eventClass = 1;
424  } else {
425  switch (histsSet) {
426 
427  // Real data with three multiplicity classes (low, medium, high)
428 
429  case (StQA_AuAuOld) : {
430  (prefix[0] = QAMakerType) += "LM";
431  (prefix[1] = QAMakerType) += "MM";
432  (prefix[2] = QAMakerType) += "HM";
433  eventClass = 3;
434  break; }
435 
436  // Real data with event classes for different triggers
437 
438  // any new StQAHistSetType values
439  case (StQA_run22) :
440  case (StQA_run19) :
441  case (StQA_run18) :
442  case (StQA_run17) :
443  case (StQA_run15) :
444  case (StQA_run14) :
445  case (StQA_run13) :
446  case (StQA_run12) :
447  case (StQA_run8) :
448  case (StQA_AuAu) : {
449  (prefix[0] = QAMakerType) += "MB"; // Minbias
450  (prefix[1] = QAMakerType) += "CL"; // Central
451  (prefix[2] = QAMakerType) += "HT"; // HighTower
452  (prefix[3] = QAMakerType) += "XX"; // OtherPhysics
453  (prefix[4] = QAMakerType) += "JP"; // JetPatch
454  eventClass = 5;
455  break; }
456 
457  case (StQA_dAu) : {
458  prefix[0] = QAMakerType; // Minbias
459  (prefix[1] = QAMakerType) += "HP";
460  (prefix[2] = QAMakerType) += "XX";
461  eventClass = 3;
462  break; }
463 
464  // the following data sets use the defaults
465 
466  // Generic data (e.g. Monte Carlo) with just one event class
467  case (StQA_MC) :
468 
469  // pp data with just one event class
470  case (StQA_pp) :
471  case (StQA_run12all) :
472 
473  default : {
474  prefix[0] = QAMakerType;
475  eventClass = 1;
476  }
477  }
478  }
479 
480  QAH::maker = (StMaker*) (this);
481  QAH::preString = QAMakerType;
482 
483  BookHistTrigger();
484  BookHistGeneral();
485  BookHistTPC();
486  BookHistDE();
487  BookHistFcl();
488  if (histsSet>=StQA_run22) BookHistFCS();
489  if (histsSet>=StQA_run13 && histsSet<StQA_run22) BookHistFMS();
490  if (histsSet>=StQA_run15) BookHistRP();
491  if (histsSet>=StQA_run19) BookHistETOF();
492 
493  Int_t tempClass2 = eventClass;
494  // Must book the histograms with no special prefix now
495  for (eventClass=0; eventClass<tempClass2; eventClass++) {
496  if (!(QAMakerType.CompareTo(prefix[eventClass]))) {
497  NewQABookHist();
498  break;
499  }
500  }
501  eventClass = tempClass;
502 
503 }
504 //_____________________________________________________________________________
505 void StQAMakerBase::BookHistGeneral(){
506 
507  mNullPrimVtx = QAH::H1F("QaNullPrimVtx","event primary vertex check",40,-2,2);
508  mNullPrimVtx->SetXTitle("has primary vertex? (yes = 1, no = -1)");
509  mNullPrimVtx->SetYTitle("# of events");
510 
511  if (histsSet == StQA_AuAuOld) {
512  mMultClass = QAH::H1F("QaMultClass","event multiplicity class",5,-0.5,4.5);
513  mMultClass->SetXTitle("mult class (0=?/MC, 1=LM, 2=MM, 3=HM)");
514  mMultClass->SetYTitle("# of events");
515  }
516 
517  m_glb_simpactTime = QAH::H2F("QaGtrkSImpactTime","globtrk: signed impact param from prim vtx vs. time",
518  18000,0.,3600.,120,-3.0,3.0);
519 
520 }
521 //_____________________________________________________________________________
522 void StQAMakerBase::BookHistTrigger(){
523 
524  QAH::maker = (StMaker*) (this);
525  QAH::preString = QAMakerType;
526  if (mTrigWord) return;
527  mTrigWord = QAH::H1F("QaTrigWord","trigger word",8,0.5,8.5);
528  mTrigWord->SetXTitle("1:MinBias 2:Central 3:HiPt 4:Jet 5:HiTower 6:OtherPhys");
529  mTrigBits = QAH::H1F("QaTrigBits","trigger bits",64,-0.5,63.5);
530 }
531 //_____________________________________________________________________________
532 void StQAMakerBase::BookHistDE(){
533 
534  // Get dE/dx histogram from dE/dx maker
535  if (!(m_dedx_Z3A)) {
536  // First try to get histograms from dE/dx maker named "dEdxY2"
537  StMaker* fhMaker = GetMaker("dEdxY2");
538  if (fhMaker) {
539  m_dedx_Z3A = (TH3F*) (fhMaker->GetHist("Z3A"));
540  AddHist(m_dedx_Z3A);
541  } else {
542  // "dEdxY2" maker doesn't exist, so look in hist branch
543  St_DataSet* hDS = GetDataSet("histBranch");
544  if (hDS) {
545  // hDS->ls(9);
546  St_DataSet* fhDS = hDS->Find("dEdxY2Hist");
547  if (fhDS) {
548  m_dedx_Z3A = (TH3F*) (fhDS->FindObject("Z3A"));
549  AddHist(m_dedx_Z3A);
550  }
551  }
552  }
553  }
554 
555 }
556 //_____________________________________________________________________________
557 void StQAMakerBase::BookHistFcl(){
558 
559  // Get fcl histograms from FTPC makers
560  if (!(m_ftpc_chargestepW)) {
561  // First try to get histograms from StFtpcClusterMaker named "ftpc_hits"
562  StMaker* fhMaker = GetMaker("ftpc_hits");
563  if (fhMaker) {
564  m_ftpc_chargestepW = (TH1F*) (fhMaker->GetHist("fcl_chargestepW"));
565  AddHist(m_ftpc_chargestepW);
566  m_ftpc_chargestepE = (TH1F*) (fhMaker->GetHist("fcl_chargestepE"));
567  AddHist(m_ftpc_chargestepE);
568  m_ftpc_fcl_radialW = (TH1F*) (fhMaker->GetHist("fcl_radialW"));
569  AddHist(m_ftpc_fcl_radialW);
570  m_ftpc_fcl_radialE = (TH1F*) (fhMaker->GetHist("fcl_radialE"));
571  AddHist(m_ftpc_fcl_radialE);
572  } else {
573  // "ftpc_hits" maker doesn't exist, so look in hist branch
574  // *** Currently isn't working for bfcread_event_QAhist.C ***
575  St_DataSet* hDS = GetDataSet("histBranch");
576  if (hDS) {
577  // hDS->ls(9);
578  St_DataSet* fhDS = hDS->Find("ftpc_hitsHist");
579  if (fhDS) {
580  m_ftpc_chargestepW =
581  (TH1F*) (fhDS->FindObject("fcl_chargestepW"));
582  AddHist(m_ftpc_chargestepW);
584  (TH1F*) (fhDS->FindObject("fcl_chargestepE"));
585  AddHist(m_ftpc_chargestepE);
587  (TH1F*) (fhDS->FindObject("fcl_radialW"));
588  AddHist(m_ftpc_fcl_radialW);
590  (TH1F*) (fhDS->FindObject("fcl_radialE"));
591  AddHist(m_ftpc_fcl_radialE);
592  }
593  }
594  }
595  }
596 }
597 //_____________________________________________________________________________
598 void StQAMakerBase::BookHistFCS(){
599 
600  if (!(m_h1_inv_mass_cluster)) {
601  StMaker* fhMaker = GetMaker("FcsPi0F");
602  if (fhMaker) {
603  m_h1_inv_mass_cluster = (TH1F*) (fhMaker->GetHist("h1_inv_mass_cluster"));
604  m_h1_dgg_cluster = (TH1F*) (fhMaker->GetHist("h1_dgg_cluster"));
605  m_h1_two_cluster_energy_allcut = (TH1F*) (fhMaker->GetHist("h1_two_cluster_energy_allcut"));
606  m_h2_cluster_dgg_vs_E1pE2 = (TH2F*) (fhMaker->GetHist("h2_cluster_dgg_vs_E1pE2"));
607  } else {
608  // "FcsMIP" maker doesn't exist, so look in hist branch
609  St_DataSet* hDS = GetDataSet("histBranch");
610  if (hDS) {
611  // hDS->ls(9);
612  St_DataSet* fhDS = hDS->Find("FcsPi0F");
613  if (fhDS) {
614  m_h1_inv_mass_cluster = (TH1F*) (fhDS->FindObject("h1_inv_mass_cluster"));
615  m_h1_dgg_cluster = (TH1F*) (fhDS->FindObject("h1_dgg_cluster"));
616  m_h1_two_cluster_energy_allcut = (TH1F*) (fhDS->FindObject("h1_two_cluster_energy_allcut"));
617  m_h2_cluster_dgg_vs_E1pE2 = (TH2F*) (fhDS->FindObject("h2_cluster_dgg_vs_E1pE2"));
618  }
619  }
620  }
621  AddHist(m_h1_inv_mass_cluster);
622  AddHist(m_h1_dgg_cluster);
623  AddHist(m_h1_two_cluster_energy_allcut);
624  AddHist(m_h2_cluster_dgg_vs_E1pE2);
625  }
626 
627 }
628 //_____________________________________________________________________________
629 void StQAMakerBase::BookHistFMS(){
630 
631  for(int qt = kQt1; qt < kQtError; ++qt) {
632 
633  std::string s;
634  switch(qt) {
635  case kQt1:
636  s = "south-top";
637  break;
638  case kQt2:
639  s = "south-bottom";
640  break;
641  case kQt3:
642  s = "north-top";
643  break;
644  case kQt4:
645  s = "north-bottom";
646  break;
647  case kFpd:
648  s = "FPD";
649  break;
650  } // switch
651 
652  std::string name;
653  std::string title;
654  // Generate histogram names and titles for FMS QT crates.
655  if(qt >= kQt1 and qt <= kQt4) {
656  std::stringstream stream;
657  stream << "fms_qt_channel_adc_crate_" << qt;
658  name = stream.str();
659  stream.str("");
660  stream.clear();
661  stream << "Input to FMS QT crate " << qt << " (" << s << ")";
662  title = stream.str();
663  } // if
664  // ... or the FPD.
665  else if(kFpd == qt) {
666  name = "fpd_channel_adc";
667  title = "Input to FPD QT crate";
668  } // else if
669 
670  // Create the histogram.
671  TH2F* h = new TH2F(name.c_str(),
672  title.c_str(),
673  kNChannels, 0., kNChannels, // Channel axis bins
674  200, 0., kNAdc); // ADC axis bins
675  TH1Helper::SetCanRebin(h);
676  h->SetXTitle("slot * 32 + channel");
677  h->SetYTitle("ADC");
678  // Store the histogram.
679  AddHist(h);
680  mFMShistograms.insert(std::make_pair(qt, h));
681  } // for
682 
683 }
684 //_____________________________________________________________________________
685 void StQAMakerBase::BookHistRP(){
686 
687  // m_RP_ClusterLength = QAH::H1F("RP_ClusterLength","Number of strips in each cluster",50,0,50);
688  char rpname[kRP_MAXSEQ][5] = { "E1U", "E1D", "E2U", "E2D", "W1U", "W1D", "W2U", "W2D" }; // 2015
689 
690  char strs[20], strl[100];
691  for ( Int_t i=0; i<kRP_MAXSEQ; i++ ) {
692  sprintf(strs,"RP_cluster_xy_%s", rpname[i] ) ;
693  sprintf(strl,"Clusters Y vs X in %s", rpname[i] ) ;
694  m_RP_clusters_xy[i] = QAH::H2F(strs, strl, 96, 0., 768., 96, 0., 768. );
695  }
696 
697 }
698 //_____________________________________________________________________________
699 void StQAMakerBase::BookHistETOF(){
700 
701  // Get ETOF histograms ETOF hit & match makers
702  if (!(m_etofHist[0])) {
703  int etofCnt = 0;
704  // First try to get histograms from StEtofHitMaker
705  StMaker* ehMaker = GetMaker("etofHit");
706  if (ehMaker) {
707  m_etofHist[etofCnt++] = (TH1*) (ehMaker->GetHist("etofHit_tof"));
708  m_etofHist[etofCnt++] = (TH1*) (ehMaker->GetHist("averageTimeDiff_etofHits_btofHits"));
709  m_etofHist[etofCnt++] = (TH1*) (ehMaker->GetHist("multiplicity_etofHits_btofHits"));
710  m_etofHist[etofCnt++] = (TH1*) (ehMaker->GetHist("multiplicity_etofHits_epdEast"));
711  }
712  // First try to get histograms from StEtofHitMaker
713  StMaker* emMaker = GetMaker("etofMatch");
714  if (emMaker) {
715  m_etofHist[etofCnt++] = (TH1*) (emMaker->GetHist("A_eTofHits_globalXY"));
716  m_etofHist[etofCnt++] = (TH1*) (emMaker->GetHist("B_intersectionMult_etofMult"));
717  m_etofHist[etofCnt++] = (TH1*) (emMaker->GetHist("G_matchCand_beta_signmom"));
718  m_etofHist[etofCnt++] = (TH1*) (emMaker->GetHist("G_matchCand_timeOfFlight_pathLength"));
719  m_etofHist[etofCnt++] = (TH1*) (emMaker->GetHist("G_primary_Intersection_validMatch"));
720  m_etofHist[etofCnt++] = (TH1*) (emMaker->GetHist("H_matchCand_t0corr_1d"));
721  }
722  for (int i=0; i<etofCnt; i++) AddHist(m_etofHist[i]);
723  }
724 }
725 //_____________________________________________________________________________
726 void StQAMakerBase::BookHistTPC(){
727 
728  for (int i = 0; i < 24; ++ i) {//1 hist per sector
729  int num_rows = St_tpcPadConfigC::instance()->numberOfRows(i+1);
730  mTpcSectorPlot[i] = QAH::H2F(Form("Qa%sTpcSector%d",(num_rows > 45 ? "i" : ""),i+1),
731  Form("Hits in %sTPC Sector %d",(num_rows > 45 ? "i" : ""),i+1),
732  104,-52.,52.,num_rows+2,-0.5,((float) num_rows)+1.5);
733  mTpcSectorPlot[i]->SetXTitle("along padrows [cm]");
734  mTpcSectorPlot[i]->SetYTitle("padrow");
735  }
736  m_pnt_rpTQW = QAH::H2F("QaPointRPTpcQW","point: r-phi distribution of charge, tpcW",20,58.75,196.75,72,0,TMath::TwoPi());
737  m_pnt_rpTQE = QAH::H2F("QaPointRPTpcQE","point: r-phi distribution of charge, tpcE",20,58.75,196.75,72,0,TMath::TwoPi());
738 
739  for (int i = 0; i < 24; ++ i) {//1 hist per sector
740  int num_rows = St_tpcPadConfigC::instance()->numberOfRows(i+1);
741  int max_pads_per_row = St_tpcPadConfigC::instance()->numberOfPadsAtRow(i+1,num_rows);
742  m_tpc_adc_chargevstb[i] = QAH::H1F(Form("QaTpc_adc_chargevstb_%d",i+1),Form("ADC charge vs. time bucket (iTPC), sector %d",i+1),512,0,511);
743  m_tpc_adc_chargevstbTPX[i] = QAH::H1F(Form("QaTpc_adc_chargevstbTPX_%d",i+1),Form("ADC charge vs. time bucket (TPX), sector %d",i+1),512,0,511);
744  m_tpc_adc_chargevsrowvstb[i] = QAH::H2F(Form("QaTpc_adc_chargevsrowvstb_%d",i+1),Form("charge vs. row vs. time bucket, sector %d",i+1),400,0.5,0.5+400,72,0.5,72+0.5);
745  m_tpc_adc_chargesum[i] = QAH::H2F(Form("QaTpc_adc_chargesum_%d",i+1),Form("ADC sum over all events, sector %d",i+1),max_pads_per_row,0.5,max_pads_per_row+0.5,num_rows,0.5,num_rows+0.5);
746 
747  m_tpc_clust_stats[i] = QAH::H1F(Form("QaTpc_clust_stats_%d",i+1),Form("status of clusters, sector %d",i+1),32,-0.5,31.5);
748  m_tpc_clust_statsvsrow[i] = QAH::H2F(Form("QaTpc_clust_statsvsrow_%d",i+1),Form("status of clusters vs. row, sector %d",i+1),72,0.5,72+0.5, 32,-0.5,31.5);
749  m_tpc_clust_charge[i] = QAH::H1F(Form("QaTpc_clust_charge_%d",i+1),Form("charge per cluster (iTPC), sector %d",i+1),1024,0,8096);
750  m_tpc_clust_chargeTPX[i] = QAH::H1F(Form("QaTpc_clust_chargeTPX_%d",i+1),Form("charge per cluster (TPX), sector %d",i+1),2048,0,2048);
751  m_tpc_clust_chargesum[i] = QAH::H2F(Form("QaTpc_clust_chargesum_%d",i+1),Form("cluster sum over all events, sector %d",i+1),max_pads_per_row,0.5,max_pads_per_row+0.5,num_rows,0.5,num_rows+0.5);
752  m_tpc_clust_chargevstb[i] = QAH::H2F(Form("QaTpc_clust_chargevstb_%d",i+1),Form("charge vs. time bucket (iTPC), sector %d",i+1),128,0.5,512+0.5,64,0.5,0.5+2048);
753  m_tpc_clust_chargevstbTPX[i] = QAH::H2F(Form("QaTpc_clust_chargevstbTPX_%d",i+1),Form("charge vs. time bucket (TPX), sector %d",i+1),128,0.5,512+0.5,64,0.5,0.5+2048);
754  m_tpc_clust_chargevsrow[i] = QAH::H2F(Form("QaTpc_clust_chargevsrow_%d",i+1),Form("charge vs. row, sector %d",i+1),72,0.5,72+0.5,128,0.5,0.5+2048);
755  }
756  m_tpc_adc_chargepersector = QAH::H1F("QaTpc_adc_chargepersector","charge per sector (iTPC)",24,0.5,24.5);
757  m_tpc_adc_chargepersectorTPX = QAH::H1F("QaTpc_adc_chargepersectorTPX","charge per sector (TPX)",24,0.5,24.5);
758  m_tpc_adc_numhitsvsrowvssector = QAH::H2F("QaTpc_adc_numhitsvsrowvssector","adc hits vs sector vs row",24,0.5,24.5,72,0.5,72.5);
759 
760  m_tpc_clust_pxltb = QAH::H2F("QaTpc_clust_pxltb","cluster pixel time bucket size (iTPC)",24,0.5,24.5,100,0,100);
761  m_tpc_clust_pxltbTPX = QAH::H2F("QaTpc_clust_pxltbTPX","cluster pixel time bucket size (TPX)",24,0.5,24.5,100,0,100);
762  m_tpc_clust_pxlp = QAH::H2F("QaTpc_clust_pxlp","cluster pixel pad size (iTPC)",24,0.5,24.5,100,0,100);
763  m_tpc_clust_pxlpTPX = QAH::H2F("QaTpc_clust_pxlpTPX","cluster pixel pad size (TPX)",24,0.5,24.5,100,0,100);
764  m_tpc_clust_numclust = QAH::H2F("QaTpc_clust_numclust","number of clusters vs. sector (iTPC)",24,0.5,24.5,120,0,6);
765  m_tpc_clust_numclustTPX = QAH::H2F("QaTpc_clust_numclustTPX","number of clusters vs. sector (TPX)",24,0.5,24.5,120,0,6);
766  m_tpc_clust_numclust->SetYTitle("log_{10}(N_{clust})");
767  m_tpc_clust_numclustTPX->SetYTitle("log_{10}(N_{clust})");
768 }
769 //_____________________________________________________________________________
770 
Int_t histsSet
event class-dependent histograms
virtual void Clear(Option_t *)
User defined functions.
TH2F * m_tpc_adc_numhitsvsrowvssector
charge per sector (TPX)
TH2F * m_tpc_clust_numclust
cluster pixel pad size (outer)
virtual Int_t Make()
TH1F * m_ftpc_fcl_radialW
Chargestep from ftpc east.
virtual void Clear(Option_t *option="")
User defined functions.
Definition: StMaker.cxx:634
TH2F * m_tpc_clust_statsvsrow[24]
status of clusters
TH1PtrMap mFMShistograms
signed impact parameter from primary vertex vs. time
TH2F * m_tpc_clust_pxltb
adc hits vs row vs sector
TH2F * m_tpc_clust_chargevstb[24]
cluster sum over all events
TH1F * m_tpc_clust_chargeTPX[24]
charge per cluster (inner)
TH2F * m_tpc_clust_chargevstbTPX[24]
charge vs. time bucket (inner)
TH1F * m_ftpc_chargestepE
Chargestep from ftpc west.
TH1F * m_ftpc_fcl_radialE
ftpc west cluster radial position
TH3F * m_dedx_Z3A
number of clusters vs. sector (outer)
TH2F * m_tpc_adc_chargevsrowvstb[24]
ADC charge vs. time bucket (outer)
TH2F * m_tpc_clust_pxlp
cluster pixel time bucket size (outer)
StQABookHist * hists
pointers to the histogram classes for the
TH2F * m_tpc_clust_pxltbTPX
cluster pixel time bucket size (inner)
TH2F * m_tpc_clust_chargevsrow[24]
charge vs. time bucket (outer)
TH2F * m_tpc_clust_chargesum[24]
charge per cluster (outer)
TH2F * m_tpc_clust_numclustTPX
number of clusters vs. sector (inner)
TH1F * m_tpc_clust_charge[24]
status of clusters vs. row
TH1F * m_tpc_adc_chargepersectorTPX
charge per sector
TH1F * m_tpc_adc_chargepersector
charge vs. row
TH1F * m_tpc_adc_chargevstbTPX[24]
ADC charge vs. time bucket (inner)
TH2F * m_tpc_adc_chargesum[24]
charge vs. row vs. time bucket
TH1F * m_tpc_adc_chargevstb[24]
ftpc east cluster radial position
TH2F * m_tpc_clust_pxlpTPX
cluster pixel pad size (inner)
Definition: Stypes.h:41
TH1F * m_tpc_clust_stats[24]
ADC sum over all events.
virtual TDataSet * Find(const char *path) const
Definition: TDataSet.cxx:362