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 
20 
24 
25 
28 
29 #include <memory>
30 #include <iostream>
31 #include <fstream>
32 #include <string>
33 #include <vector>
34 #include <map>
35 
36 class DTGeometry;
37 class DTSuperLayerId;
38 class DTLayerId;
39 class DTChamberId;
40 class DTTtrig;
41 class DTT0;
42 
43 class DQMStore;
44 class MonitorElement;
45 
47 
48 public:
49 
51  DTDigiTask(const edm::ParameterSet& ps);
52 
54  virtual ~DTDigiTask();
55 
56 protected:
57 
59  void beginJob();
60 
61  void beginRun(const edm::Run&, const edm::EventSetup&);
62 
64  void bookHistos(const DTSuperLayerId& dtSL, std::string folder, std::string histoTag);
65  void bookHistos(const DTChamberId& dtCh, std::string folder, std::string histoTag);
66  void bookHistos(const int wheelId, std::string folder, std::string histoTag);
67 
69  void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;
70  void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& setup);
71 
73  void channelsMap(const DTChamberId& dtCh, std::string histoTag);
74 
76  void analyze(const edm::Event& e, const edm::EventSetup& c);
77 
79  void endJob();
80 
83 
84 private:
85 
86  std::string topFolder() const;
87 
88  int nevents;
89 
91  int tMax;
93 
95  float tTrig;
96  float tTrigRMS;
97  float kFactor;
98 
99  //check for sync noise
100  // bool newChamber;
101  // DTChamberId chDone;
102  std::map<DTChamberId,int> hitMap;
103  std::set<DTChamberId> syncNoisyChambers;
105  int syncNum;
106 
108 
110 
113 
116 
117  std::map<std::string, std::map<uint32_t, MonitorElement*> > digiHistos;
118  std::map<std::string, std::map<int, MonitorElement*> > wheelHistos;
119 
120  // Parameters from config file
121 
122  // The label to retrieve the digis
124 
126 
127  // Set to true to read the ttrig from DB (useful to determine in-time and out-of-time hits)
129  // Set to true to subtract t0 from test pulses
131  // Tmax value (TDC counts)
133  // Switch from static (all histo at the beginninig of the job) to
134  // dynamic (book when needed) histo booking
136  // Switch for local/global runs
138  // Setting for the reset of the ME after n (= ResetCycle) luminosity sections
140  // Check the DB of noisy channels
142  // Default TTrig to be used when not reading the TTrig DB
144 
152 
153  bool tpMode;
156 
158 
159  std::map<DTChamberId, int> nSynchNoiseEvents;
161 
162 
163 };
164 
165 #endif
166 
167 /* Local Variables: */
168 /* show-trailing-whitespace: t */
169 /* truncate-lines: t */
170 /* End: */
int defaultTmax
Definition: DTDigiTask.h:132
bool doStaticBooking
Definition: DTDigiTask.h:135
void beginRun(const edm::Run &, const edm::EventSetup &)
Definition: DTDigiTask.cc:129
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
Definition: DTDigiTask.cc:475
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &setup)
Definition: DTDigiTask.cc:807
void channelsMap(const DTChamberId &dtCh, std::string histoTag)
To map real channels.
Definition: DTDigiTask.cc:823
bool tpMode
Definition: DTDigiTask.h:153
bool doLayerTimeBoxes
Definition: DTDigiTask.h:157
bool filterSyncNoise
Definition: DTDigiTask.h:155
std::string topFolder() const
Definition: DTDigiTask.cc:797
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
To reset the MEs.
Definition: DTDigiTask.cc:204
bool readTTrigDB
Definition: DTDigiTask.h:128
edm::ESHandle< DTReadOutMapping > mapping
Definition: DTDigiTask.h:112
bool lookForSyncNoise
Definition: DTDigiTask.h:154
float kFactor
Definition: DTDigiTask.h:97
void endJob()
Endjob.
Definition: DTDigiTask.cc:114
int maxTDCCounts
Definition: DTDigiTask.h:148
edm::ESHandle< DTTtrig > tTrigMap
Definition: DTDigiTask.h:114
DTDigiTask(const edm::ParameterSet &ps)
Constructor.
Definition: DTDigiTask.cc:46
edm::EDGetTokenT< DTDigiCollection > dtDigiToken_
Definition: DTDigiTask.h:123
Definition: DTT0.h:53
void bookHistos(const DTSuperLayerId &dtSL, std::string folder, std::string histoTag)
Book the ME.
bool checkNoisyChannels
Definition: DTDigiTask.h:141
bool isLocalRun
Definition: DTDigiTask.h:137
edm::ESHandle< DTT0 > t0Map
Definition: DTDigiTask.h:115
bool doInTimeOccupancies
Definition: DTDigiTask.h:151
bool doNoiseOccupancies
Definition: DTDigiTask.h:150
std::map< std::string, std::map< int, MonitorElement * > > wheelHistos
Definition: DTDigiTask.h:118
int nevents
Definition: DTDigiTask.h:88
edm::ESHandle< DTGeometry > muonGeom
Definition: DTDigiTask.h:111
int resetCycle
Definition: DTDigiTask.h:139
int inTimeHitsUpperBound
Definition: DTDigiTask.h:146
DQMStore * dbe
Definition: DTDigiTask.h:109
int defaultTTrig
Definition: DTDigiTask.h:143
virtual ~DTDigiTask()
Destructor.
Definition: DTDigiTask.cc:106
float tTrig
tTrig from the DB
Definition: DTDigiTask.h:95
int tMax
no needs to be precise. Value from PSets will always be used
Definition: DTDigiTask.h:91
bool doAllHitsOccupancies
Definition: DTDigiTask.h:149
int maxTDCHits
Definition: DTDigiTask.h:92
bool subtractT0
Definition: DTDigiTask.h:130
int timeBoxGranularity
Definition: DTDigiTask.h:147
std::set< DTChamberId > syncNoisyChambers
Definition: DTDigiTask.h:103
int syncNumTot
Definition: DTDigiTask.h:104
MonitorElement * nEventMonitor
Definition: DTDigiTask.h:160
int inTimeHitsLowerBound
Definition: DTDigiTask.h:145
float tTrigRMS
Definition: DTDigiTask.h:96
std::map< DTChamberId, int > hitMap
Definition: DTDigiTask.h:102
void beginJob()
BeginJob.
Definition: DTDigiTask.cc:122
std::map< DTChamberId, int > nSynchNoiseEvents
Definition: DTDigiTask.h:159
std::map< std::string, std::map< uint32_t, MonitorElement * > > digiHistos
Definition: DTDigiTask.h:117
std::string triggerSource()
get the L1A source
Definition: DTDigiTask.cc:773
edm::Handle< LTCDigiCollection > ltcdigis
Definition: DTDigiTask.h:107
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
Definition: DTDigiTask.h:125
Definition: Run.h:41