CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 class DTGeometry;
33 class MuonGeometryRecord;
34 
36 public:
39 
41  ~DTVDriftCalibration() override;
42 
43  // Operations
44 
45  void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override;
46 
47  void endJob() override;
48 
49 protected:
50 private:
51  std::unique_ptr<DTSegmentSelector> select_;
52 
53  // The class containing TMax information
54  typedef DTTMax::TMax TMax;
55 
57 
58  // class to create/manage histos for each partition (SL)
59  class cellInfo {
60  public:
61  cellInfo(const TString& name) { histos = new hTMaxCell(name); }
62 
63  ~cellInfo() { delete histos; }
64 
65  void add(const std::vector<const TMax*>& tMaxes);
66  void update() { addedCells.clear(); }
67  hTMaxCell* getHists() { return histos; }
68 
69  private:
70  cellInfo(){};
71  cellInfo(const cellInfo&){};
72 
73  std::vector<dttmaxenums::TMaxCells> addedCells;
75  };
76 
77  TH1F* hChi2;
81 
82  // Divide cellInfo by given granularity (to be implemented)
83  // DTVDriftCalibration::cellInfo* partition(const DTWireId& wireId);
84 
85  // Specify the granularity for the TMax histograms
88 
89  // The label used to retrieve 4D segments from the event
91 
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  // which format to be created
139 };
140 #endif
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > theDTGeomToken
TMaxGranularity theGranularity
std::unique_ptr< DTTTrigBaseSync > theSync
Information on each of the four TMax values in a SL.
Definition: DTTMax.h:49
std::map< DTWireId, cellInfo * > theWireIdAndCellMap
edm::ParameterSet theCalibFilePar
edm::EDGetTokenT< DTRecSegment4DCollection > theRecHits4DToken
void add(const std::vector< const TMax * > &tMaxes)
std::unique_ptr< DTMeanTimerFitter > theFitter
~DTVDriftCalibration() override
Destructor.
dtcalibration::Histograms histograms_
std::unique_ptr< DTSegmentSelector > select_
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
DTVDriftCalibration(const edm::ParameterSet &pset)
Constructor.
std::vector< dttmaxenums::TMaxCells > addedCells