CMS 3D CMS Logo

DTDigiTask.h
Go to the documentation of this file.
1 #ifndef DTDigiTask_H
2 #define DTDigiTask_H
3 
4 /*
5  * \file DTDigiTask.h
6  *
7  * \author M. Zanetti - INFN Padova
8  *
9 */
10 
18 
21 
23 
25 
29 
32 
33 #include <memory>
34 #include <iostream>
35 #include <fstream>
36 #include <string>
37 #include <vector>
38 #include <map>
39 
40 class DTGeometry;
41 class DTSuperLayerId;
42 class DTLayerId;
43 class DTChamberId;
44 class DTTtrig;
45 class DTT0;
46 
47 class DTDigiTask : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks> {
48 public:
50  DTDigiTask(const edm::ParameterSet& ps);
51 
53  ~DTDigiTask() override;
54 
55 protected:
56  void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
57 
58  // Book the histograms
59  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
60 
63  void bookHistos(DQMStore::IBooker& ibooker, const DTChamberId& dtCh, std::string folder, std::string histoTag);
64  void bookHistos(DQMStore::IBooker& ibooker, const int wheelId, std::string folder, std::string histoTag);
65 
67  void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) override;
68  void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) final {}
69 
71  void channelsMap(const DTChamberId& dtCh, std::string histoTag);
72 
74  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
75 
78 
79 private:
80  std::string topFolder() const;
81 
82  int nevents;
83 
85  int tMax;
87 
89  float tTrig;
90  float tTrigRMS;
91  float kFactor;
92 
93  //check for sync noise
94 
95  std::map<DTChamberId, int> hitMap;
96  std::set<DTChamberId> syncNoisyChambers;
98  int syncNum;
99 
101 
104 
107 
108  std::map<std::string, std::map<uint32_t, MonitorElement*> > digiHistos;
109  std::map<std::string, std::map<int, MonitorElement*> > wheelHistos;
110 
111  // Parameters from config file
112 
113  // The label to retrieve the digis
115 
117 
118  // Set to true to read the ttrig from DB (useful to determine in-time and out-of-time hits)
120  // Set to true to subtract t0 from test pulses
122  // Tmax value (TDC counts)
124  // Switch from static (all histo at the beginninig of the job) to
125  // dynamic (book when needed) histo booking
127  // Switch for local/global runs
129  // Setting for the reset of the ME after n (= ResetCycle) luminosity sections
131  // Check the DB of noisy channels
133  // Default TTrig to be used when not reading the TTrig DB
135 
143 
144  bool tpMode;
147 
150 
152 
153  std::map<DTChamberId, int> nSynchNoiseEvents;
155 };
156 
157 #endif
158 
159 /* Local Variables: */
160 /* show-trailing-whitespace: t */
161 /* truncate-lines: t */
162 /* End: */
int defaultTmax
Definition: DTDigiTask.h:123
bool doStaticBooking
Definition: DTDigiTask.h:126
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Definition: DTDigiTask.cc:106
void channelsMap(const DTChamberId &dtCh, std::string histoTag)
To map real channels.
Definition: DTDigiTask.cc:719
bool tpMode
Definition: DTDigiTask.h:144
bool doLayerTimeBoxes
Definition: DTDigiTask.h:151
bool filterSyncNoise
Definition: DTDigiTask.h:146
int maxTTMounts
Definition: DTDigiTask.h:139
std::string topFolder() const
Definition: DTDigiTask.cc:711
bool readTTrigDB
Definition: DTDigiTask.h:119
edm::ESHandle< DTReadOutMapping > mapping
Definition: DTDigiTask.h:103
bool lookForSyncNoise
Definition: DTDigiTask.h:145
float kFactor
Definition: DTDigiTask.h:91
std::map< DTChamberId, int > hitMap
Definition: DTDigiTask.h:95
edm::ESHandle< DTTtrig > tTrigMap
Definition: DTDigiTask.h:105
DTDigiTask(const edm::ParameterSet &ps)
Constructor.
Definition: DTDigiTask.cc:43
edm::EDGetTokenT< DTDigiCollection > dtDigiToken_
Definition: DTDigiTask.h:114
Definition: DTT0.h:48
bool checkNoisyChannels
Definition: DTDigiTask.h:132
bool isLocalRun
Definition: DTDigiTask.h:128
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context) final
Definition: DTDigiTask.h:68
edm::ESHandle< DTT0 > t0Map
Definition: DTDigiTask.h:106
bool doInTimeOccupancies
Definition: DTDigiTask.h:142
bool doNoiseOccupancies
Definition: DTDigiTask.h:141
std::map< std::string, std::map< int, MonitorElement * > > wheelHistos
Definition: DTDigiTask.h:109
int nevents
Definition: DTDigiTask.h:82
edm::ESHandle< DTGeometry > muonGeom
Definition: DTDigiTask.h:102
int syncNum
Definition: DTDigiTask.h:98
int resetCycle
Definition: DTDigiTask.h:130
int inTimeHitsUpperBound
Definition: DTDigiTask.h:137
int defaultTTrig
Definition: DTDigiTask.h:134
float tTrig
tTrig from the DB
Definition: DTDigiTask.h:89
int tMax
no needs to be precise. Value from PSets will always be used
Definition: DTDigiTask.h:85
int tdcPedestal
Definition: DTDigiTask.h:149
bool doAllHitsOccupancies
Definition: DTDigiTask.h:140
int maxTDCHits
Definition: DTDigiTask.h:86
bool subtractT0
Definition: DTDigiTask.h:121
void bookHistos(DQMStore::IBooker &ibooker, const DTSuperLayerId &dtSL, std::string folder, std::string histoTag)
Book the ME.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: DTDigiTask.cc:128
int timeBoxGranularity
Definition: DTDigiTask.h:138
~DTDigiTask() override
Destructor.
Definition: DTDigiTask.cc:102
std::set< DTChamberId > syncNoisyChambers
Definition: DTDigiTask.h:96
int syncNumTot
Definition: DTDigiTask.h:97
MonitorElement * nEventMonitor
Definition: DTDigiTask.h:154
int inTimeHitsLowerBound
Definition: DTDigiTask.h:136
float tTrigRMS
Definition: DTDigiTask.h:90
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context) override
To reset the MEs.
Definition: DTDigiTask.cc:185
std::map< DTChamberId, int > nSynchNoiseEvents
Definition: DTDigiTask.h:153
std::map< std::string, std::map< uint32_t, MonitorElement * > > digiHistos
Definition: DTDigiTask.h:108
std::string triggerSource()
get the L1A source
Definition: DTDigiTask.cc:690
edm::Handle< LTCDigiCollection > ltcdigis
Definition: DTDigiTask.h:100
bool sliceTestMode
Definition: DTDigiTask.h:148
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
Definition: DTDigiTask.cc:433
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
Definition: DTDigiTask.h:116
Definition: Run.h:45