Go to the documentation of this file.00001
00002
00003 #include <memory>
00004 #include <FWCore/Framework/interface/EDAnalyzer.h>
00005
00006 class TFile;
00007 class TTree;
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #define NCRYSEB 1700 // Number of crystals per EB supermodule
00024 #define NTTEB 68 // Number of EB Trigger Towers
00025 #define NMODEB 9 // Number of EB submodules
00026 #define NPNPERMOD 2 // Number of PN per module
00027
00028
00029 #define NCRYSEE 830 // Number of crystals per EE supermodule
00030 #define NTTEE 68 // Number of EE Trigger Towers
00031 #define NMODEE 21 // Number of EE submodules
00032
00033 #define NGAINPN 2 // Number of gains
00034 #define NGAINAPD 4 // Number of gains
00035
00036
00037 class EcalTestPulseAnalyzer: public edm::EDAnalyzer{
00038
00039 public:
00040
00041 explicit EcalTestPulseAnalyzer(const edm::ParameterSet& iConfig);
00042 ~EcalTestPulseAnalyzer();
00043
00044
00045 virtual void analyze( const edm::Event & e, const edm::EventSetup& c);
00046 virtual void beginJob();
00047 virtual void endJob();
00048
00049
00050 private:
00051
00052 int iEvent;
00053
00054
00055
00056 unsigned int _nsamples;
00057 unsigned int _presample;
00058 unsigned int _firstsample;
00059 unsigned int _lastsample;
00060 unsigned int _samplemin;
00061 unsigned int _samplemax;
00062 unsigned int _nsamplesPN;
00063 unsigned int _presamplePN;
00064 unsigned int _firstsamplePN;
00065 unsigned int _lastsamplePN;
00066 unsigned int _niter ;
00067 double _chi2max ;
00068 double _timeofmax ;
00069 std::string _ecalPart;
00070 int _fedid;
00071
00072 std::string resdir_;
00073 std::string digiCollection_;
00074 std::string digiPNCollection_;
00075 std::string digiProducer_;
00076 std::string eventHeaderCollection_;
00077 std::string eventHeaderProducer_;
00078
00079
00080
00081
00082 std::string rootfile;
00083 std::string resfile;
00084
00085
00086
00087
00088 unsigned int nCrys;
00089 unsigned int nTT;
00090 unsigned int nMod;
00091 unsigned int nGainPN;
00092 unsigned int nGainAPD;
00093
00094
00095
00096 int TPEvents;
00097
00098 double ret_data[20];
00099
00100 int towerID;
00101 int channelID;
00102
00103
00104
00105 int runType;
00106 int runNum;
00107 int fedID;
00108 int dccID;
00109 int side;
00110 int iZ;
00111
00112
00113
00114
00115 TFile *outFile;
00116 TFile *resFile;
00117
00118
00119
00120
00121 TTree *trees[NCRYSEB];
00122
00123
00124
00125 int phi, eta;
00126 int event ;
00127 double adc[10] ;
00128 double pn[50] ;
00129
00130 int apdGain;
00131 int pnGain;
00132 int pnG;
00133 double apdAmpl;
00134 double apdTime;
00135 double pnAmpl0;
00136 double pnAmpl1;
00137 double pnAmpl;
00138
00139
00140
00141
00142 TTree *restrees;
00143 TTree *respntrees;
00144
00145
00146 std::map<int, int> channelMapEE;
00147 std::vector<int> dccMEM;
00148 std::vector<int> modules;
00149
00150
00151
00152
00153 int ieta, iphi, flag, gain;
00154 int pnID, moduleID;
00155 int channelIteratorEE;
00156 double APD[6], PN[6];
00157
00158 int iEta[NCRYSEB],iPhi[NCRYSEB];
00159 unsigned int iModule[NCRYSEB];
00160 int iTowerID[NCRYSEB], iChannelID[NCRYSEB], idccID[NCRYSEB], iside[NCRYSEB];
00161
00162 unsigned int firstChanMod[NMODEB];
00163 unsigned int isFirstChanModFilled[NMODEB];
00164
00165
00166 };
00167
00168