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: 2011/10/31 17:11:20 $
8  * $Revision: 1.35 $
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 
81  std::string triggerSource();
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  // Set to true to read the ttrig from DB (useful to determine in-time and out-of-time hits)
125  // Set to true to subtract t0 from test pulses
127  // Tmax value (TDC counts)
129  // Switch from static (all histo at the beginninig of the job) to
130  // dynamic (book when needed) histo booking
132  // Switch for local/global runs
134  // Setting for the reset of the ME after n (= ResetCycle) luminosity sections
136  // Check the DB of noisy channels
138  // Default TTrig to be used when not reading the TTrig DB
140 
148 
149  bool tpMode;
152 
154 
155  std::map<DTChamberId, int> nSynchNoiseEvents;
157 
158 
159 };
160 
161 #endif
int defaultTmax
Definition: DTDigiTask.h:128
bool doStaticBooking
Definition: DTDigiTask.h:131
void beginRun(const edm::Run &, const edm::EventSetup &)
Definition: DTDigiTask.cc:126
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
Definition: DTDigiTask.cc:472
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &setup)
Definition: DTDigiTask.cc:804
void channelsMap(const DTChamberId &dtCh, std::string histoTag)
To map real channels.
Definition: DTDigiTask.cc:820
bool tpMode
Definition: DTDigiTask.h:149
bool doLayerTimeBoxes
Definition: DTDigiTask.h:153
bool filterSyncNoise
Definition: DTDigiTask.h:151
std::string topFolder() const
Definition: DTDigiTask.cc:794
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
To reset the MEs.
Definition: DTDigiTask.cc:201
bool readTTrigDB
Definition: DTDigiTask.h:124
edm::ESHandle< DTReadOutMapping > mapping
Definition: DTDigiTask.h:111
bool lookForSyncNoise
Definition: DTDigiTask.h:150
float kFactor
Definition: DTDigiTask.h:96
void endJob()
Endjob.
Definition: DTDigiTask.cc:111
int maxTDCCounts
Definition: DTDigiTask.h:144
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:137
bool isLocalRun
Definition: DTDigiTask.h:133
edm::ESHandle< DTT0 > t0Map
Definition: DTDigiTask.h:114
bool doInTimeOccupancies
Definition: DTDigiTask.h:147
bool doNoiseOccupancies
Definition: DTDigiTask.h:146
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:135
int inTimeHitsUpperBound
Definition: DTDigiTask.h:142
DQMStore * dbe
Definition: DTDigiTask.h:108
int defaultTTrig
Definition: DTDigiTask.h:139
virtual ~DTDigiTask()
Destructor.
Definition: DTDigiTask.cc:103
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:145
int maxTDCHits
Definition: DTDigiTask.h:91
bool subtractT0
Definition: DTDigiTask.h:126
int timeBoxGranularity
Definition: DTDigiTask.h:143
std::set< DTChamberId > syncNoisyChambers
Definition: DTDigiTask.h:102
int syncNumTot
Definition: DTDigiTask.h:103
MonitorElement * nEventMonitor
Definition: DTDigiTask.h:156
int inTimeHitsLowerBound
Definition: DTDigiTask.h:141
float tTrigRMS
Definition: DTDigiTask.h:95
std::map< DTChamberId, int > hitMap
Definition: DTDigiTask.h:101
void beginJob()
BeginJob.
Definition: DTDigiTask.cc:119
std::map< DTChamberId, int > nSynchNoiseEvents
Definition: DTDigiTask.h:155
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:770
edm::Handle< LTCDigiCollection > ltcdigis
Definition: DTDigiTask.h:106
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
Definition: Run.h:33