CMS 3D CMS Logo

DTVDriftCalibration.h
Go to the documentation of this file.
1 #ifndef DTVDriftCalibration_H
2 #define DTVDriftCalibration_H
3 
15 
19 
20 #include "DTCalibrationMap.h"
21 
22 #include <string>
23 #include <vector>
24 
25 namespace edm {
26  class ParameterSet;
27  class Event;
28  class EventSetup;
29 }
30 
31 class TFile;
32 class DTMeanTimerFitter;
33 
35 public:
38 
40  ~DTVDriftCalibration() override;
41 
42  // Operations
43 
44  void analyze(const edm::Event & event, const edm::EventSetup& eventSetup) override;
45 
46  void endJob() override;
47 
48 protected:
49 
50 private:
51 
52  std::unique_ptr<DTSegmentSelector> select_;
53 
54  // The class containing TMax information
55  typedef DTTMax::TMax TMax;
56 
57  // class to create/manage histos for each partition (SL)
58  class cellInfo{
59  public:
60  cellInfo(const TString& name) {
61  histos = new hTMaxCell(name);
62  }
63 
65  delete histos;
66  }
67 
68  void add(const std::vector<const TMax*>& tMaxes);
69  void update() {addedCells.clear();}
70  hTMaxCell* getHists() {return histos;}
71 
72  private:
73  cellInfo(){};
74  cellInfo(const cellInfo&){};
75 
76  std::vector<dttmaxenums::TMaxCells> addedCells;
78  };
79 
83 
84  // Divide cellInfo by given granularity (to be implemented)
85  // DTVDriftCalibration::cellInfo* partition(const DTWireId& wireId);
86 
87  // Specify the granularity for the TMax histograms
88  enum TMaxGranularity {byChamber, bySL, byPartition};
90 
91  // The label used to retrieve 4D segments from the event
93 
94  // Debug flag
95  bool debug;
96 
97  // The label used to retrieve digis from the event
99 
100  // The file which will contain the tMax histograms
101  TFile *theFile;
102 
103  // The fitter
104  std::unique_ptr<DTMeanTimerFitter> theFitter;
105 
106  // Perform the vDrift and t0 evaluation or just fill the
107  // tMaxHists (if you read the dataset in different jobs)
109 
110  // The name of the output text file
112 
113  // Map of wires and cellInfo with coarse granularity
114  std::map<DTWireId, cellInfo*> theWireIdAndCellMap;
115 
116  // Switch for checking of noisy channels
117  //bool checkNoisyChannels;
118 
119  // The module for t0 subtraction
120  std::unique_ptr<DTTTrigBaseSync> theSync;//FIXME: should be const
121 
122  // parameter set for DTCalibrationMap constructor
124 
125  // Maximum value for the 4D Segment chi2
126  //double theMaxChi2;
127 
128  // Maximum incident angle for Phi Seg
129  //double theMaxPhiAngle;
130 
131  // Maximum incident angle for Theta Seg
132  //double theMaxZAngle;
133 
134  // Choose the chamber you want to calibrate
136 
137 };
138 #endif
139 
TMaxGranularity theGranularity
std::unique_ptr< DTTTrigBaseSync > theSync
Information on each of the four TMax values in a SL.
Definition: DTTMax.h:46
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
std::map< DTWireId, cellInfo * > theWireIdAndCellMap
edm::ParameterSet theCalibFilePar
edm::EDGetTokenT< DTRecSegment4DCollection > theRecHits4DToken
std::unique_ptr< DTMeanTimerFitter > theFitter
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
std::unique_ptr< DTSegmentSelector > select_
HLT enums.
Definition: event.py:1