CMS 3D CMS Logo

EcalMatacqAnalyzer.h
Go to the documentation of this file.
1 // $Id: EcalMatacqAnalyzer.h
2 
3 #include <memory>
7 
8 class TFile;
9 class TTree;
10 class TMTQ;
11 
12 #define N_samples 2560
13 #define N_channels 1
14 #define NSIDES 2 // Number of sides
15 
17 public:
18  explicit EcalMatacqAnalyzer(const edm::ParameterSet &iConfig);
19  ~EcalMatacqAnalyzer() override = default;
20 
21  void analyze(const edm::Event &e, const edm::EventSetup &c) override;
22  void beginJob() override;
23  void endJob() override;
24 
25  enum VarCol { iBlue, iRed, nColor };
26  enum VarSide { iSide0, iSide1, nSide };
27 
28 private:
29  int iEvent;
30 
31  //
32  // Framework parameters
33  //
34 
35  const double _presample;
36  const unsigned int _nsamplesaftmax;
37  const unsigned int _noiseCut;
38  const unsigned int _parabnbefmax;
39  const unsigned int _parabnaftmax;
40  const unsigned int _thres;
41  const unsigned int _lowlev;
42  const unsigned int _highlev;
43  const unsigned int _nevlasers;
44  const unsigned int _timebefmax;
45  const unsigned int _timeaftmax;
46  const double _cutwindow;
47  const unsigned int _nsamplesshape;
48  const unsigned int _presampleshape;
49  const unsigned int _slide;
50  const int _fedid;
51  const int _debug;
52 
60 
63 
64  // Identify run type
65 
66  unsigned int nSides;
67  int lightside;
68  int runType;
69  int runNum;
70  int dccID;
71  int fedID;
72 
73  // Count Laser Events
76 
77  //Declaration of leaves types
78 
79  int event;
80  int color;
81  double matacq[N_samples];
82  int maxsamp;
83  int nsamples;
84  double tt;
85 
86  TFile *sampFile;
87  TTree *tree;
88 
90  TTree *meanTree[nColor];
91 
92  std::vector<int> colors;
93 
94  TFile *outFile;
95  int status;
97  TTree *mtqShape;
98 };
Definition: TMTQ.h:8
const unsigned int _timeaftmax
const unsigned int _thres
EcalMatacqAnalyzer(const edm::ParameterSet &iConfig)
std::vector< int > colors
const unsigned int _slide
void beginJob() override
const unsigned int _lowlev
const std::string digiCollection_
const unsigned int _presampleshape
~EcalMatacqAnalyzer() override=default
TMTQ * MTQ[nColor][nSide]
const std::string resdir_
const std::string eventHeaderCollection_
TTree * meanTree[nColor]
void analyze(const edm::Event &e, const edm::EventSetup &c) override
const unsigned int _nevlasers
#define N_samples
const unsigned int _timebefmax
const std::string eventHeaderProducer_
const unsigned int _parabnbefmax
const edm::EDGetTokenT< EcalMatacqDigiCollection > pmatToken_
const std::string digiProducer_
const unsigned int _nsamplesaftmax
const unsigned int _nsamplesshape
const unsigned int _noiseCut
const edm::EDGetTokenT< EcalRawDataCollection > dccToken_
void endJob() override
const unsigned int _highlev
const unsigned int _parabnaftmax