CMS 3D CMS Logo

DTTTrigCalibration.h
Go to the documentation of this file.
1 #ifndef CalibMuon_DTTTrigCalibration_H
2 #define CalibMuon_DTTTrigCalibration_H
3 
16 
17 #include <string>
18 #include <map>
19 
20 namespace edm {
21  class ParameterSet;
22  class Event;
23  class EventSetup;
24 } // namespace edm
25 
26 class TFile;
27 class TH1F;
28 class DTTimeBoxFitter;
29 class DTTTrigBaseSync;
30 class DTTtrig;
31 class DTStatusFlag;
32 class DTStatusFlagRcd;
33 
35 public:
38 
40  ~DTTTrigCalibration() override;
41 
42  // Operations
43 
45  void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override;
46 
48  void endJob() override;
49 
50 protected:
51 private:
52  // Generate the time box name
53  std::string getTBoxName(const DTSuperLayerId& slId) const;
54  // Generate the time box name
55  std::string getOccupancyName(const DTLayerId& slId) const;
56 
57  // Print computed ttrig
58  void dumpTTrigMap(const DTTtrig* tTrig) const;
59 
60  // Plot computed ttrig
61  void plotTTrig(const DTTtrig* tTrig) const;
62 
63  // Debug flag
64  bool debug;
65 
66  // The token used to retrieve digis from the event
68 
69  // The TDC time-window
71  //The maximum number of digis per layer
73 
74  // The file which will contain the time boxes
75  TFile* theFile;
76 
77  // Map of the histograms by SL
78  std::map<DTSuperLayerId, TH1F*> theHistoMap;
79  std::map<DTLayerId, TH1F*> theOccupancyMap;
80 
81  // Switch for t0 subtraction
83  // Switch for checking of noisy channels
85  //card to switch on/off the DB writing
87  // the kfactor to be uploaded in the ttrig DB
88  double kFactor;
89 
90  // The fitter
91  std::unique_ptr<DTTimeBoxFitter> theFitter;
92  // The module for t0 subtraction
93  std::unique_ptr<DTTTrigBaseSync> theSync; //FIXME: should be const
95 };
96 #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
edm::EDGetTokenT< DTDigiCollection > digiToken
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