Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:11:11

0001 //-------------------------------------------------
0002 //
0003 /**  \class DTTrigTest
0004  *
0005  *   EDAnalyzer that generates a rootfile useful
0006  *   for L1-DTTrigger debugging and performance 
0007  *   studies
0008  *
0009  *
0010  *
0011  *   \author C. Battilana
0012  */
0013 //
0014 //--------------------------------------------------
0015 
0016 #ifndef L1Trigger_DTTrigger_DTTrigTest_h
0017 #define L1Trigger_DTTrigger_DTTrigTest_h
0018 
0019 // Framework related headers
0020 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0021 #include "FWCore/Framework/interface/ESHandle.h"
0022 #include "FWCore/Framework/interface/Event.h"
0023 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0024 
0025 // Trigger related headers
0026 #include "L1Trigger/DTTrigger/interface/DTTrig.h"
0027 
0028 // Root headers
0029 #include "TTree.h"
0030 #include "TFile.h"
0031 
0032 class DTTrigTest : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0033 public:
0034   //! Constructor
0035   DTTrigTest(const edm::ParameterSet& pset);
0036 
0037   //! Destructor
0038   ~DTTrigTest() override;
0039 
0040   //! Create tree and Branches
0041   //void beginJob(const edm::EventSetup & iEventSetup);
0042   void beginJob() override;
0043 
0044   //! Close Tree and write File
0045   void endJob() override;
0046 
0047   //! Create DTTrig instance and TUs
0048   void beginRun(const edm::Run& iRun, const edm::EventSetup& iEventSetup) override;
0049   void endRun(const edm::Run& iRun, const edm::EventSetup& iEventSetup) override {}
0050 
0051   //! Analyze function executed on all the events
0052   void analyze(const edm::Event& iEvent, const edm::EventSetup& iEventSetup) override;
0053 
0054 private:
0055   // time to TDC_time conversion
0056   static const double my_TtoTDC;
0057 
0058   // trigger istance
0059   DTTrig* my_trig;
0060 
0061   // debug flag
0062   bool my_debug;
0063 
0064   // ParameterSet
0065   edm::ParameterSet my_params;
0066 
0067   // tree
0068   TTree* my_tree;
0069   // TFile
0070   TFile* my_rootfile;
0071 
0072   //GENERAL block
0073   int runn;
0074   int eventn;
0075   float weight;
0076 
0077   //GEANT block
0078   int ngen;
0079   float pxgen[10];
0080   float pygen[10];
0081   float pzgen[10];
0082   float ptgen[10];
0083   float etagen[10];
0084   float phigen[10];
0085   int chagen[10];
0086   float vxgen[10];
0087   float vygen[10];
0088   float vzgen[10];
0089 
0090   // BTI
0091   int nbti;
0092   int bwh[100];
0093   int bstat[100];
0094   int bsect[100];
0095   int bsl[100];
0096   int bnum[100];
0097   int bbx[100];
0098   int bcod[100];
0099   int bk[100];
0100   int bx[100];
0101   float bposx[100];
0102   float bposy[100];
0103   float bposz[100];
0104   float bdirx[100];
0105   float bdiry[100];
0106   float bdirz[100];
0107 
0108   // TRACO
0109   int ntraco;
0110   int twh[80];
0111   int tstat[80];
0112   int tsect[80];
0113   int tnum[80];
0114   int tbx[80];
0115   int tcod[80];
0116   int tk[80];
0117   int tx[80];
0118   float tposx[100];
0119   float tposy[100];
0120   float tposz[100];
0121   float tdirx[100];
0122   float tdiry[100];
0123   float tdirz[100];
0124 
0125   // TSPHI
0126   int ntsphi;
0127   int swh[40];
0128   int sstat[40];
0129   int ssect[40];
0130   int sbx[40];
0131   int scod[40];
0132   int sphi[40];
0133   int sphib[40];
0134   float sposx[100];
0135   float sposy[100];
0136   float sposz[100];
0137   float sdirx[100];
0138   float sdiry[100];
0139   float sdirz[100];
0140 
0141   // TSTHETA
0142   int ntstheta;
0143   int thwh[40];
0144   int thstat[40];
0145   int thsect[40];
0146   int thbx[40];
0147   int thcode[40][7];
0148   int thpos[40][7];
0149   int thqual[40][7];
0150 
0151   // SECTOR COLLECTOR (PHI VIEW)
0152   int nscphi;
0153   int scphwh[40];
0154   int scphstat[40];
0155   int scphsect[40];
0156   int scphbx[40];
0157   int scphcod[40];
0158   int scphphi[40];
0159   int scphphib[40];
0160   float scphposx[100];
0161   float scphposy[100];
0162   float scphposz[100];
0163   float scphdirx[100];
0164   float scphdiry[100];
0165   float scphdirz[100];
0166 
0167   // SECTOR COLLECTOR (THETA VIEW)
0168   int nsctheta;
0169   int scthwh[40];
0170   int scthstat[40];
0171   int scthsect[40];
0172   int scthbx[40];
0173   int scthcode[40][7];
0174   int scthpos[40][7];
0175   int scthqual[40][7];
0176 };
0177 
0178 #endif