CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
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  virtual ~DTDigiTask();
61 
62 protected:
63 
64  void dqmBeginRun(const edm::Run&, const edm::EventSetup&);
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) ;
77  void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& setup);
78 
80  void channelsMap(const DTChamberId& dtCh, std::string histoTag);
81 
83  void analyze(const edm::Event& e, const edm::EventSetup& c);
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 
160 
161  std::map<DTChamberId, int> nSynchNoiseEvents;
163 
164 
165 };
166 
167 #endif
168 
169 /* Local Variables: */
170 /* show-trailing-whitespace: t */
171 /* truncate-lines: t */
172 /* End: */
int defaultTmax
Definition: DTDigiTask.h:134
bool doStaticBooking
Definition: DTDigiTask.h:137
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
Definition: DTDigiTask.cc:448
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &setup)
Definition: DTDigiTask.cc:741
void channelsMap(const DTChamberId &dtCh, std::string histoTag)
To map real channels.
Definition: DTDigiTask.cc:745
bool tpMode
Definition: DTDigiTask.h:155
bool doLayerTimeBoxes
Definition: DTDigiTask.h:159
bool filterSyncNoise
Definition: DTDigiTask.h:157
std::string topFolder() const
Definition: DTDigiTask.cc:731
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
To reset the MEs.
Definition: DTDigiTask.cc:186
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
int maxTDCCounts
Definition: DTDigiTask.h:150
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
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
virtual ~DTDigiTask()
Destructor.
Definition: DTDigiTask.cc:104
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
bool doAllHitsOccupancies
Definition: DTDigiTask.h:151
int maxTDCHits
Definition: DTDigiTask.h:97
void dqmBeginRun(const edm::Run &, const edm::EventSetup &)
Definition: DTDigiTask.cc:110
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:133
int timeBoxGranularity
Definition: DTDigiTask.h:149
std::set< DTChamberId > syncNoisyChambers
Definition: DTDigiTask.h:107
int syncNumTot
Definition: DTDigiTask.h:108
MonitorElement * nEventMonitor
Definition: DTDigiTask.h:162
int inTimeHitsLowerBound
Definition: DTDigiTask.h:147
float tTrigRMS
Definition: DTDigiTask.h:101
std::map< DTChamberId, int > hitMap
Definition: DTDigiTask.h:106
std::map< DTChamberId, int > nSynchNoiseEvents
Definition: DTDigiTask.h:161
std::map< std::string, std::map< uint32_t, MonitorElement * > > digiHistos
Definition: DTDigiTask.h:119
std::string triggerSource()
get the L1A source
Definition: DTDigiTask.cc:707
edm::Handle< LTCDigiCollection > ltcdigis
Definition: DTDigiTask.h:111
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
Definition: DTDigiTask.h:127
Definition: Run.h:41