CMS 3D CMS Logo

HLTTauL1DQMOfflineSource.h

Go to the documentation of this file.
00001 // Original Author:  Chi Nhan Nguyen
00002 //         Created:  Fri Feb 22 09:20:55 CST 2008
00003 
00004 // system include files
00005 #include <memory>
00006 #include <vector>
00007 #include <string>
00008 #include <iostream>
00009 #include <iomanip>
00010 
00011 // user include files
00012 #include "FWCore/Framework/interface/Frameworkfwd.h"
00013 #include "FWCore/Framework/interface/EDAnalyzer.h"
00014 #include "FWCore/Framework/interface/Event.h"
00015 #include "FWCore/Framework/interface/MakerMacros.h"
00016 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00017 
00018 // L1 Trigger data formats
00019 #include "DataFormats/L1Trigger/interface/L1EmParticle.h"
00020 #include "DataFormats/L1Trigger/interface/L1EmParticleFwd.h"
00021 #include "DataFormats/L1Trigger/interface/L1JetParticle.h"
00022 #include "DataFormats/L1Trigger/interface/L1JetParticleFwd.h"
00023 #include "DataFormats/L1Trigger/interface/L1MuonParticle.h"
00024 #include "DataFormats/L1Trigger/interface/L1MuonParticleFwd.h"
00025 #include "DataFormats/L1Trigger/interface/L1EtMissParticle.h"
00026 #include "DataFormats/L1Trigger/interface/L1EtMissParticleFwd.h"
00027 #include "DataFormats/L1Trigger/interface/L1ParticleMap.h"
00028 #include "DataFormats/L1Trigger/interface/L1ParticleMapFwd.h"
00029 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h"
00030 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
00031 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerObjectMapRecord.h"
00032 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerObjectMapFwd.h"
00033 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerObjectMap.h"
00034 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTExtendedCand.h"
00035 
00036 #include "FWCore/ServiceRegistry/interface/Service.h" // Framework services
00037 #include "DQMServices/Core/interface/DQMStore.h"
00038 #include "DQMServices/Core/interface/MonitorElement.h"
00039 
00040 //
00041 typedef math::XYZTLorentzVectorD   LV;
00042 typedef std::vector<LV>            LVColl;
00043 
00044 
00045 class HLTTauL1DQMOfflineSource : public edm::EDAnalyzer {
00046    public:
00047       explicit HLTTauL1DQMOfflineSource(const edm::ParameterSet&);
00048       ~HLTTauL1DQMOfflineSource();
00049 
00050 
00051    private:
00052       virtual void beginJob(const edm::EventSetup&) ;
00053       virtual void analyze(const edm::Event&, const edm::EventSetup&);
00054       virtual void endJob() ;
00055 
00056 
00057   void getL1extraObjects(const edm::Event&);
00058   void evalL1extraDecisions();
00059   void fillL1Histograms();
00060   void fillL1MCTauMatchedHists(const edm::Event& iEvent);
00061 
00062   //  void convertToIntegratedEff(MonitorElement*,double);
00063   
00064   // ----------member data ---------------------------
00065 
00066   edm::InputTag     _refTauColl; 
00067   edm::InputTag     _refElecColl; 
00068   edm::InputTag     _refMuonColl; 
00069   
00070   edm::InputTag _L1extraTauJetSource;
00071   edm::InputTag _L1extraCenJetSource;
00072   edm::InputTag _L1extraForJetSource;
00073   edm::InputTag _L1extraMuonSource;
00074   edm::InputTag _L1extraMETSource;
00075   edm::InputTag _L1extraNonIsoEgammaSource;
00076   edm::InputTag _L1extraIsoEgammaSource;
00077 
00078   // Thresholds of L1 menu
00079   double _SingleTauThreshold;
00080   double _DoubleTauThreshold;
00081   std::vector<double> _SingleTauMETThresholds;
00082   std::vector<double> _MuTauThresholds;
00083   std::vector<double> _IsoEgTauThresholds;
00084 
00085   // Cuts
00086   double _L1MCTauMinDeltaR;
00087   double _MCTauHadMinEt;
00088   double _MCTauHadMaxAbsEta;
00089 
00090   double _L1MCElecMinDeltaR;
00091   double _MCElecMinEt;
00092   double _MCElecMaxAbsEta;
00093 
00094   double _L1MCMuonMinDeltaR;
00095   double _MCMuonMinEt;
00096   double _MCMuonMaxAbsEta;
00097 
00098   //Output file
00099   std::string _triggerTag;//tag for dqm flder
00100   std::string _outFile;
00101 
00102   // L1extra Objects
00103   LVColl _L1Taus;
00104   LVColl _L1CenJets;
00105   LVColl _L1ForJets;
00106   LVColl _L1NonIsoEgammas;
00107   LVColl _L1IsoEgammas;
00108   LVColl _L1METs;
00109   LVColl _L1Muons;
00110   std::vector<int> _L1MuQuals;
00111   
00112   // histograms
00113   MonitorElement* h_L1TauEt;  
00114   MonitorElement* h_L1TauEta;
00115   MonitorElement* h_L1TauPhi;
00116 
00117   MonitorElement* h_L1Tau1Et;
00118   MonitorElement* h_L1Tau1Eta;
00119   MonitorElement* h_L1Tau1Phi;
00120 
00121   MonitorElement* h_L1Tau2Et;
00122   MonitorElement* h_L1Tau2Eta;
00123   MonitorElement* h_L1Tau2Phi;
00124 
00125   MonitorElement* h_L1IsoEg1Et;  
00126   MonitorElement* h_L1IsoEg1Eta;
00127   MonitorElement* h_L1IsoEg1Phi;
00128 
00129   MonitorElement* h_L1Muon1Et;  
00130   MonitorElement* h_L1Muon1Eta;
00131   MonitorElement* h_L1Muon1Phi;
00132 
00133   MonitorElement* h_L1Met;  
00134   MonitorElement* h_L1MetEta;  
00135   MonitorElement* h_L1MetPhi;  
00136 
00137   // L1 response
00138   MonitorElement* h_L1MCTauDeltaR;
00139   MonitorElement* h_L1minusMCTauEt;
00140   MonitorElement* h_L1minusMCoverMCTauEt;
00141 
00142   // MC w/o cuts
00143   MonitorElement* h_GenTauHadEt;
00144   MonitorElement* h_GenTauHadEta;
00145   MonitorElement* h_GenTauHadPhi;
00146 
00147   MonitorElement* h_GenTauElecEt;
00148   MonitorElement* h_GenTauElecEta;
00149   MonitorElement* h_GenTauElecPhi;
00150 
00151   MonitorElement* h_GenTauMuonEt;
00152   MonitorElement* h_GenTauMuonEta;
00153   MonitorElement* h_GenTauMuonPhi;
00154 
00155   // Tau -> Electron
00156   // MC matching efficiencies
00157   //  MonitorElement* h_EffMCTauElecEt;
00158   //MonitorElement* h_EffMCTauElecEta;
00159   //MonitorElement* h_EffMCTauElecPhi;
00160   // Numerators
00161   MonitorElement* h_L1MCMatchedTauElecEt;
00162   MonitorElement* h_L1MCMatchedTauElecEta;
00163   MonitorElement* h_L1MCMatchedTauElecPhi;
00164   // Denominators
00165   MonitorElement* h_MCTauElecEt;
00166   MonitorElement* h_MCTauElecEta;
00167   MonitorElement* h_MCTauElecPhi;
00168 
00169   // Tau -> Muon
00170   // MC matching efficiencies
00171   //MonitorElement* h_EffMCTauMuonEt;
00172   //MonitorElement* h_EffMCTauMuonEta;
00173   //MonitorElement* h_EffMCTauMuonPhi;
00174   // Numerators
00175   MonitorElement* h_L1MCMatchedTauMuonEt;
00176   MonitorElement* h_L1MCMatchedTauMuonEta;
00177   MonitorElement* h_L1MCMatchedTauMuonPhi;
00178   // Denominators
00179   MonitorElement* h_MCTauMuonEt;
00180   MonitorElement* h_MCTauMuonEta;
00181   MonitorElement* h_MCTauMuonPhi;
00182 
00183   // Tau -> Hadr
00184   // MC matching efficiencies
00185   //MonitorElement* h_EffMCTauEt;
00186   //MonitorElement* h_EffMCTauEta;
00187   //MonitorElement* h_EffMCTauPhi;
00188   // Numerators
00189   MonitorElement* h_L1MCMatchedTauEt;
00190   MonitorElement* h_L1MCMatchedTauEta;
00191   MonitorElement* h_L1MCMatchedTauPhi;
00192   // Denominators
00193   MonitorElement* h_MCTauHadEt;
00194   MonitorElement* h_MCTauHadEta;
00195   MonitorElement* h_MCTauHadPhi;
00196   
00197   // Event based efficiencies as a function of thresholds
00198   MonitorElement* h_L1SingleTauEffEt;
00199   MonitorElement* h_L1DoubleTauEffEt;
00200   MonitorElement* h_L1SingleTauEffMCMatchEt;
00201   MonitorElement* h_L1DoubleTauEffMCMatchEt;
00202 
00203   MonitorElement* h_L1TauMETfixEffEt;
00204   MonitorElement* h_L1TauMETfixEffMCMatchEt;
00205   MonitorElement* h_L1METTaufixEffEt;
00206   MonitorElement* h_L1METTaufixEffMCMatchEt;
00207 
00208   MonitorElement* h_L1TauIsoEgfixEffEt;
00209   MonitorElement* h_L1TauIsoEgfixEffMCMatchEt;
00210   MonitorElement* h_L1IsoEgTaufixEffEt;
00211   MonitorElement* h_L1IsoEgTaufixEffMCMatchEt;
00212 
00213   MonitorElement* h_L1TauMuonfixEffEt;
00214   MonitorElement* h_L1TauMuonfixEffMCMatchEt;
00215   MonitorElement* h_L1MuonTaufixEffEt;
00216   MonitorElement* h_L1MuonTaufixEffMCMatchEt;
00217 
00218 
00219   //Counter Histogram
00220   MonitorElement* h_nfidCounter;
00221 
00222   // Counters for event based efficiencies
00223   int _nEvents; // all events processed
00224 
00225   int _nfidEventsGenTauHad; 
00226   int _nfidEventsDoubleGenTauHads; 
00227   int _nfidEventsGenTauMuonTauHad; 
00228   int _nfidEventsGenTauElecTauHad;   
00229 
00230 };
00231 
00232 //
00233 

Generated on Tue Jun 9 17:34:09 2009 for CMSSW by  doxygen 1.5.4