00001 #ifndef __StEEmcTimingMaker_h__
00002 #define __StEEmcTimingMaker_h__
00003
00004 #include "StMaker.h"
00005 #include <map>
00006 #include "TString.h"
00007
00008 #include "StEEmcUtil/EEfeeRaw/EEdims.h"
00009 #include <vector>
00010
00011 class TH1F;
00012 class TTree;
00013
00014 class StEEmcTimingMaker : public StMaker
00015 {
00016
00017 public:
00018 StEEmcTimingMaker(const Char_t *name="timing");
00019 ~StEEmcTimingMaker(){ };
00020
00021 Int_t Init();
00022 Int_t InitRun(Int_t run);
00023
00024 Int_t Make();
00025 void Clear(Option_t *opts="");
00026
00027 Int_t Finish();
00028
00029 void setTiming( Float_t tower_delay, Float_t mapmt_delay );
00030 void setRunNumber( Int_t run );
00031
00032 void setTowerCuts( Int_t min, Int_t max );
00033 void setMapmtCuts( Int_t min, Int_t max );
00034
00036 void addTowerMask( Int_t cr, Int_t ch ){ mTowerMask[ cr-1 ][ ch ] = 1; }
00037
00039 void addMapmtMask( Int_t cr, Int_t ch ){ mMapmtMask[ cr-MinMapmtCrateID ][ ch ] = 1; }
00040
00042 void supressZeroAdc();
00043
00044 void dumpAsciiFile(const Char_t *fname="eemcTimingFile.dat" );
00045 void dumpPDF( const Char_t *fname="eemcTimingFile.pdf" );
00046
00047 void setOutputFile( const Char_t *fname ){ mOutputFile=fname; }
00048
00049
00051 void processFromL2( const Char_t *name, int nevents );
00052
00053
00054
00055 private:
00056 protected:
00057
00058 Bool_t mSupressZero;
00059 TString mOutputFile;
00060 TTree *mTree;
00061
00062 Int_t mRunNumber;
00063 Float_t mTowerDelay;
00064 Float_t mMapmtDelay;
00065
00066 Int_t mTotalYield;
00067 Int_t mTowerCrateYield[ MaxTwCrates ];
00068 Int_t mMapmtCrateYield[ MaxMapmtCrates ];
00069
00070 Int_t mTowerChanYield[ MaxTwCrates ][ MaxTwCrateCh ];
00071 Int_t mMapmtChanYield[ MaxMapmtCrates ][ MaxMapmtCrateCh ];
00072
00073 Float_t mTowerChanSlope[ MaxTwCrates ][ MaxTwCrateCh ];
00074 Float_t mMapmtChanSlope[ MaxMapmtCrates ][ MaxMapmtCrateCh ];
00075
00076 Int_t mTowerMin;
00077 Int_t mTowerMax;
00078 Int_t mMapmtMin;
00079 Int_t mMapmtMax;
00080
00081 TH1F *hTower[ MaxTwCrates ][ MaxTwCrateCh ];
00082 TH1F *hMapmt[ MaxMapmtCrates ][ MaxMapmtCrateCh ];
00083
00084 Int_t mTowerMask[ MaxTwCrates ][ MaxTwCrateCh ];
00085 Int_t mMapmtMask[ MaxMapmtCrates ][ MaxMapmtCrateCh ];
00086
00087
00088 TH1F *hCounter;
00089
00090 ClassDef(StEEmcTimingMaker,1);
00091
00092 };
00093
00094 #endif