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 class DTStatusFlag;
31 class DTStatusFlagRcd;
32 
34 public:
37 
39  ~DTTTrigCalibration() override;
40 
41  // Operations
42 
44  void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override;
45 
47  void endJob() override;
48 
49 protected:
50 private:
51  // Generate the time box name
52  std::string getTBoxName(const DTSuperLayerId& slId) const;
53  // Generate the time box name
54  std::string getOccupancyName(const DTLayerId& slId) const;
55 
56  // Print computed ttrig
57  void dumpTTrigMap(const DTTtrig* tTrig) const;
58 
59  // Plot computed ttrig
60  void plotTTrig(const DTTtrig* tTrig) const;
61 
62  // Debug flag
63  bool debug;
64 
65  // The label used to retrieve digis from the event
67 
68  // The TDC time-window
70  //The maximum number of digis per layer
72 
73  // The file which will contain the time boxes
74  TFile* theFile;
75 
76  // Map of the histograms by SL
77  std::map<DTSuperLayerId, TH1F*> theHistoMap;
78  std::map<DTLayerId, TH1F*> theOccupancyMap;
79 
80  // Switch for t0 subtraction
82  // Switch for checking of noisy channels
84  //card to switch on/off the DB writing
86  // the kfactor to be uploaded in the ttrig DB
87  double kFactor;
88 
89  // The fitter
90  std::unique_ptr<DTTimeBoxFitter> theFitter;
91  // The module for t0 subtraction
92  std::unique_ptr<DTTTrigBaseSync> theSync; //FIXME: should be const
94 };
95 #endif
DTTTrigCalibration(const edm::ParameterSet &pset)
Constructor.
std::map< DTSuperLayerId, TH1F * > theHistoMap
void dumpTTrigMap(const DTTtrig *tTrig) const
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Fill the time boxes.
void plotTTrig(const DTTtrig *tTrig) const
~DTTTrigCalibration() override
Destructor.
std::unique_ptr< DTTimeBoxFitter > theFitter
std::unique_ptr< DTTTrigBaseSync > theSync
std::string getTBoxName(const DTSuperLayerId &slId) const
std::string getOccupancyName(const DTLayerId &slId) const
HLT enums.
std::map< DTLayerId, TH1F * > theOccupancyMap
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > theStatusMapToken
void endJob() override
Fit the time box rising edge and write the resulting ttrig to the DB.
Definition: event.py:1