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 
22 
24 
26 
30 
31 
34 
35 #include <memory>
36 #include <iostream>
37 #include <fstream>
38 #include <string>
39 #include <vector>
40 #include <map>
41 
42 class DTGeometry;
43 class DTSuperLayerId;
44 class DTLayerId;
45 class DTChamberId;
46 class DTTtrig;
47 class DTT0;
48 
49 class DQMStore;
50 class MonitorElement;
51 
52 class DTDigiTask: public DQMEDAnalyzer{
53 
54 public:
55 
57  DTDigiTask(const edm::ParameterSet& ps);
58 
60  ~DTDigiTask() override;
61 
62 protected:
63 
64  void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
65 
66  // Book the histograms
67  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
68 
69 
71  void bookHistos(DQMStore::IBooker & ibooker, const DTSuperLayerId& dtSL, std::string folder, std::string histoTag);
72  void bookHistos(DQMStore::IBooker & ibooker, const DTChamberId& dtCh, std::string folder, std::string histoTag);
73  void bookHistos(DQMStore::IBooker & ibooker, const int wheelId, std::string folder, std::string histoTag);
74 
76  void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) override;
77 
79  void channelsMap(const DTChamberId& dtCh, std::string histoTag);
80 
82  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
83 
84 
87 
88 private:
89 
90  std::string topFolder() const;
91 
92  int nevents;
93 
95  int tMax;
97 
99  float tTrig;
100  float tTrigRMS;
101  float kFactor;
102 
103  //check for sync noise
104 
105  std::map<DTChamberId,int> hitMap;
106  std::set<DTChamberId> syncNoisyChambers;
108  int syncNum;
109 
111 
114 
117 
118  std::map<std::string, std::map<uint32_t, MonitorElement*> > digiHistos;
119  std::map<std::string, std::map<int, MonitorElement*> > wheelHistos;
120 
121  // Parameters from config file
122 
123  // The label to retrieve the digis
125 
127 
128  // Set to true to read the ttrig from DB (useful to determine in-time and out-of-time hits)
130  // Set to true to subtract t0 from test pulses
132  // Tmax value (TDC counts)
134  // Switch from static (all histo at the beginninig of the job) to
135  // dynamic (book when needed) histo booking
137  // Switch for local/global runs
139  // Setting for the reset of the ME after n (= ResetCycle) luminosity sections
141  // Check the DB of noisy channels
143  // Default TTrig to be used when not reading the TTrig DB
145 
153 
154  bool tpMode;
157 
159 
160  std::map<DTChamberId, int> nSynchNoiseEvents;
162 
163 
164 };
165 
166 #endif
167 
168 /* Local Variables: */
169 /* show-trailing-whitespace: t */
170 /* truncate-lines: t */
171 /* End: */
int defaultTmax
Definition: DTDigiTask.h:133
bool doStaticBooking
Definition: DTDigiTask.h:136
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Definition: DTDigiTask.cc:110
void channelsMap(const DTChamberId &dtCh, std::string histoTag)
To map real channels.
Definition: DTDigiTask.cc:743
bool tpMode
Definition: DTDigiTask.h:154
bool doLayerTimeBoxes
Definition: DTDigiTask.h:158
bool filterSyncNoise
Definition: DTDigiTask.h:156
int maxTTMounts
Definition: DTDigiTask.h:149
std::string topFolder() const
Definition: DTDigiTask.cc:732
bool readTTrigDB
Definition: DTDigiTask.h:129
edm::ESHandle< DTReadOutMapping > mapping
Definition: DTDigiTask.h:113
bool lookForSyncNoise
Definition: DTDigiTask.h:155
float kFactor
Definition: DTDigiTask.h:101
edm::ESHandle< DTTtrig > tTrigMap
Definition: DTDigiTask.h:115
DTDigiTask(const edm::ParameterSet &ps)
Constructor.
Definition: DTDigiTask.cc:46
edm::EDGetTokenT< DTDigiCollection > dtDigiToken_
Definition: DTDigiTask.h:124
Definition: DTT0.h:53
bool checkNoisyChannels
Definition: DTDigiTask.h:142
bool isLocalRun
Definition: DTDigiTask.h:138
edm::ESHandle< DTT0 > t0Map
Definition: DTDigiTask.h:116
bool doInTimeOccupancies
Definition: DTDigiTask.h:152
bool doNoiseOccupancies
Definition: DTDigiTask.h:151
std::map< std::string, std::map< int, MonitorElement * > > wheelHistos
Definition: DTDigiTask.h:119
int nevents
Definition: DTDigiTask.h:92
edm::ESHandle< DTGeometry > muonGeom
Definition: DTDigiTask.h:112
int resetCycle
Definition: DTDigiTask.h:140
int inTimeHitsUpperBound
Definition: DTDigiTask.h:147
int defaultTTrig
Definition: DTDigiTask.h:144
float tTrig
tTrig from the DB
Definition: DTDigiTask.h:99
int tMax
no needs to be precise. Value from PSets will always be used
Definition: DTDigiTask.h:95
bool doAllHitsOccupancies
Definition: DTDigiTask.h:150
int maxTDCHits
Definition: DTDigiTask.h:96
bool subtractT0
Definition: DTDigiTask.h:131
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:133
int timeBoxGranularity
Definition: DTDigiTask.h:148
~DTDigiTask() override
Destructor.
Definition: DTDigiTask.cc:104
std::set< DTChamberId > syncNoisyChambers
Definition: DTDigiTask.h:106
int syncNumTot
Definition: DTDigiTask.h:107
MonitorElement * nEventMonitor
Definition: DTDigiTask.h:161
int inTimeHitsLowerBound
Definition: DTDigiTask.h:146
float tTrigRMS
Definition: DTDigiTask.h:100
std::map< DTChamberId, int > hitMap
Definition: DTDigiTask.h:105
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context) override
To reset the MEs.
Definition: DTDigiTask.cc:187
std::map< DTChamberId, int > nSynchNoiseEvents
Definition: DTDigiTask.h:160
std::map< std::string, std::map< uint32_t, MonitorElement * > > digiHistos
Definition: DTDigiTask.h:118
std::string triggerSource()
get the L1A source
Definition: DTDigiTask.cc:708
edm::Handle< LTCDigiCollection > ltcdigis
Definition: DTDigiTask.h:110
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
Definition: DTDigiTask.cc:449
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
Definition: DTDigiTask.h:126
Definition: Run.h:44