CMS 3D CMS Logo

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