CMS 3D CMS Logo

EcalTPGAnalyzer.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Class: EcalTPGAnalyzer
4 //
5 //
6 // Original Author: Pascal Paganini
7 //
15 #include <vector>
16 #include <string>
17 #include <TFile.h>
18 #include <TTree.h>
19 
21 
22 // Auxiliary class
23 class towerEner {
24 public:
25  float eRec_;
26  int tpgEmul_[5];
27  int tpgADC_;
29  towerEner() : eRec_(0), tpgADC_(0), iphi_(-999), ieta_(-999), nbXtal_(0) {
30  for (int i = 0; i < 5; i++)
31  tpgEmul_[i] = 0;
32  }
33 };
34 
36 public:
37  explicit EcalTPGAnalyzer(const edm::ParameterSet &);
38  ~EcalTPGAnalyzer() override;
39  void analyze(edm::Event const &, edm::EventSetup const &) override;
40  void beginRun(edm::Run const &, edm::EventSetup const &) override;
41 
42 private:
44  // event variables
45  unsigned int runNb;
46  unsigned int evtNb;
47  unsigned int bxNb;
48  unsigned int orbitNb;
49  unsigned int nbOfActiveTriggers;
50  int activeTriggers[128];
51 
52  // tower variables
53  unsigned int nbOfTowers; //max 4032 EB+EE
54  int ieta[4032];
55  int iphi[4032];
56  int nbOfXtals[4032];
57  int rawTPData[4032];
58  int rawTPEmul1[4032];
59  int rawTPEmul2[4032];
60  int rawTPEmul3[4032];
61  int rawTPEmul4[4032];
62  int rawTPEmul5[4032];
63  float eRec[4032];
64  };
65 
66 private:
67  TFile *file_;
68  TTree *tree_;
70 
76 
77  bool allowTP_;
78  bool useEE_;
79  bool print_;
80 
84 };
std::string gtRecordCollectionTag_
int tpgEmul_[5]
const CaloSubdetectorGeometry * theEndcapGeometry_
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
edm::ESHandle< EcalTrigTowerConstituentsMap > eTTmap_
EcalTPGVariables treeVariables_
edm::InputTag digiCollectionEB_
edm::InputTag tpEmulatorCollection_
edm::InputTag tpCollection_
const CaloSubdetectorGeometry * theBarrelGeometry_
edm::InputTag digiCollectionEE_
Definition: Run.h:45