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