StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcTimingMaker.h
1 #ifndef __StEEmcTimingMaker_h__
2 #define __StEEmcTimingMaker_h__
3 
4 #include "StMaker.h"
5 #include <map>
6 #include "TString.h"
7 
8 #include "StEEmcUtil/EEfeeRaw/EEdims.h"
9 #include <vector>
10 
11 class TH1F;
12 class TTree;
13 
14 class StEEmcTimingMaker : public StMaker
15 {
16 
17  public:
18  StEEmcTimingMaker(const Char_t *name="timing");
19  ~StEEmcTimingMaker(){ /* nada */ };
20 
21  Int_t Init();
22  Int_t InitRun(Int_t run);
23 
24  Int_t Make();
25  void Clear(Option_t *opts="");
26 
27  Int_t Finish();
28 
29  void setTiming( Float_t tower_delay, Float_t mapmt_delay );
30  void setRunNumber( Int_t run );
31 
32  void setTowerCuts( Int_t min, Int_t max );
33  void setMapmtCuts( Int_t min, Int_t max );
34 
36  void addTowerMask( Int_t cr, Int_t ch ){ mTowerMask[ cr-1 ][ ch ] = 1; }
37 
39  void addMapmtMask( Int_t cr, Int_t ch ){ mMapmtMask[ cr-MinMapmtCrateID ][ ch ] = 1; }
40 
42  void supressZeroAdc();
43 
44  void dumpAsciiFile(const Char_t *fname="eemcTimingFile.dat" );
45  void dumpPDF( const Char_t *fname="eemcTimingFile.pdf" );
46 
47  void setOutputFile( const Char_t *fname ){ mOutputFile=fname; }
48 
49 
51  void processFromL2( const Char_t *name, int nevents );
52 
53 
54 
55  private:
56  protected:
57 
58  Bool_t mSupressZero;
59  TString mOutputFile;
60  TTree *mTree;
61 
62  Int_t mRunNumber;
63  Float_t mTowerDelay;
64  Float_t mMapmtDelay;
65 
66  Int_t mTotalYield;
67  Int_t mTowerCrateYield[ MaxTwCrates ];
68  Int_t mMapmtCrateYield[ MaxMapmtCrates ];
69 
70  Int_t mTowerChanYield[ MaxTwCrates ][ MaxTwCrateCh ];
71  Int_t mMapmtChanYield[ MaxMapmtCrates ][ MaxMapmtCrateCh ];
72 
73  Float_t mTowerChanSlope[ MaxTwCrates ][ MaxTwCrateCh ];
74  Float_t mMapmtChanSlope[ MaxMapmtCrates ][ MaxMapmtCrateCh ];
75 
76  Int_t mTowerMin;
77  Int_t mTowerMax;
78  Int_t mMapmtMin;
79  Int_t mMapmtMax;
80 
81  TH1F *hTower[ MaxTwCrates ][ MaxTwCrateCh ];
82  TH1F *hMapmt[ MaxMapmtCrates ][ MaxMapmtCrateCh ];
83 
84  Int_t mTowerMask[ MaxTwCrates ][ MaxTwCrateCh ];
85  Int_t mMapmtMask[ MaxMapmtCrates ][ MaxMapmtCrateCh ];
86 
87 
88  TH1F *hCounter;
89 
90  ClassDef(StEEmcTimingMaker,1);
91 
92 };
93 
94 #endif
void processFromL2(const Char_t *name, int nevents)
Process ready-made histograms from level 2.
void addTowerMask(Int_t cr, Int_t ch)
Add a tower mask. Count crates from 1, channels from 0.
void supressZeroAdc()
Do not fill histograms with ADC=0.
void Clear(Option_t *opts="")
User defined functions.
void addMapmtMask(Int_t cr, Int_t ch)
Add a mapmt mask. Count crates from MinMapmtCrateID].