CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
16 
19 
22 
25 
27 
34 
35 #include <vector>
36 #include <string>
37 #include <map>
38 
39 class DTGeometry;
40 class DTTrigGeomUtils;
41 class DTChamberId;
42 class DTRecSegment4D;
43 class DTLocalTrigger;
44 class L1MuDTChambPhDigi;
46 
47 typedef std::array<std::array<std::array<int, 13>, 5>, 6> DTArr3int;
48 typedef std::array<std::array<std::array<const L1MuDTChambPhDigi*, 15>, 5>, 6> DTArr3PhDigi;
49 typedef std::array<std::array<std::array<const L1MuDTChambThDigi*, 15>, 5>, 6> DTArr3ThDigi;
50 typedef std::array<std::array<std::array<const DTLocalTrigger*, 15>, 5>, 6> DTArr3LocalTrigger;
51 typedef std::array<std::array<std::array<int, 2>, 13>, 6> DTArr3mapInt;
52 
53 class DTLocalTriggerTask : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks> {
54  friend class DTMonitorModule;
55 
56 public:
59 
61  ~DTLocalTriggerTask() override;
62 
63 protected:
65  void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
66 
68 
69  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
71 
73  void bookWheelHistos(DQMStore::IBooker&, int wh, std::string histoTag);
74 
77 
79  void setQLabels(MonitorElement* me, short int iaxis);
80  void setQLabelsTheta(MonitorElement* me, short int iaxis);
81 
83  void runTMAnalysis(std::vector<L1MuDTChambPhDigi> const* phTrigs, std::vector<L1MuDTChambThDigi> const* thTrigs);
84 
87 
89  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
90 
92  void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) override;
93  void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) final {}
94 
96  void triggerSource(const edm::Event& e);
97 
100 
101  const int wheelArrayShift = 3;
102 
103 private:
109 
110  bool useTM, useSEG;
112  int nevents;
113  bool tpMode;
115  bool doTMTheta;
117 
123  bool track_ok[6][5][15];
124 
129  std::map<uint32_t, std::map<std::string, MonitorElement*> > digiHistos;
130  std::map<int, std::map<std::string, MonitorElement*> > wheelHistos;
131 
133 
135 };
136 
137 #endif
138 
139 /* Local Variables: */
140 /* show-trailing-whitespace: t */
141 /* truncate-lines: t */
142 /* End: */
std::array< std::array< std::array< const L1MuDTChambPhDigi *, 15 >, 5 >, 6 > DTArr3PhDigi
std::array< std::array< std::array< int, 2 >, 13 >, 6 > DTArr3mapInt
const edm::EventSetup & c
friend class DTMonitorModule
std::array< std::array< std::array< const L1MuDTChambThDigi *, 15 >, 5 >, 6 > DTArr3ThDigi
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