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 one::DQMEDAnalyzer<edm::one::WatchLuminosityBlocks> {
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  void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) final {}
78 
80  void channelsMap(const DTChamberId& dtCh, std::string histoTag);
81 
83  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
84 
85 
88 
89 private:
90 
91  std::string topFolder() const;
92 
93  int nevents;
94 
96  int tMax;
98 
100  float tTrig;
101  float tTrigRMS;
102  float kFactor;
103 
104  //check for sync noise
105 
106  std::map<DTChamberId,int> hitMap;
107  std::set<DTChamberId> syncNoisyChambers;
109  int syncNum;
110 
112 
115 
118 
119  std::map<std::string, std::map<uint32_t, MonitorElement*> > digiHistos;
120  std::map<std::string, std::map<int, MonitorElement*> > wheelHistos;
121 
122  // Parameters from config file
123 
124  // The label to retrieve the digis
126 
128 
129  // Set to true to read the ttrig from DB (useful to determine in-time and out-of-time hits)
131  // Set to true to subtract t0 from test pulses
133  // Tmax value (TDC counts)
135  // Switch from static (all histo at the beginninig of the job) to
136  // dynamic (book when needed) histo booking
138  // Switch for local/global runs
140  // Setting for the reset of the ME after n (= ResetCycle) luminosity sections
142  // Check the DB of noisy channels
144  // Default TTrig to be used when not reading the TTrig DB
146 
154 
155  bool tpMode;
158 
161 
163 
164  std::map<DTChamberId, int> nSynchNoiseEvents;
166 
167 
168 };
169 
170 #endif
171 
172 /* Local Variables: */
173 /* show-trailing-whitespace: t */
174 /* truncate-lines: t */
175 /* End: */
int defaultTmax
Definition: DTDigiTask.h:134
bool doStaticBooking
Definition: DTDigiTask.h:137
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Definition: DTDigiTask.cc:116
void channelsMap(const DTChamberId &dtCh, std::string histoTag)
To map real channels.
Definition: DTDigiTask.cc:755
bool tpMode
Definition: DTDigiTask.h:155
bool doLayerTimeBoxes
Definition: DTDigiTask.h:162
bool filterSyncNoise
Definition: DTDigiTask.h:157
int maxTTMounts
Definition: DTDigiTask.h:150
std::string topFolder() const
Definition: DTDigiTask.cc:743
bool readTTrigDB
Definition: DTDigiTask.h:130
edm::ESHandle< DTReadOutMapping > mapping
Definition: DTDigiTask.h:114
bool lookForSyncNoise
Definition: DTDigiTask.h:156
float kFactor
Definition: DTDigiTask.h:102
edm::ESHandle< DTTtrig > tTrigMap
Definition: DTDigiTask.h:116
DTDigiTask(const edm::ParameterSet &ps)
Constructor.
Definition: DTDigiTask.cc:46
edm::EDGetTokenT< DTDigiCollection > dtDigiToken_
Definition: DTDigiTask.h:125
Definition: DTT0.h:53
bool checkNoisyChannels
Definition: DTDigiTask.h:143
bool isLocalRun
Definition: DTDigiTask.h:139
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context) final
Definition: DTDigiTask.h:77
edm::ESHandle< DTT0 > t0Map
Definition: DTDigiTask.h:117
bool doInTimeOccupancies
Definition: DTDigiTask.h:153
bool doNoiseOccupancies
Definition: DTDigiTask.h:152
std::map< std::string, std::map< int, MonitorElement * > > wheelHistos
Definition: DTDigiTask.h:120
int nevents
Definition: DTDigiTask.h:93
edm::ESHandle< DTGeometry > muonGeom
Definition: DTDigiTask.h:113
int resetCycle
Definition: DTDigiTask.h:141
int inTimeHitsUpperBound
Definition: DTDigiTask.h:148
int defaultTTrig
Definition: DTDigiTask.h:145
float tTrig
tTrig from the DB
Definition: DTDigiTask.h:100
int tMax
no needs to be precise. Value from PSets will always be used
Definition: DTDigiTask.h:96
int tdcPedestal
Definition: DTDigiTask.h:160
bool doAllHitsOccupancies
Definition: DTDigiTask.h:151
int maxTDCHits
Definition: DTDigiTask.h:97
bool subtractT0
Definition: DTDigiTask.h:132
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:139
int timeBoxGranularity
Definition: DTDigiTask.h:149
~DTDigiTask() override
Destructor.
Definition: DTDigiTask.cc:110
std::set< DTChamberId > syncNoisyChambers
Definition: DTDigiTask.h:107
int syncNumTot
Definition: DTDigiTask.h:108
MonitorElement * nEventMonitor
Definition: DTDigiTask.h:165
int inTimeHitsLowerBound
Definition: DTDigiTask.h:147
float tTrigRMS
Definition: DTDigiTask.h:101
std::map< DTChamberId, int > hitMap
Definition: DTDigiTask.h:106
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context) override
To reset the MEs.
Definition: DTDigiTask.cc:193
std::map< DTChamberId, int > nSynchNoiseEvents
Definition: DTDigiTask.h:164
std::map< std::string, std::map< uint32_t, MonitorElement * > > digiHistos
Definition: DTDigiTask.h:119
std::string triggerSource()
get the L1A source
Definition: DTDigiTask.cc:719
edm::Handle< LTCDigiCollection > ltcdigis
Definition: DTDigiTask.h:111
bool sliceTestMode
Definition: DTDigiTask.h:159
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
Definition: DTDigiTask.cc:455
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
Definition: DTDigiTask.h:127
Definition: Run.h:45