StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFstQAMaker.h
1 /***************************************************************************
2 *
3 * $Id: StFstQAMaker.h,v$
4 *
5 * Author: Shenghui Zhang, Nov. 2021
6 ****************************************************************************
7 * Description:
8 * Generate several histograms and trees for FST raw hits and hits.
9 ****************************************************************************
10 * StFstQAMaker.h,v 1.0
11 * Revision 1.0 2021/11/1 Shenghui Zhang
12 * Initial version
13 ****************************************************************************/
14 
15 #ifndef StFstQAMaker_hh
16 #define StFstQAMaker_hh
17 
18 #include <string>
19 
20 #include "StMaker.h"
21 #include "StEvent/StFstConsts.h"
22 
23 class TH2F;
24 class TH2S;
25 class TProfile;
26 class TTree;
27 
28 class StFstQAMaker : public StMaker {
29 public:
30  StFstQAMaker(const char *name="fst_Qa"); // constructor
31  Int_t Init();
32  Int_t Make(); // invoked for every event
33  Int_t Finish(); // called once at the end
34 
35  struct rawHitInfo {
36  int channelId, geoId, wedge, sensor, phistrip, rstrip, maxTimeBin, rdo, arm, apv, channel, idTruth, seedHitFlag, EventId;
37  float charge[kFstNumTimeBins], chargeErr[kFstNumTimeBins];
38  } fstRawHit;
39 
40  struct hitInfo {
41  int hitId, wedge, sensor, apv, idTruth, EventId, maxTimeBin, clusteringType, nRawHits, nRawHitsR, nRawHitsPhi;
42  float meanPhiStrip, meanRStrip, localR, localPhi, localZ, x, y, z, charge, chargeErr;
43  } fstHit;
44 
45 protected:
46  // TFile* myRootFile;
47  TTree *fstRawHitTree;
48  TTree *fstHitTree;
49 
50  //position
51  TH2S* rawHitMap[kFstNumSensors]; // raw hit phistrip vs. rstrip per sensor
52  TH2S* hitMap[kFstNumSensors]; // hit mean phistrip vs. mean rstrip per sensor
53  TH2S* hitMapOfFST[kFstNumDisk]; // hit map in r vs. phi per disk
54  TH2S* hitMapOfAPV[kFstNumDisk]; // hit map in APV geometry Id vs. module geometry Id per disk
55  TH2F* hitGlobalXY[kFstNumDisk]; // hit global x vs. y per disk
56  TH2F* hitGlobalRPhi[kFstNumDisk]; // hit global r vs. phi per disk
57  //Charge
58  TH2S* rawHitCharge_TimeBin[kFstNumTimeBins]; // Charge (ADC) vs channel ID over all time bins
59  TH2S* rawHitChargeErr; // RMS noise vs channel ID
60  TH2S* rawHitMaxTimeBin_APV; // Raw hit max ADC time bin vs APV electronics ID [48*(ARC-1)+16*ARM+APV]
61  TH2S* hitCharge_SensorId; // Charge vs sensorID
62  TH2S* hitChargeErr_SensorId; // Charge uncertainty vs sensorID
63  TH2S* maxTimeBin_SensorId; // hit max ADC time bin vs sensorID
64  //hit or raw hit number
65  TH2S* numOfRawHits_SensorId; // number of raw hits vs sensor Id
66  TH2S* numOfHits_SensorId; // number of hits vs sensor Id
67  TProfile* numOfRawHits_EventId[kFstNumSensors];
68  //cluster size
69  TH2S* clusterSize_SensorId; // hit cluster size
70  TH2S* clusterSizeR_SensorId; // hit cluster size in R direction
71  TH2S* clusterSizePhi_SensorId; // hit cluster size in Phi direction
72 
73  Int_t mEventCounter; // Event countter
74  Bool_t mDoTreeOutput;
75 
76 private:
77  ClassDef(StFstQAMaker,0);
78 };
79 #endif