CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/HLTriggerOffline/SUSYBSM/interface/PlotMakerL1.h

Go to the documentation of this file.
00001 #ifndef PlotMakerL1_h
00002 #define PlotMakerL1_h
00003 
00004 /*  \class PlotMaker
00005 *
00006 *  Class to produce some plots of Off-line variables in the TriggerValidation Code
00007 *
00008 *  Author: Massimiliano Chiorboli      Date: September 2007
00009 //         Maurizio Pierini
00010 //         Maria Spiropulu
00011 *
00012 */
00013 #include <memory>
00014 #include <string>
00015 #include <iostream>
00016 
00017 #include "FWCore/Framework/interface/Event.h"
00018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00019 #include "DataFormats/Common/interface/Handle.h"
00020 
00021 
00022 
00023 
00024 //l1extra
00025 #include "DataFormats/L1Trigger/interface/L1EmParticle.h"
00026 #include "DataFormats/L1Trigger/interface/L1EmParticleFwd.h"
00027 #include "DataFormats/L1Trigger/interface/L1EtMissParticle.h"
00028 #include "DataFormats/L1Trigger/interface/L1EtMissParticleFwd.h"
00029 #include "DataFormats/L1Trigger/interface/L1JetParticle.h"
00030 #include "DataFormats/L1Trigger/interface/L1JetParticleFwd.h"
00031 #include "DataFormats/L1Trigger/interface/L1MuonParticle.h"
00032 #include "DataFormats/L1Trigger/interface/L1MuonParticleFwd.h"
00033 
00034 //#include "DataFormats/L1Trigger/interface/L1ParticleMap.h"
00035 
00036 //included for DQM
00037 #include "DQMServices/Core/interface/DQMStore.h"
00038 #include "DQMServices/Core/interface/MonitorElement.h"
00039 #include "FWCore/ServiceRegistry/interface/Service.h"
00040 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00041 
00042 
00043 
00044 class PlotMakerL1 {
00045 
00046  public:
00047   PlotMakerL1(edm::ParameterSet objectList);
00048   virtual ~PlotMakerL1(){};
00049 
00050   void handleObjects(const edm::Event&);
00051   void fillPlots(const edm::Event&);
00052   void bookHistos(DQMStore *, std::vector<int>*, std::vector<int>*,std::vector<std::string>*,std::vector<std::string>*);
00053   //  void writeHistos();
00054 
00055 
00056  private:
00057 
00058   std::string dirname_;
00059 
00060   void setBits(std::vector<int>* l1bits, std::vector<int>* hltbits) {l1bits_=l1bits; hltbits_=hltbits;}
00061   double invariantMass(reco::Candidate*,reco::Candidate*);
00062   std::vector<int>* l1bits_;
00063   std::vector<int>* hltbits_;
00064     
00065     
00066 
00067   // Define the parameters
00068   std::string m_l1extra;
00069 
00070   l1extra::L1EmParticleCollection theL1EmIsoCollection, theL1EmNotIsoCollection;
00071   l1extra::L1MuonParticleCollection theL1MuonCollection;
00072   l1extra::L1JetParticleCollection theL1CentralJetCollection, theL1ForwardJetCollection, theL1TauJetCollection;
00073   l1extra::L1EtMissParticleCollection theL1METCollection;
00074 
00075   //histos
00076 
00077   //Jets
00078   MonitorElement* hL1CentralJetMult;
00079   MonitorElement* hL1ForwardJetMult;
00080   MonitorElement* hL1TauJetMult;
00081   std::vector<MonitorElement*> hL1CentralJetMultAfterL1;
00082   std::vector<MonitorElement*> hL1CentralJetMultAfterHLT;
00083   std::vector<MonitorElement*> hL1ForwardJetMultAfterL1;
00084   std::vector<MonitorElement*> hL1ForwardJetMultAfterHLT;
00085   std::vector<MonitorElement*> hL1TauJetMultAfterL1;
00086   std::vector<MonitorElement*> hL1TauJetMultAfterHLT;
00087   MonitorElement* hL1CentralJet1Pt;
00088   MonitorElement* hL1ForwardJet1Pt;
00089   MonitorElement* hL1TauJet1Pt;
00090   std::vector<MonitorElement*> hL1CentralJet1PtAfterL1;
00091   std::vector<MonitorElement*> hL1CentralJet1PtAfterHLT;
00092   std::vector<MonitorElement*> hL1ForwardJet1PtAfterL1;
00093   std::vector<MonitorElement*> hL1ForwardJet1PtAfterHLT;
00094   std::vector<MonitorElement*> hL1TauJet1PtAfterL1;
00095   std::vector<MonitorElement*> hL1TauJet1PtAfterHLT;
00096   MonitorElement* hL1CentralJet2Pt;
00097   MonitorElement* hL1ForwardJet2Pt;
00098   MonitorElement* hL1TauJet2Pt;
00099   std::vector<MonitorElement*> hL1CentralJet2PtAfterL1;
00100   std::vector<MonitorElement*> hL1CentralJet2PtAfterHLT;
00101   std::vector<MonitorElement*> hL1ForwardJet2PtAfterL1;
00102   std::vector<MonitorElement*> hL1ForwardJet2PtAfterHLT;
00103   std::vector<MonitorElement*> hL1TauJet2PtAfterL1;
00104   std::vector<MonitorElement*> hL1TauJet2PtAfterHLT;
00105   MonitorElement* hL1CentralJet1Eta;
00106   MonitorElement* hL1ForwardJet1Eta;
00107   MonitorElement* hL1TauJet1Eta;
00108   std::vector<MonitorElement*> hL1CentralJet1EtaAfterL1;
00109   std::vector<MonitorElement*> hL1CentralJet1EtaAfterHLT;
00110   std::vector<MonitorElement*> hL1ForwardJet1EtaAfterL1;
00111   std::vector<MonitorElement*> hL1ForwardJet1EtaAfterHLT;
00112   std::vector<MonitorElement*> hL1TauJet1EtaAfterL1;
00113   std::vector<MonitorElement*> hL1TauJet1EtaAfterHLT;
00114   MonitorElement* hL1CentralJet2Eta;
00115   MonitorElement* hL1ForwardJet2Eta;
00116   MonitorElement* hL1TauJet2Eta;
00117   std::vector<MonitorElement*> hL1CentralJet2EtaAfterL1;
00118   std::vector<MonitorElement*> hL1CentralJet2EtaAfterHLT;
00119   std::vector<MonitorElement*> hL1ForwardJet2EtaAfterL1;
00120   std::vector<MonitorElement*> hL1ForwardJet2EtaAfterHLT;
00121   std::vector<MonitorElement*> hL1TauJet2EtaAfterL1;
00122   std::vector<MonitorElement*> hL1TauJet2EtaAfterHLT;
00123   MonitorElement* hL1CentralJet1Phi;
00124   MonitorElement* hL1ForwardJet1Phi;
00125   MonitorElement* hL1TauJet1Phi;
00126   std::vector<MonitorElement*> hL1CentralJet1PhiAfterL1;
00127   std::vector<MonitorElement*> hL1CentralJet1PhiAfterHLT;
00128   std::vector<MonitorElement*> hL1ForwardJet1PhiAfterL1;
00129   std::vector<MonitorElement*> hL1ForwardJet1PhiAfterHLT;
00130   std::vector<MonitorElement*> hL1TauJet1PhiAfterL1;
00131   std::vector<MonitorElement*> hL1TauJet1PhiAfterHLT;
00132   MonitorElement* hL1CentralJet2Phi;
00133   MonitorElement* hL1ForwardJet2Phi;
00134   MonitorElement* hL1TauJet2Phi;
00135   std::vector<MonitorElement*> hL1CentralJet2PhiAfterL1;
00136   std::vector<MonitorElement*> hL1CentralJet2PhiAfterHLT;
00137   std::vector<MonitorElement*> hL1ForwardJet2PhiAfterL1;
00138   std::vector<MonitorElement*> hL1ForwardJet2PhiAfterHLT;
00139   std::vector<MonitorElement*> hL1TauJet2PhiAfterL1;
00140   std::vector<MonitorElement*> hL1TauJet2PhiAfterHLT;
00141 
00142 
00143 
00144   //Electrons
00145   MonitorElement* hL1EmIsoMult;
00146   MonitorElement* hL1EmNotIsoMult;
00147   std::vector<MonitorElement*> hL1EmIsoMultAfterL1;
00148   std::vector<MonitorElement*> hL1EmIsoMultAfterHLT;
00149   std::vector<MonitorElement*> hL1EmNotIsoMultAfterL1;
00150   std::vector<MonitorElement*> hL1EmNotIsoMultAfterHLT;
00151   MonitorElement* hL1EmIso1Pt;
00152   MonitorElement* hL1EmNotIso1Pt;
00153   std::vector<MonitorElement*> hL1EmIso1PtAfterL1;
00154   std::vector<MonitorElement*> hL1EmIso1PtAfterHLT;
00155   std::vector<MonitorElement*> hL1EmNotIso1PtAfterL1;
00156   std::vector<MonitorElement*> hL1EmNotIso1PtAfterHLT;
00157   MonitorElement* hL1EmIso2Pt;
00158   MonitorElement* hL1EmNotIso2Pt;
00159   std::vector<MonitorElement*> hL1EmIso2PtAfterL1;
00160   std::vector<MonitorElement*> hL1EmIso2PtAfterHLT;
00161   std::vector<MonitorElement*> hL1EmNotIso2PtAfterL1;
00162   std::vector<MonitorElement*> hL1EmNotIso2PtAfterHLT;
00163   MonitorElement* hL1EmIso1Eta;
00164   MonitorElement* hL1EmNotIso1Eta;
00165   std::vector<MonitorElement*> hL1EmIso1EtaAfterL1;
00166   std::vector<MonitorElement*> hL1EmIso1EtaAfterHLT;
00167   std::vector<MonitorElement*> hL1EmNotIso1EtaAfterL1;
00168   std::vector<MonitorElement*> hL1EmNotIso1EtaAfterHLT;
00169   MonitorElement* hL1EmIso2Eta;
00170   MonitorElement* hL1EmNotIso2Eta;
00171   std::vector<MonitorElement*> hL1EmIso2EtaAfterL1;
00172   std::vector<MonitorElement*> hL1EmIso2EtaAfterHLT;
00173   std::vector<MonitorElement*> hL1EmNotIso2EtaAfterL1;
00174   std::vector<MonitorElement*> hL1EmNotIso2EtaAfterHLT;
00175   MonitorElement* hL1EmIso1Phi;
00176   MonitorElement* hL1EmNotIso1Phi;
00177   std::vector<MonitorElement*> hL1EmIso1PhiAfterL1;
00178   std::vector<MonitorElement*> hL1EmIso1PhiAfterHLT;
00179   std::vector<MonitorElement*> hL1EmNotIso1PhiAfterL1;
00180   std::vector<MonitorElement*> hL1EmNotIso1PhiAfterHLT;
00181   MonitorElement* hL1EmIso2Phi;
00182   MonitorElement* hL1EmNotIso2Phi;
00183   std::vector<MonitorElement*> hL1EmIso2PhiAfterL1;
00184   std::vector<MonitorElement*> hL1EmIso2PhiAfterHLT;
00185   std::vector<MonitorElement*> hL1EmNotIso2PhiAfterL1;
00186   std::vector<MonitorElement*> hL1EmNotIso2PhiAfterHLT;
00187   
00188 
00189   //Muons
00190   MonitorElement* hL1MuonMult;
00191   std::vector<MonitorElement*> hL1MuonMultAfterL1;
00192   std::vector<MonitorElement*> hL1MuonMultAfterHLT;
00193   MonitorElement* hL1Muon1Pt;
00194   std::vector<MonitorElement*> hL1Muon1PtAfterL1;
00195   std::vector<MonitorElement*> hL1Muon1PtAfterHLT;
00196   MonitorElement* hL1Muon2Pt;
00197   std::vector<MonitorElement*> hL1Muon2PtAfterL1;
00198   std::vector<MonitorElement*> hL1Muon2PtAfterHLT;
00199   MonitorElement* hL1Muon1Eta;
00200   std::vector<MonitorElement*> hL1Muon1EtaAfterL1;
00201   std::vector<MonitorElement*> hL1Muon1EtaAfterHLT;
00202   MonitorElement* hL1Muon2Eta;
00203   std::vector<MonitorElement*> hL1Muon2EtaAfterL1;
00204   std::vector<MonitorElement*> hL1Muon2EtaAfterHLT;
00205   MonitorElement* hL1Muon1Phi;
00206   std::vector<MonitorElement*> hL1Muon1PhiAfterL1;
00207   std::vector<MonitorElement*> hL1Muon1PhiAfterHLT;
00208   MonitorElement* hL1Muon2Phi;
00209   std::vector<MonitorElement*> hL1Muon2PhiAfterL1;
00210   std::vector<MonitorElement*> hL1Muon2PhiAfterHLT;
00211 
00212 
00213   //MET
00214   MonitorElement* hL1MET;
00215   MonitorElement* hL1METphi;
00216   MonitorElement* hL1METx;
00217   MonitorElement* hL1METy;
00218   MonitorElement* hL1SumEt;
00219   MonitorElement* hL1METSignificance;
00220 
00221   std::vector<MonitorElement*> hL1METAfterL1;
00222   std::vector<MonitorElement*> hL1METAfterHLT;
00223   std::vector<MonitorElement*> hL1METphiAfterL1;
00224   std::vector<MonitorElement*> hL1METphiAfterHLT;
00225   std::vector<MonitorElement*> hL1METxAfterL1;
00226   std::vector<MonitorElement*> hL1METxAfterHLT;
00227   std::vector<MonitorElement*> hL1METyAfterL1;
00228   std::vector<MonitorElement*> hL1METyAfterHLT;
00229   std::vector<MonitorElement*> hL1SumEtAfterL1;
00230   std::vector<MonitorElement*> hL1SumEtAfterHLT;
00231   std::vector<MonitorElement*> hL1METSignificanceAfterL1;
00232   std::vector<MonitorElement*> hL1METSignificanceAfterHLT;
00233 
00234   std::string myHistoName;
00235   std::string myHistoTitle;
00236 
00237 };
00238 
00239 
00240 #endif