CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/DQM/DTMonitorModule/src/DTLocalTriggerTask.h

Go to the documentation of this file.
00001 #ifndef DTLocalTriggerTask_H
00002 #define DTLocalTriggerTask_H
00003 
00004 /*
00005  * \file DTLocalTriggerTask.h
00006  *
00007  * $Date: 2010/03/15 09:42:52 $
00008  * $Revision: 1.4 $
00009  * \author M. Zanetti - INFN Padova
00010  *
00011 */
00012 
00013 #include "FWCore/Framework/interface/Frameworkfwd.h"
00014 #include "FWCore/Framework/interface/EDAnalyzer.h"
00015 #include "DataFormats/Common/interface/Handle.h"
00016 #include "FWCore/Framework/interface/ESHandle.h"
00017 #include <FWCore/Framework/interface/LuminosityBlock.h>
00018 
00019 #include "FWCore/Framework/interface/Event.h"
00020 #include "FWCore/Framework/interface/MakerMacros.h"
00021 
00022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00023 
00024 #include "DQMServices/Core/interface/DQMStore.h"
00025 #include "DQMServices/Core/interface/MonitorElement.h"
00026 #include "FWCore/ServiceRegistry/interface/Service.h"
00027 
00028 #include "DataFormats/DTDigi/interface/DTLocalTriggerCollection.h"
00029 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
00030 
00031 #include <vector>
00032 #include <string>
00033 #include <map>
00034 
00035 class DTGeometry;
00036 class DTTrigGeomUtils;
00037 class DTChamberId;
00038 class DTRecSegment4D;
00039 class DTLocalTrigger;
00040 class L1MuDTChambPhDigi;
00041 class L1MuDTChambThDigi;
00042 
00043 
00044 class DTLocalTriggerTask: public edm::EDAnalyzer{
00045   
00046   friend class DTMonitorModule;
00047   
00048  public:
00049   
00051   DTLocalTriggerTask(const edm::ParameterSet& ps );
00052   
00054   virtual ~DTLocalTriggerTask();
00055   
00056  protected:
00057   
00058   // BeginJob
00059   void beginJob();
00060 
00062   void beginRun(const edm::Run& , const edm::EventSetup&);
00063 
00065   void bookHistos(const DTChamberId& dtCh, std::string folder, std::string histoTag );
00066 
00068   void bookWheelHistos(int wh, std::string histoTag );
00069 
00071   void bookBarrelHistos(std::string histoTag);
00072   
00074   void setQLabels(MonitorElement* me, short int iaxis);
00075 
00077   void runDCCAnalysis(std::vector<L1MuDTChambPhDigi>* phTrigs, std::vector<L1MuDTChambThDigi>* thTrigs);
00078 
00080   void runDDUAnalysis(edm::Handle<DTLocalTriggerCollection>& trigsDDU);
00081 
00083   void runSegmentAnalysis(edm::Handle<DTRecSegment4DCollection>& segments4D);
00084 
00086   void runDDUvsDCCAnalysis(std::string& trigsrc);
00087 
00089   void analyze(const edm::Event& e, const edm::EventSetup& c);
00090 
00092   void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) ;
00093   
00095   void endJob(void);
00096   
00098   void triggerSource(const edm::Event& e);
00099 
00101   std::string& topFolder(bool isDCC) { return isDCC ? baseFolderDCC : baseFolderDDU; }
00102   
00103  private:
00104   
00105   bool useDCC, useDDU, useSEG;
00106   std::string trigsrc;
00107   int nevents;
00108   bool tpMode;
00109   std::string baseFolderDCC;
00110   std::string baseFolderDDU;
00111   bool doDCCTheta;
00112   bool detailedAnalysis;
00113   
00114  
00115   int phcode_best[6][5][13];
00116   int dduphcode_best[6][5][13];
00117   int thcode_best[6][5][13];  
00118   int dduthcode_best[6][5][13];
00119   int mapDTTF[6][13][2];
00120   const L1MuDTChambPhDigi* iphbest[6][5][13];
00121   const DTLocalTrigger*    iphbestddu[6][5][13];
00122   const L1MuDTChambThDigi* ithbest[6][5][13];
00123   bool track_ok[6][5][15];
00124 
00125   DQMStore* dbe;
00126   edm::ParameterSet parameters;
00127   edm::ESHandle<DTGeometry> muonGeom;
00128   DTTrigGeomUtils* trigGeomUtils;
00129   std::map<uint32_t, std::map<std::string, MonitorElement*> > digiHistos;
00130   std::map<int, std::map<std::string, MonitorElement*> > wheelHistos;
00131   
00132   MonitorElement* dcc_IDDataErrorPlot;
00133 };
00134 
00135 #endif