CMS 3D CMS Logo

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