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 }
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 
49 private:
50 
52 
53  // The class containing TMax information
54  typedef DTTMax::TMax TMax;
55 
56  // class to create/manage histos for each partition (SL)
57  class cellInfo{
58  public:
59  cellInfo(const TString& name) {
60  histos = new hTMaxCell(name);
61  }
62 
64  delete histos;
65  }
66 
67  void add(const std::vector<const TMax*>& tMaxes);
68  void update() {addedCells.clear();}
69  hTMaxCell* getHists() {return histos;}
70 
71  private:
72  cellInfo(){};
73  cellInfo(const cellInfo&){};
74 
75  std::vector<dttmaxenums::TMaxCells> addedCells;
77  };
78 
82 
83  // Divide cellInfo by given granularity (to be implemented)
84  // DTVDriftCalibration::cellInfo* partition(const DTWireId& wireId);
85 
86  // Specify the granularity for the TMax histograms
87  enum TMaxGranularity {byChamber, bySL, byPartition};
89 
90  // The label used to retrieve 4D segments from the event
92 
93  // Debug flag
94  bool debug;
95 
96  // The label used to retrieve digis from the event
98 
99  // The file which will contain the tMax histograms
100  TFile *theFile;
101 
102  // The fitter
104 
105  // Perform the vDrift and t0 evaluation or just fill the
106  // tMaxHists (if you read the dataset in different jobs)
108 
109  // The name of the output text file
111 
112  // Map of wires and cellInfo with coarse granularity
113  std::map<DTWireId, cellInfo*> theWireIdAndCellMap;
114 
115  // Switch for checking of noisy channels
116  //bool checkNoisyChannels;
117 
118  // The module for t0 subtraction
119  DTTTrigBaseSync *theSync;//FIXME: should be const
120 
121  // parameter set for DTCalibrationMap constructor
123 
124  // Maximum value for the 4D Segment chi2
125  //double theMaxChi2;
126 
127  // Maximum incident angle for Phi Seg
128  //double theMaxPhiAngle;
129 
130  // Maximum incident angle for Theta Seg
131  //double theMaxZAngle;
132 
133  // Choose the chamber you want to calibrate
135 
136 };
137 #endif
138 
TMaxGranularity theGranularity
Information on each of the four TMax values in a SL.
Definition: DTTMax.h:46
std::map< DTWireId, cellInfo * > theWireIdAndCellMap
edm::ParameterSet theCalibFilePar
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
DTSegmentSelector select_
DTMeanTimerFitter * theFitter
HLT enums.
DTTTrigBaseSync * theSync
edm::InputTag theRecHits4DLabel
virtual example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: event.py:1