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 
55 
56  // class to create/manage histos for each partition (SL)
57  class cellInfo {
58  public:
59  cellInfo(const TString& name) { histos = new hTMaxCell(name); }
60 
61  ~cellInfo() { delete histos; }
62 
63  void add(const std::vector<const TMax*>& tMaxes);
64  void update() { addedCells.clear(); }
65  hTMaxCell* getHists() { return histos; }
66 
67  private:
68  cellInfo(){};
69  cellInfo(const cellInfo&){};
70 
71  std::vector<dttmaxenums::TMaxCells> addedCells;
73  };
74 
75  TH1F* hChi2;
79 
80  // Divide cellInfo by given granularity (to be implemented)
81  // DTVDriftCalibration::cellInfo* partition(const DTWireId& wireId);
82 
83  // Specify the granularity for the TMax histograms
86 
87  // The label used to retrieve 4D segments from the event
89 
90  // Debug flag
91  bool debug;
92 
93  // The label used to retrieve digis from the event
95 
96  // The file which will contain the tMax histograms
97  TFile* theFile;
98 
99  // The fitter
100  std::unique_ptr<DTMeanTimerFitter> theFitter;
101 
102  // Perform the vDrift and t0 evaluation or just fill the
103  // tMaxHists (if you read the dataset in different jobs)
105 
106  // The name of the output text file
108 
109  // Map of wires and cellInfo with coarse granularity
110  std::map<DTWireId, cellInfo*> theWireIdAndCellMap;
111 
112  // Switch for checking of noisy channels
113  //bool checkNoisyChannels;
114 
115  // The module for t0 subtraction
116  std::unique_ptr<DTTTrigBaseSync> theSync; //FIXME: should be const
117 
118  // parameter set for DTCalibrationMap constructor
120 
121  // Maximum value for the 4D Segment chi2
122  //double theMaxChi2;
123 
124  // Maximum incident angle for Phi Seg
125  //double theMaxPhiAngle;
126 
127  // Maximum incident angle for Theta Seg
128  //double theMaxZAngle;
129 
130  // Choose the chamber you want to calibrate
132 };
133 #endif
DTVDriftCalibration::theFile
TFile * theFile
Definition: DTVDriftCalibration.h:97
dtcalibration::Histograms
Definition: Histogram.h:9
DTVDriftCalibration::cellInfo::add
void add(const std::vector< const TMax * > &tMaxes)
Definition: DTVDriftCalibration.cc:392
edm::EDGetTokenT< DTRecSegment4DCollection >
edm
HLT enums.
Definition: AlignableModifier.h:19
DTVDriftCalibration::TMaxGranularity
TMaxGranularity
Definition: DTVDriftCalibration.h:84
DTVDriftCalibration::analyze
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Definition: DTVDriftCalibration.cc:109
DTVDriftCalibration::findVDriftAndT0
bool findVDriftAndT0
Definition: DTVDriftCalibration.h:104
DTVDriftCalibration::histograms_
dtcalibration::Histograms histograms_
Definition: DTVDriftCalibration.h:54
h4DSegm
Definition: vDriftHistos.h:11
DTVDriftCalibration::theRecHits4DToken
edm::EDGetTokenT< DTRecSegment4DCollection > theRecHits4DToken
Definition: DTVDriftCalibration.h:88
DTVDriftCalibration
Definition: DTVDriftCalibration.h:33
DTVDriftCalibration::digiLabel
std::string digiLabel
Definition: DTVDriftCalibration.h:94
EDAnalyzer.h
DTCalibrationMap.h
h2DSegm
Definition: vDriftHistos.h:70
DTVDriftCalibration::theCalibChamber
std::string theCalibChamber
Definition: DTVDriftCalibration.h:131
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
DTVDriftCalibration::theSync
std::unique_ptr< DTTTrigBaseSync > theSync
Definition: DTVDriftCalibration.h:116
DTVDriftCalibration::cellInfo::addedCells
std::vector< dttmaxenums::TMaxCells > addedCells
Definition: DTVDriftCalibration.h:69
DTVDriftCalibration::h2DSegmRZ
h2DSegm * h2DSegmRZ
Definition: DTVDriftCalibration.h:76
DTTMax::TMax
Information on each of the four TMax values in a SL.
Definition: DTTMax.h:50
DTVDriftCalibration::debug
bool debug
Definition: DTVDriftCalibration.h:91
DTVDriftCalibration::h4DSegmAllCh
h4DSegm * h4DSegmAllCh
Definition: DTVDriftCalibration.h:78
DTVDriftCalibration::cellInfo::getHists
hTMaxCell * getHists()
Definition: DTVDriftCalibration.h:65
DTVDriftCalibration::byPartition
Definition: DTVDriftCalibration.h:84
Event
DTVDriftCalibration::h2DSegmRPhi
h2DSegm * h2DSegmRPhi
Definition: DTVDriftCalibration.h:77
DTVDriftCalibration::TMax
DTTMax::TMax TMax
Definition: DTVDriftCalibration.h:52
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTVDriftCalibration::hChi2
TH1F * hChi2
Definition: DTVDriftCalibration.h:75
DTVDriftCalibration::cellInfo
Definition: DTVDriftCalibration.h:57
DTMeanTimerFitter
Definition: DTMeanTimerFitter.h:17
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
DTVDriftCalibration::cellInfo::cellInfo
cellInfo(const cellInfo &)
Definition: DTVDriftCalibration.h:69
DTTMax.h
DTVDriftCalibration::cellInfo::histos
hTMaxCell * histos
Definition: DTVDriftCalibration.h:72
DTVDriftCalibration::theGranularity
TMaxGranularity theGranularity
Definition: DTVDriftCalibration.h:85
hTMaxCell
Definition: vDriftHistos.h:111
DTVDriftCalibration::cellInfo::cellInfo
cellInfo(const TString &name)
Definition: DTVDriftCalibration.h:59
edm::EventSetup
Definition: EventSetup.h:58
InputTag.h
DTVDriftCalibration::cellInfo::~cellInfo
~cellInfo()
Definition: DTVDriftCalibration.h:61
DTVDriftCalibration::~DTVDriftCalibration
~DTVDriftCalibration() override
Destructor.
Definition: DTVDriftCalibration.cc:104
DTWireId.h
DTSegmentSelector.h
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
DTVDriftCalibration::bySL
Definition: DTVDriftCalibration.h:84
DTVDriftCalibration::cellInfo::cellInfo
cellInfo()
Definition: DTVDriftCalibration.h:68
DTVDriftCalibration::endJob
void endJob() override
Definition: DTVDriftCalibration.cc:274
vDriftHistos.h
EventSetup
DTVDriftCalibration::cellInfo::update
void update()
Definition: DTVDriftCalibration.h:64
DTVDriftCalibration::theWireIdAndCellMap
std::map< DTWireId, cellInfo * > theWireIdAndCellMap
Definition: DTVDriftCalibration.h:110
DTVDriftCalibration::theCalibFilePar
edm::ParameterSet theCalibFilePar
Definition: DTVDriftCalibration.h:119
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
DTVDriftCalibration::theFitter
std::unique_ptr< DTMeanTimerFitter > theFitter
Definition: DTVDriftCalibration.h:100
DTVDriftCalibration::byChamber
Definition: DTVDriftCalibration.h:84
DTVDriftCalibration::DTVDriftCalibration
DTVDriftCalibration(const edm::ParameterSet &pset)
Constructor.
Definition: DTVDriftCalibration.cc:42
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
DTVDriftCalibration::select_
std::unique_ptr< DTSegmentSelector > select_
Definition: DTVDriftCalibration.h:49
DTRecSegment4DCollection.h
DTVDriftCalibration::theVDriftOutputFile
std::string theVDriftOutputFile
Definition: DTVDriftCalibration.h:107