StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StQAMakerBase.h
1 // $Id: StQAMakerBase.h,v 2.34 2019/12/17 19:08:01 genevb Exp $
2 // $Log: StQAMakerBase.h,v $
3 // Revision 2.34 2019/12/17 19:08:01 genevb
4 // Add more ETOF histograms
5 //
6 // Revision 2.33 2019/05/22 21:24:31 genevb
7 // Add sDCA vs. time-in-run
8 //
9 // Revision 2.32 2019/03/26 15:29:38 genevb
10 // Introduce ETOF
11 //
12 // Revision 2.31 2019/03/14 02:31:53 genevb
13 // Introduce iTPC plots
14 //
15 // Revision 2.30 2019/03/01 19:40:38 genevb
16 // Some minor Run 19 preparations, including first padrow hit
17 //
18 // Revision 2.29 2018/07/03 21:33:34 genevb
19 // Introduce EPD (code provided by J. Ewigleben)
20 //
21 // Revision 2.28 2017/02/25 03:24:30 genevb
22 // Run 17: remove HFT
23 //
24 // Revision 2.27 2015/07/17 19:09:03 genevb
25 // SSD copied for SST, and HFT histogams use SST now too
26 //
27 // Revision 2.26 2015/03/18 21:43:17 genevb
28 // Introduce Roman Pots histograms (K. Yip)
29 //
30 // Revision 2.25 2015/01/21 17:49:40 genevb
31 // Fix missing run14 cases, remove unused firstEventClass, re-work normalizations with StHistUtil
32 //
33 // Revision 2.24 2015/01/16 21:08:28 genevb
34 // Initial versions of HFT histograms
35 //
36 // Revision 2.23 2014/08/06 11:43:53 jeromel
37 // Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
38 //
39 // Revision 2.22 2014/07/22 20:39:28 genevb
40 // Add MTD to Offline QA
41 //
42 // Revision 2.21 2014/01/30 19:44:06 genevb
43 // Additional TPC histogram for monitoring gas contamination
44 //
45 // Revision 2.20 2013/03/12 03:06:02 genevb
46 // Add FMS/FPD histograms for Run 13+
47 //
48 // Revision 2.19 2012/03/05 03:42:32 genevb
49 // Remove TPC XY dist, add TPC RPhi charge
50 //
51 // Revision 2.18 2012/02/08 22:10:35 genevb
52 // Updates for Run 12
53 //
54 // Revision 2.17 2009/11/19 20:34:38 genevb
55 // Remove Event Summary (using defunct old software monitors)
56 //
57 // Revision 2.16 2007/11/30 05:38:50 genevb
58 // Changes for Run8: mostly silicon removal, TOF addition
59 //
60 // Revision 2.15 2005/02/08 17:22:46 genevb
61 // PMD histo changes, handle estGlobal/ITTF tracks
62 //
63 // Revision 2.14 2004/12/13 15:52:37 genevb
64 // Numerous updates: PMD, primtrk, FPD, QAShift lists
65 //
66 // Revision 2.13 2004/02/12 05:03:17 genevb
67 // Year 4 AuAu changes. New SVT histos.
68 //
69 // Revision 2.12 2004/01/10 01:10:18 genevb
70 // Preparations for Year 5, added some svt plots
71 //
72 // Revision 2.11 2003/02/28 06:17:56 genevb
73 // Allow StQAMakerBase::Make to be called for all events
74 //
75 // Revision 2.10 2003/02/20 20:09:54 genevb
76 // Several changes for new trigger scheme, dAu data
77 //
78 // Revision 2.9 2003/02/19 06:38:29 genevb
79 // Rework trigger and mult/event class sections
80 //
81 // Revision 2.8 2003/02/15 22:00:52 genevb
82 // Add tpcSectors, fix ftpc east/west charge
83 //
84 // Revision 2.7 2002/04/23 01:59:56 genevb
85 // Addition of BBC/FPD histos
86 //
87 // Revision 2.6 2002/01/26 03:04:07 genevb
88 // Fixed some problems with fcl histos
89 //
90 // Revision 2.5 2001/12/28 09:19:13 genevb
91 // Adjustments for pp running
92 //
93 // Revision 2.4 2001/08/29 20:45:15 genevb
94 // Trigger word histos
95 //
96 // Revision 2.3 2001/05/16 20:57:03 lansdell
97 // new histograms added for qa_shift printlist; some histogram ranges changed; StMcEvent now used in StEventQA
98 //
99 // Revision 2.2 2001/04/28 22:05:13 genevb
100 // Added EMC histograms
101 //
102 // Revision 2.1 2000/08/25 16:04:10 genevb
103 // Introduction of files
104 //
105 //
107 // //
108 // StQAMakerBase base class for QA Histogram Makers //
109 // //
111 
112 #ifndef STAR_StQAMakerBase
113 #define STAR_StQAMakerBase
114 
115 enum StQAHistSetType {
116  StQA_Undef = -1,
117  StQA_MC = 0,
118  StQA_AuAuOld = 1,
119  StQA_pp = 2,
120  StQA_dAu = 3,
121  StQA_AuAu = 4,
122  StQA_run8 = 5,
123  StQA_run12all = 6,
124  StQA_run12 = 7,
125  StQA_run13 = 8,
126  StQA_run14 = 9,
127  StQA_run15 = 10,
128  StQA_run17 = 11,
129  StQA_run18 = 12,
130  StQA_run19 = 13,
131  StQA_run22 = 14
132  // when adding more, search for StQAHistSetType for other changes
133 };
134 
135 #include "StMaker.h"
136 class StQABookHist;
137 class TObjArray;
138 class TH1F;
139 class TH2F;
140 class TH3F;
141 
142 // FMS needs
143 typedef std::map<int, TH1*> TH1PtrMap;
144 // Enumerate QT crate numbers 1-5 (1-4 are FMS, 5 is FPD).
145 enum StFmsQtCrateNumber {kQt1 = 1, kQt2, kQt3, kQt4, kFpd, kQtError};
146 /*
147  Basic QT crate geometry.
148  Note that physically there are 16 slots per crate, but only 12
149  at most are currently actually used.
150  */
151 const int kNQtSlotsPerCrate = 12;
152 const int kNQtChannelsPerSlot = 32;
153 const int kNChannels = kNQtSlotsPerCrate * kNQtChannelsPerSlot;
154 const int kNAdc = 4096;
155 
156 // RP Constants
157 const int kRP_MAXSEQ = 8 ;
158 const int kRP_MAXCHAIN = 4 ;
159 
160 class StQAMakerBase : public StMaker {
161 
162 // **************** Public Member Functions ***************************
163  public:
164  StQAMakerBase() {}
165  StQAMakerBase(const char *name, const char *title, const char *type);
166  virtual ~StQAMakerBase();
167  virtual Int_t Init();
168  virtual Int_t Make();
169  virtual void Clear(Option_t *);
170  virtual void UseHistSet(Int_t s) { histsSet=s; }
171 // the following is a ROOT macro that is needed in all ROOT code
172  virtual const char *GetCVS() const
173  {static const char cvs[]="Tag $Name: $ $Id: StQAMakerBase.h,v 2.34 2019/12/17 19:08:01 genevb Exp $ built " __DATE__ " " __TIME__ ; return cvs;}
174 
175 
176 // ******************** Histogram Booking Constants ************************
177  protected:
178 
179  Int_t ntrk;
180  Int_t nmnpt;
181  Int_t nmneta;
182  Int_t nxyz;
183 
184 // ***************** Histogram Pointers ***************************
185  public:
186  // histogram for number of events without primary vertex
187  TH1F *mNullPrimVtx;
188  // histogram for number of events in mult classes
189  TH1F *mMultClass;
190  // histograms for event trigger words/bits
191  TH1F *mTrigWord;
192  TH1F *mTrigBits;
193  // histograms for TPC hits sector by sector
194  TH2F *mTpcSectorPlot[24];
195  TH2F *m_pnt_rpTQW;
196  TH2F *m_pnt_rpTQE;
197 
198  // FTPC histograms
199  TH1F *m_ftpc_chargestepW;
203 
204  // TPC raw data
205  //~~~per-sector histograms~~~//
206  //adcs
211  //clusters
212  TH1F *m_tpc_clust_stats[24];
214  TH1F *m_tpc_clust_charge[24];
220  //~~~~~~//
221  //~~~sector-integrated histograms~~~//
222  //adcs
226  //clusters
233  //~~~~~~//
234 
235  // TPC dE/dx over time
236  TH3F *m_dedx_Z3A; // dE/dx vs. drift distance
237 
238  // FCS
239  TH1F *m_h1_inv_mass_cluster;
240  TH1F *m_h1_dgg_cluster;
241  TH1F *m_h1_two_cluster_energy_allcut;
242  TH2F *m_h2_cluster_dgg_vs_E1pE2;
243 
244 
245  // signed DCA (impact parameter) over time
246  TH2F *m_glb_simpactTime;
247 
248  // FMS histograms
249  // ADC vs. channel histograms keyed by QT crate number.
250  // Stores both FMS and FPD histograms.
251  TH1PtrMap mFMShistograms;
252 
253  // Roman-Pot histograms
254  // TH1F *m_RP_ClusterLength; // testing
255  TH2F *m_RP_clusters_xy[kRP_MAXSEQ] ; // cluster positions
256 
257  // ETOF histograms
258  TH1 *m_etofHist[10];
259 
260 // **************** Members For Internal Use ***************************
261  protected:
262  TString QAMakerType; // character string to prepend to each hist name/title
263  TObjArray histsList;
265  Int_t histsSet;
266  TString prefix[32];
267  Int_t eventClass;
268  Int_t eventClassIdx;
269  Int_t eventCount;
270  Bool_t fillHists;
271  Bool_t ITTF;
272  Int_t EST;
273  Bool_t allTrigs;
274 
275  virtual void NewQABookHist();
276  virtual TH2F* MH1F(const Text_t* name, const Text_t* title,
277  Int_t nbinsx, Axis_t xlow, Axis_t xup);
278 
279  virtual void BookHist();
280  virtual void BookHistGeneral();
281  virtual void BookHistTrigger();
282  virtual void BookHistFcl();
283  virtual void BookHistFCS();
284  virtual void BookHistFMS();
285  virtual void BookHistDE();
286  virtual void BookHistRP();
287  virtual void BookHistETOF();
288  virtual void BookHistTPC();
289 
290  virtual void MakeHistGlob() = 0;
291  virtual void MakeHistDE() = 0;
292  virtual void MakeHistPrim() = 0;
293  virtual void MakeHistPID() = 0;
294  virtual void MakeHistVertex() = 0;
295  virtual void MakeHistPoint() = 0;
296  virtual void MakeHistEMC() {}
297  virtual void MakeHistEval() = 0;
298  virtual void MakeHistBBC() {}
299  virtual void MakeHistFPD() {}
300  virtual void MakeHistPMD() {}
301  virtual void MakeHistTOF() {}
302  virtual void MakeHistFMS() {}
303  virtual void MakeHistMTD() {}
304  virtual void MakeHistHFT() {}
305  virtual void MakeHistPXL() {}
306  virtual void MakeHistIST() {}
307  virtual void MakeHistSST() {}
308  virtual void MakeHistRP () {}
309  virtual void MakeHistEPD() {}
310  virtual void MakeHistTPC() {}
311  virtual void MakeHistiTPC() {}
312 
313  ClassDef(StQAMakerBase,0) //needed for all code that will be used in CINT
314 };
315 
316 #endif
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.
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)
TH1F * m_tpc_clust_stats[24]
ADC sum over all events.