CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/HLTriggerOffline/Higgs/interface/HLTHiggsTruth.h

Go to the documentation of this file.
00001 #ifndef HLTHIGGSTRUTH_H
00002 #define HLTHIGGSTRUTH_H
00003 
00004 #include "TH1.h"
00005 #include "TH2.h"
00006 #include "TFile.h"
00007 #include "TNamed.h"
00008 #include <vector>
00009 #include <map>
00010 #include "TROOT.h"
00011 #include "TChain.h"
00012 #include "TVector3.h"
00013 #include "TLorentzVector.h"
00014 
00015 
00016 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00017 #include <DataFormats/HepMCCandidate/interface/GenParticle.h>
00018 
00019 #include "DataFormats/METReco/interface/CaloMETCollection.h"
00020 
00021 #include <DataFormats/METReco/interface/CaloMET.h> 
00022 #include <DataFormats/METReco/interface/CaloMETFwd.h> 
00023 #include <DataFormats/METReco/interface/MET.h> 
00024 #include <DataFormats/METReco/interface/METFwd.h> 
00025 
00026 
00027 
00028 #include "DataFormats/MuonReco/interface/Muon.h"
00029 #include "DataFormats/MuonReco/interface/MuonFwd.h"
00030 
00031 
00032 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
00033 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
00034 
00035 #include "DataFormats/EgammaCandidates/interface/Photon.h"
00036 #include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"
00037 
00038 
00039 #include "DataFormats/EgammaCandidates/interface/Electron.h"
00040 #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h"
00041 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
00042 #include "DataFormats/EgammaReco/interface/BasicCluster.h"
00043 #include "DataFormats/EgammaReco/interface/BasicClusterFwd.h"
00044 
00045 #include "DataFormats/TrackReco/interface/Track.h"
00046 
00047 
00048 typedef std::vector<std::string> MyStrings;
00049 
00056 class HLTHiggsTruth {
00057 public:
00058   HLTHiggsTruth(); 
00059  
00060  
00061 
00062   void setup(const edm::ParameterSet& pSet, TTree* tree);
00063 
00068  // void analyzeHWW2l(const reco::CandidateView& mctruth,const reco::MuonCollection& muonHandle, const GsfElectronCollection& electronHandle, TTree* tree);
00069   
00070    void analyzeHWW2l(const reco::CandidateView& mctruth,const reco::CaloMETCollection&
00071    caloMet, const reco::TrackCollection& Tracks, const reco::MuonCollection& muonHandle, const reco::GsfElectronCollection& electronHandle, TTree* tree);
00072   
00073   
00074   void analyzeHZZ4l(const reco::CandidateView& mctruth,const reco::MuonCollection& muonHandle, const reco::GsfElectronCollection& electronHandle, TTree* tree);
00075   void analyzeHgg(const reco::CandidateView& mctruth,const reco::PhotonCollection& photonHandle,TTree* tree); 
00076   void analyzeH2tau(const reco::CandidateView& mctruth,TTree* tree);  
00077   void analyzeHtaunu(const reco::CandidateView& mctruth,TTree* tree);  
00078   void analyzeA2mu(const reco::CandidateView& mctruth,TTree* tree);  
00079   void analyzeHinv(const reco::CandidateView& mctruth,TTree* tree);
00080   
00081   /* study leptonic tau decays*/
00082   void LeptonicTauDecay(const reco::Candidate& tau, bool& elecdec, bool&
00083   muondec);  
00084      
00085 
00086   inline bool decision() const {return isvisible;};
00087   
00088  /* inline bool MuonChannel() const {return isMuonDecay;};  // muons in final state
00089   inline bool ElecChannel() const {return isElecDecay;};  // electrons in final state
00090   inline bool ElecMuchannel() const {return isEMuDecay;};
00091  
00092   
00093   inline bool MuonChannel_acc() const {return isMuonDecay_acc;}; //within acceptance cuts
00094   inline bool ElecChannel_acc() const {return isElecDecay_acc;};
00095   inline bool ElecMuChannel_acc() const {return isEMuDecay_acc;}; */
00096   inline bool PhotonChannel_acc() const {return isPhotonDecay_acc;};
00097   inline bool TauChannel_acc() const {return isTauDecay_acc;};
00098   
00099   
00100   inline bool MuonChannel_recoacc() const {return isMuonDecay_recoacc;}; //within acceptance +reco cuts
00101   inline bool ElecChannel_recoacc() const {return isElecDecay_recoacc;};
00102   inline bool ElecMuChannel_recoacc() const {return isEMuDecay_recoacc;}; 
00103   inline bool PhotonChannel_recoacc() const {return isPhotonDecay_recoacc;};
00104   inline bool TauChannel_recoacc() const {return isTauDecay_recoacc;};
00105   inline bool decision_reco() const {return isvisible_reco;};
00106   
00107   
00108   inline double ptMuon1() const {return ptMuMax;};
00109   inline double ptMuon2() const {return ptMuMin;};
00110   inline double etaMuon1() const {return etaMuMax;};
00111   inline double etaMuon2() const {return etaMuMin;};
00112   inline double ptElectron1() const {return ptElMax;};
00113   inline double ptElectron2() const {return ptElMin;};
00114   inline double etaElectron1() const {return etaElMax;};
00115   inline double etaElectron2() const {return etaElMin;};
00116 /*  inline double ptPhoton1() const {return ptPhMax;};
00117   inline double ptPhoton2() const {return ptPhMin;};
00118   inline double etaPhoton1() const {return etaPhMax;};
00119   inline double etaPhoton2() const {return etaPhMin;};*/
00120   inline double ptTau1() const {return ptTauMax;};
00121   inline double etaTau1() const {return etaTauMax;};
00122   
00123  /*  inline int evtype() const {return ev_type;};*/
00124   
00125  /* inline std::vector<double> ptgen_() const {return ptgen;};
00126   inline std::vector<double> ptreco_() const {return ptreco;};
00127  
00128  inline int ngenpart_() const {return ngenpart;};
00129  inline int ngenph_() const{return ngenph;};*/
00130  
00131  
00132  inline reco::Photon photon1_() const {return Photon1;};
00133  inline reco::Photon photon2_() const {return Photon2;};
00134  
00135  inline reco::Muon muon1_() const {return Muon1;};
00136  inline reco::Muon muon2_() const {return Muon2;};
00137  inline reco::Muon muon3_() const {return Muon3;};
00138  inline reco::Muon muon4_() const {return Muon4;};
00139  
00140 /* inline reco::Particle genmuon1_() const {return genMuon1;};
00141  inline reco::Particle genelectron1_() const {return genElectron1;};*/
00142  
00143  inline reco::GsfElectron electron1_() const {return Electron1;};
00144  inline reco::GsfElectron electron2_() const {return Electron2;};
00145  inline reco::GsfElectron electron3_() const {return Electron3;};
00146  inline reco::GsfElectron electron4_() const {return Electron4;};
00147  
00148  inline double met_hwwdimu() const {return met_hwwdimu_ ;};
00149  inline double met_hwwdiel() const {return met_hwwdiel_ ;};
00150  inline double met_hwwemu()  const {return met_hwwemu_ ;};
00151  
00152 
00153 private:
00154 
00155   // Tree variables
00156 /*  float *mcpid, *mcvx, *mcvy, *mcvz, *mcpt;
00157 //  bool isvisible_WW, isvisible_ZZ, isvisible_gg, isvisible_2tau, isvisible_taunu,
00158 //       isvisible_2mu, isvisible_inv,isvisible;*/
00159   bool isvisible;
00160 /*  bool isMuonDecay;
00161   bool isElecDecay;
00162   bool isEMuDecay;
00163   bool isMuonDecay_acc;
00164   bool isElecDecay_acc;
00165   bool isEMuDecay_acc;
00166   bool isPhotonDecay;*/
00167   bool isPhotonDecay_acc;
00168   bool isTauDecay;
00169   bool isTauDecay_acc;
00170   
00171   
00172   bool isMuonDecay_recoacc;
00173   bool isElecDecay_recoacc;
00174   bool isEMuDecay_recoacc; 
00175   bool isPhotonDecay_recoacc;
00176   bool isTauDecay_recoacc;
00177   
00178   bool isvisible_reco;
00179   
00180 /*  int ev_type; */
00181   
00182   
00183   double ptMuMax, ptMuMin;
00184   double ptElMax, ptElMin;
00185 /*  double ptPhMax, ptPhMin;*/
00186   double ptTauMax;
00187   double etaMuMax, etaMuMin;
00188   double etaElMax, etaElMin;
00189   double etaPhMax, etaPhMin;
00190   double etaTauMax;
00191  
00192   
00193   double PtElFromTau, PtMuFromTau;
00194   double EtaElFromTau, EtaMuFromTau;
00195   
00196   double met_hwwdimu_;
00197   double met_hwwdiel_;
00198   double met_hwwemu_;
00199   
00200  /* std::vector<double> ptgen ; // etagen;
00201   std::vector<double> ptreco;// etareco;*/
00202   
00203    reco::Photon Photon1;
00204    reco::Photon Photon2;
00205    
00206    reco::Muon Muon1;
00207    reco::Muon Muon2;
00208    reco::Muon Muon3;
00209    reco::Muon Muon4;
00210    
00211    reco::GsfElectron Electron1;
00212    reco::GsfElectron Electron2;
00213    reco::GsfElectron Electron3;
00214    reco::GsfElectron Electron4;
00215    
00216  /*  reco::Particle genMuon1;
00217    reco::Particle genElectron1;
00218   
00219   
00220  // double ptgen,ptreco;
00221   int n_gen, n_match;
00222   int ngenpart, ngenph; */
00223   
00224   // input variables
00225   bool _Monte,_Debug;
00226 
00227 };
00228 
00229 #endif