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 
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 
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: */
DTGeometry
Definition: DTGeometry.h:28
DTSuperLayerId
Definition: DTSuperLayerId.h:12
DTTtrig
Definition: DTTtrig.h:68
Handle.h
DTDigiTask::t0Map
const DTT0 * t0Map
Definition: DTDigiTask.h:117
DTTtrigRcd.h
ESHandle.h
DTDigiTask::muonGeom
const DTGeometry * muonGeom
Definition: DTDigiTask.h:110
DTDigiTask::kFactor
float kFactor
Definition: DTDigiTask.h:98
DTDigiTask::doAllHitsOccupancies
bool doAllHitsOccupancies
Definition: DTDigiTask.h:155
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
DTDigiTask::nSynchNoiseEvents
std::map< DTChamberId, int > nSynchNoiseEvents
Definition: DTDigiTask.h:168
edm::Run
Definition: Run.h:45
printsummarytable.folder
folder
Definition: printsummarytable.py:7
edm::EDGetTokenT< DTDigiCollection >
LuminosityBlock.h
DTDigiTask::DTDigiTask
DTDigiTask(const edm::ParameterSet &ps)
Constructor.
Definition: DTDigiTask.cc:36
DTDigiTask::dtDigiToken_
edm::EDGetTokenT< DTDigiCollection > dtDigiToken_
Definition: DTDigiTask.h:129
DTDigiTask::tTrigRMS
float tTrigRMS
Definition: DTDigiTask.h:97
DTDigiTask::tMax
int tMax
no needs to be precise. Value from PSets will always be used
Definition: DTDigiTask.h:92
DTDigiTask::timeBoxGranularity
int timeBoxGranularity
Definition: DTDigiTask.h:153
DTDigiTask::mapping
const DTReadOutMapping * mapping
Definition: DTDigiTask.h:112
DTDigiTask::sliceTestMode
bool sliceTestMode
Definition: DTDigiTask.h:163
DTDigiTask::channelsMap
void channelsMap(const DTChamberId &dtCh, std::string histoTag)
To map real channels.
Definition: DTDigiTask.cc:728
DQMOneEDAnalyzer
Definition: DQMOneEDAnalyzer.h:20
DTDigiTask::maxTDCHits
int maxTDCHits
Definition: DTDigiTask.h:93
DQMStore.h
DTStatusFlagRcd.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
EDAnalyzer.h
DTDigiTask::maxTTMounts
int maxTTMounts
Definition: DTDigiTask.h:154
edm::Handle< LTCDigiCollection >
DTDigiTask::statusMapToken_
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > statusMapToken_
Definition: DTDigiTask.h:120
DQMOneEDAnalyzer.h
LTCDigi.h
visDQMUpload.context
context
Definition: visDQMUpload.py:37
DTDigiTask::doLayerTimeBoxes
bool doLayerTimeBoxes
Definition: DTDigiTask.h:166
MakerMacros.h
DTDigiTask::bookHistos
void bookHistos(DQMStore::IBooker &ibooker, const DTSuperLayerId &dtSL, std::string folder, std::string histoTag)
Book the ME.
DTDigiTask::syncNum
int syncNum
Definition: DTDigiTask.h:105
DTDigiTask::syncNoisyChambers
std::set< DTChamberId > syncNoisyChambers
Definition: DTDigiTask.h:103
DTDigiTask::defaultTmax
int defaultTmax
Definition: DTDigiTask.h:138
DTDigiTask::tTrigMap
const DTTtrig * tTrigMap
Definition: DTDigiTask.h:115
Service.h
DTDigiTask::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: DTDigiTask.cc:126
DTLayerId
Definition: DTLayerId.h:12
DTStatusFlag.h
DTDigiTask::tdcPedestal
int tdcPedestal
Definition: DTDigiTask.h:164
DTDigiTask::wheelHistos
std::map< std::string, std::map< int, MonitorElement * > > wheelHistos
Definition: DTDigiTask.h:124
DTDigiTask::topFolder
std::string topFolder() const
Definition: DTDigiTask.cc:720
DTReadOutMappingRcd.h
edm::ParameterSet
Definition: ParameterSet.h:47
DTDigiTask::nEventMonitor
MonitorElement * nEventMonitor
Definition: DTDigiTask.h:169
Event.h
DTT0Rcd.h
DTDigiTask::ltcdigis
edm::Handle< LTCDigiCollection > ltcdigis
Definition: DTDigiTask.h:107
DTDigiTask::T0Token_
edm::ESGetToken< DTT0, DTT0Rcd > T0Token_
Definition: DTDigiTask.h:116
dtResolutionTest_cfi.histoTag
histoTag
Definition: dtResolutionTest_cfi.py:21
DTDigiTask::lookForSyncNoise
bool lookForSyncNoise
Definition: DTDigiTask.h:160
DTDigiTask::tTrig
float tTrig
tTrig from the DB
Definition: DTDigiTask.h:96
edm::EventSetup
Definition: EventSetup.h:58
DTDigiTask::isLocalRun
bool isLocalRun
Definition: DTDigiTask.h:143
DTDigiTask::doInTimeOccupancies
bool doInTimeOccupancies
Definition: DTDigiTask.h:157
DTDigiTask::subtractT0
bool subtractT0
Definition: DTDigiTask.h:136
edm::ESGetToken< DTGeometry, MuonGeometryRecord >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTDigiTask::digiHistos
std::map< std::string, std::map< uint32_t, MonitorElement * > > digiHistos
Definition: DTDigiTask.h:123
InputTag.h
DTDigiTask::triggerSource
std::string triggerSource()
get the L1A source
Definition: DTDigiTask.cc:699
DTDigiTask::readOutMapToken_
edm::ESGetToken< DTReadOutMapping, DTReadOutMappingRcd > readOutMapToken_
Definition: DTDigiTask.h:111
DTDigiTask::defaultTTrig
int defaultTTrig
Definition: DTDigiTask.h:149
DTDigiTask::inTimeHitsUpperBound
int inTimeHitsUpperBound
Definition: DTDigiTask.h:152
DTDigiTask::readTTrigDB
bool readTTrigDB
Definition: DTDigiTask.h:134
DTDigiTask::checkNoisyChannels
bool checkNoisyChannels
Definition: DTDigiTask.h:147
DTDigiTask::nevents
int nevents
Definition: DTDigiTask.h:89
DTDigiTask::hitMap
std::map< DTChamberId, int > hitMap
Definition: DTDigiTask.h:102
Frameworkfwd.h
DTDigiTask::~DTDigiTask
~DTDigiTask() override
Destructor.
Definition: DTDigiTask.cc:100
DTDigiTask::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
Definition: DTDigiTask.cc:444
DTDigiTask::resetCycle
int resetCycle
Definition: DTDigiTask.h:145
DTT0
Definition: DTT0.h:48
DTDigiTask::doStaticBooking
bool doStaticBooking
Definition: DTDigiTask.h:141
DTDigiTask::filterSyncNoise
bool filterSyncNoise
Definition: DTDigiTask.h:161
dqm::implementation::IBooker
Definition: DQMStore.h:43
DTDigiTask::TtrigToken_
edm::ESGetToken< DTTtrig, DTTtrigRcd > TtrigToken_
Definition: DTDigiTask.h:114
DTDigiTask::syncNumTot
int syncNumTot
Definition: DTDigiTask.h:104
DTDigiTask
Definition: DTDigiTask.h:54
DTDigi.h
DTDigiCollection.h
DTChamberId
Definition: DTChamberId.h:14
ParameterSet.h
DTDigiTask::dqmBeginRun
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Definition: DTDigiTask.cc:104
MuonGeometryRecord.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
DTDigiTask::tpMode
bool tpMode
Definition: DTDigiTask.h:159
DTDigiTask::statusMap
const DTStatusFlag * statusMap
Definition: DTDigiTask.h:121
edm::Event
Definition: Event.h:73
DTDigiTask::inTimeHitsLowerBound
int inTimeHitsLowerBound
Definition: DTDigiTask.h:151
DTReadOutMapping.h
DTDigiTask::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context) override
To reset the MEs.
Definition: DTDigiTask.cc:190
DTDigiTask::muonGeomToken_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
Definition: DTDigiTask.h:109
DTDigiTask::doNoiseOccupancies
bool doNoiseOccupancies
Definition: DTDigiTask.h:156
DTReadOutMapping
Definition: DTReadOutMapping.h:62
DTDigiTask::ltcDigiCollectionToken_
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
Definition: DTDigiTask.h:131
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
DTStatusFlag
Definition: DTStatusFlag.h:74
DTDigiTask::endLuminosityBlock
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context) final
Definition: DTDigiTask.h:75