CMS 3D CMS Logo

EcalTPGAnalyzer.h
Go to the documentation of this file.
1 #ifndef CaloOnlineTools_EcalTools_EcalTPGAnalyzer_h
2 #define CaloOnlineTools_EcalTools_EcalTPGAnalyzer_h
3 // -*- C++ -*-
4 //
5 // Class: EcalTPGAnalyzer
6 //
7 //
8 // Original Author: Pascal Paganini
9 //
22 #include <vector>
23 #include <string>
24 #include <TFile.h>
25 #include <TTree.h>
26 
28 
29 // Auxiliary class
30 class towerEner {
31 public:
32  float eRec_;
33  int tpgEmul_[5];
34  int tpgADC_;
36  towerEner() : eRec_(0), tpgADC_(0), iphi_(-999), ieta_(-999), nbXtal_(0) {
37  for (int i = 0; i < 5; i++)
38  tpgEmul_[i] = 0;
39  }
40 };
41 
42 class EcalTPGAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
43 public:
44  explicit EcalTPGAnalyzer(const edm::ParameterSet &);
45  ~EcalTPGAnalyzer() override;
46  void analyze(edm::Event const &, edm::EventSetup const &) override;
47  void beginRun(edm::Run const &, edm::EventSetup const &) override;
48  void endRun(edm::Run const &, edm::EventSetup const &) override;
49 
50 private:
52  // event variables
53  unsigned int runNb;
54  unsigned int evtNb;
55  unsigned int bxNb;
56  unsigned int orbitNb;
57  unsigned int nbOfActiveTriggers;
58  int activeTriggers[128];
59 
60  // tower variables
61  unsigned int nbOfTowers; //max 4032 EB+EE
62  int ieta[4032];
63  int iphi[4032];
64  int nbOfXtals[4032];
65  int rawTPData[4032];
66  int rawTPEmul1[4032];
67  int rawTPEmul2[4032];
68  int rawTPEmul3[4032];
69  int rawTPEmul4[4032];
70  int rawTPEmul5[4032];
71  float eRec[4032];
72  };
73 
74 private:
75  TFile *file_;
76  TTree *tree_;
78 
84 
90 
95 
96  const bool allowTP_;
97  const bool useEE_;
98  const bool print_;
99 
103 };
104 
105 #endif
const edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > eTTMapToken_
const bool print_
int tpgEmul_[5]
const edm::InputTag tpCollection_
const CaloSubdetectorGeometry * theEndcapGeometry_
const edm::EDGetTokenT< EcalTrigPrimDigiCollection > tpToken_
~EcalTPGAnalyzer() override
EcalTPGVariables treeVariables_
const std::string gtRecordCollectionTag_
void analyze(edm::Event const &, edm::EventSetup const &) override
const edm::EDGetTokenT< EcalTrigPrimDigiCollection > tpEmulToken_
const edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd > l1GtMaskToken_
const edm::InputTag digiCollectionEB_
void beginRun(edm::Run const &, edm::EventSetup const &) override
const CaloSubdetectorGeometry * theBarrelGeometry_
const EcalTrigTowerConstituentsMap * eTTmap_
void endRun(edm::Run const &, edm::EventSetup const &) override
const edm::ESGetToken< CaloSubdetectorGeometry, EcalEndcapGeometryRecord > eeGeometryToken_
const edm::ESGetToken< CaloSubdetectorGeometry, EcalBarrelGeometryRecord > ebGeometryToken_
const bool useEE_
const edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > l1GtReadoutRecordToken_
const bool allowTP_
const edm::EDGetTokenT< EEDigiCollection > eeDigiToken_
const edm::EDGetTokenT< EBDigiCollection > ebDigiToken_
EcalTPGAnalyzer(const edm::ParameterSet &)
const edm::InputTag digiCollectionEE_
Definition: Run.h:45
const edm::InputTag tpEmulatorCollection_