CMS 3D CMS Logo

DTLocalTriggerTask.h
Go to the documentation of this file.
1 #ifndef DTLocalTriggerTask_H
2 #define DTLocalTriggerTask_H
3 
4 /*
5  * \file DTLocalTriggerTask.h
6  *
7  * \author M. Zanetti - INFN Padova
8  *
9 */
10 
14 
17 
20 
22 
24 
31 
32 #include <vector>
33 #include <string>
34 #include <map>
35 
36 class DTGeometry;
37 class DTTrigGeomUtils;
38 class DTChamberId;
39 class DTRecSegment4D;
40 class DTLocalTrigger;
41 class L1MuDTChambPhDigi;
43 
44 typedef std::array<std::array<std::array<int, 13>, 5>, 6> DTArr3int;
45 typedef std::array<std::array<std::array<const L1MuDTChambPhDigi*, 15>, 5>, 6> DTArr3PhDigi;
46 typedef std::array<std::array<std::array<const L1MuDTChambThDigi*, 15>, 5>, 6> DTArr3ThDigi;
47 typedef std::array<std::array<std::array<const DTLocalTrigger*, 15>, 5>, 6> DTArr3LocalTrigger;
48 typedef std::array<std::array<std::array<int, 2>, 13>, 6> DTArr3mapInt;
49 
50 class DTLocalTriggerTask : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks> {
51  friend class DTMonitorModule;
52 
53 public:
56 
58  ~DTLocalTriggerTask() override;
59 
60 protected:
62  void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
63 
65 
66  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
68 
71 
74 
76  void setQLabels(MonitorElement* me, short int iaxis);
77  void setQLabelsTheta(MonitorElement* me, short int iaxis);
78 
80  void runTMAnalysis(std::vector<L1MuDTChambPhDigi> const* phTrigs, std::vector<L1MuDTChambThDigi> const* thTrigs);
81 
84 
86  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
87 
89  void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) override;
90  void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) final {}
91 
93  void triggerSource(const edm::Event& e);
94 
97 
98  const int wheelArrayShift = 3;
99 
100 private:
106 
107  bool useTM, useSEG;
109  int nevents;
110  bool tpMode;
112  bool doTMTheta;
114 
120  bool track_ok[6][5][15];
121 
126  std::map<uint32_t, std::map<std::string, MonitorElement*> > digiHistos;
127  std::map<int, std::map<std::string, MonitorElement*> > wheelHistos;
128 
130 
132 };
133 
134 #endif
135 
136 /* Local Variables: */
137 /* show-trailing-whitespace: t */
138 /* truncate-lines: t */
139 /* End: */
std::array< std::array< std::array< const L1MuDTChambPhDigi *, 15 >, 5 >, 6 > DTArr3PhDigi
std::array< std::array< std::array< int, 2 >, 13 >, 6 > DTArr3mapInt
friend class DTMonitorModule
std::array< std::array< std::array< const L1MuDTChambThDigi *, 15 >, 5 >, 6 > DTArr3ThDigi
std::array< std::array< std::array< int, 13 >, 5 >, 6 > DTArr3int
std::map< int, std::map< std::string, MonitorElement * > > wheelHistos
void runTMAnalysis(std::vector< L1MuDTChambPhDigi > const *phTrigs, std::vector< L1MuDTChambThDigi > const *thTrigs)
Run analysis on TM data.
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Beginrun.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Book the histograms.
void setQLabelsTheta(MonitorElement *me, short int iaxis)
MonitorElement * tm_IDDataErrorPlot
bool track_ok[6][5][15]
void runSegmentAnalysis(edm::Handle< DTRecSegment4DCollection > &segments4D)
Run analysis using DT 4D segments.
std::array< std::array< std::array< const DTLocalTrigger *, 15 >, 5 >, 6 > DTArr3LocalTrigger
edm::EDGetTokenT< DTRecSegment4DCollection > seg_Token_
edm::EDGetTokenT< L1MuDTChambPhContainer > tm_Token_
const DTGeometry * muonGeom
edm::EDGetTokenT< L1MuDTChambThContainer > tmTh_Token_
DTLocalTriggerTask(const edm::ParameterSet &ps)
Constructor.
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
edm::EDGetTokenT< DTLocalTriggerCollection > ros_Token_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
void bookHistos(DQMStore::IBooker &, const DTChamberId &dtCh, std::string folder, std::string histoTag)
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) final
void setQLabels(MonitorElement *me, short int iaxis)
Set Quality labels.
edm::ParameterSet parameters
DTTrigGeomUtils * trigGeomUtils
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) override
To reset the MEs.
void bookWheelHistos(DQMStore::IBooker &, int wh, std::string histoTag)
Book the histograms.
void triggerSource(const edm::Event &e)
Get the L1A source.
std::array< std::array< std::array< int, 13 >, 5 >, 6 > DTArr3int
std::string & topFolder()
Get the Top folder (different between Physics and TP and TM)
void bookBarrelHistos(DQMStore::IBooker &, std::string histoTag)
Book the histograms.
std::map< uint32_t, std::map< std::string, MonitorElement * > > digiHistos
~DTLocalTriggerTask() override
Destructor.
Definition: Run.h:45