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 
16 
19 
22 
26 
28 
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 
54 
55  friend class DTMonitorModule;
56 
57  public:
58 
61 
63  virtual ~DTLocalTriggerTask();
64 
65  protected:
66 
68  void dqmBeginRun(const edm::Run& , const edm::EventSetup&) override;
69 
71 
72  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
73  void bookHistos(DQMStore::IBooker &, const DTChamberId& dtCh, std::string folder, std::string histoTag );
74 
76  void bookWheelHistos(DQMStore::IBooker &, int wh, std::string histoTag );
77 
80 
82  void setQLabels(MonitorElement* me, short int iaxis);
83  void setQLabelsTheta(MonitorElement* me, short int iaxis);
84 
86  void runTMAnalysis(std::vector<L1MuDTChambPhDigi> const* phTrigs, std::vector<L1MuDTChambThDigi> const* thTrigs);
87 
90 
93 
96 
98  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
99 
101  void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) override ;
102 
104  void triggerSource(const edm::Event& e);
105 
107  std::string& topFolder(bool isTM) { return isTM ? baseFolderTM : baseFolderDDU; }
108 
109  const int wheelArrayShift = 3;
110 
111  private:
112 
118 
121  int nevents;
122  bool tpMode;
125  bool doTMTheta;
127 
128 
137  bool track_ok[6][5][15];
138 
142  std::map<uint32_t, std::map<std::string, MonitorElement*> > digiHistos;
143  std::map<int, std::map<std::string, MonitorElement*> > wheelHistos;
144 
146 
148 };
149 
150 #endif
151 
152 /* Local Variables: */
153 /* show-trailing-whitespace: t */
154 /* truncate-lines: t */
155 /* End: */
friend class DTMonitorModule
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]
std::string & topFolder(bool isTM)
Get the Top folder (different between Physics and TP and TM/DDU)
void runSegmentAnalysis(edm::Handle< DTRecSegment4DCollection > &segments4D)
Run analysis using DT 4D segments.
edm::EDGetTokenT< DTRecSegment4DCollection > seg_Token_
edm::EDGetTokenT< L1MuDTChambPhContainer > tm_Token_
DTArr3LocalTrigger iphbestddu
edm::EDGetTokenT< L1MuDTChambThContainer > tmTh_Token_
DTLocalTriggerTask(const edm::ParameterSet &ps)
Constructor.
std::array< std::array< std::array< const L1MuDTChambPhDigi *, 15 >, 5 >,6 > DTArr3PhDigi
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
edm::EDGetTokenT< DTLocalTriggerCollection > ros_Token_
edm::ESHandle< DTGeometry > muonGeom
void bookHistos(DQMStore::IBooker &, const DTChamberId &dtCh, std::string folder, std::string histoTag)
std::array< std::array< std::array< const DTLocalTrigger *, 15 >, 5 >,6 > DTArr3LocalTrigger
void runDDUvsTMAnalysis(std::string &trigsrc)
Run analysis on ROS data.
std::array< std::array< std::array< int, 2 >, 13 >,6 > DTArr3mapInt
void setQLabels(MonitorElement *me, short int iaxis)
Set Quality labels.
edm::ParameterSet parameters
DTTrigGeomUtils * trigGeomUtils
std::array< std::array< std::array< int, 13 >, 5 >,6 > DTArr3int
virtual ~DTLocalTriggerTask()
Destructor.
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< const L1MuDTChambThDigi *, 15 >, 5 >,6 > DTArr3ThDigi
void bookBarrelHistos(DQMStore::IBooker &, std::string histoTag)
Book the histograms.
std::map< uint32_t, std::map< std::string, MonitorElement * > > digiHistos
Definition: Run.h:42
void runDDUAnalysis(edm::Handle< DTLocalTriggerCollection > &trigsDDU)
Run analysis on ROS data.