CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/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: 2012/09/24 16:08:07 $
00008  * $Revision: 1.5 $
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 #include "FWCore/Utilities/interface/InputTag.h"
00024 
00025 #include "DQMServices/Core/interface/DQMStore.h"
00026 #include "DQMServices/Core/interface/MonitorElement.h"
00027 #include "FWCore/ServiceRegistry/interface/Service.h"
00028 
00029 #include "DataFormats/DTDigi/interface/DTLocalTriggerCollection.h"
00030 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
00031 
00032 #include <vector>
00033 #include <string>
00034 #include <map>
00035 
00036 class DTGeometry;
00037 class DTTrigGeomUtils;
00038 class DTChamberId;
00039 class DTRecSegment4D;
00040 class DTLocalTrigger;
00041 class L1MuDTChambPhDigi;
00042 class L1MuDTChambThDigi;
00043 
00044 
00045 class DTLocalTriggerTask: public edm::EDAnalyzer{
00046   
00047   friend class DTMonitorModule;
00048   
00049  public:
00050   
00052   DTLocalTriggerTask(const edm::ParameterSet& ps );
00053   
00055   virtual ~DTLocalTriggerTask();
00056   
00057  protected:
00058   
00059   // BeginJob
00060   void beginJob();
00061 
00063   void beginRun(const edm::Run& , const edm::EventSetup&);
00064 
00066   void bookHistos(const DTChamberId& dtCh, std::string folder, std::string histoTag );
00067 
00069   void bookWheelHistos(int wh, std::string histoTag );
00070 
00072   void bookBarrelHistos(std::string histoTag);
00073   
00075   void setQLabels(MonitorElement* me, short int iaxis);
00076 
00078   void runDCCAnalysis(std::vector<L1MuDTChambPhDigi>* phTrigs, std::vector<L1MuDTChambThDigi>* thTrigs);
00079 
00081   void runDDUAnalysis(edm::Handle<DTLocalTriggerCollection>& trigsDDU);
00082 
00084   void runSegmentAnalysis(edm::Handle<DTRecSegment4DCollection>& segments4D);
00085 
00087   void runDDUvsDCCAnalysis(std::string& trigsrc);
00088 
00090   void analyze(const edm::Event& e, const edm::EventSetup& c);
00091 
00093   void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) ;
00094   
00096   void endJob(void);
00097   
00099   void triggerSource(const edm::Event& e);
00100 
00102   std::string& topFolder(bool isDCC) { return isDCC ? baseFolderDCC : baseFolderDDU; }
00103   
00104  private:
00105   
00106   bool useDCC, useDDU, useSEG;
00107   std::string trigsrc;
00108   int nevents;
00109   bool tpMode;
00110   std::string baseFolderDCC;
00111   std::string baseFolderDDU;
00112   bool doDCCTheta;
00113   bool detailedAnalysis;
00114   
00115  
00116   int phcode_best[6][5][13];
00117   int dduphcode_best[6][5][13];
00118   int thcode_best[6][5][13];  
00119   int dduthcode_best[6][5][13];
00120   int mapDTTF[6][13][2];
00121   const L1MuDTChambPhDigi* iphbest[6][5][13];
00122   const DTLocalTrigger*    iphbestddu[6][5][13];
00123   const L1MuDTChambThDigi* ithbest[6][5][13];
00124   bool track_ok[6][5][15];
00125 
00126   DQMStore* dbe;
00127   edm::ParameterSet parameters;
00128   edm::ESHandle<DTGeometry> muonGeom;
00129   DTTrigGeomUtils* trigGeomUtils;
00130   std::map<uint32_t, std::map<std::string, MonitorElement*> > digiHistos;
00131   std::map<int, std::map<std::string, MonitorElement*> > wheelHistos;
00132   
00133   MonitorElement* dcc_IDDataErrorPlot;
00134 
00135   bool isLocalRun;
00136   edm::InputTag ltcDigiCollectionTag;
00137 };
00138 
00139 #endif