CMS 3D CMS Logo

DTTTrigCalibration.h
Go to the documentation of this file.
1 #ifndef CalibMuon_DTTTrigCalibration_H
2 #define CalibMuon_DTTTrigCalibration_H
3 
15 
16 #include <string>
17 #include <map>
18 
19 namespace edm {
20  class ParameterSet;
21  class Event;
22  class EventSetup;
23 } // namespace edm
24 
25 class TFile;
26 class TH1F;
27 class DTTimeBoxFitter;
28 class DTTTrigBaseSync;
29 class DTTtrig;
30 
32 public:
35 
37  ~DTTTrigCalibration() override;
38 
39  // Operations
40 
42  void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override;
43 
45  void endJob() override;
46 
47 protected:
48 private:
49  // Generate the time box name
50  std::string getTBoxName(const DTSuperLayerId& slId) const;
51  // Generate the time box name
52  std::string getOccupancyName(const DTLayerId& slId) const;
53 
54  // Print computed ttrig
55  void dumpTTrigMap(const DTTtrig* tTrig) const;
56 
57  // Plot computed ttrig
58  void plotTTrig(const DTTtrig* tTrig) const;
59 
60  // Debug flag
61  bool debug;
62 
63  // The label used to retrieve digis from the event
65 
66  // The TDC time-window
68  //The maximum number of digis per layer
70 
71  // The file which will contain the time boxes
72  TFile* theFile;
73 
74  // Map of the histograms by SL
75  std::map<DTSuperLayerId, TH1F*> theHistoMap;
76  std::map<DTLayerId, TH1F*> theOccupancyMap;
77 
78  // Switch for t0 subtraction
80  // Switch for checking of noisy channels
82  //card to switch on/off the DB writing
84  // the kfactor to be uploaded in the ttrig DB
85  double kFactor;
86 
87  // The fitter
88  std::unique_ptr<DTTimeBoxFitter> theFitter;
89  // The module for t0 subtraction
90  std::unique_ptr<DTTTrigBaseSync> theSync; //FIXME: should be const
91 };
92 #endif
DTSuperLayerId
Definition: DTSuperLayerId.h:12
DTTtrig
Definition: DTTtrig.h:68
DTTTrigCalibration::endJob
void endJob() override
Fit the time box rising edge and write the resulting ttrig to the DB.
Definition: DTTTrigCalibration.cc:208
DTTTrigCalibration::digiLabel
std::string digiLabel
Definition: DTTTrigCalibration.h:64
DTTTrigCalibration::analyze
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Fill the time boxes.
Definition: DTTTrigCalibration.cc:98
DTLayerId.h
DTTTrigBaseSync
Definition: DTTTrigBaseSync.h:19
edm
HLT enums.
Definition: AlignableModifier.h:19
dttriganalyzer_cfi.tTrig
tTrig
Definition: dttriganalyzer_cfi.py:11
EDAnalyzer.h
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
DTTTrigCalibration::theFitter
std::unique_ptr< DTTimeBoxFitter > theFitter
Definition: DTTTrigCalibration.h:88
DTTTrigCalibration::getTBoxName
std::string getTBoxName(const DTSuperLayerId &slId) const
Definition: DTTTrigCalibration.cc:256
DTTTrigCalibration::debug
bool debug
Definition: DTTTrigCalibration.h:61
DTTTrigCalibration::kFactor
double kFactor
Definition: DTTTrigCalibration.h:85
DTTTrigCalibration::checkNoisyChannels
bool checkNoisyChannels
Definition: DTTTrigCalibration.h:81
DTTTrigCalibration::theOccupancyMap
std::map< DTLayerId, TH1F * > theOccupancyMap
Definition: DTTTrigCalibration.h:76
DTTTrigCalibration::maxTDCCounts
int maxTDCCounts
Definition: DTTTrigCalibration.h:67
Event
DTTTrigCalibration::DTTTrigCalibration
DTTTrigCalibration(const edm::ParameterSet &pset)
Constructor.
Definition: DTTTrigCalibration.cc:39
DTLayerId
Definition: DTLayerId.h:12
DTTTrigCalibration::getOccupancyName
std::string getOccupancyName(const DTLayerId &slId) const
Definition: DTTTrigCalibration.cc:265
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
DTTTrigCalibration::dumpTTrigMap
void dumpTTrigMap(const DTTtrig *tTrig) const
Definition: DTTTrigCalibration.cc:274
ParameterSet
Definition: Functions.h:16
DTTTrigCalibration::theHistoMap
std::map< DTSuperLayerId, TH1F * > theHistoMap
Definition: DTTTrigCalibration.h:75
DTTTrigCalibration::plotTTrig
void plotTTrig(const DTTtrig *tTrig) const
Definition: DTTTrigCalibration.cc:284
DTTTrigCalibration::~DTTTrigCalibration
~DTTTrigCalibration() override
Destructor.
Definition: DTTTrigCalibration.cc:83
edm::EventSetup
Definition: EventSetup.h:57
DTTTrigCalibration::doSubtractT0
bool doSubtractT0
Definition: DTTTrigCalibration.h:79
DTTimeBoxFitter
Definition: DTTimeBoxFitter.h:17
EventSetup
DTSuperLayerId.h
DTTTrigCalibration::theSync
std::unique_ptr< DTTTrigBaseSync > theSync
Definition: DTTTrigCalibration.h:90
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
DTTTrigCalibration
Definition: DTTTrigCalibration.h:31
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
DTTTrigCalibration::maxDigiPerLayer
int maxDigiPerLayer
Definition: DTTTrigCalibration.h:69
DTTTrigCalibration::theFile
TFile * theFile
Definition: DTTTrigCalibration.h:72
DTTTrigCalibration::findTMeanAndSigma
bool findTMeanAndSigma
Definition: DTTTrigCalibration.h:83