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