test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
GammaJetAnalysis Class Reference

#include <GammaJetAnalysis.h>

Inheritance diagram for GammaJetAnalysis:
edm::EDAnalyzer edm::EDConsumerBase

Classes

struct  PFJetCorretPairComp
 
struct  PhotonPairComp
 

Public Member Functions

 GammaJetAnalysis (const edm::ParameterSet &)
 
float pfEcalIso (const reco::Photon *localPho1, edm::Handle< reco::PFCandidateCollection > pfHandle, float dRmax, float dRVetoBarrel, float dRVetoEndcap, float etaStripBarrel, float etaStripEndcap, float energyBarrel, float energyEndcap, reco::PFCandidate::ParticleType pfToUse)
 
float pfHcalIso (const reco::Photon *localPho, edm::Handle< reco::PFCandidateCollection > pfHandle, float dRmax, float dRveto, reco::PFCandidate::ParticleType pfToUse)
 
std::vector< float > pfTkIsoWithVertex (const reco::Photon *localPho1, edm::Handle< reco::PFCandidateCollection > pfHandle, edm::Handle< reco::VertexCollection > vtxHandle, float dRmax, float dRvetoBarrel, float dRvetoEndcap, float ptMin, float dzMax, float dxyMax, reco::PFCandidate::ParticleType pfToUse)
 
 ~GammaJetAnalysis ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
void beginRun (const edm::Run &, const edm::EventSetup &)
 
template<class JetPair_type >
float calc_dPhi (const PhotonPair &pho, const JetPair_type &jet)
 
void clear_leadingPfJetVars ()
 
void copy_leadingPfJetVars_to_pfJet2 ()
 
double deltaR (const reco::Jet *j1, const reco::Jet *j2)
 
double deltaR (const double eta1, const double phi1, const double eta2, const double phi2)
 
template<class Jet_type >
double deltaR (const PhotonPair &photon, const Jet_type *jet)
 
virtual void endJob ()
 
int getEtaPhi (const DetId id)
 
int getEtaPhi (const HcalDetId id)
 

Private Attributes

bool allowNoPhoton_
 
TTree * calo_tree_
 
int debug_
 
unsigned int debugEvent
 
int debugHLTTrigNames
 
bool doGenJets_
 
bool doPFJets_
 
int eventNumber_
 
float eventPtHat_
 
float eventWeight_
 
std::string genEventInfoName_
 
std::string genJetCollName_
 
std::string genParticleCollName_
 
std::string hbheRecHitName_
 
std::string hfRecHitName_
 
HLTPrescaleProvider hltPrescaleProvider_
 
std::string hoRecHitName_
 
bool ignoreHLT_
 
double jet2EtMax_
 
double jet3EtMax_
 
double jetEtMin_
 
std::vector< int > jetTrigFired_
 
std::vector< std::string > jetTrigNamesV_
 
std::vector< int > jetTrigPrescale_
 
int lumiBlock_
 
float met_phi_
 
float met_sumEt_
 
float met_value_
 MET info. More...
 
float metType1_phi_
 
float metType1_sumEt_
 
float metType1_value_
 
TTree * misc_tree_
 
int nGenJets_
 
int nPFJets_
 
int nPhotons_
 
ULong64_t nProcessed_
 
int pf_NPV_
 
float pf_thirdjet_E_
 
float pf_thirdjet_et_
 
float pf_thirdjet_eta_
 
float pf_thirdjet_p_
 
float pf_thirdjet_phi_
 
float pf_thirdjet_pt_
 
float pf_thirdjet_px_
 
float pf_thirdjet_py_
 
float pf_thirdjet_scale_
 
TTree * pf_tree_
 
float pfjet2_area_
 
std::vector< float > pfjet2_candtrack_EcalE_
 
std::vector< float > pfjet2_candtrack_px_
 
std::vector< float > pfjet2_candtrack_py_
 
std::vector< float > pfjet2_candtrack_pz_
 
float pfjet2_ChargedEMFrac_
 
float pfjet2_ChargedHadronFrac_
 
float pfjet2_ChargedMultiplicity_
 
std::vector< float > pfjet2_cluster_dR_
 
std::vector< float > pfjet2_cluster_eta_
 
int pfjet2_cluster_n_
 
std::vector< float > pfjet2_cluster_phi_
 
float pfjet2_E_
 
float pfjet2_E_NPVcorr_
 
float pfjet2_electron_E_
 
float pfjet2_electron_EcalE_
 
int pfjet2_electron_n_
 
float pfjet2_electron_px_
 
float pfjet2_electron_py_
 
float pfjet2_electron_pz_
 
float pfjet2_eta_
 
float pfjet2_gendr_
 
float pfjet2_genE_
 
float pfjet2_genp_
 
float pfjet2_genpt_
 
std::vector< int > pfjet2_had_candtrackind_
 
std::vector< float > pfjet2_had_E_
 
std::vector< float > pfjet2_had_E_mctruth_
 
std::vector< float > pfjet2_had_EcalE_
 
std::vector< float > pfjet2_had_emf_
 
std::vector< int > pfjet2_had_id_
 
std::vector< int > pfjet2_had_mcpdgId_
 
int pfjet2_had_n_
 
std::vector< int > pfjet2_had_ntwrs_
 
std::vector< float > pfjet2_had_px_
 
std::vector< float > pfjet2_had_py_
 
std::vector< float > pfjet2_had_pz_
 
std::vector< float > pfjet2_had_rawHcalE_
 
float pfjet2_muon_E_
 
float pfjet2_muon_EcalE_
 
int pfjet2_muon_n_
 
float pfjet2_muon_px_
 
float pfjet2_muon_py_
 
float pfjet2_muon_pz_
 
int pfjet2_ncandtracks_
 
int pfjet2_nConstituents_
 
float pfjet2_NeutralEMFrac_
 
float pfjet2_NeutralHadronFrac_
 
int pfjet2_ntwrs_
 
float pfjet2_p_
 
float pfjet2_phi_
 
float pfjet2_photon_E_
 
float pfjet2_photon_EcalE_
 
int pfjet2_photon_n_
 
float pfjet2_photon_px_
 
float pfjet2_photon_py_
 
float pfjet2_photon_pz_
 
float pfjet2_pt_
 
float pfjet2_scale_
 
std::vector< int > pfjet2_twr_candtrackind_
 
std::vector< int > pfjet2_twr_clusterind_
 
std::vector< int > pfjet2_twr_depth_
 
std::vector< float > pfjet2_twr_dR_
 
std::vector< int > pfjet2_twr_elmttype_
 
std::vector< float > pfjet2_twr_frac_
 
std::vector< float > pfjet2_twr_hade_
 
std::vector< int > pfjet2_twr_hadind_
 
std::vector< int > pfjet2_twr_ieta_
 
std::vector< int > pfjet2_twr_iphi_
 
std::vector< int > pfjet2_twr_subdet_
 
float pfjet2_unkown_E_
 
float pfjet2_unkown_EcalE_
 
int pfjet2_unkown_n_
 
float pfjet2_unkown_px_
 
float pfjet2_unkown_py_
 
float pfjet2_unkown_pz_
 
std::string pfJetCollName_
 
std::string pfJetCorrName_
 
edm::InputTag pfMETColl
 
edm::InputTag pfType1METColl
 
float pho_2nd_pt_
 
std::string photonCollName_
 
double photonJetDPhiMin_
 
double photonPtMin_
 
std::vector< int > photonTrigFired_
 
std::vector< std::string > photonTrigNamesV_
 
std::vector< int > photonTrigPrescale_
 
float ppfjet_area_
 
std::vector< float > ppfjet_candtrack_EcalE_
 
std::vector< float > ppfjet_candtrack_px_
 
std::vector< float > ppfjet_candtrack_py_
 
std::vector< float > ppfjet_candtrack_pz_
 
float ppfjet_ChargedEMFrac_
 
float ppfjet_ChargedHadronFrac_
 
float ppfjet_ChargedMultiplicity_
 
std::vector< float > ppfjet_cluster_dR_
 
std::vector< float > ppfjet_cluster_eta_
 
int ppfjet_cluster_n_
 
std::vector< float > ppfjet_cluster_phi_
 
float ppfjet_E_
 
float ppfjet_E_NPVcorr_
 
float ppfjet_electron_E_
 
float ppfjet_electron_EcalE_
 
int ppfjet_electron_n_
 
float ppfjet_electron_px_
 
float ppfjet_electron_py_
 
float ppfjet_electron_pz_
 
float ppfjet_eta_
 
float ppfjet_gendr_
 
float ppfjet_genE_
 
float ppfjet_genp_
 
float ppfjet_genpt_
 
std::vector< int > ppfjet_had_candtrackind_
 
std::vector< float > ppfjet_had_E_
 
std::vector< float > ppfjet_had_E_mctruth_
 
std::vector< float > ppfjet_had_EcalE_
 
std::vector< float > ppfjet_had_emf_
 
std::vector< int > ppfjet_had_id_
 
std::vector< int > ppfjet_had_mcpdgId_
 
int ppfjet_had_n_
 
std::vector< int > ppfjet_had_ntwrs_
 
std::vector< float > ppfjet_had_px_
 
std::vector< float > ppfjet_had_py_
 
std::vector< float > ppfjet_had_pz_
 
std::vector< float > ppfjet_had_rawHcalE_
 
float ppfjet_muon_E_
 
float ppfjet_muon_EcalE_
 
int ppfjet_muon_n_
 
float ppfjet_muon_px_
 
float ppfjet_muon_py_
 
float ppfjet_muon_pz_
 
int ppfjet_ncandtracks_
 
int ppfjet_nConstituents_
 
float ppfjet_NeutralEMFrac_
 
float ppfjet_NeutralHadronFrac_
 
int ppfjet_ntwrs_
 
float ppfjet_p_
 
float ppfjet_phi_
 
float ppfjet_photon_E_
 
float ppfjet_photon_EcalE_
 
int ppfjet_photon_n_
 
float ppfjet_photon_px_
 
float ppfjet_photon_py_
 
float ppfjet_photon_pz_
 
float ppfjet_pt_
 
float ppfjet_scale_
 
std::vector< int > ppfjet_twr_candtrackind_
 
std::vector< int > ppfjet_twr_clusterind_
 
std::vector< int > ppfjet_twr_depth_
 
std::vector< float > ppfjet_twr_dR_
 
std::vector< int > ppfjet_twr_elmttype_
 
std::vector< float > ppfjet_twr_frac_
 
std::vector< float > ppfjet_twr_hade_
 
std::vector< int > ppfjet_twr_hadind_
 
std::vector< int > ppfjet_twr_ieta_
 
std::vector< int > ppfjet_twr_iphi_
 
std::vector< int > ppfjet_twr_subdet_
 
float ppfjet_unkown_E_
 
float ppfjet_unkown_EcalE_
 
int ppfjet_unkown_n_
 
float ppfjet_unkown_px_
 
float ppfjet_unkown_py_
 
float ppfjet_unkown_pz_
 
std::string prodProcess_
 
std::string pvCollName_
 
float rho2012_
 
edm::InputTag rhoCollection_
 
TFile * rootfile_
 
std::string rootHistFilename_
 
int runNumber_
 
int tagPho_ConvSafeEleVeto_
 
float tagPho_EcalIsoDR04_
 
float tagPho_energy_
 
float tagPho_eta_
 
float tagPho_genDeltaR_
 
float tagPho_genEnergy_
 
float tagPho_genEta_
 
float tagPho_genPhi_
 
float tagPho_genPt_
 
float tagPho_HcalIsoDR0412_
 
float tagPho_HcalIsoDR04_
 
float tagPho_HoE_
 
int tagPho_idLoose_
 
int tagPho_idTight_
 
std::vector< std::vector< float > > tagPho_pfiso_mycharged03
 
float tagPho_pfiso_myneutral03_
 
float tagPho_pfiso_myphoton03_
 
float tagPho_phi_
 
int tagPho_pixelSeed_
 
float tagPho_pt_
 
float tagPho_r9_
 
float tagPho_sieie_
 
float tagPho_TrkIsoHollowDR04_
 
edm::EDGetTokenT< reco::BeamSpottok_BS_
 
edm::EDGetTokenT
< reco::ConversionCollection
tok_Conv_
 
edm::EDGetTokenT
< GenEventInfoProduct
tok_GenEvInfo_
 
edm::EDGetTokenT< std::vector
< reco::GenJet > > 
tok_GenJet_
 
edm::EDGetTokenT< std::vector
< reco::GenParticle > > 
tok_GenPart_
 
edm::EDGetTokenT
< reco::GsfElectronCollection
tok_GsfElec_
 
edm::EDGetTokenT
< edm::SortedCollection
< HBHERecHit,
edm::StrictWeakOrdering
< HBHERecHit > > > 
tok_HBHE_
 
edm::EDGetTokenT
< edm::SortedCollection
< HFRecHit,
edm::StrictWeakOrdering
< HFRecHit > > > 
tok_HF_
 
edm::EDGetTokenT
< edm::SortedCollection
< HORecHit,
edm::StrictWeakOrdering
< HORecHit > > > 
tok_HO_
 
edm::EDGetTokenT
< edm::ValueMap< Bool_t > > 
tok_loosePhoton_
 
edm::EDGetTokenT< std::vector
< Bool_t > > 
tok_loosePhotonV_
 
edm::EDGetTokenT
< reco::PFCandidateCollection
tok_PFCand_
 
edm::EDGetTokenT
< reco::PFJetCollection
tok_PFJet_
 
edm::EDGetTokenT
< reco::PFMETCollection
tok_PFMET_
 
edm::EDGetTokenT
< reco::PFMETCollection
tok_PFType1MET_
 
edm::EDGetTokenT
< reco::PhotonCollection
tok_Photon_
 
edm::EDGetTokenT< std::vector
< reco::Vertex > > 
tok_PV_
 
edm::EDGetTokenT< double > tok_Rho_
 
edm::EDGetTokenT
< edm::ValueMap< Bool_t > > 
tok_tightPhoton_
 
edm::EDGetTokenT< std::vector
< Bool_t > > 
tok_tightPhotonV_
 
edm::EDGetTokenT
< edm::TriggerResults
tok_TrigRes_
 
edm::EDGetTokenT
< reco::VertexCollection
tok_Vertex_
 
int workOnAOD_
 
bool writeTriggerPrescale_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 118 of file GammaJetAnalysis.h.

Constructor & Destructor Documentation

GammaJetAnalysis::GammaJetAnalysis ( const edm::ParameterSet iConfig)
explicit

Definition at line 71 of file GammaJetAnalysis.cc.

References allowNoPhoton_, debug_, debugEvent, debugHLTTrigNames, doGenJets_, doPFJets_, eventPtHat_, eventWeight_, Exception, edm::ParameterSet::exists(), genEventInfoName_, genJetCollName_, genParticleCollName_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hbheRecHitName_, hfRecHitName_, hoRecHitName_, ignoreHLT_, HLT_25ns10e33_v2_cff::InputTag, jet2EtMax_, jet3EtMax_, jetEtMin_, jetTrigNamesV_, edm::InputTag::label(), nProcessed_, pfJetCollName_, pfJetCorrName_, pfMETColl, pfType1METColl, photonCollName_, photonJetDPhiMin_, photonPtMin_, photonTrigNamesV_, parseEventContent::prod, prodProcess_, edm::errors::ProductNotFound, pvCollName_, rhoCollection_, rootHistFilename_, AlCaHLTBitMon_QueryRunRegistry::string, tok_BS_, tok_Conv_, tok_GenEvInfo_, tok_GenJet_, tok_GenPart_, tok_GsfElec_, tok_HBHE_, tok_HF_, tok_HO_, tok_loosePhoton_, tok_loosePhotonV_, tok_PFCand_, tok_PFJet_, tok_PFMET_, tok_PFType1MET_, tok_Photon_, tok_PV_, tok_Rho_, tok_tightPhoton_, tok_tightPhotonV_, tok_TrigRes_, tok_Vertex_, workOnAOD_, and writeTriggerPrescale_.

71  :
72  hltPrescaleProvider_(iConfig, consumesCollector(), *this) {
73 
74  // set parameters
75  debug_ = iConfig.getUntrackedParameter<int>("debug", 0);
76  debugHLTTrigNames = iConfig.getUntrackedParameter<int>("debugHLTTrigNames",1);
77  debugEvent = iConfig.getUntrackedParameter<unsigned int>("debugEvent",0);
78  pfMETColl = iConfig.getParameter<edm::InputTag>("PFMETColl");
79  pfType1METColl = iConfig.getParameter<edm::InputTag>("PFMETTYPE1Coll");
80  rhoCollection_ = iConfig.getParameter<edm::InputTag>("rhoColl");
81  photonCollName_ = iConfig.getParameter<std::string>("photonCollName");
82  pfJetCollName_ = iConfig.getParameter<std::string>("pfJetCollName");
83  pfJetCorrName_ = iConfig.getParameter<std::string>("pfJetCorrName");
84  genJetCollName_ = iConfig.getParameter<std::string>("genJetCollName");
85  genParticleCollName_ = iConfig.getParameter<std::string>("genParticleCollName");
86  genEventInfoName_ = iConfig.getParameter<std::string>("genEventInfoName");
87  hbheRecHitName_ = iConfig.getParameter<std::string>("hbheRecHitName");
88  hfRecHitName_ = iConfig.getParameter<std::string>("hfRecHitName");
89  hoRecHitName_ = iConfig.getParameter<std::string>("hoRecHitName");
90  rootHistFilename_ = iConfig.getParameter<std::string>("rootHistFilename");
91  pvCollName_ = iConfig.getParameter<std::string>("pvCollName");
92  prodProcess_ = "MYGAMMA";
93  if (iConfig.exists("prodProcess"))
94  prodProcess_ = iConfig.getUntrackedParameter<std::string>("prodProcess");
95 
96  allowNoPhoton_ = iConfig.getParameter<bool>("allowNoPhoton");
97  photonPtMin_ = iConfig.getParameter<double>("photonPtMin");
98  photonJetDPhiMin_ = iConfig.getParameter<double>("photonJetDPhiMin");
99  jetEtMin_ = iConfig.getParameter<double>("jetEtMin");
100  jet2EtMax_ = iConfig.getParameter<double>("jet2EtMax");
101  jet3EtMax_ = iConfig.getParameter<double>("jet3EtMax");
102  photonTrigNamesV_ = iConfig.getParameter<std::vector<std::string>>("photonTriggers");
103  jetTrigNamesV_ = iConfig.getParameter<std::vector<std::string>>("jetTriggers");
104  writeTriggerPrescale_= iConfig.getParameter<bool>("writeTriggerPrescale");
105  doPFJets_ = iConfig.getParameter<bool>("doPFJets");
106  doGenJets_ = iConfig.getParameter<bool>("doGenJets");
107  workOnAOD_ = iConfig.getParameter<int>("workOnAOD");
108  ignoreHLT_ = iConfig.getUntrackedParameter<bool>("ignoreHLT",false);
109 
110  eventWeight_ = 1.0;
111  eventPtHat_ = 0.;
112  nProcessed_ = 0;
113 
114  //Get the tokens
115  // FAST FIX
116  if (workOnAOD_ < 2) { // origin data file
117  tok_Photon_ = consumes<reco::PhotonCollection>(photonCollName_);
118  tok_PFJet_ = consumes<reco::PFJetCollection>(pfJetCollName_);
119  tok_GenJet_ = consumes<std::vector<reco::GenJet> >(genJetCollName_);
120  tok_GenPart_ = consumes<std::vector<reco::GenParticle> >(genParticleCollName_);
121  tok_GenEvInfo_ = consumes<GenEventInfoProduct>(genEventInfoName_);
122  tok_HBHE_ = consumes<edm::SortedCollection<HBHERecHit,edm::StrictWeakOrdering<HBHERecHit> > >(hbheRecHitName_);
123  tok_HF_ = consumes<edm::SortedCollection<HFRecHit,edm::StrictWeakOrdering<HFRecHit> > >(hfRecHitName_);
124  tok_HO_ = consumes<edm::SortedCollection<HORecHit,edm::StrictWeakOrdering<HORecHit> > >(hoRecHitName_);
125  tok_loosePhoton_ = consumes<edm::ValueMap<Bool_t> >(edm::InputTag("PhotonIDProdGED","PhotonCutBasedIDLoose"));
126  tok_tightPhoton_ = consumes<edm::ValueMap<Bool_t> >(edm::InputTag("PhotonIDProdGED:PhotonCutBasedIDTight"));
127  tok_PFCand_ = consumes<reco::PFCandidateCollection>(edm::InputTag("particleFlow"));
128  tok_Vertex_ = consumes<reco::VertexCollection>(edm::InputTag("offlinePrimaryVertices"));
129  tok_GsfElec_ = consumes<reco::GsfElectronCollection>(edm::InputTag("gsfElectrons"));
130  tok_Rho_ = consumes<double>(rhoCollection_);
131  tok_Conv_ = consumes<reco::ConversionCollection>(edm::InputTag("allConversions"));
132  tok_BS_ = consumes<reco::BeamSpot>(edm::InputTag("offlineBeamSpot"));
133  tok_PV_ = consumes<std::vector<reco::Vertex> >(pvCollName_);
134  tok_PFMET_ = consumes<reco::PFMETCollection>(pfMETColl);
135  tok_PFType1MET_ = consumes<reco::PFMETCollection>(pfType1METColl);
136  tok_TrigRes_ = consumes<edm::TriggerResults>(edm::InputTag("TriggerResults::HLT"));
137 
138  } else {
139  // FAST FIX
140  const char* prod= "GammaJetProd";
141  if (prodProcess_.size()==0) {
142  edm::LogError("GammaJetAnalysis") << "prodProcess needs to be defined";
144  }
145  const char* an= prodProcess_.c_str();
146  edm::LogWarning("GammaJetAnalysis") << "FAST FIX: changing " << photonCollName_
147  << " to" << edm::InputTag(prod,photonCollName_,an);
148  tok_Photon_ = consumes<reco::PhotonCollection>(edm::InputTag(prod,photonCollName_,an));
149  tok_PFJet_ = consumes<reco::PFJetCollection>(edm::InputTag(prod,pfJetCollName_,an));
150  tok_GenJet_ = consumes<std::vector<reco::GenJet> >(edm::InputTag(prod,genJetCollName_,an));
151  tok_GenPart_ = consumes<std::vector<reco::GenParticle> >(edm::InputTag(prod,genParticleCollName_,an));
152  tok_GenEvInfo_ = consumes<GenEventInfoProduct>(edm::InputTag(prod,genEventInfoName_,an));
153  tok_HBHE_ = consumes<edm::SortedCollection<HBHERecHit,edm::StrictWeakOrdering<HBHERecHit> > >(edm::InputTag(prod,hbheRecHitName_,an));
154  tok_HF_ = consumes<edm::SortedCollection<HFRecHit,edm::StrictWeakOrdering<HFRecHit> > >(edm::InputTag(prod,hfRecHitName_,an));
155  tok_HO_ = consumes<edm::SortedCollection<HORecHit,edm::StrictWeakOrdering<HORecHit> > >(edm::InputTag(prod,hoRecHitName_,an));
156  //tok_loosePhoton_ = consumes<edm::ValueMap<Bool_t> >(edm::InputTag("PhotonIDProdGED","PhotonCutBasedIDLoose"));
157  //tok_tightPhoton_ = consumes<edm::ValueMap<Bool_t> >(edm::InputTag("PhotonIDProdGED:PhotonCutBasedIDTight"));
158  tok_loosePhotonV_ = consumes<std::vector<Bool_t> >(edm::InputTag(prod,"PhotonIDProdGED:PhotonCutBasedIDLoose",an));
159  tok_tightPhotonV_ = consumes<std::vector<Bool_t> >(edm::InputTag(prod,"PhotonIDProdGED:PhotonCutBasedIDTight",an));
160  tok_PFCand_ = consumes<reco::PFCandidateCollection>(edm::InputTag(prod,"particleFlow",an));
161  tok_Vertex_ = consumes<reco::VertexCollection>(edm::InputTag(prod,"offlinePrimaryVertices",an));
162  tok_GsfElec_ = consumes<reco::GsfElectronCollection>(edm::InputTag(prod,"gedGsfElectrons",an));
163  tok_Rho_ = consumes<double>(edm::InputTag(prod,rhoCollection_.label(),an));
164  tok_Conv_ = consumes<reco::ConversionCollection>(edm::InputTag(prod,"allConversions",an));
165  tok_BS_ = consumes<reco::BeamSpot>(edm::InputTag(prod,"offlineBeamSpot",an));
166  tok_PV_ = consumes<std::vector<reco::Vertex> >(edm::InputTag(prod,pvCollName_,an));
167  tok_PFMET_ = consumes<reco::PFMETCollection>(edm::InputTag(prod,pfMETColl.label(),an));
168  tok_PFType1MET_ = consumes<reco::PFMETCollection>(edm::InputTag(prod,pfType1METColl.label(),an));
169  TString HLTlabel = "TriggerResults::HLT";
170  if (prodProcess_.find("reRECO")!=std::string::npos)
171  HLTlabel.ReplaceAll("HLT","reHLT");
172  tok_TrigRes_ = consumes<edm::TriggerResults>(edm::InputTag(prod,HLTlabel.Data(),an));
173  }
174 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< std::vector< Bool_t > > tok_tightPhotonV_
edm::EDGetTokenT< reco::ConversionCollection > tok_Conv_
edm::EDGetTokenT< GenEventInfoProduct > tok_GenEvInfo_
edm::EDGetTokenT< reco::PFCandidateCollection > tok_PFCand_
edm::EDGetTokenT< edm::SortedCollection< HFRecHit, edm::StrictWeakOrdering< HFRecHit > > > tok_HF_
edm::EDGetTokenT< double > tok_Rho_
edm::EDGetTokenT< edm::TriggerResults > tok_TrigRes_
std::string hoRecHitName_
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::string prodProcess_
std::string hbheRecHitName_
edm::EDGetTokenT< reco::PFMETCollection > tok_PFMET_
edm::EDGetTokenT< reco::VertexCollection > tok_Vertex_
unsigned int debugEvent
edm::EDGetTokenT< reco::BeamSpot > tok_BS_
std::string photonCollName_
edm::EDGetTokenT< std::vector< reco::GenParticle > > tok_GenPart_
edm::EDGetTokenT< edm::SortedCollection< HORecHit, edm::StrictWeakOrdering< HORecHit > > > tok_HO_
std::string rootHistFilename_
std::string hfRecHitName_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetTokenT< reco::PhotonCollection > tok_Photon_
edm::InputTag rhoCollection_
edm::EDGetTokenT< std::vector< Bool_t > > tok_loosePhotonV_
edm::EDGetTokenT< edm::ValueMap< Bool_t > > tok_tightPhoton_
edm::InputTag pfMETColl
edm::InputTag pfType1METColl
std::string genParticleCollName_
std::string pfJetCollName_
std::vector< std::string > photonTrigNamesV_
edm::EDGetTokenT< reco::PFJetCollection > tok_PFJet_
edm::EDGetTokenT< edm::ValueMap< Bool_t > > tok_loosePhoton_
std::vector< std::string > jetTrigNamesV_
edm::EDGetTokenT< std::vector< reco::Vertex > > tok_PV_
std::string genEventInfoName_
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< edm::SortedCollection< HBHERecHit, edm::StrictWeakOrdering< HBHERecHit > > > tok_HBHE_
std::string genJetCollName_
std::string pvCollName_
HLTPrescaleProvider hltPrescaleProvider_
edm::EDGetTokenT< reco::GsfElectronCollection > tok_GsfElec_
edm::EDGetTokenT< std::vector< reco::GenJet > > tok_GenJet_
edm::EDGetTokenT< reco::PFMETCollection > tok_PFType1MET_
std::string pfJetCorrName_
GammaJetAnalysis::~GammaJetAnalysis ( )

Definition at line 176 of file GammaJetAnalysis.cc.

176 {}

Member Function Documentation

void GammaJetAnalysis::analyze ( const edm::Event iEvent,
const edm::EventSetup evSetup 
)
privatevirtual

h_pfrecoOgen_et->Fill(jer, eventWeight_);

Implements edm::EDAnalyzer.

Definition at line 183 of file GammaJetAnalysis.cc.

References allowNoPhoton_, calc_dPhi(), reco::PFJet::chargedEmEnergyFraction(), reco::PFJet::chargedHadronEnergyFraction(), reco::PFJet::chargedMultiplicity(), clear_leadingPfJetVars(), copy_leadingPfJetVars_to_pfJet2(), JetCorrector::correction(), counter, cuy::cv, debug_, debugEvent, debugHLTTrigNames, deltaR(), doGenJets_, doPFJets_, PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, reco::PFCandidate::e, alignCSCRings::e, reco::Photon::ecalRecHitSumEtConeDR04(), reco::PFCandidate::egamma_HF, bookConverter::elements, reco::LeafCandidate::energy(), reco::LeafCandidate::et(), reco::LeafCandidate::eta(), reco::CaloCluster::eta(), edm::EventID::event(), eventNumber_, eventPtHat_, eventWeight_, plotBeamSpotDB::first, reco::PFCandidate::gamma, genEventInfoName_, genJetCollName_, genParticleCollName_, edm::EventSetup::get(), edm::Event::getByToken(), CaloCellGeometry::getCorners(), getEtaPhi(), CaloSubdetectorGeometry::getGeometry(), JetCorrector::getJetCorrector(), getNeutralPVCorr(), reco::PFJet::getPFConstituents(), reco::PFCandidate::h, reco::PFCandidate::h0, reco::PFCandidate::h_HF, reco::Photon::hadronicOverEm(), reco::Photon::hadTowOverEm(), reco::Photon::hasPixelSeed(), hbheRecHitName_, ReconstructionCosmics_cff::hbhereco, DetId::Hcal, reco::PFBlockElement::HCAL, HcalBarrel, HcalEndcap, reco::Photon::hcalTowerSumEtConeDR04(), helper_findTrigger(), HERE(), reco::PFBlockElement::HFEM, reco::PFBlockElement::HFHAD, hfRecHitName_, HcalHitReconstructor_hf_cfi::hfreco, reco::CaloCluster::hitsAndFractions(), hltPrescaleProvider_, reco::PFBlockElement::HO, hoRecHitName_, HcalHitReconstructor_ho_cfi::horeco, i, edm::EventBase::id(), PhotonPair::idx(), cmsHarvester::index, edm::Ref< C, T, F >::isNonnull(), edm::HandleBase::isValid(), PhotonPair::isValid(), PFJetCorretPair::isValid(), patTestJEC_cfi::jec, metsig::jet, PFJetCorretPair::jet(), jet2EtMax_, jet3EtMax_, reco::Jet::jetArea(), jetEtMin_, jetTrigFired_, jetTrigNamesV_, jetTrigPrescale_, lumiBlock_, edm::EventID::luminosityBlock(), met_phi_, met_sumEt_, met_value_, metType1_phi_, metType1_sumEt_, metType1_value_, reco::PFCandidate::mu, reco::Jet::nConstituents(), reco::PFJet::neutralEmEnergyFraction(), reco::PFJet::neutralHadronEnergyFraction(), nGenJets_, nPFJets_, nPhotons_, nProcessed_, reco::LeafCandidate::p(), pf_NPV_, pf_thirdjet_E_, pf_thirdjet_et_, pf_thirdjet_eta_, pf_thirdjet_p_, pf_thirdjet_phi_, pf_thirdjet_pt_, pf_thirdjet_px_, pf_thirdjet_py_, pf_thirdjet_scale_, pf_tree_, pfEcalIso(), pfHcalIso(), pfJetCollName_, pfJetCorrName_, pfMETColl, pfTkIsoWithVertex(), phi, reco::LeafCandidate::phi(), reco::CaloCluster::phi(), pho_2nd_pt_, PhotonPair::photon(), photonCollName_, photonJetDPhiMin_, photonPtMin_, interactiveExample::photons, photonTrigFired_, photonTrigNamesV_, photonTrigPrescale_, ppfjet_area_, ppfjet_candtrack_EcalE_, ppfjet_candtrack_px_, ppfjet_candtrack_py_, ppfjet_candtrack_pz_, ppfjet_ChargedEMFrac_, ppfjet_ChargedHadronFrac_, ppfjet_ChargedMultiplicity_, ppfjet_cluster_dR_, ppfjet_cluster_eta_, ppfjet_cluster_n_, ppfjet_cluster_phi_, ppfjet_E_, ppfjet_E_NPVcorr_, ppfjet_electron_E_, ppfjet_electron_EcalE_, ppfjet_electron_n_, ppfjet_electron_px_, ppfjet_electron_py_, ppfjet_electron_pz_, ppfjet_eta_, ppfjet_gendr_, ppfjet_genE_, ppfjet_genp_, ppfjet_genpt_, ppfjet_had_candtrackind_, ppfjet_had_E_, ppfjet_had_E_mctruth_, ppfjet_had_EcalE_, ppfjet_had_emf_, ppfjet_had_id_, ppfjet_had_mcpdgId_, ppfjet_had_n_, ppfjet_had_ntwrs_, ppfjet_had_px_, ppfjet_had_py_, ppfjet_had_pz_, ppfjet_had_rawHcalE_, ppfjet_muon_E_, ppfjet_muon_EcalE_, ppfjet_muon_n_, ppfjet_muon_px_, ppfjet_muon_py_, ppfjet_muon_pz_, ppfjet_ncandtracks_, ppfjet_nConstituents_, ppfjet_NeutralEMFrac_, ppfjet_NeutralHadronFrac_, ppfjet_ntwrs_, ppfjet_p_, ppfjet_phi_, ppfjet_photon_E_, ppfjet_photon_EcalE_, ppfjet_photon_n_, ppfjet_photon_px_, ppfjet_photon_py_, ppfjet_photon_pz_, ppfjet_pt_, ppfjet_scale_, ppfjet_twr_candtrackind_, ppfjet_twr_clusterind_, ppfjet_twr_depth_, ppfjet_twr_dR_, ppfjet_twr_elmttype_, ppfjet_twr_frac_, ppfjet_twr_hade_, ppfjet_twr_hadind_, ppfjet_twr_ieta_, ppfjet_twr_iphi_, ppfjet_twr_subdet_, ppfjet_unkown_E_, ppfjet_unkown_EcalE_, ppfjet_unkown_n_, ppfjet_unkown_px_, ppfjet_unkown_py_, ppfjet_unkown_pz_, HLTPrescaleProvider::prescaleValues(), edm::Handle< T >::product(), PhotonPair::pt(), reco::LeafCandidate::pt(), MetAnalyzer::pv(), pvCollName_, reco::LeafCandidate::px(), reco::TrackBase::px(), reco::LeafCandidate::py(), reco::TrackBase::py(), reco::TrackBase::pz(), reco::Photon::r9(), rho2012_, edm::EventID::run(), runNumber_, PFJetCorretPair::scale(), PFJetCorretPair::scaledEt(), edm::second(), reco::Photon::sigmaIetaIeta(), edm::TriggerNames::size(), edm::OwnVector< T, P >::size(), AlCaHLTBitMon_QueryRunRegistry::string, tagPho_ConvSafeEleVeto_, tagPho_EcalIsoDR04_, tagPho_energy_, tagPho_eta_, tagPho_genDeltaR_, tagPho_genEnergy_, tagPho_genEta_, tagPho_genPhi_, tagPho_genPt_, tagPho_HcalIsoDR0412_, tagPho_HcalIsoDR04_, tagPho_HoE_, tagPho_idLoose_, tagPho_idTight_, tagPho_pfiso_mycharged03, tagPho_pfiso_myneutral03_, tagPho_pfiso_myphoton03_, tagPho_phi_, tagPho_pixelSeed_, tagPho_pt_, tagPho_r9_, tagPho_sieie_, tagPho_TrkIsoHollowDR04_, tok_BS_, tok_Conv_, tok_GenEvInfo_, tok_GenJet_, tok_GenPart_, tok_GsfElec_, tok_HBHE_, tok_HF_, tok_HO_, tok_loosePhoton_, tok_loosePhotonV_, tok_PFCand_, tok_PFJet_, tok_PFMET_, tok_PFType1MET_, tok_Photon_, tok_PV_, tok_Rho_, tok_tightPhoton_, tok_tightPhotonV_, tok_TrigRes_, tok_Vertex_, edm::TriggerNames::triggerName(), edm::TriggerNames::triggerNames(), edm::Event::triggerNames(), triggerResults, reco::Photon::trkSumPtHollowConeDR04(), workOnAOD_, writeTriggerPrescale_, and reco::PFCandidate::X.

183  {
184  nProcessed_++;
185 
186  edm::LogInfo("GammaJetAnalysis") << "nProcessed=" << nProcessed_ << "\n";
187 
188  // 1st. Get Photons //
190  iEvent.getByToken(tok_Photon_, photons);
191  if(!photons.isValid()) {
192  edm::LogWarning("GammaJetAnalysis") << "Could not find PhotonCollection named "
193  << photonCollName_;
194  return;
195  }
196 
197  if ((photons->size()==0) && !allowNoPhoton_) {
198  if (debug_>0) edm::LogInfo("GammaJetAnalysis") << "No photons in the event";
199  return;
200  }
201 
202  nPhotons_= photons->size();
203  edm::LogInfo("GammaJetAnalysis") << "nPhotons_=" << nPhotons_;
204 
205  // Get photon quality flags
206  edm::Handle<edm::ValueMap<Bool_t> > loosePhotonQual, tightPhotonQual;
207  edm::Handle<std::vector<Bool_t> > loosePhotonQual_Vec, tightPhotonQual_Vec;
208  if (workOnAOD_ < 2) {
209  iEvent.getByToken(tok_loosePhoton_, loosePhotonQual);
210  iEvent.getByToken(tok_tightPhoton_, tightPhotonQual);
211  if (!loosePhotonQual.isValid() || !tightPhotonQual.isValid()) {
212  edm::LogWarning("GammaJetAnalysis") << "Failed to get photon quality flags";
213  return;
214  }
215  }
216  else {
217  iEvent.getByToken(tok_loosePhotonV_, loosePhotonQual_Vec);
218  iEvent.getByToken(tok_tightPhotonV_, tightPhotonQual_Vec);
219  if (!loosePhotonQual_Vec.isValid() || !tightPhotonQual_Vec.isValid()) {
220  edm::LogWarning("GammaJetAnalysis") << "Failed to get photon quality flags (vec)";
221  return;
222  }
223  }
224 
225  // sort photons by Et //
226  // counter is needed later to get the reference to the ptr
227  std::set<PhotonPair, PhotonPairComp> photonpairset;
228  int counter=0;
229  for(reco::PhotonCollection::const_iterator it=photons->begin(); it!=photons->end(); ++it) {
230  //HERE(Form("photon counter=%d",counter));
231  const reco::Photon* photon=&(*it);
232  //if(loosePhotonQual.isValid()){
233  photonpairset.insert( PhotonPair(photon, photon->pt(), counter) );
234  counter++;
235  //}
236  }
237 
238  HERE(Form("photonpairset.size=%d",int(photonpairset.size())));
239 
240  if ((photonpairset.size()==0) && !allowNoPhoton_) {
241  if (debug_>0) edm::LogInfo("GammaJetAnalysis") << "No good quality photons in the event";
242  return;
243  }
244 
246  // TAG = Highest Et photon
248 
249  // find highest Et photon //
250  PhotonPair photon_tag;
251  PhotonPair photon_2nd;
252  counter=0;
253  for(std::set<PhotonPair, PhotonPairComp>::const_iterator it=photonpairset.begin(); it!=photonpairset.end(); ++it) {
254  PhotonPair photon=(*it);
255  ++counter;
256  if(counter==1) photon_tag = photon;
257  else if (counter==2) photon_2nd = photon;
258  else break;
259  }
260 
261  if (counter==0) {
262  edm::LogWarning("GammaJetAnalysis") << "Code bug";
263  return;
264  }
265 
266  HERE(Form("counter=%d",counter));
267 
268  // cut on photon pt
269  if (photon_tag.isValid() && ( photon_tag.pt() < photonPtMin_ )) {
270  if (debug_>0) edm::LogInfo("GammaJetAnalysis") << "largest photonPt=" << photon_tag.pt();
271  return;
272  }
273 
274  HERE("aa");
275 
276  // 2nd. Get Jets
278  nPFJets_=0;
279  nGenJets_=0;
280 
281  unsigned int anyJetCount=0;
282 
283  if (doPFJets_) {
284  iEvent.getByToken(tok_PFJet_,pfjets);
285  if(!pfjets.isValid()) {
286  edm::LogWarning("GammaJetAnalysis") << "Could not find PFJetCollection named " << pfJetCollName_;
287  return;
288  }
289  anyJetCount+= pfjets->size();
290  nPFJets_ = pfjets->size();
291  }
292 
293  HERE(Form("anyJetCount=%d",anyJetCount));
294 
295  if (anyJetCount==0) {
296  if (debug_>0) edm::LogInfo("GammaJetAnalysis") << "Event contains no jets";
297  return;
298  }
299  if (debug_>0) edm::LogInfo("GammaJetAnalysis") << "nPhotons=" << nPhotons_
300  << ", nPFJets=" << nPFJets_;
301 
302  HERE(Form("nPhotons_=%d, nPFJets_=%d",nPhotons_,nPFJets_));
303 
304  // 3rd. Check the trigger
305  photonTrigFired_.clear();
306  photonTrigPrescale_.clear();
307  jetTrigFired_.clear();
308  jetTrigPrescale_.clear();
309 
310  HERE("trigger");
311 
312  // HLT Trigger
313  // assign "trig fired" if no triggers are specified
314  bool photonTrigFlag= (photonTrigNamesV_.size()==0) ? true : false;
315  bool jetTrigFlag= (jetTrigNamesV_.size()==0) ? true : false;
316  if ((photonTrigNamesV_.size()==1) &&
317  (photonTrigNamesV_[0].length()==0)) photonTrigFlag=true;
318  if ((jetTrigNamesV_.size()==1) &&
319  (jetTrigNamesV_[0].length()==0)) jetTrigFlag=true;
320 
321  // If needed, process trigger information
322  if (!photonTrigFlag || !jetTrigFlag) {
323  // check the triggers
325  if( !iEvent.getByToken(tok_TrigRes_,triggerResults) ) {
326  edm::LogWarning("GammaJetAnalysis") << "Could not find TriggerResults::HLT";
327  return;
328  }
329  const edm::TriggerNames &evTrigNames =iEvent.triggerNames(*triggerResults);
330 
331  if (debugHLTTrigNames>0) {
332  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "debugHLTTrigNames is on";
333  const std::vector<std::string> *trNames= & evTrigNames.triggerNames();
334  for (size_t i=0; i<trNames->size(); ++i) {
335  if (trNames->at(i).find("_Photon")!=std::string::npos) {
336  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << " - " << trNames->at(i);
337  }
338  }
339  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << " ";
341  }
342 
343  size_t id = 0;
344  for (size_t i=0; i<photonTrigNamesV_.size(); ++i) {
345  const std::string trigName=photonTrigNamesV_.at(i);
346  id= helper_findTrigger(evTrigNames.triggerNames(),trigName);
347  if (id==evTrigNames.size()) {
348  photonTrigFired_.push_back(0);
349  photonTrigPrescale_.push_back(-1);
350  continue;
351  }
352  int fired= triggerResults->accept(id);
353  if (fired) photonTrigFlag=true;
354  photonTrigFired_.push_back(fired);
355  if (!writeTriggerPrescale_) photonTrigPrescale_.push_back(-1);
356  else {
357  // for triggers with two L1 seeds this fails
358  std::pair<int,int> prescaleVals= hltPrescaleProvider_.prescaleValues(iEvent,evSetup, evTrigNames.triggerName(id));
359  photonTrigPrescale_.push_back(prescaleVals.first * prescaleVals.second);
360  }
361  }
362  for (size_t i=0; i<jetTrigNamesV_.size(); ++i) {
363  const std::string trigName=jetTrigNamesV_.at(i);
364  id= helper_findTrigger(evTrigNames.triggerNames(),trigName);
365  if (id==evTrigNames.size()) {
366  jetTrigFired_.push_back(0);
367  jetTrigPrescale_.push_back(-1);
368  continue;
369  }
370  int fired= triggerResults->accept(id);
371  if (fired) jetTrigFlag=true;
372  jetTrigFired_.push_back(fired);
373  std::pair<int,int> prescaleVals = hltPrescaleProvider_.prescaleValues(iEvent,evSetup,evTrigNames.triggerName(id));
374  jetTrigPrescale_.push_back(prescaleVals.first * prescaleVals.second);
375  }
376  }
377 
378  if (!photonTrigFlag && !jetTrigFlag) {
379  if (debug_>0) edm::LogInfo("GammaJetAnalysis") << "no trigger fired";
380  return;
381  }
382 
383  HERE("start isolation");
384 
385  tagPho_pfiso_mycharged03.clear();
386 
390  iEvent.getByToken(tok_PFCand_, pfHandle);
391 
393  iEvent.getByToken(tok_Vertex_, vtxHandle);
394 
396  iEvent.getByToken(tok_GsfElec_, gsfElectronHandle);
397  edm::Handle<double> rhoHandle_2012;
398  iEvent.getByToken(tok_Rho_, rhoHandle_2012);
399  rho2012_ = *(rhoHandle_2012.product());
400  //rho2012_ = -1e6;
401 
403  iEvent.getByToken(tok_Conv_, convH);
404  edm::Handle<reco::BeamSpot> beamSpotHandle;
405  iEvent.getByToken(tok_BS_, beamSpotHandle);
406 
407  HERE("doGenJets");
408 
409  if(doGenJets_){
410  // Get GenJets
411  iEvent.getByToken(tok_GenJet_,genjets);
412  if(!genjets.isValid()) {
413  edm::LogWarning("GammaJetAnalysis") << "Could not find GenJet vector named "
414  << genJetCollName_;
415  return;
416  }
417  nGenJets_= genjets->size();
418 
419  // Get GenParticles
420  iEvent.getByToken(tok_GenPart_,genparticles);
421  if(!genparticles.isValid()) {
422  edm::LogWarning("GammaJetAnalysis") << "Could not find GenParticle vector named " << genParticleCollName_;
423  return;
424  }
425 
426  // Get weights
427  edm::Handle<GenEventInfoProduct> genEventInfoProduct;
428  iEvent.getByToken(tok_GenEvInfo_, genEventInfoProduct);
429  if(!genEventInfoProduct.isValid()){
430  edm::LogWarning("GammaJetAnalysis") << "Could not find GenEventInfoProduct named " << genEventInfoName_;
431  return;
432  }
433  eventWeight_ = genEventInfoProduct->weight();
434  eventPtHat_ = 0.;
435  if (genEventInfoProduct->hasBinningValues()) {
436  eventPtHat_ = genEventInfoProduct->binningValues()[0];
437  }
438  }
439 
440  runNumber_ = iEvent.id().run();
441  lumiBlock_ = iEvent.id().luminosityBlock();
442  eventNumber_ = iEvent.id().event();
443 
444  HERE(Form("runNumber=%d, eventNumber=%d",runNumber_,eventNumber_));
445 
446  // fill tag photon variables
447  if (!photon_tag.isValid()) {
448  tagPho_pt_=-1;
449  pho_2nd_pt_=-1;
450  tagPho_energy_=-1;
451  tagPho_eta_=0;
452  tagPho_phi_=0;
453  tagPho_sieie_=0;
454  tagPho_HoE_=0;
455  tagPho_r9_=0;
462  tagPho_pfiso_mycharged03.clear();
465  tagPho_idTight_=0;
466  tagPho_idLoose_=0;
467  tagPho_genPt_=0;
469  tagPho_genEta_=0;
470  tagPho_genPhi_=0;
472  }
473  else {
474  HERE("bb");
475 
476  tagPho_pt_ = photon_tag.photon()->pt();
477  pho_2nd_pt_ = (photon_2nd.photon()) ? photon_2nd.photon()->pt() : -1.;
478  tagPho_energy_ = photon_tag.photon()->energy();
479  tagPho_eta_ = photon_tag.photon()->eta();
480  tagPho_phi_ = photon_tag.photon()->phi();
481  tagPho_sieie_ = photon_tag.photon()->sigmaIetaIeta();
482  tagPho_HoE_ = photon_tag.photon()->hadTowOverEm();
483  tagPho_r9_ = photon_tag.photon()->r9();
484  tagPho_pixelSeed_ = photon_tag.photon()->hasPixelSeed();
488  tagPho_HcalIsoDR0412_ = photon_tag.photon()->hcalTowerSumEtConeDR04() + (photon_tag.photon()->hadronicOverEm() - photon_tag.photon()->hadTowOverEm())*(photon_tag.photon()->energy()/cosh((photon_tag.photon()->eta())));
489 
490  HERE("tt");
491 
492  tagPho_pfiso_myphoton03_ = pfEcalIso(photon_tag.photon(), pfHandle, 0.3, 0.0, 0.070, 0.015, 0.0, 0.0, 0.0, reco::PFCandidate::gamma);
493  tagPho_pfiso_myneutral03_ = pfHcalIso(photon_tag.photon(), pfHandle, 0.3, 0.0, reco::PFCandidate::h0);
494  HERE("calc charged pfiso");
495  tagPho_pfiso_mycharged03.push_back(pfTkIsoWithVertex(photon_tag.photon(), pfHandle, vtxHandle, 0.3, 0.02, 0.02, 0.0, 0.2, 0.1, reco::PFCandidate::h));
496 
497  HERE("got isolation");
498 
499  //tagPho_ConvSafeEleVeto_ = ((int)ConversionTools::hasMatchedPromptElectron(photon_tag.photon()->superCluster(), gsfElectronHandle, convH, beamSpotHandle->position()));
501 
502  HERE("get id");
503  if (workOnAOD_ < 2) {
504  HERE(Form("workOnAOD_<2. loose photon qual size=%d",int(loosePhotonQual->size())));
505 
506  edm::Ref<reco::PhotonCollection> photonRef(photons, photon_tag.idx());
507  HERE(Form("got photon ref, photon_tag.idx()=%d",photon_tag.idx()));
508 
509  //std::cout << "loosePhotonQual->at(photon_tag.idx())=" << loosePhotonQual->at(photon_tag.idx()) << std::endl;
510 
511  tagPho_idLoose_ = (loosePhotonQual.isValid()) ? (*loosePhotonQual)[photonRef] : -1;
512  tagPho_idTight_ = (tightPhotonQual.isValid()) ? (*tightPhotonQual)[photonRef] : -1;
513  }
514  else {
515  tagPho_idLoose_ = (loosePhotonQual_Vec.isValid()) ? loosePhotonQual_Vec->at(photon_tag.idx()) : -1;
516  tagPho_idTight_ = (tightPhotonQual_Vec.isValid()) ? tightPhotonQual_Vec->at(photon_tag.idx()) : -1;
517  }
518 
519  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "photon tag ID = "
520  << tagPho_idLoose_ << " and "
521  << tagPho_idTight_;
522 
523  HERE(Form("tagPhoID= %d and %d",tagPho_idLoose_,tagPho_idTight_));
524 
525  HERE("reset pho gen");
526 
527  tagPho_genPt_=0;
529  tagPho_genEta_=0;
530  tagPho_genPhi_=0;
532  if (doGenJets_) {
533  tagPho_genDeltaR_=9999.;
534  for (std::vector<reco::GenParticle>::const_iterator itmc=genparticles->begin();
535  itmc!=genparticles->end(); itmc++) {
536  if (itmc->status() == 1 && itmc->pdgId()==22) {
538  itmc->eta(),itmc->phi());
539  if (dR < tagPho_genDeltaR_) {
540  tagPho_genPt_ = itmc->pt();
541  tagPho_genEnergy_ = itmc->energy();
542  tagPho_genEta_ = itmc->eta();
543  tagPho_genPhi_ = itmc->phi();
545  }
546  }
547  }
548  }
549  }
550 
551  HERE("run over PFJets");
552 
553  // Run over PFJets //
554 
555  if(doPFJets_ && (nPFJets_>0)){
556 
557  // Get RecHits in HB and HE
559  iEvent.getByToken(tok_HBHE_,hbhereco);
560  if(!hbhereco.isValid() && !workOnAOD_) {
561  edm::LogWarning("GammaJetAnalysis") << "Could not find HBHERecHit named "
562  << hbheRecHitName_;
563  return;
564  }
565 
566  // Get RecHits in HF
568  iEvent.getByToken(tok_HF_,hfreco);
569  if(!hfreco.isValid() && !workOnAOD_) {
570  edm::LogWarning("GammaJetAnalysis") << "Could not find HFRecHit named "
571  << hfRecHitName_;
572  return;
573  }
574 
575  // Get RecHits in HO
577  iEvent.getByToken(tok_HO_,horeco);
578  if(!horeco.isValid() && !workOnAOD_) {
579  edm::LogWarning("GammaJetAnalysis") << "Could not find HORecHit named "
580  << hoRecHitName_;
581  return;
582  }
583 
584  HERE("get geometry");
585 
586  // Get geometry
587  edm::ESHandle<CaloGeometry> geoHandle;
588  evSetup.get<CaloGeometryRecord>().get(geoHandle);
589  const CaloSubdetectorGeometry *HBGeom = geoHandle->getSubdetectorGeometry(DetId::Hcal, 1);
590  const CaloSubdetectorGeometry *HEGeom = geoHandle->getSubdetectorGeometry(DetId::Hcal, 2);
591  const CaloSubdetectorGeometry *HOGeom = geoHandle->getSubdetectorGeometry(DetId::Hcal, 3);
592  const CaloSubdetectorGeometry *HFGeom = geoHandle->getSubdetectorGeometry(DetId::Hcal, 4);
593 
594  HERE("work");
595 
596  int HBHE_n = 0;
597  if (hbhereco.isValid()) {
598  for(edm::SortedCollection<HBHERecHit,edm::StrictWeakOrdering<HBHERecHit>>::const_iterator ith=hbhereco->begin(); ith!=hbhereco->end(); ++ith){
599  HBHE_n++;
600  if(iEvent.id().event() == debugEvent){
601  if (debug_>1)
602  edm::LogInfo("GammaJetAnalysis") << (*ith).id().ieta() << " "
603  << (*ith).id().iphi();
604  }
605  }
606  }
607  int HF_n = 0;
608  if (hfreco.isValid()) {
609  for(edm::SortedCollection<HFRecHit,edm::StrictWeakOrdering<HFRecHit>>::const_iterator ith=hfreco->begin(); ith!=hfreco->end(); ++ith){
610  HF_n++;
611  if(iEvent.id().event() == debugEvent){
612  }
613  }
614  }
615  int HO_n = 0;
616  if (horeco.isValid()) {
617  for(edm::SortedCollection<HORecHit,edm::StrictWeakOrdering<HORecHit>>::const_iterator ith=horeco->begin(); ith!=horeco->end(); ++ith){
618  HO_n++;
619  if(iEvent.id().event() == debugEvent){
620  }
621  }
622  }
623 
624  HERE("Get primary vertices");
625 
626  // Get primary vertices
628  iEvent.getByToken(tok_PV_,pv);
629  if(!pv.isValid()) {
630  edm::LogWarning("GammaJetAnalysis") << "Could not find Vertex named "
631  << pvCollName_;
632  return;
633  }
634  pf_NPV_ = 0;
635  for(std::vector<reco::Vertex>::const_iterator it=pv->begin(); it!=pv->end(); ++it){
636  if(!it->isFake() && it->ndof() > 4) ++pf_NPV_;
637  }
638 
639  HERE("get corrector");
640 
641  // Get jet corrections
642  const JetCorrector* correctorPF = JetCorrector::getJetCorrector(pfJetCorrName_,evSetup);
643 
644  // sort jets by corrected et
645  std::set<PFJetCorretPair, PFJetCorretPairComp> pfjetcorretpairset;
646  for(reco::PFJetCollection::const_iterator it=pfjets->begin(); it!=pfjets->end(); ++it) {
647  const reco::PFJet* jet=&(*it);
648  // do not let the jet to be close to the tag photon
649  if (deltaR(photon_tag,jet)<0.5) continue;
650  double jec = correctorPF->correction(*it, iEvent, evSetup);
651  pfjetcorretpairset.insert( PFJetCorretPair(jet, jec));
652  }
653 
654  PFJetCorretPair pfjet_probe;
655  PFJetCorretPair pf_2ndjet;
656  PFJetCorretPair pf_3rdjet;
657  int jet_cntr=0;
658  for(std::set<PFJetCorretPair, PFJetCorretPairComp>::const_iterator it=pfjetcorretpairset.begin(); it!=pfjetcorretpairset.end(); ++it) {
659  PFJetCorretPair jet=(*it);
660  ++jet_cntr;
661  if(jet_cntr==1) pfjet_probe = jet;
662  else if(jet_cntr==2) pf_2ndjet = jet;
663  else if(jet_cntr==3) pf_3rdjet = jet;
664  //else break; // don't break for the statistics
665  }
666 
667  HERE("reached selection");
668 
669  // Check selection
670  int failSelPF = 0;
671 
672  if (!pfjet_probe.isValid()) failSelPF |= 1;
673  else {
674  if (pfjet_probe.scaledEt() < jetEtMin_) failSelPF |= 2;
675  if (calc_dPhi(photon_tag,pfjet_probe) < photonJetDPhiMin_) failSelPF |= 3;
676  if (deltaR(photon_tag,pfjet_probe.jet())<0.5) failSelPF |= 4;
677  if (pf_2ndjet.isValid() && (pf_2ndjet.scaledEt() > jet2EtMax_))
678  failSelPF |= 5;
679  if (pf_3rdjet.isValid() && (pf_3rdjet.scaledEt() > jet3EtMax_))
680  failSelPF |= 6;
681  }
682 
683  if (!failSelPF) {
684  // put values into 3rd jet quantities
685  if (pf_3rdjet.isValid()) {
686  pf_thirdjet_et_ = pf_3rdjet.jet()->et();
687  pf_thirdjet_pt_ = pf_3rdjet.jet()->pt();
688  pf_thirdjet_p_ = pf_3rdjet.jet()->p();
689  pf_thirdjet_px_ = pf_3rdjet.jet()->px();
690  pf_thirdjet_py_ = pf_3rdjet.jet()->py();
691  pf_thirdjet_E_ = pf_3rdjet.jet()->energy();
692  pf_thirdjet_eta_= pf_3rdjet.jet()->eta();
693  pf_thirdjet_phi_= pf_3rdjet.jet()->phi();
694  pf_thirdjet_scale_= pf_3rdjet.scale();
695  }
696  else {
697  pf_thirdjet_et_ = 0;
702  }
703 
704  HERE("fill PF jet");
705 
706  int types = 0;
707  int ntypes = 0;
708 
710  // Get PF constituents and fill HCAL towers
712 
713  // fill jet variables
714  // First start from a second jet, then fill the first jet
715  PFJetCorretPair pfjet_probe_store = pfjet_probe;
716  for (int iJet=2; iJet>0; iJet--) {
717  // prepare the container
719 
720  if (iJet==2) pfjet_probe= pf_2ndjet;
721  else pfjet_probe = pfjet_probe_store;
722 
723  if(!pfjet_probe.jet()) {
724  if (iJet==2) {
725  // put zeros into 2nd jet quantities
727  } else {
728  edm::LogWarning("GammaJetAnalysis") << "error in the code: leading pf jet is null";
729  }
730  continue;
731  }
732 
733  HERE("work further");
734 
735  // temporary variables
736  std::map<int,std::pair<int,std::set<float>>> ppfjet_rechits;
737  std::map<float,int> ppfjet_clusters;
738 
739  // fill the values
740  ppfjet_pt_ = pfjet_probe.jet()->pt();
741  ppfjet_p_ = pfjet_probe.jet()->p();
742  ppfjet_eta_ = pfjet_probe.jet()->eta();
743  ppfjet_area_ = pfjet_probe.jet()->jetArea();
744  ppfjet_E_ = pfjet_probe.jet()->energy();
746  ppfjet_phi_ = pfjet_probe.jet()->phi();
749  ppfjet_nConstituents_ = pfjet_probe.jet()->nConstituents();
753  ppfjet_scale_ = pfjet_probe.scale();
754  ppfjet_ntwrs_=0;
757 
758  HERE("Get PF constituents");
759 
760  // Get PF constituents and fill HCAL towers
761  std::vector<reco::PFCandidatePtr> probeconst=pfjet_probe.jet()->getPFConstituents();
762  HERE(Form("probeconst.size=%d",int(probeconst.size())));
763  int iPF=0;
764  for(std::vector<reco::PFCandidatePtr>::const_iterator it=probeconst.begin(); it!=probeconst.end(); ++it){
765  bool hasTrack = false;
766  if (!(*it)) HERE("\tnull probeconst iterator value\n");
767  reco::PFCandidate::ParticleType candidateType = (*it)->particleId();
768  iPF++;
769  HERE(Form("iPF=%d",iPF));
770 
771  // store information
772  switch(candidateType){
774  ppfjet_unkown_E_ += (*it)->energy();
775  ppfjet_unkown_px_ += (*it)->px();
776  ppfjet_unkown_py_ += (*it)->py();
777  ppfjet_unkown_pz_ += (*it)->pz();
778  ppfjet_unkown_EcalE_ += (*it)->ecalEnergy();
780  continue;
782  {
783  ppfjet_had_E_.push_back((*it)->energy());
784  ppfjet_had_px_.push_back((*it)->px());
785  ppfjet_had_py_.push_back((*it)->py());
786  ppfjet_had_pz_.push_back((*it)->pz());
787  ppfjet_had_EcalE_.push_back((*it)->ecalEnergy());
788  ppfjet_had_rawHcalE_.push_back((*it)->rawHcalEnergy());
789  ppfjet_had_id_.push_back(0);
790  ppfjet_had_ntwrs_.push_back(0);
791  ppfjet_had_n_++;
792 
793  if(doGenJets_){
794  float gendr = 99999;
795  float genE = 0;
796  int genpdgId = 0;
797  for(std::vector<reco::GenParticle>::const_iterator itmc = genparticles->begin(); itmc != genparticles->end(); itmc++){
798  if(itmc->status() == 1 && itmc->pdgId() > 100){
799  double dr = deltaR((*it)->eta(),(*it)->phi(),itmc->eta(),itmc->phi());
800  if(dr < gendr){
801  gendr = dr;
802  genE = itmc->energy();
803  genpdgId = itmc->pdgId();
804  }
805  }
806  }
807  ppfjet_had_E_mctruth_.push_back(genE);
808  ppfjet_had_mcpdgId_.push_back(genpdgId);
809  }
810 
811  reco::TrackRef trackRef = (*it)->trackRef();
812  if(trackRef.isNonnull()){
813  reco::Track track = *trackRef;
814  ppfjet_candtrack_px_.push_back(track.px());
815  ppfjet_candtrack_py_.push_back(track.py());
816  ppfjet_candtrack_pz_.push_back(track.pz());
817  ppfjet_candtrack_EcalE_.push_back((*it)->ecalEnergy());
819  hasTrack = true;
821  }
822  else{
823  ppfjet_had_candtrackind_.push_back(-2);
824  }
825  }
826  break;
828  ppfjet_electron_E_ += (*it)->energy();
829  ppfjet_electron_px_ += (*it)->px();
830  ppfjet_electron_py_ += (*it)->py();
831  ppfjet_electron_pz_ += (*it)->pz();
832  ppfjet_electron_EcalE_ += (*it)->ecalEnergy();
834  continue;
836  ppfjet_muon_E_ += (*it)->energy();
837  ppfjet_muon_px_ += (*it)->px();
838  ppfjet_muon_py_ += (*it)->py();
839  ppfjet_muon_pz_ += (*it)->pz();
840  ppfjet_muon_EcalE_ += (*it)->ecalEnergy();
841  ppfjet_muon_n_++;
842  continue;
844  ppfjet_photon_E_ += (*it)->energy();
845  ppfjet_photon_px_ += (*it)->px();
846  ppfjet_photon_py_ += (*it)->py();
847  ppfjet_photon_pz_ += (*it)->pz();
848  ppfjet_photon_EcalE_ += (*it)->ecalEnergy();
850  continue;
852  {
853  ppfjet_had_E_.push_back((*it)->energy());
854  ppfjet_had_px_.push_back((*it)->px());
855  ppfjet_had_py_.push_back((*it)->py());
856  ppfjet_had_pz_.push_back((*it)->pz());
857  ppfjet_had_EcalE_.push_back((*it)->ecalEnergy());
858  ppfjet_had_rawHcalE_.push_back((*it)->rawHcalEnergy());
859  ppfjet_had_id_.push_back(1);
860  ppfjet_had_candtrackind_.push_back(-1);
861  ppfjet_had_ntwrs_.push_back(0);
862  ppfjet_had_n_++;
863 
864  if(doGenJets_){
865  float gendr = 99999;
866  float genE = 0;
867  int genpdgId = 0;
868  for(std::vector<reco::GenParticle>::const_iterator itmc = genparticles->begin(); itmc != genparticles->end(); itmc++){
869  if(itmc->status() == 1 && itmc->pdgId() > 100){
870  double dr = deltaR((*it)->eta(),(*it)->phi(),itmc->eta(),itmc->phi());
871  if(dr < gendr){
872  gendr = dr;
873  genE = itmc->energy();
874  genpdgId = itmc->pdgId();
875  }
876  }
877  }
878  ppfjet_had_E_mctruth_.push_back(genE);
879  ppfjet_had_mcpdgId_.push_back(genpdgId);
880  }
881 
882  break;
883  }
885  {
886  ppfjet_had_E_.push_back((*it)->energy());
887  ppfjet_had_px_.push_back((*it)->px());
888  ppfjet_had_py_.push_back((*it)->py());
889  ppfjet_had_pz_.push_back((*it)->pz());
890  ppfjet_had_EcalE_.push_back((*it)->ecalEnergy());
891  ppfjet_had_rawHcalE_.push_back((*it)->rawHcalEnergy());
892  ppfjet_had_id_.push_back(2);
893  ppfjet_had_candtrackind_.push_back(-1);
894  ppfjet_had_ntwrs_.push_back(0);
895  ppfjet_had_n_++;
896 
897  if(doGenJets_){
898  float gendr = 99999;
899  float genE = 0;
900  int genpdgId = 0;
901  for(std::vector<reco::GenParticle>::const_iterator itmc = genparticles->begin(); itmc != genparticles->end(); itmc++){
902  if(itmc->status() == 1 && itmc->pdgId() > 100){
903  double dr = deltaR((*it)->eta(),(*it)->phi(),itmc->eta(),itmc->phi());
904  if(dr < gendr){
905  gendr = dr;
906  genE = itmc->energy();
907  genpdgId = itmc->pdgId();
908  }
909  }
910  }
911  ppfjet_had_E_mctruth_.push_back(genE);
912  ppfjet_had_mcpdgId_.push_back(genpdgId);
913  }
914 
915  break;
916  }
918  {
919  ppfjet_had_E_.push_back((*it)->energy());
920  ppfjet_had_px_.push_back((*it)->px());
921  ppfjet_had_py_.push_back((*it)->py());
922  ppfjet_had_pz_.push_back((*it)->pz());
923  ppfjet_had_EcalE_.push_back((*it)->ecalEnergy());
924  ppfjet_had_rawHcalE_.push_back((*it)->rawHcalEnergy());
925  ppfjet_had_id_.push_back(3);
926  ppfjet_had_candtrackind_.push_back(-1);
927  ppfjet_had_ntwrs_.push_back(0);
928  ppfjet_had_n_++;
929 
930  if(doGenJets_){
931  float gendr = 99999;
932  float genE = 0;
933  int genpdgId = 0;
934  for(std::vector<reco::GenParticle>::const_iterator itmc = genparticles->begin(); itmc != genparticles->end(); itmc++){
935  if(itmc->status() == 1 && itmc->pdgId() > 100){
936  double dr = deltaR((*it)->eta(),(*it)->phi(),itmc->eta(),itmc->phi());
937  if(dr < gendr){
938  gendr = dr;
939  genE = itmc->energy();
940  genpdgId = itmc->pdgId();
941  }
942  }
943  }
944  ppfjet_had_E_mctruth_.push_back(genE);
945  ppfjet_had_mcpdgId_.push_back(genpdgId);
946  }
947 
948  break;
949  }
950  }
951 
952  float HFHAD_E = 0;
953  float HFEM_E = 0;
954  int HFHAD_n_ = 0;
955  int HFEM_n_ = 0;
956  int HF_type_ = 0;
957  int maxElement=(*it)->elementsInBlocks().size();
958  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "maxElement=" << maxElement;
959  if (workOnAOD_==1) {
960  maxElement=0;
961  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "forced 0";
962  }
963  HERE(Form("maxElement=%d",maxElement));
964  for(int e=0; e<maxElement; ++e){
965  // Get elements from block
966  reco::PFBlockRef blockRef = (*it)->elementsInBlocks()[e].first;
967  const edm::OwnVector<reco::PFBlockElement>& elements = blockRef->elements();
968  for(unsigned iEle=0; iEle<elements.size(); iEle++) {
969  if(elements[iEle].index() == (*it)->elementsInBlocks()[e].second){
970  if(elements[iEle].type() == reco::PFBlockElement::HCAL){ // Element is HB or HE
971  HF_type_ |= 0x1;
972  // Get cluster and hits
973  reco::PFClusterRef clusterref = elements[iEle].clusterRef();
974  reco::PFCluster cluster = *clusterref;
975  double cluster_dR = deltaR(ppfjet_eta_,ppfjet_phi_,cluster.eta(),cluster.phi());
976  if(ppfjet_clusters.count(cluster_dR) == 0){
977  ppfjet_clusters[cluster_dR] = ppfjet_cluster_n_;
978  ppfjet_cluster_eta_.push_back(cluster.eta());
979  ppfjet_cluster_phi_.push_back(cluster.phi());
980  ppfjet_cluster_dR_.push_back(cluster_dR);
982  }
983  int cluster_ind = ppfjet_clusters[cluster_dR];
984  std::vector<std::pair<DetId,float>> hitsAndFracs = cluster.hitsAndFractions();
985 
986  // Run over hits and match
987  int nHits = hitsAndFracs.size();
988  for(int iHit=0; iHit<nHits; iHit++){
989  int etaPhiPF = getEtaPhi(hitsAndFracs[iHit].first);
990 
991  for(edm::SortedCollection<HBHERecHit,edm::StrictWeakOrdering<HBHERecHit>>::const_iterator ith=hbhereco->begin(); ith!=hbhereco->end(); ++ith){
992  int etaPhiRecHit = getEtaPhi((*ith).id());
993  if(etaPhiPF == etaPhiRecHit){
995  if(ppfjet_rechits.count((*ith).id()) == 0){
996  ppfjet_twr_ieta_.push_back((*ith).id().ieta());
997  ppfjet_twr_iphi_.push_back((*ith).id().iphi());
998  ppfjet_twr_depth_.push_back((*ith).id().depth());
999  ppfjet_twr_subdet_.push_back((*ith).id().subdet());
1000  ppfjet_twr_hade_.push_back((*ith).energy());
1001  ppfjet_twr_frac_.push_back(hitsAndFracs[iHit].second);
1002  ppfjet_rechits[(*ith).id()].second.insert(hitsAndFracs[iHit].second);
1003  ppfjet_twr_hadind_.push_back(ppfjet_had_n_ - 1);
1004  ppfjet_twr_elmttype_.push_back(0);
1005  ppfjet_twr_clusterind_.push_back(cluster_ind);
1006  if(hasTrack){
1008  }
1009  else{
1010  ppfjet_twr_candtrackind_.push_back(-1);
1011  }
1012  switch((*ith).id().subdet()){
1014  {
1015  const CaloCellGeometry *thisCell = HBGeom->getGeometry((*ith).id().rawId());
1016  const CaloCellGeometry::CornersVec& cv = thisCell->getCorners();
1017  float avgeta = (cv[0].eta() + cv[2].eta())/2.0;
1018  float avgphi = (static_cast<double>(cv[0].phi()) + static_cast<double>(cv[2].phi()))/2.0;
1019  if((cv[0].phi() < cv[2].phi()) && (debug_>1)) edm::LogInfo("GammaJetAnalysis") << "pHB" << cv[0].phi() << " " << cv[2].phi();
1020  if(cv[0].phi() < cv[2].phi()) avgphi = (2.0*3.141592653 + static_cast<double>(cv[0].phi()) + static_cast<double>(cv[2].phi()))/2.0;
1021  ppfjet_twr_dR_.push_back(deltaR(ppfjet_eta_,ppfjet_phi_,avgeta,avgphi));
1022  break;
1023  }
1025  {
1026  const CaloCellGeometry *thisCell = HEGeom->getGeometry((*ith).id().rawId());
1027  const CaloCellGeometry::CornersVec& cv = thisCell->getCorners();
1028  float avgeta = (cv[0].eta() + cv[2].eta())/2.0;
1029  float avgphi = (static_cast<double>(cv[0].phi()) + static_cast<double>(cv[2].phi()))/2.0;
1030  if((cv[0].phi() < cv[2].phi()) && (debug_>1)) edm::LogInfo("GammaJetAnalysis") << "pHE" << cv[0].phi() << " " << cv[2].phi();
1031  if(cv[0].phi() < cv[2].phi()) avgphi = (2.0*3.141592653 + static_cast<double>(cv[0].phi()) + static_cast<double>(cv[2].phi()))/2.0;
1032  ppfjet_twr_dR_.push_back(deltaR(ppfjet_eta_,ppfjet_phi_,avgeta,avgphi));
1033  break;
1034  }
1035  default:
1036  ppfjet_twr_dR_.push_back(-1);
1037  break;
1038  }
1039  ppfjet_rechits[(*ith).id()].first = ppfjet_ntwrs_;
1040  ++ppfjet_ntwrs_;
1041  }
1042  else if(ppfjet_rechits[(*ith).id()].second.count(hitsAndFracs[iHit].second) == 0){
1043  ppfjet_twr_frac_.at(ppfjet_rechits[(*ith).id()].first) += hitsAndFracs[iHit].second;
1044  if(cluster_dR < ppfjet_cluster_dR_.at(ppfjet_twr_clusterind_.at(ppfjet_rechits[(*ith).id()].first))){
1045  ppfjet_twr_clusterind_.at(ppfjet_rechits[(*ith).id()].first) = cluster_ind;
1046  }
1047  ppfjet_rechits[(*ith).id()].second.insert(hitsAndFracs[iHit].second);
1048  }
1049  } // Test if ieta,iphi matches
1050  } // Loop over rechits
1051  } // Loop over hits
1052  } // Test if element is from HCAL
1053  else if(elements[iEle].type() == reco::PFBlockElement::HFHAD){ // Element is HF
1054  types |= 0x2;
1055  ntypes++;
1056  HFHAD_n_++;
1057  HF_type_ |= 0x2;
1058 
1060 
1061  for(edm::SortedCollection<HFRecHit,edm::StrictWeakOrdering<HFRecHit>>::const_iterator ith=hfreco->begin(); ith!=hfreco->end(); ++ith){
1062  if((*ith).id().depth() == 1) continue; // Remove long fibers
1063  const CaloCellGeometry *thisCell = HFGeom->getGeometry((*ith).id().rawId());
1064  const CaloCellGeometry::CornersVec& cv = thisCell->getCorners();
1065 
1066  bool passMatch = false;
1067  if((*it)->eta() < cv[0].eta() && (*it)->eta() > cv[2].eta()){
1068  if((*it)->phi() < cv[0].phi() && (*it)->phi() > cv[2].phi()) passMatch = true;
1069  else if(cv[0].phi() < cv[2].phi()){
1070  if((*it)->phi() < cv[0].phi()) passMatch = true;
1071  else if((*it)->phi() > cv[2].phi()) passMatch = true;
1072  }
1073  }
1074 
1075  if(passMatch){
1076  ppfjet_had_ntwrs_.at(ppfjet_had_n_ - 1)++;
1077  ppfjet_twr_ieta_.push_back((*ith).id().ieta());
1078  ppfjet_twr_iphi_.push_back((*ith).id().iphi());
1079  ppfjet_twr_depth_.push_back((*ith).id().depth());
1080  ppfjet_twr_subdet_.push_back((*ith).id().subdet());
1081  ppfjet_twr_hade_.push_back((*ith).energy());
1082  ppfjet_twr_frac_.push_back(1.0);
1083  ppfjet_twr_hadind_.push_back(ppfjet_had_n_ - 1);
1084  ppfjet_twr_elmttype_.push_back(1);
1085  ppfjet_twr_clusterind_.push_back(-1);
1086  ppfjet_twr_candtrackind_.push_back(-1);
1087  float avgeta = (cv[0].eta() + cv[2].eta())/2.0;
1088  float avgphi = (static_cast<double>(cv[0].phi()) + static_cast<double>(cv[2].phi()))/2.0;
1089  if((cv[0].phi() < cv[2].phi()) && (debug_>1)) edm::LogInfo("GammaJetAnalysis") << "pHFhad" << cv[0].phi() << " " << cv[2].phi();
1090  if(cv[0].phi() < cv[2].phi()) avgphi = (2.0*3.141592653 + static_cast<double>(cv[0].phi()) + static_cast<double>(cv[2].phi()))/2.0;
1091  ppfjet_twr_dR_.push_back(deltaR(ppfjet_eta_,ppfjet_phi_,avgeta,avgphi));
1092  ++ppfjet_ntwrs_;
1093  HFHAD_E += (*ith).energy();
1094  }
1095  }
1096  }
1097  else if(elements[iEle].type() == reco::PFBlockElement::HFEM){ // Element is HF
1098  types |= 0x4;
1099  ntypes++;
1100  HFEM_n_++;
1101  HF_type_ |= 0x4;
1102 
1103  for(edm::SortedCollection<HFRecHit,edm::StrictWeakOrdering<HFRecHit>>::const_iterator ith=hfreco->begin(); ith!=hfreco->end(); ++ith){
1104  if((*ith).id().depth() == 2) continue; // Remove short fibers
1105  const CaloCellGeometry *thisCell = HFGeom->getGeometry((*ith).id().rawId());
1106  const CaloCellGeometry::CornersVec& cv = thisCell->getCorners();
1107 
1108  bool passMatch = false;
1109  if((*it)->eta() < cv[0].eta() && (*it)->eta() > cv[2].eta()){
1110  if((*it)->phi() < cv[0].phi() && (*it)->phi() > cv[2].phi()) passMatch = true;
1111  else if(cv[0].phi() < cv[2].phi()){
1112  if((*it)->phi() < cv[0].phi()) passMatch = true;
1113  else if((*it)->phi() > cv[2].phi()) passMatch = true;
1114  }
1115  }
1116 
1117  if(passMatch){
1118  ppfjet_had_ntwrs_.at(ppfjet_had_n_ - 1)++;
1119  ppfjet_twr_ieta_.push_back((*ith).id().ieta());
1120  ppfjet_twr_iphi_.push_back((*ith).id().iphi());
1121  ppfjet_twr_depth_.push_back((*ith).id().depth());
1122  ppfjet_twr_subdet_.push_back((*ith).id().subdet());
1123  ppfjet_twr_hade_.push_back((*ith).energy());
1124  ppfjet_twr_frac_.push_back(1.0);
1125  ppfjet_twr_hadind_.push_back(ppfjet_had_n_ - 1);
1126  ppfjet_twr_elmttype_.push_back(2);
1127  ppfjet_twr_clusterind_.push_back(-1);
1128  ppfjet_twr_candtrackind_.push_back(-1);
1129  float avgeta = (cv[0].eta() + cv[2].eta())/2.0;
1130  float avgphi = (static_cast<double>(cv[0].phi()) + static_cast<double>(cv[2].phi()))/2.0;
1131  if((cv[0].phi() < cv[2].phi()) && (debug_>1)) edm::LogInfo("GammaJetAnalysis") << "pHFem" << cv[0].phi() << " " << cv[2].phi();
1132  if(cv[0].phi() < cv[2].phi()) avgphi = (2.0*3.141592653 + static_cast<double>(cv[0].phi()) + static_cast<double>(cv[2].phi()))/2.0;
1133  ppfjet_twr_dR_.push_back(deltaR(ppfjet_eta_,ppfjet_phi_,avgeta,avgphi));
1134  ++ppfjet_ntwrs_;
1135  HFEM_E += (*ith).energy();
1136  }
1137  }
1138  }
1139  else if(elements[iEle].type() == reco::PFBlockElement::HO){ // Element is HO
1140  types |= 0x8;
1141  ntypes++;
1142  HF_type_ |= 0x8;
1143  reco::PFClusterRef clusterref = elements[iEle].clusterRef();
1144  reco::PFCluster cluster = *clusterref;
1145  double cluster_dR = deltaR(ppfjet_eta_,ppfjet_phi_,cluster.eta(),cluster.phi());
1146  if(ppfjet_clusters.count(cluster_dR) == 0){
1147  ppfjet_clusters[cluster_dR] = ppfjet_cluster_n_;
1148  ppfjet_cluster_eta_.push_back(cluster.eta());
1149  ppfjet_cluster_phi_.push_back(cluster.phi());
1150  ppfjet_cluster_dR_.push_back(cluster_dR);
1152  }
1153  int cluster_ind = ppfjet_clusters[cluster_dR];
1154 
1155  std::vector<std::pair<DetId,float>> hitsAndFracs = cluster.hitsAndFractions();
1156  int nHits = hitsAndFracs.size();
1157  for(int iHit=0; iHit<nHits; iHit++){
1158  int etaPhiPF = getEtaPhi(hitsAndFracs[iHit].first);
1159 
1160  for(edm::SortedCollection<HORecHit,edm::StrictWeakOrdering<HORecHit>>::const_iterator ith=horeco->begin(); ith!=horeco->end(); ++ith){
1161  int etaPhiRecHit = getEtaPhi((*ith).id());
1162  if(etaPhiPF == etaPhiRecHit){
1163  ppfjet_had_ntwrs_.at(ppfjet_had_n_ - 1)++;
1164  if(ppfjet_rechits.count((*ith).id()) == 0){
1165  ppfjet_twr_ieta_.push_back((*ith).id().ieta());
1166  ppfjet_twr_iphi_.push_back((*ith).id().iphi());
1167  ppfjet_twr_depth_.push_back((*ith).id().depth());
1168  ppfjet_twr_subdet_.push_back((*ith).id().subdet());
1169  ppfjet_twr_hade_.push_back((*ith).energy());
1170  ppfjet_twr_frac_.push_back(hitsAndFracs[iHit].second);
1171  ppfjet_rechits[(*ith).id()].second.insert(hitsAndFracs[iHit].second);
1172  ppfjet_twr_hadind_.push_back(ppfjet_had_n_ - 1);
1173  ppfjet_twr_elmttype_.push_back(3);
1174  ppfjet_twr_clusterind_.push_back(cluster_ind);
1175  if(hasTrack){
1177  }
1178  else{
1179  ppfjet_twr_candtrackind_.push_back(-1);
1180  }
1181  const CaloCellGeometry *thisCell = HOGeom->getGeometry((*ith).id().rawId());
1182  const CaloCellGeometry::CornersVec& cv = thisCell->getCorners();
1183  float avgeta = (cv[0].eta() + cv[2].eta())/2.0;
1184  float avgphi = (static_cast<double>(cv[0].phi()) + static_cast<double>(cv[2].phi()))/2.0;
1185  if((cv[0].phi() < cv[2].phi()) && (debug_>1)) edm::LogInfo("GammaJetAnalysis") << "pHO" << cv[0].phi() << " " << cv[2].phi();
1186  if(cv[0].phi() < cv[2].phi()) avgphi = (2.0*3.141592653 + static_cast<double>(cv[0].phi()) + static_cast<double>(cv[2].phi()))/2.0;
1187 
1188  ppfjet_twr_dR_.push_back(deltaR(ppfjet_eta_,ppfjet_phi_,avgeta,avgphi));
1189  ppfjet_rechits[(*ith).id()].first = ppfjet_ntwrs_;
1190  ++ppfjet_ntwrs_;
1191  }
1192  else if(ppfjet_rechits[(*ith).id()].second.count(hitsAndFracs[iHit].second) == 0){
1193  ppfjet_twr_frac_.at(ppfjet_rechits[(*ith).id()].first) += hitsAndFracs[iHit].second;
1194  if(cluster_dR < ppfjet_cluster_dR_.at(ppfjet_twr_clusterind_.at(ppfjet_rechits[(*ith).id()].first))){
1195  ppfjet_twr_clusterind_.at(ppfjet_rechits[(*ith).id()].first) = cluster_ind;
1196  }
1197  ppfjet_rechits[(*ith).id()].second.insert(hitsAndFracs[iHit].second);
1198  }
1199  } // Test if ieta,iphi match
1200  } // Loop over rechits
1201  } // Loop over hits
1202  } // Test if element is from HO
1203  } // Test for right element index
1204  } // Loop over elements
1205  } // Loop over elements in blocks
1206  switch(candidateType){
1208  ppfjet_had_emf_.push_back(HFEM_E/(HFEM_E + HFHAD_E));
1209  break;
1211  ppfjet_had_emf_.push_back(-1);
1212  break;
1213  default:
1214  ppfjet_had_emf_.push_back(-1);
1215  break;
1216  }
1217  } // Loop over PF constitutents
1218 
1219  if(doGenJets_){
1220  // fill genjet variables
1221  ppfjet_gendr_ = 99999.;
1222  ppfjet_genpt_ = 0;
1223  ppfjet_genp_ = 0;
1224  for(std::vector<reco::GenJet>::const_iterator it=genjets->begin(); it!=genjets->end(); ++it){
1225  const reco::GenJet* jet=&(*it);
1226  double dr=deltaR(jet, pfjet_probe.jet());
1227  if(dr<ppfjet_gendr_) {
1228  ppfjet_gendr_ = dr;
1229  ppfjet_genpt_ = jet->pt();
1230  ppfjet_genp_ = jet->p();
1231  ppfjet_genE_ = jet->energy();
1232  }
1233  }
1234  } // doGenJets_
1235  if (iJet==2) {
1237  }
1238  }
1239  // double jer= (ppfjet_genpt_==double(0)) ?
1240  // 0. : pfjet_probe.jet()->et()/ppfjet_genpt_;
1242 
1245  iEvent.getByToken(tok_PFMET_, pfmet_h);
1246  if (!pfmet_h.isValid()) {
1247  edm::LogWarning("GammaJetAnalysis") << " could not find " << pfMETColl;
1248  return;
1249  }
1250  met_value_ = pfmet_h->begin()->et();
1251  met_phi_ = pfmet_h->begin()->phi();
1252  met_sumEt_ = pfmet_h->begin()->sumEt();
1253 
1255  iEvent.getByToken(tok_PFType1MET_, pfmetType1_h);
1256  if ( pfmetType1_h.isValid()) {
1257  metType1_value_ = pfmetType1_h->begin()->et();
1258  metType1_phi_ = pfmetType1_h->begin()->phi();
1259  metType1_sumEt_ = pfmetType1_h->begin()->sumEt();
1260  }
1261  else {
1262  // do we need an exception here?
1263  metType1_value_ = -999.;
1264  metType1_phi_ = -999.;
1265  metType1_sumEt_ = -999.;
1266  }
1267 
1268 
1269  // fill photon+jet variables
1270  pf_tree_->Fill();
1271  }
1272  }
1273  return;
1274 
1275 }
RunNumber_t run() const
Definition: EventID.h:39
type
Definition: HCALResponse.h:21
EventNumber_t event() const
Definition: EventID.h:41
void copy_leadingPfJetVars_to_pfJet2()
std::vector< float > ppfjet_cluster_phi_
int i
Definition: DBlmapReader.cc:9
float hcalTowerSumEtConeDR04() const
Hcal isolation sum.
Definition: Photon.h:388
bool isValid() const
edm::EDGetTokenT< std::vector< Bool_t > > tok_tightPhotonV_
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:215
void idx(int set_idx)
ParticleType
particle types
Definition: PFCandidate.h:44
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
std::vector< float > ppfjet_had_py_
std::vector< float > ppfjet_candtrack_px_
edm::EDGetTokenT< reco::ConversionCollection > tok_Conv_
edm::EDGetTokenT< GenEventInfoProduct > tok_GenEvInfo_
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:47
virtual double energy() const final
energy
std::vector< float > ppfjet_candtrack_pz_
edm::EDGetTokenT< reco::PFCandidateCollection > tok_PFCand_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
std::vector< int > photonTrigFired_
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
edm::EDGetTokenT< edm::SortedCollection< HFRecHit, edm::StrictWeakOrdering< HFRecHit > > > tok_HF_
float chargedHadronEnergyFraction() const
chargedHadronEnergyFraction
Definition: PFJet.h:100
std::vector< float > ppfjet_had_E_
edm::EDGetTokenT< double > tok_Rho_
edm::EDGetTokenT< edm::TriggerResults > tok_TrigRes_
std::vector< int > ppfjet_twr_ieta_
std::vector< int > ppfjet_twr_hadind_
size_type size() const
Definition: OwnVector.h:264
std::string hoRecHitName_
std::vector< int > ppfjet_twr_subdet_
std::vector< int > ppfjet_had_candtrackind_
virtual double phi() const final
momentum azimuthal angle
float ecalRecHitSumEtConeDR04() const
Definition: Photon.h:386
const reco::PFJet * jet(void) const
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
Definition: CaloCluster.h:192
std::vector< float > pfTkIsoWithVertex(const reco::Photon *localPho1, edm::Handle< reco::PFCandidateCollection > pfHandle, edm::Handle< reco::VertexCollection > vtxHandle, float dRmax, float dRvetoBarrel, float dRvetoEndcap, float ptMin, float dzMax, float dxyMax, reco::PFCandidate::ParticleType pfToUse)
std::string hbheRecHitName_
Strings::size_type size() const
Definition: TriggerNames.cc:39
edm::EDGetTokenT< reco::PFMETCollection > tok_PFMET_
edm::EDGetTokenT< reco::VertexCollection > tok_Vertex_
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:622
unsigned int debugEvent
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:40
edm::EDGetTokenT< reco::BeamSpot > tok_BS_
int chargedMultiplicity() const
chargedMultiplicity
Definition: PFJet.h:155
Strings const & triggerNames() const
Definition: TriggerNames.cc:24
Jets made from PFObjects.
Definition: PFJet.h:21
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:163
std::string photonCollName_
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
std::vector< float > ppfjet_twr_frac_
dictionary elements
U second(std::pair< T, U > const &p)
edm::EDGetTokenT< std::vector< reco::GenParticle > > tok_GenPart_
std::vector< int > ppfjet_had_id_
float neutralEmEnergyFraction() const
neutralEmEnergyFraction
Definition: PFJet.h:152
float met_value_
MET info.
std::vector< int > jetTrigPrescale_
std::vector< int > ppfjet_twr_clusterind_
edm::EDGetTokenT< edm::SortedCollection< HORecHit, edm::StrictWeakOrdering< HORecHit > > > tok_HO_
std::string hfRecHitName_
std::vector< float > ppfjet_candtrack_py_
float pfEcalIso(const reco::Photon *localPho1, edm::Handle< reco::PFCandidateCollection > pfHandle, float dRmax, float dRVetoBarrel, float dRVetoEndcap, float etaStripBarrel, float etaStripEndcap, float energyBarrel, float energyEndcap, reco::PFCandidate::ParticleType pfToUse)
float pfHcalIso(const reco::Photon *localPho, edm::Handle< reco::PFCandidateCollection > pfHandle, float dRmax, float dRveto, reco::PFCandidate::ParticleType pfToUse)
std::vector< float > ppfjet_cluster_dR_
edm::EDGetTokenT< reco::PhotonCollection > tok_Photon_
double scale(void) const
float ppfjet_ChargedMultiplicity_
bool isValid() const
float sigmaIetaIeta() const
Definition: Photon.h:224
std::vector< float > ppfjet_twr_hade_
std::vector< int > ppfjet_twr_elmttype_
unsigned int helper_findTrigger(const std::vector< std::string > &list, const std::string &name)
std::vector< float > ppfjet_had_rawHcalE_
edm::EDGetTokenT< std::vector< Bool_t > > tok_loosePhotonV_
std::vector< int > ppfjet_twr_depth_
edm::EDGetTokenT< edm::ValueMap< Bool_t > > tok_tightPhoton_
const reco::Photon * photon(void) const
Jets made from MC generator particles.
Definition: GenJet.h:24
float neutralHadronEnergyFraction() const
neutralHadronEnergyFraction
Definition: PFJet.h:104
virtual double py() const final
y coordinate of momentum vector
float hadTowOverEm() const
the ration of hadronic energy in towers behind the BCs in the SC and the SC energy ...
Definition: Photon.h:210
edm::InputTag pfMETColl
static std::string const triggerResults
Definition: EdmProvDump.cc:41
float hadronicOverEm() const
the total hadronic over electromagnetic fraction
Definition: Photon.h:203
std::string genParticleCollName_
bool isValid() const
Definition: HandleBase.h:75
std::vector< float > ppfjet_twr_dR_
std::vector< float > ppfjet_candtrack_EcalE_
std::vector< float > ppfjet_cluster_eta_
dictionary cv
Definition: cuy.py:362
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:634
std::string pfJetCollName_
double getNeutralPVCorr(double eta, int intNPV, double area, bool isMC_)
float chargedEmEnergyFraction() const
chargedEmEnergyFraction
Definition: PFJet.h:144
std::vector< std::string > photonTrigNamesV_
T const * product() const
Definition: Handle.h:81
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:27
std::vector< int > jetTrigFired_
edm::EDGetTokenT< reco::PFJetCollection > tok_PFJet_
std::vector< float > ppfjet_had_E_mctruth_
edm::EDGetTokenT< edm::ValueMap< Bool_t > > tok_loosePhoton_
bool hasPixelSeed() const
Bool flagging photons having a non-zero size vector of Ref to electornPixel seeds.
Definition: Photon.h:75
std::vector< std::string > jetTrigNamesV_
const T & get() const
Definition: EventSetup.h:56
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
Definition: JetCorrector.cc:50
edm::EDGetTokenT< std::vector< reco::Vertex > > tok_PV_
std::pair< int, int > prescaleValues(const edm::Event &iEvent, const edm::EventSetup &iSetup, const std::string &trigger)
Combined L1T (pair.first) and HLT (pair.second) prescales per HLT path.
std::string genEventInfoName_
virtual double p() const final
magnitude of momentum vector
CornersVec const & getCorners() const
Returns the corner points of this cell&#39;s volume.
double deltaR(const reco::Jet *j1, const reco::Jet *j2)
int getEtaPhi(const DetId id)
float trkSumPtHollowConeDR04() const
Definition: Photon.h:402
edm::EDGetTokenT< edm::SortedCollection< HBHERecHit, edm::StrictWeakOrdering< HBHERecHit > > > tok_HBHE_
edm::EventID id() const
Definition: EventBase.h:59
std::string genJetCollName_
void HERE(const char *msg)
double scaledEt() const
std::string pvCollName_
HLTPrescaleProvider hltPrescaleProvider_
virtual float jetArea() const
get jet area
Definition: Jet.h:105
virtual int nConstituents() const
of constituents
Definition: Jet.h:65
std::vector< float > ppfjet_had_px_
std::vector< int > ppfjet_had_mcpdgId_
static std::atomic< unsigned int > counter
float r9() const
Definition: Photon.h:227
edm::EDGetTokenT< reco::GsfElectronCollection > tok_GsfElec_
double pt(void) const
virtual std::vector< reco::PFCandidatePtr > getPFConstituents() const
get all constituents
Definition: PFJet.cc:52
virtual double px() const final
x coordinate of momentum vector
std::vector< int > ppfjet_twr_iphi_
virtual double et() const final
transverse energy
std::vector< int > photonTrigPrescale_
std::vector< int > ppfjet_had_ntwrs_
edm::EDGetTokenT< std::vector< reco::GenJet > > tok_GenJet_
std::vector< float > ppfjet_had_pz_
virtual double eta() const final
momentum pseudorapidity
edm::EDGetTokenT< reco::PFMETCollection > tok_PFType1MET_
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:166
std::vector< float > ppfjet_had_emf_
std::vector< int > ppfjet_twr_candtrackind_
float calc_dPhi(const PhotonPair &pho, const JetPair_type &jet)
std::vector< std::vector< float > > tagPho_pfiso_mycharged03
std::vector< float > ppfjet_had_EcalE_
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:628
std::string pfJetCorrName_
virtual double pt() const final
transverse momentum
void GammaJetAnalysis::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1278 of file GammaJetAnalysis.cc.

References assert(), doGenJets_, doPFJets_, eventNumber_, eventPtHat_, eventWeight_, jetTrigFired_, jetTrigPrescale_, lumiBlock_, met_phi_, met_sumEt_, met_value_, metType1_phi_, metType1_sumEt_, metType1_value_, nGenJets_, nPFJets_, nPhotons_, pf_NPV_, pf_thirdjet_E_, pf_thirdjet_et_, pf_thirdjet_eta_, pf_thirdjet_p_, pf_thirdjet_phi_, pf_thirdjet_pt_, pf_thirdjet_px_, pf_thirdjet_py_, pf_thirdjet_scale_, pf_tree_, pfjet2_area_, pfjet2_candtrack_EcalE_, pfjet2_candtrack_px_, pfjet2_candtrack_py_, pfjet2_candtrack_pz_, pfjet2_ChargedEMFrac_, pfjet2_ChargedHadronFrac_, pfjet2_ChargedMultiplicity_, pfjet2_cluster_dR_, pfjet2_cluster_eta_, pfjet2_cluster_n_, pfjet2_cluster_phi_, pfjet2_E_, pfjet2_E_NPVcorr_, pfjet2_electron_E_, pfjet2_electron_EcalE_, pfjet2_electron_n_, pfjet2_electron_px_, pfjet2_electron_py_, pfjet2_electron_pz_, pfjet2_eta_, pfjet2_gendr_, pfjet2_genE_, pfjet2_genp_, pfjet2_genpt_, pfjet2_had_candtrackind_, pfjet2_had_E_, pfjet2_had_E_mctruth_, pfjet2_had_EcalE_, pfjet2_had_emf_, pfjet2_had_id_, pfjet2_had_mcpdgId_, pfjet2_had_n_, pfjet2_had_ntwrs_, pfjet2_had_px_, pfjet2_had_py_, pfjet2_had_pz_, pfjet2_had_rawHcalE_, pfjet2_muon_E_, pfjet2_muon_EcalE_, pfjet2_muon_n_, pfjet2_muon_px_, pfjet2_muon_py_, pfjet2_muon_pz_, pfjet2_ncandtracks_, pfjet2_nConstituents_, pfjet2_NeutralEMFrac_, pfjet2_NeutralHadronFrac_, pfjet2_ntwrs_, pfjet2_p_, pfjet2_phi_, pfjet2_photon_E_, pfjet2_photon_EcalE_, pfjet2_photon_n_, pfjet2_photon_px_, pfjet2_photon_py_, pfjet2_photon_pz_, pfjet2_pt_, pfjet2_scale_, pfjet2_twr_candtrackind_, pfjet2_twr_clusterind_, pfjet2_twr_depth_, pfjet2_twr_dR_, pfjet2_twr_elmttype_, pfjet2_twr_frac_, pfjet2_twr_hade_, pfjet2_twr_hadind_, pfjet2_twr_ieta_, pfjet2_twr_iphi_, pfjet2_twr_subdet_, pfjet2_unkown_E_, pfjet2_unkown_EcalE_, pfjet2_unkown_n_, pfjet2_unkown_px_, pfjet2_unkown_py_, pfjet2_unkown_pz_, pho_2nd_pt_, photonTrigFired_, photonTrigPrescale_, ppfjet_area_, ppfjet_candtrack_EcalE_, ppfjet_candtrack_px_, ppfjet_candtrack_py_, ppfjet_candtrack_pz_, ppfjet_ChargedEMFrac_, ppfjet_ChargedHadronFrac_, ppfjet_ChargedMultiplicity_, ppfjet_cluster_dR_, ppfjet_cluster_eta_, ppfjet_cluster_n_, ppfjet_cluster_phi_, ppfjet_E_, ppfjet_E_NPVcorr_, ppfjet_electron_E_, ppfjet_electron_EcalE_, ppfjet_electron_n_, ppfjet_electron_px_, ppfjet_electron_py_, ppfjet_electron_pz_, ppfjet_eta_, ppfjet_gendr_, ppfjet_genE_, ppfjet_genp_, ppfjet_genpt_, ppfjet_had_candtrackind_, ppfjet_had_E_, ppfjet_had_E_mctruth_, ppfjet_had_EcalE_, ppfjet_had_emf_, ppfjet_had_id_, ppfjet_had_mcpdgId_, ppfjet_had_n_, ppfjet_had_ntwrs_, ppfjet_had_px_, ppfjet_had_py_, ppfjet_had_pz_, ppfjet_had_rawHcalE_, ppfjet_muon_E_, ppfjet_muon_EcalE_, ppfjet_muon_n_, ppfjet_muon_px_, ppfjet_muon_py_, ppfjet_muon_pz_, ppfjet_ncandtracks_, ppfjet_nConstituents_, ppfjet_NeutralEMFrac_, ppfjet_NeutralHadronFrac_, ppfjet_ntwrs_, ppfjet_p_, ppfjet_phi_, ppfjet_photon_E_, ppfjet_photon_EcalE_, ppfjet_photon_n_, ppfjet_photon_px_, ppfjet_photon_py_, ppfjet_photon_pz_, ppfjet_pt_, ppfjet_scale_, ppfjet_twr_candtrackind_, ppfjet_twr_clusterind_, ppfjet_twr_depth_, ppfjet_twr_dR_, ppfjet_twr_elmttype_, ppfjet_twr_frac_, ppfjet_twr_hade_, ppfjet_twr_hadind_, ppfjet_twr_ieta_, ppfjet_twr_iphi_, ppfjet_twr_subdet_, ppfjet_unkown_E_, ppfjet_unkown_EcalE_, ppfjet_unkown_n_, ppfjet_unkown_px_, ppfjet_unkown_py_, ppfjet_unkown_pz_, rho2012_, rootfile_, rootHistFilename_, runNumber_, tagPho_ConvSafeEleVeto_, tagPho_EcalIsoDR04_, tagPho_energy_, tagPho_eta_, tagPho_genDeltaR_, tagPho_genEnergy_, tagPho_genEta_, tagPho_genPhi_, tagPho_genPt_, tagPho_HcalIsoDR0412_, tagPho_HcalIsoDR04_, tagPho_HoE_, tagPho_idLoose_, tagPho_idTight_, tagPho_pfiso_mycharged03, tagPho_pfiso_myneutral03_, tagPho_pfiso_myphoton03_, tagPho_phi_, tagPho_pixelSeed_, tagPho_pt_, tagPho_r9_, tagPho_sieie_, tagPho_TrkIsoHollowDR04_, and MainPageGenerator::tree.

1279 {
1280  rootfile_ = new TFile(rootHistFilename_.c_str(), "RECREATE");
1281  if (doPFJets_) {
1282  pf_tree_ = new TTree("pf_gammajettree", "tree for gamma+jet balancing using PFJets");
1283  assert(pf_tree_);
1284  }
1285 
1286  for (int iJet=0; iJet<2; iJet++) {
1287  bool doJet=doPFJets_;
1288  if (!doJet) continue;
1289  if (iJet>0) continue; // ! caloJet are no longer there, so store only once
1290  TTree *tree= pf_tree_;
1291 
1292  // Event triggers
1293  tree->Branch("photonTrig_fired", &photonTrigFired_);
1294  tree->Branch("photonTrig_prescale", &photonTrigPrescale_);
1295  tree->Branch("jetTrig_fired", &jetTrigFired_);
1296  tree->Branch("jetTrig_prescale", &jetTrigPrescale_);
1297 
1298  // Event info
1299  tree->Branch("RunNumber",&runNumber_, "RunNumber/I");
1300  tree->Branch("LumiBlock",&lumiBlock_, "LumiBlock/I");
1301  tree->Branch("EventNumber",&eventNumber_, "EventNumber/I");
1302  tree->Branch("EventWeight",&eventWeight_, "EventWeight/F");
1303  tree->Branch("EventPtHat",&eventPtHat_, "EventPtHat/F");
1304 
1305  // Photon info
1306  tree->Branch("rho2012", &rho2012_, "rho2012/F");
1307  tree->Branch("tagPho_pt", &tagPho_pt_, "tagPho_pt/F");
1308  tree->Branch("pho_2nd_pt", &pho_2nd_pt_, "pho_2nd_pt/F");
1309  tree->Branch("tagPho_energy", &tagPho_energy_, "tagPho_energy/F");
1310  tree->Branch("tagPho_eta", &tagPho_eta_, "tagPho_eta/F");
1311  tree->Branch("tagPho_phi", &tagPho_phi_, "tagPho_phi/F");
1312  tree->Branch("tagPho_sieie", &tagPho_sieie_, "tagPho_sieie/F");
1313  tree->Branch("tagPho_HoE", &tagPho_HoE_, "tagPho_HoE/F");
1314  tree->Branch("tagPho_r9", &tagPho_r9_, "tagPho_r9/F");
1315  tree->Branch("tagPho_EcalIsoDR04",&tagPho_EcalIsoDR04_, "tagPho_EcalIsoDR04/F");
1316  tree->Branch("tagPho_HcalIsoDR04",&tagPho_HcalIsoDR04_, "tagPho_HcalIsoDR04/F");
1317  tree->Branch("tagPho_HcalIsoDR0412",&tagPho_HcalIsoDR0412_, "tagPho_HcalIsoDR0412/F");
1318  tree->Branch("tagPho_TrkIsoHollowDR04",&tagPho_TrkIsoHollowDR04_, "tagPho_TrkIsoHollowDR04/F");
1319  tree->Branch("tagPho_pfiso_myphoton03",&tagPho_pfiso_myphoton03_, "tagPho_pfiso_myphoton03/F");
1320  tree->Branch("tagPho_pfiso_myneutral03",&tagPho_pfiso_myneutral03_, "tagPho_pfiso_myneutral03/F");
1321  tree->Branch("tagPho_pfiso_mycharged03","std::vector<std::vector<float> >", &tagPho_pfiso_mycharged03);
1322  tree->Branch("tagPho_pixelSeed", &tagPho_pixelSeed_, "tagPho_pixelSeed/I");
1323  tree->Branch("tagPho_ConvSafeEleVeto", &tagPho_ConvSafeEleVeto_, "tagPho_ConvSafeEleVeto/I");
1324  tree->Branch("tagPho_idTight",&tagPho_idTight_, "tagPho_idTight/I");
1325  tree->Branch("tagPho_idLoose",&tagPho_idLoose_, "tagPho_idLoose/I");
1326  // gen.info on photon
1327  if(doGenJets_){
1328  tree->Branch("tagPho_genPt",&tagPho_genPt_, "tagPho_genPt/F");
1329  tree->Branch("tagPho_genEnergy",&tagPho_genEnergy_,"tagPho_genEnergy/F");
1330  tree->Branch("tagPho_genEta",&tagPho_genEta_, "tagPho_genEta/F");
1331  tree->Branch("tagPho_genPhi",&tagPho_genPhi_, "tagPho_genPhi/F");
1332  tree->Branch("tagPho_genDeltaR",&tagPho_genDeltaR_,"tagPho_genDeltaR/F");
1333  }
1334  // counters
1335  tree->Branch("nPhotons",&nPhotons_, "nPhotons/I");
1336  tree->Branch("nGenJets",&nGenJets_, "nGenJets/I");
1337  }
1338 
1340 
1341  if (doPFJets_) {
1342 
1343  pf_tree_->Branch("nPFJets",&nPFJets_, "nPFJets/I");
1344 
1345  // Leading jet info
1346  pf_tree_->Branch("ppfjet_pt",&ppfjet_pt_, "ppfjet_pt/F");
1347  pf_tree_->Branch("ppfjet_p",&ppfjet_p_, "ppfjet_p/F");
1348  pf_tree_->Branch("ppfjet_E",&ppfjet_E_, "ppfjet_E/F");
1349  pf_tree_->Branch("ppfjet_E_NPVcorr",&ppfjet_E_NPVcorr_, "ppfjet_E_NPVcorr/F");
1350  pf_tree_->Branch("ppfjet_area",&ppfjet_area_, "ppfjet_area/F");
1351  pf_tree_->Branch("ppfjet_eta",&ppfjet_eta_, "ppfjet_eta/F");
1352  pf_tree_->Branch("ppfjet_phi",&ppfjet_phi_, "ppfjet_phi/F");
1353  pf_tree_->Branch("ppfjet_scale",&ppfjet_scale_, "ppfjet_scale/F");
1354  pf_tree_->Branch("ppfjet_NeutralHadronFrac", &ppfjet_NeutralHadronFrac_, "ppfjet_NeutralHadronFrac/F");
1355  pf_tree_->Branch("ppfjet_NeutralEMFrac", &ppfjet_NeutralEMFrac_, "ppfjet_NeutralEMFrac/F");
1356  pf_tree_->Branch("ppfjet_nConstituents", &ppfjet_nConstituents_, "ppfjet_nConstituents/I");
1357  pf_tree_->Branch("ppfjet_ChargedHadronFrac", &ppfjet_ChargedHadronFrac_, "ppfjet_ChargedHadronFrac/F");
1358  pf_tree_->Branch("ppfjet_ChargedMultiplicity", &ppfjet_ChargedMultiplicity_, "ppfjet_ChargedMultiplicity/F");
1359  pf_tree_->Branch("ppfjet_ChargedEMFrac", &ppfjet_ChargedEMFrac_, "ppfjet_ChargedEMFrac/F");
1360  if(doGenJets_){
1361  pf_tree_->Branch("ppfjet_genpt",&ppfjet_genpt_, "ppfjet_genpt/F");
1362  pf_tree_->Branch("ppfjet_genp",&ppfjet_genp_, "ppfjet_genp/F");
1363  pf_tree_->Branch("ppfjet_genE",&ppfjet_genE_, "ppfjet_genE/F");
1364  pf_tree_->Branch("ppfjet_gendr",&ppfjet_gendr_, "ppfjet_gendr/F");
1365  }
1366  pf_tree_->Branch("ppfjet_unkown_E",&ppfjet_unkown_E_, "ppfjet_unkown_E/F");
1367  pf_tree_->Branch("ppfjet_electron_E",&ppfjet_electron_E_, "ppfjet_electron_E/F");
1368  pf_tree_->Branch("ppfjet_muon_E",&ppfjet_muon_E_, "ppfjet_muon_E/F");
1369  pf_tree_->Branch("ppfjet_photon_E",&ppfjet_photon_E_, "ppfjet_photon_E/F");
1370  pf_tree_->Branch("ppfjet_unkown_px",&ppfjet_unkown_px_, "ppfjet_unkown_px/F");
1371  pf_tree_->Branch("ppfjet_electron_px",&ppfjet_electron_px_, "ppfjet_electron_px/F");
1372  pf_tree_->Branch("ppfjet_muon_px",&ppfjet_muon_px_, "ppfjet_muon_px/F");
1373  pf_tree_->Branch("ppfjet_photon_px",&ppfjet_photon_px_, "ppfjet_photon_px/F");
1374  pf_tree_->Branch("ppfjet_unkown_py",&ppfjet_unkown_py_, "ppfjet_unkown_py/F");
1375  pf_tree_->Branch("ppfjet_electron_py",&ppfjet_electron_py_, "ppfjet_electron_py/F");
1376  pf_tree_->Branch("ppfjet_muon_py",&ppfjet_muon_py_, "ppfjet_muon_py/F");
1377  pf_tree_->Branch("ppfjet_photon_py",&ppfjet_photon_py_, "ppfjet_photon_py/F");
1378  pf_tree_->Branch("ppfjet_unkown_pz",&ppfjet_unkown_pz_, "ppfjet_unkown_pz/F");
1379  pf_tree_->Branch("ppfjet_electron_pz",&ppfjet_electron_pz_, "ppfjet_electron_pz/F");
1380  pf_tree_->Branch("ppfjet_muon_pz",&ppfjet_muon_pz_, "ppfjet_muon_pz/F");
1381  pf_tree_->Branch("ppfjet_photon_pz",&ppfjet_photon_pz_, "ppfjet_photon_pz/F");
1382  pf_tree_->Branch("ppfjet_unkown_EcalE",&ppfjet_unkown_EcalE_, "ppfjet_unkown_EcalE/F");
1383  pf_tree_->Branch("ppfjet_electron_EcalE",&ppfjet_electron_EcalE_, "ppfjet_electron_EcalE/F");
1384  pf_tree_->Branch("ppfjet_muon_EcalE",&ppfjet_muon_EcalE_, "ppfjet_muon_EcalE/F");
1385  pf_tree_->Branch("ppfjet_photon_EcalE",&ppfjet_photon_EcalE_, "ppfjet_photon_EcalE/F");
1386  pf_tree_->Branch("ppfjet_unkown_n",&ppfjet_unkown_n_, "ppfjet_unkown_n/I");
1387  pf_tree_->Branch("ppfjet_electron_n",&ppfjet_electron_n_, "ppfjet_electron_n/I");
1388  pf_tree_->Branch("ppfjet_muon_n",&ppfjet_muon_n_, "ppfjet_muon_n/I");
1389  pf_tree_->Branch("ppfjet_photon_n",&ppfjet_photon_n_, "ppfjet_photon_n/I");
1390  pf_tree_->Branch("ppfjet_had_n",&ppfjet_had_n_, "ppfjet_had_n/I");
1391  pf_tree_->Branch("ppfjet_had_E",&ppfjet_had_E_);
1392  pf_tree_->Branch("ppfjet_had_px",&ppfjet_had_px_);
1393  pf_tree_->Branch("ppfjet_had_py",&ppfjet_had_py_);
1394  pf_tree_->Branch("ppfjet_had_pz",&ppfjet_had_pz_);
1395  pf_tree_->Branch("ppfjet_had_EcalE",&ppfjet_had_EcalE_);
1396  pf_tree_->Branch("ppfjet_had_rawHcalE",&ppfjet_had_rawHcalE_);
1397  pf_tree_->Branch("ppfjet_had_emf",&ppfjet_had_emf_);
1398  pf_tree_->Branch("ppfjet_had_id",&ppfjet_had_id_);
1399  pf_tree_->Branch("ppfjet_had_candtrackind",&ppfjet_had_candtrackind_);
1400  if(doGenJets_){
1401  pf_tree_->Branch("ppfjet_had_E_mctruth",&ppfjet_had_E_mctruth_);
1402  pf_tree_->Branch("ppfjet_had_mcpdgId",&ppfjet_had_mcpdgId_);
1403  }
1404  pf_tree_->Branch("ppfjet_had_ntwrs",&ppfjet_had_ntwrs_);
1405  pf_tree_->Branch("ppfjet_ntwrs",&ppfjet_ntwrs_, "ppfjet_ntwrs/I");
1406  pf_tree_->Branch("ppfjet_twr_ieta",&ppfjet_twr_ieta_);
1407  pf_tree_->Branch("ppfjet_twr_iphi",&ppfjet_twr_iphi_);
1408  pf_tree_->Branch("ppfjet_twr_depth",&ppfjet_twr_depth_);
1409  pf_tree_->Branch("ppfjet_twr_subdet",&ppfjet_twr_subdet_);
1410  pf_tree_->Branch("ppfjet_twr_hade",&ppfjet_twr_hade_);
1411  pf_tree_->Branch("ppfjet_twr_frac",&ppfjet_twr_frac_);
1412  pf_tree_->Branch("ppfjet_twr_candtrackind",&ppfjet_twr_candtrackind_);
1413  pf_tree_->Branch("ppfjet_twr_hadind",&ppfjet_twr_hadind_);
1414  pf_tree_->Branch("ppfjet_twr_elmttype",&ppfjet_twr_elmttype_);
1415  pf_tree_->Branch("ppfjet_twr_dR",&ppfjet_twr_dR_);
1416  pf_tree_->Branch("ppfjet_twr_clusterind",&ppfjet_twr_clusterind_);
1417  pf_tree_->Branch("ppfjet_cluster_n",&ppfjet_cluster_n_, "ppfjet_cluster_n/I");
1418  pf_tree_->Branch("ppfjet_cluster_eta",&ppfjet_cluster_eta_);
1419  pf_tree_->Branch("ppfjet_cluster_phi",&ppfjet_cluster_phi_);
1420  pf_tree_->Branch("ppfjet_cluster_dR",&ppfjet_cluster_dR_);
1421  pf_tree_->Branch("ppfjet_ncandtracks",&ppfjet_ncandtracks_, "ppfjet_ncandtracks/I");
1422  pf_tree_->Branch("ppfjet_candtrack_px",&ppfjet_candtrack_px_);
1423  pf_tree_->Branch("ppfjet_candtrack_py",&ppfjet_candtrack_py_);
1424  pf_tree_->Branch("ppfjet_candtrack_pz",&ppfjet_candtrack_pz_);
1425  pf_tree_->Branch("ppfjet_candtrack_EcalE",&ppfjet_candtrack_EcalE_);
1426 
1427  // Subleading jet info
1428  pf_tree_->Branch("pfjet2_pt",&pfjet2_pt_, "pfjet2_pt/F");
1429  pf_tree_->Branch("pfjet2_p",&pfjet2_p_, "pfjet2_p/F");
1430  pf_tree_->Branch("pfjet2_E",&pfjet2_E_, "pfjet2_E/F");
1431  pf_tree_->Branch("pfjet2_E_NPVcorr",&pfjet2_E_NPVcorr_, "pfjet2_E_NPVcorr/F");
1432  pf_tree_->Branch("pfjet2_area",&pfjet2_area_, "pfjet2_area/F");
1433  pf_tree_->Branch("pfjet2_eta",&pfjet2_eta_, "pfjet2_eta/F");
1434  pf_tree_->Branch("pfjet2_phi",&pfjet2_phi_, "pfjet2_phi/F");
1435  pf_tree_->Branch("pfjet2_scale",&pfjet2_scale_, "pfjet2_scale/F");
1436  pf_tree_->Branch("pfjet2_NeutralHadronFrac", &pfjet2_NeutralHadronFrac_, "pfjet2_NeutralHadronFrac/F");
1437  pf_tree_->Branch("pfjet2_NeutralEMFrac", &pfjet2_NeutralEMFrac_, "pfjet2_NeutralEMFrac/F");
1438  pf_tree_->Branch("pfjet2_nConstituents", &pfjet2_nConstituents_, "pfjet2_nConstituents/I");
1439  pf_tree_->Branch("pfjet2_ChargedHadronFrac", &pfjet2_ChargedHadronFrac_, "pfjet2_ChargedHadronFrac/F");
1440  pf_tree_->Branch("pfjet2_ChargedMultiplicity", &pfjet2_ChargedMultiplicity_, "pfjet2_ChargedMultiplicity/F");
1441  pf_tree_->Branch("pfjet2_ChargedEMFrac", &pfjet2_ChargedEMFrac_, "pfjet2_ChargedEMFrac/F");
1442  if(doGenJets_){
1443  pf_tree_->Branch("pfjet2_genpt",&pfjet2_genpt_, "pfjet2_genpt/F");
1444  pf_tree_->Branch("pfjet2_genp",&pfjet2_genp_, "pfjet2_genp/F");
1445  pf_tree_->Branch("pfjet2_genE",&pfjet2_genE_, "pfjet2_genE/F");
1446  pf_tree_->Branch("pfjet2_gendr",&pfjet2_gendr_, "pfjet2_gendr/F");
1447  }
1448  pf_tree_->Branch("pfjet2_unkown_E",&pfjet2_unkown_E_, "pfjet2_unkown_E/F");
1449  pf_tree_->Branch("pfjet2_electron_E",&pfjet2_electron_E_, "pfjet2_electron_E/F");
1450  pf_tree_->Branch("pfjet2_muon_E",&pfjet2_muon_E_, "pfjet2_muon_E/F");
1451  pf_tree_->Branch("pfjet2_photon_E",&pfjet2_photon_E_, "pfjet2_photon_E/F");
1452  pf_tree_->Branch("pfjet2_unkown_px",&pfjet2_unkown_px_, "pfjet2_unkown_px/F");
1453  pf_tree_->Branch("pfjet2_electron_px",&pfjet2_electron_px_, "pfjet2_electron_px/F");
1454  pf_tree_->Branch("pfjet2_muon_px",&pfjet2_muon_px_, "pfjet2_muon_px/F");
1455  pf_tree_->Branch("pfjet2_photon_px",&pfjet2_photon_px_, "pfjet2_photon_px/F");
1456  pf_tree_->Branch("pfjet2_unkown_py",&pfjet2_unkown_py_, "pfjet2_unkown_py/F");
1457  pf_tree_->Branch("pfjet2_electron_py",&pfjet2_electron_py_, "pfjet2_electron_py/F");
1458  pf_tree_->Branch("pfjet2_muon_py",&pfjet2_muon_py_, "pfjet2_muon_py/F");
1459  pf_tree_->Branch("pfjet2_photon_py",&pfjet2_photon_py_, "pfjet2_photon_py/F");
1460  pf_tree_->Branch("pfjet2_unkown_pz",&pfjet2_unkown_pz_, "pfjet2_unkown_pz/F");
1461  pf_tree_->Branch("pfjet2_electron_pz",&pfjet2_electron_pz_, "pfjet2_electron_pz/F");
1462  pf_tree_->Branch("pfjet2_muon_pz",&pfjet2_muon_pz_, "pfjet2_muon_pz/F");
1463  pf_tree_->Branch("pfjet2_photon_pz",&pfjet2_photon_pz_, "pfjet2_photon_pz/F");
1464  pf_tree_->Branch("pfjet2_unkown_EcalE",&pfjet2_unkown_EcalE_, "pfjet2_unkown_EcalE/F");
1465  pf_tree_->Branch("pfjet2_electron_EcalE",&pfjet2_electron_EcalE_, "pfjet2_electron_EcalE/F");
1466  pf_tree_->Branch("pfjet2_muon_EcalE",&pfjet2_muon_EcalE_, "pfjet2_muon_EcalE/F");
1467  pf_tree_->Branch("pfjet2_photon_EcalE",&pfjet2_photon_EcalE_, "pfjet2_photon_EcalE/F");
1468  pf_tree_->Branch("pfjet2_unkown_n",&pfjet2_unkown_n_, "pfjet2_unkown_n/I");
1469  pf_tree_->Branch("pfjet2_electron_n",&pfjet2_electron_n_, "pfjet2_electron_n/I");
1470  pf_tree_->Branch("pfjet2_muon_n",&pfjet2_muon_n_, "pfjet2_muon_n/I");
1471  pf_tree_->Branch("pfjet2_photon_n",&pfjet2_photon_n_, "pfjet2_photon_n/I");
1472  pf_tree_->Branch("pfjet2_had_n",&pfjet2_had_n_, "pfjet2_had_n/I");
1473  pf_tree_->Branch("pfjet2_had_E",&pfjet2_had_E_);
1474  pf_tree_->Branch("pfjet2_had_px",&pfjet2_had_px_);
1475  pf_tree_->Branch("pfjet2_had_py",&pfjet2_had_py_);
1476  pf_tree_->Branch("pfjet2_had_pz",&pfjet2_had_pz_);
1477  pf_tree_->Branch("pfjet2_had_EcalE",&pfjet2_had_EcalE_);
1478  pf_tree_->Branch("pfjet2_had_rawHcalE",&pfjet2_had_rawHcalE_);
1479  pf_tree_->Branch("pfjet2_had_emf",&pfjet2_had_emf_);
1480  pf_tree_->Branch("pfjet2_had_id",&pfjet2_had_id_);
1481  pf_tree_->Branch("pfjet2_had_candtrackind",&pfjet2_had_candtrackind_);
1482  if(doGenJets_){
1483  pf_tree_->Branch("pfjet2_had_E_mctruth",&pfjet2_had_E_mctruth_);
1484  pf_tree_->Branch("pfjet2_had_mcpdgId",&pfjet2_had_mcpdgId_);
1485  }
1486  pf_tree_->Branch("pfjet2_had_ntwrs",&pfjet2_had_ntwrs_);
1487  pf_tree_->Branch("pfjet2_ntwrs",&pfjet2_ntwrs_, "pfjet2_ntwrs/I");
1488  pf_tree_->Branch("pfjet2_twr_ieta",&pfjet2_twr_ieta_);
1489  pf_tree_->Branch("pfjet2_twr_iphi",&pfjet2_twr_iphi_);
1490  pf_tree_->Branch("pfjet2_twr_depth",&pfjet2_twr_depth_);
1491  pf_tree_->Branch("pfjet2_twr_subdet",&pfjet2_twr_subdet_);
1492  pf_tree_->Branch("pfjet2_twr_hade",&pfjet2_twr_hade_);
1493  pf_tree_->Branch("pfjet2_twr_frac",&pfjet2_twr_frac_);
1494  pf_tree_->Branch("pfjet2_twr_candtrackind",&pfjet2_twr_candtrackind_);
1495  pf_tree_->Branch("pfjet2_twr_hadind",&pfjet2_twr_hadind_);
1496  pf_tree_->Branch("pfjet2_twr_elmttype",&pfjet2_twr_elmttype_);
1497  pf_tree_->Branch("pfjet2_twr_dR",&pfjet2_twr_dR_);
1498  pf_tree_->Branch("pfjet2_twr_clusterind",&pfjet2_twr_clusterind_);
1499  pf_tree_->Branch("pfjet2_cluster_n",&pfjet2_cluster_n_, "pfjet2_cluster_n/I");
1500  pf_tree_->Branch("pfjet2_cluster_eta",&pfjet2_cluster_eta_);
1501  pf_tree_->Branch("pfjet2_cluster_phi",&pfjet2_cluster_phi_);
1502  pf_tree_->Branch("pfjet2_cluster_dR",&pfjet2_cluster_dR_);
1503  pf_tree_->Branch("pfjet2_ncandtracks",&pfjet2_ncandtracks_, "pfjet2_ncandtracks/I");
1504  pf_tree_->Branch("pfjet2_candtrack_px",&pfjet2_candtrack_px_);
1505  pf_tree_->Branch("pfjet2_candtrack_py",&pfjet2_candtrack_py_);
1506  pf_tree_->Branch("pfjet2_candtrack_pz",&pfjet2_candtrack_pz_);
1507  pf_tree_->Branch("pfjet2_candtrack_EcalE",&pfjet2_candtrack_EcalE_);
1508 
1509  // third pf jet
1510  pf_tree_->Branch("pf_thirdjet_et", &pf_thirdjet_et_, "pf_thirdjet_et/F");
1511  pf_tree_->Branch("pf_thirdjet_pt", &pf_thirdjet_pt_, "pf_thirdjet_pt/F");
1512  pf_tree_->Branch("pf_thirdjet_p", &pf_thirdjet_p_, "pf_thirdjet_p/F");
1513  pf_tree_->Branch("pf_thirdjet_px", &pf_thirdjet_px_, "pf_thirdjet_px/F");
1514  pf_tree_->Branch("pf_thirdjet_py", &pf_thirdjet_py_, "pf_thirdjet_py/F");
1515  pf_tree_->Branch("pf_thirdjet_E", &pf_thirdjet_E_, "pf_thirdjet_E/F");
1516  pf_tree_->Branch("pf_thirdjet_eta", &pf_thirdjet_eta_, "pf_thirdjet_eta/F");
1517  pf_tree_->Branch("pf_thirdjet_phi", &pf_thirdjet_phi_, "pf_thirdjet_phi/F");
1518  pf_tree_->Branch("pf_thirdjet_scale", &pf_thirdjet_scale_, "pf_thirdjet_scale/F");
1519 
1520  pf_tree_->Branch("met_value", &met_value_, "met_value/F");
1521  pf_tree_->Branch("met_phi", &met_phi_, "met_phi/F");
1522  pf_tree_->Branch("met_sumEt", &met_sumEt_, "met_sumEt/F");
1523  pf_tree_->Branch("metType1_value", &metType1_value_, "metType1_value/F");
1524  pf_tree_->Branch("metType1_phi", &metType1_phi_, "metType1_phi/F");
1525  pf_tree_->Branch("metType1_sumEt", &metType1_sumEt_, "metType1_sumEt/F");
1526  pf_tree_->Branch("pf_NPV",&pf_NPV_, "pf_NPV/I");
1527  }
1528 
1529  return;
1530 }
std::vector< float > ppfjet_cluster_phi_
std::vector< int > pfjet2_twr_ieta_
std::vector< int > pfjet2_had_id_
std::vector< int > pfjet2_twr_iphi_
std::vector< float > pfjet2_candtrack_px_
std::vector< float > ppfjet_had_py_
std::vector< float > ppfjet_candtrack_px_
std::vector< int > pfjet2_twr_hadind_
std::vector< float > ppfjet_candtrack_pz_
std::vector< int > pfjet2_twr_elmttype_
std::vector< int > photonTrigFired_
std::vector< float > pfjet2_cluster_dR_
std::vector< float > ppfjet_had_E_
std::vector< int > ppfjet_twr_ieta_
assert(m_qm.get())
std::vector< int > ppfjet_twr_hadind_
std::vector< int > ppfjet_twr_subdet_
std::vector< int > ppfjet_had_candtrackind_
std::vector< float > pfjet2_had_E_
std::vector< float > pfjet2_had_EcalE_
std::vector< float > pfjet2_cluster_eta_
std::vector< float > pfjet2_candtrack_py_
std::vector< int > pfjet2_twr_candtrackind_
std::vector< int > pfjet2_twr_clusterind_
std::vector< int > pfjet2_twr_depth_
std::vector< int > pfjet2_had_candtrackind_
std::vector< float > ppfjet_twr_frac_
std::vector< int > ppfjet_had_id_
float met_value_
MET info.
std::vector< int > jetTrigPrescale_
std::vector< int > ppfjet_twr_clusterind_
std::string rootHistFilename_
std::vector< float > pfjet2_had_E_mctruth_
std::vector< float > ppfjet_candtrack_py_
std::vector< float > pfjet2_had_py_
std::vector< float > ppfjet_cluster_dR_
float ppfjet_ChargedMultiplicity_
std::vector< float > ppfjet_twr_hade_
std::vector< int > ppfjet_twr_elmttype_
std::vector< float > ppfjet_had_rawHcalE_
std::vector< int > ppfjet_twr_depth_
std::vector< float > pfjet2_candtrack_pz_
std::vector< float > pfjet2_twr_frac_
std::vector< float > pfjet2_had_rawHcalE_
std::vector< float > ppfjet_twr_dR_
std::vector< float > ppfjet_candtrack_EcalE_
std::vector< float > ppfjet_cluster_eta_
std::vector< float > pfjet2_cluster_phi_
std::vector< int > jetTrigFired_
std::vector< float > ppfjet_had_E_mctruth_
std::vector< int > pfjet2_had_ntwrs_
std::vector< float > pfjet2_twr_hade_
std::vector< float > pfjet2_had_emf_
std::vector< float > ppfjet_had_px_
std::vector< int > ppfjet_had_mcpdgId_
std::vector< float > pfjet2_twr_dR_
std::vector< float > pfjet2_had_pz_
float pfjet2_ChargedMultiplicity_
std::vector< int > pfjet2_twr_subdet_
std::vector< int > ppfjet_twr_iphi_
std::vector< int > photonTrigPrescale_
std::vector< int > ppfjet_had_ntwrs_
std::vector< float > ppfjet_had_pz_
std::vector< float > pfjet2_candtrack_EcalE_
std::vector< int > pfjet2_had_mcpdgId_
std::vector< float > ppfjet_had_emf_
std::vector< int > ppfjet_twr_candtrackind_
std::vector< std::vector< float > > tagPho_pfiso_mycharged03
std::vector< float > ppfjet_had_EcalE_
std::vector< float > pfjet2_had_px_
void GammaJetAnalysis::beginRun ( const edm::Run iRun,
const edm::EventSetup setup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1572 of file GammaJetAnalysis.cc.

References debug_, Exception, hltPrescaleProvider_, ignoreHLT_, HLTPrescaleProvider::init(), jetTrigNamesV_, photonTrigNamesV_, FSQHLTOfflineSource_cfi::processName, edm::errors::ProductNotFound, and AlCaHLTBitMon_QueryRunRegistry::string.

1573  {
1574  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "beginRun()";
1575 
1576  if (!ignoreHLT_) {
1577  int noPhotonTrigger= (photonTrigNamesV_.size()==0) ? 1:0;
1578  int noJetTrigger= (jetTrigNamesV_.size()==0) ? 1:0;
1579  if (!noPhotonTrigger &&
1580  (photonTrigNamesV_.size()==1) &&
1581  (photonTrigNamesV_[0].length()==0)) noPhotonTrigger=1;
1582  if (!noJetTrigger &&
1583  (jetTrigNamesV_.size()==1) &&
1584  (jetTrigNamesV_[0].length()==0)) noJetTrigger=1;
1585  if (noPhotonTrigger && noJetTrigger) {
1586  ignoreHLT_=true;
1587  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "HLT trigger ignored: no trigger requested";
1588  }
1589  } else {
1590  // clear trigger names, if needed
1591  photonTrigNamesV_.clear();
1592  jetTrigNamesV_.clear();
1593  }
1594 
1595  if (!ignoreHLT_) {
1596  if (debug_>0) edm::LogInfo("GammaJetAnalysis") << "Initializing trigger information for individual run";
1597  bool changed(true);
1598  std::string processName="HLT";
1599  if (hltPrescaleProvider_.init(iRun,setup,processName,changed)) {
1600  // if init returns TRUE, initialisation has succeeded!
1601  if (changed) {
1602  // The HLT config has actually changed wrt the previous Run, hence rebook your
1603  // histograms or do anything else dependent on the revised HLT config
1604  }
1605  }
1606  else {
1607  // if init returns FALSE, initialisation has NOT succeeded, which indicates a problem
1608  // with the file and/or code and needs to be investigated!
1610  << " HLT config extraction failure with process name " << processName;
1611  // In this case, all access methods will return empty values!
1612  }
1613  }
1614 }
std::vector< std::string > photonTrigNamesV_
std::vector< std::string > jetTrigNamesV_
HLTPrescaleProvider hltPrescaleProvider_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
template<class JetPair_type >
float GammaJetAnalysis::calc_dPhi ( const PhotonPair pho,
const JetPair_type &  jet 
)
inlineprivate

Definition at line 286 of file GammaJetAnalysis.h.

References PhotonPair::isValid(), reco::LeafCandidate::phi(), and PhotonPair::photon().

Referenced by analyze().

286  {
287  if (!pho.isValid() || !jet.isValid()) return 9999.;
288  float phi1=pho.photon()->phi();
289  float phi2=jet.jet()->phi();
290  float dphi=fabs(phi1-phi2);
291  const float cPi= 4*atan(1);
292  while (dphi>cPi) dphi = fabs(2*cPi - dphi);
293  return dphi;
294  }
virtual double phi() const final
momentum azimuthal angle
bool isValid() const
const reco::Photon * photon(void) const
void GammaJetAnalysis::clear_leadingPfJetVars ( )
private

Definition at line 1751 of file GammaJetAnalysis.cc.

References ppfjet_area_, ppfjet_candtrack_EcalE_, ppfjet_candtrack_px_, ppfjet_candtrack_py_, ppfjet_candtrack_pz_, ppfjet_ChargedEMFrac_, ppfjet_ChargedHadronFrac_, ppfjet_ChargedMultiplicity_, ppfjet_cluster_dR_, ppfjet_cluster_eta_, ppfjet_cluster_n_, ppfjet_cluster_phi_, ppfjet_E_, ppfjet_E_NPVcorr_, ppfjet_electron_E_, ppfjet_electron_EcalE_, ppfjet_electron_n_, ppfjet_electron_px_, ppfjet_electron_py_, ppfjet_electron_pz_, ppfjet_eta_, ppfjet_gendr_, ppfjet_genE_, ppfjet_genp_, ppfjet_genpt_, ppfjet_had_candtrackind_, ppfjet_had_E_, ppfjet_had_E_mctruth_, ppfjet_had_EcalE_, ppfjet_had_emf_, ppfjet_had_id_, ppfjet_had_mcpdgId_, ppfjet_had_n_, ppfjet_had_ntwrs_, ppfjet_had_px_, ppfjet_had_py_, ppfjet_had_pz_, ppfjet_had_rawHcalE_, ppfjet_muon_E_, ppfjet_muon_EcalE_, ppfjet_muon_n_, ppfjet_muon_px_, ppfjet_muon_py_, ppfjet_muon_pz_, ppfjet_ncandtracks_, ppfjet_nConstituents_, ppfjet_NeutralEMFrac_, ppfjet_NeutralHadronFrac_, ppfjet_ntwrs_, ppfjet_p_, ppfjet_phi_, ppfjet_photon_E_, ppfjet_photon_EcalE_, ppfjet_photon_n_, ppfjet_photon_px_, ppfjet_photon_py_, ppfjet_photon_pz_, ppfjet_pt_, ppfjet_scale_, ppfjet_twr_candtrackind_, ppfjet_twr_clusterind_, ppfjet_twr_depth_, ppfjet_twr_dR_, ppfjet_twr_elmttype_, ppfjet_twr_frac_, ppfjet_twr_hade_, ppfjet_twr_hadind_, ppfjet_twr_ieta_, ppfjet_twr_iphi_, ppfjet_twr_subdet_, ppfjet_unkown_E_, ppfjet_unkown_EcalE_, ppfjet_unkown_n_, ppfjet_unkown_px_, ppfjet_unkown_py_, and ppfjet_unkown_pz_.

Referenced by analyze().

1751  {
1752  ppfjet_pt_ = ppfjet_p_ = ppfjet_E_ = 0;
1758  ppfjet_ChargedEMFrac_ = 0.;
1760  // Reset particle variables
1766  ppfjet_had_n_ = 0;
1767  ppfjet_ntwrs_ = 0;
1768  ppfjet_cluster_n_ = 0;
1769  ppfjet_ncandtracks_ = 0;
1770 
1771  ppfjet_had_E_.clear();
1772  ppfjet_had_px_.clear();
1773  ppfjet_had_py_.clear();
1774  ppfjet_had_pz_.clear();
1775  ppfjet_had_EcalE_.clear();
1776  ppfjet_had_rawHcalE_.clear();
1777  ppfjet_had_emf_.clear();
1778  ppfjet_had_E_mctruth_.clear();
1779  ppfjet_had_id_.clear();
1780  ppfjet_had_candtrackind_.clear();
1781  ppfjet_had_mcpdgId_.clear();
1782  ppfjet_had_ntwrs_.clear();
1783  ppfjet_twr_ieta_.clear();
1784  ppfjet_twr_iphi_.clear();
1785  ppfjet_twr_depth_.clear();
1786  ppfjet_twr_subdet_.clear();
1787  ppfjet_twr_candtrackind_.clear();
1788  ppfjet_twr_hadind_.clear();
1789  ppfjet_twr_elmttype_.clear();
1790  ppfjet_twr_hade_.clear();
1791  ppfjet_twr_frac_.clear();
1792  ppfjet_twr_dR_.clear();
1793  ppfjet_twr_clusterind_.clear();
1794  ppfjet_cluster_eta_.clear();
1795  ppfjet_cluster_phi_.clear();
1796  ppfjet_cluster_dR_.clear();
1797  ppfjet_candtrack_px_.clear();
1798  ppfjet_candtrack_py_.clear();
1799  ppfjet_candtrack_pz_.clear();
1800  ppfjet_candtrack_EcalE_.clear();
1801 
1802 }
std::vector< float > ppfjet_cluster_phi_
std::vector< float > ppfjet_had_py_
std::vector< float > ppfjet_candtrack_px_
std::vector< float > ppfjet_candtrack_pz_
std::vector< float > ppfjet_had_E_
std::vector< int > ppfjet_twr_ieta_
std::vector< int > ppfjet_twr_hadind_
std::vector< int > ppfjet_twr_subdet_
std::vector< int > ppfjet_had_candtrackind_
std::vector< float > ppfjet_twr_frac_
std::vector< int > ppfjet_had_id_
std::vector< int > ppfjet_twr_clusterind_
std::vector< float > ppfjet_candtrack_py_
std::vector< float > ppfjet_cluster_dR_
float ppfjet_ChargedMultiplicity_
std::vector< float > ppfjet_twr_hade_
std::vector< int > ppfjet_twr_elmttype_
std::vector< float > ppfjet_had_rawHcalE_
std::vector< int > ppfjet_twr_depth_
std::vector< float > ppfjet_twr_dR_
std::vector< float > ppfjet_candtrack_EcalE_
std::vector< float > ppfjet_cluster_eta_
std::vector< float > ppfjet_had_E_mctruth_
std::vector< float > ppfjet_had_px_
std::vector< int > ppfjet_had_mcpdgId_
std::vector< int > ppfjet_twr_iphi_
std::vector< int > ppfjet_had_ntwrs_
std::vector< float > ppfjet_had_pz_
std::vector< float > ppfjet_had_emf_
std::vector< int > ppfjet_twr_candtrackind_
std::vector< float > ppfjet_had_EcalE_
void GammaJetAnalysis::copy_leadingPfJetVars_to_pfJet2 ( )
private

Definition at line 1806 of file GammaJetAnalysis.cc.

References pfjet2_area_, pfjet2_candtrack_EcalE_, pfjet2_candtrack_px_, pfjet2_candtrack_py_, pfjet2_candtrack_pz_, pfjet2_ChargedEMFrac_, pfjet2_ChargedHadronFrac_, pfjet2_ChargedMultiplicity_, pfjet2_cluster_dR_, pfjet2_cluster_eta_, pfjet2_cluster_n_, pfjet2_cluster_phi_, pfjet2_E_, pfjet2_E_NPVcorr_, pfjet2_electron_E_, pfjet2_electron_EcalE_, pfjet2_electron_n_, pfjet2_electron_px_, pfjet2_electron_py_, pfjet2_electron_pz_, pfjet2_eta_, pfjet2_gendr_, pfjet2_genE_, pfjet2_genp_, pfjet2_genpt_, pfjet2_had_candtrackind_, pfjet2_had_E_, pfjet2_had_E_mctruth_, pfjet2_had_EcalE_, pfjet2_had_emf_, pfjet2_had_id_, pfjet2_had_mcpdgId_, pfjet2_had_n_, pfjet2_had_ntwrs_, pfjet2_had_px_, pfjet2_had_py_, pfjet2_had_pz_, pfjet2_had_rawHcalE_, pfjet2_muon_E_, pfjet2_muon_EcalE_, pfjet2_muon_n_, pfjet2_muon_px_, pfjet2_muon_py_, pfjet2_muon_pz_, pfjet2_ncandtracks_, pfjet2_nConstituents_, pfjet2_NeutralEMFrac_, pfjet2_NeutralHadronFrac_, pfjet2_ntwrs_, pfjet2_p_, pfjet2_phi_, pfjet2_photon_E_, pfjet2_photon_EcalE_, pfjet2_photon_n_, pfjet2_photon_px_, pfjet2_photon_py_, pfjet2_photon_pz_, pfjet2_pt_, pfjet2_scale_, pfjet2_twr_candtrackind_, pfjet2_twr_clusterind_, pfjet2_twr_depth_, pfjet2_twr_dR_, pfjet2_twr_elmttype_, pfjet2_twr_frac_, pfjet2_twr_hade_, pfjet2_twr_hadind_, pfjet2_twr_ieta_, pfjet2_twr_iphi_, pfjet2_twr_subdet_, pfjet2_unkown_E_, pfjet2_unkown_EcalE_, pfjet2_unkown_n_, pfjet2_unkown_px_, pfjet2_unkown_py_, pfjet2_unkown_pz_, ppfjet_area_, ppfjet_candtrack_EcalE_, ppfjet_candtrack_px_, ppfjet_candtrack_py_, ppfjet_candtrack_pz_, ppfjet_ChargedEMFrac_, ppfjet_ChargedHadronFrac_, ppfjet_ChargedMultiplicity_, ppfjet_cluster_dR_, ppfjet_cluster_eta_, ppfjet_cluster_n_, ppfjet_cluster_phi_, ppfjet_E_, ppfjet_E_NPVcorr_, ppfjet_electron_E_, ppfjet_electron_EcalE_, ppfjet_electron_n_, ppfjet_electron_px_, ppfjet_electron_py_, ppfjet_electron_pz_, ppfjet_eta_, ppfjet_gendr_, ppfjet_genE_, ppfjet_genp_, ppfjet_genpt_, ppfjet_had_candtrackind_, ppfjet_had_E_, ppfjet_had_E_mctruth_, ppfjet_had_EcalE_, ppfjet_had_emf_, ppfjet_had_id_, ppfjet_had_mcpdgId_, ppfjet_had_n_, ppfjet_had_ntwrs_, ppfjet_had_px_, ppfjet_had_py_, ppfjet_had_pz_, ppfjet_had_rawHcalE_, ppfjet_muon_E_, ppfjet_muon_EcalE_, ppfjet_muon_n_, ppfjet_muon_px_, ppfjet_muon_py_, ppfjet_muon_pz_, ppfjet_ncandtracks_, ppfjet_nConstituents_, ppfjet_NeutralEMFrac_, ppfjet_NeutralHadronFrac_, ppfjet_ntwrs_, ppfjet_p_, ppfjet_phi_, ppfjet_photon_E_, ppfjet_photon_EcalE_, ppfjet_photon_n_, ppfjet_photon_px_, ppfjet_photon_py_, ppfjet_photon_pz_, ppfjet_pt_, ppfjet_scale_, ppfjet_twr_candtrackind_, ppfjet_twr_clusterind_, ppfjet_twr_depth_, ppfjet_twr_dR_, ppfjet_twr_elmttype_, ppfjet_twr_frac_, ppfjet_twr_hade_, ppfjet_twr_hadind_, ppfjet_twr_ieta_, ppfjet_twr_iphi_, ppfjet_twr_subdet_, ppfjet_unkown_E_, ppfjet_unkown_EcalE_, ppfjet_unkown_n_, ppfjet_unkown_px_, ppfjet_unkown_py_, and ppfjet_unkown_pz_.

Referenced by analyze().

1806  {
1808  pfjet2_p_ = ppfjet_p_;
1809  pfjet2_E_ = ppfjet_E_;
1821 
1826 
1832 
1838 
1844 
1850 
1856 
1865 
1870 
1880 
1884 
1889 
1895 }
std::vector< float > ppfjet_cluster_phi_
std::vector< int > pfjet2_twr_ieta_
std::vector< int > pfjet2_had_id_
std::vector< int > pfjet2_twr_iphi_
std::vector< float > pfjet2_candtrack_px_
std::vector< float > ppfjet_had_py_
std::vector< float > ppfjet_candtrack_px_
std::vector< int > pfjet2_twr_hadind_
std::vector< float > ppfjet_candtrack_pz_
std::vector< int > pfjet2_twr_elmttype_
std::vector< float > pfjet2_cluster_dR_
std::vector< float > ppfjet_had_E_
std::vector< int > ppfjet_twr_ieta_
std::vector< int > ppfjet_twr_hadind_
std::vector< int > ppfjet_twr_subdet_
std::vector< int > ppfjet_had_candtrackind_
std::vector< float > pfjet2_had_E_
std::vector< float > pfjet2_had_EcalE_
std::vector< float > pfjet2_cluster_eta_
std::vector< float > pfjet2_candtrack_py_
std::vector< int > pfjet2_twr_candtrackind_
std::vector< int > pfjet2_twr_clusterind_
std::vector< int > pfjet2_twr_depth_
std::vector< int > pfjet2_had_candtrackind_
std::vector< float > ppfjet_twr_frac_
std::vector< int > ppfjet_had_id_
std::vector< int > ppfjet_twr_clusterind_
std::vector< float > pfjet2_had_E_mctruth_
std::vector< float > ppfjet_candtrack_py_
std::vector< float > pfjet2_had_py_
std::vector< float > ppfjet_cluster_dR_
float ppfjet_ChargedMultiplicity_
std::vector< float > ppfjet_twr_hade_
std::vector< int > ppfjet_twr_elmttype_
std::vector< float > ppfjet_had_rawHcalE_
std::vector< int > ppfjet_twr_depth_
std::vector< float > pfjet2_candtrack_pz_
std::vector< float > pfjet2_twr_frac_
std::vector< float > pfjet2_had_rawHcalE_
std::vector< float > ppfjet_twr_dR_
std::vector< float > ppfjet_candtrack_EcalE_
std::vector< float > ppfjet_cluster_eta_
std::vector< float > pfjet2_cluster_phi_
std::vector< float > ppfjet_had_E_mctruth_
std::vector< int > pfjet2_had_ntwrs_
std::vector< float > pfjet2_twr_hade_
std::vector< float > pfjet2_had_emf_
std::vector< float > ppfjet_had_px_
std::vector< int > ppfjet_had_mcpdgId_
std::vector< float > pfjet2_twr_dR_
std::vector< float > pfjet2_had_pz_
float pfjet2_ChargedMultiplicity_
std::vector< int > pfjet2_twr_subdet_
std::vector< int > ppfjet_twr_iphi_
std::vector< int > ppfjet_had_ntwrs_
std::vector< float > ppfjet_had_pz_
std::vector< float > pfjet2_candtrack_EcalE_
std::vector< int > pfjet2_had_mcpdgId_
std::vector< float > ppfjet_had_emf_
std::vector< int > ppfjet_twr_candtrackind_
std::vector< float > ppfjet_had_EcalE_
std::vector< float > pfjet2_had_px_
double GammaJetAnalysis::deltaR ( const reco::Jet j1,
const reco::Jet j2 
)
private

Definition at line 1899 of file GammaJetAnalysis.cc.

References reco::LeafCandidate::eta(), reco::LeafCandidate::phi(), and mathSSE::sqrt().

Referenced by analyze(), deltaR(), pfEcalIso(), and pfTkIsoWithVertex().

1900 {
1901  double deta = j1->eta()-j2->eta();
1902  double dphi = std::fabs(j1->phi()-j2->phi());
1903  if(dphi>3.1415927) dphi = 2*3.1415927 - dphi;
1904  return std::sqrt(deta*deta + dphi*dphi);
1905 }
virtual double phi() const final
momentum azimuthal angle
T sqrt(T t)
Definition: SSEVec.h:18
virtual double eta() const final
momentum pseudorapidity
double GammaJetAnalysis::deltaR ( const double  eta1,
const double  phi1,
const double  eta2,
const double  phi2 
)
private

Definition at line 1909 of file GammaJetAnalysis.cc.

References mathSSE::sqrt().

1910 {
1911  double deta = eta1 - eta2;
1912  double dphi = std::fabs(phi1 - phi2);
1913  if(dphi>3.1415927) dphi = 2*3.1415927 - dphi;
1914  return std::sqrt(deta*deta + dphi*dphi);
1915 }
T sqrt(T t)
Definition: SSEVec.h:18
template<class Jet_type >
double GammaJetAnalysis::deltaR ( const PhotonPair photon,
const Jet_type *  jet 
)
inlineprivate

Definition at line 305 of file GammaJetAnalysis.h.

References deltaR(), reco::LeafCandidate::eta(), PhotonPair::isValid(), reco::LeafCandidate::phi(), and PhotonPair::photon().

305  {
306  if (!photon.isValid()) return 9999.;
307  return deltaR(photon.photon()->eta(),photon.photon()->phi(),
308  jet->eta(), jet->phi());
309  }
virtual double phi() const final
momentum azimuthal angle
bool isValid() const
const reco::Photon * photon(void) const
double deltaR(const reco::Jet *j1, const reco::Jet *j2)
virtual double eta() const final
momentum pseudorapidity
void GammaJetAnalysis::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1534 of file GammaJetAnalysis.cc.

References doGenJets_, doPFJets_, ignoreHLT_, jetTrigNamesV_, misc_tree_, nProcessed_, NULL, pf_tree_, photonTrigNamesV_, rootfile_, and workOnAOD_.

Referenced by o2o.O2ORunMgr::executeJob().

1534  {
1535  rootfile_->cd();
1536 
1537  if(doPFJets_){
1538  pf_tree_->Write();
1539  }
1540  // write miscItems
1541  // Save info about the triggers and other misc items
1542  {
1543  rootfile_->cd();
1544  rootfile_->mkdir("miscItems");
1545  rootfile_->cd("miscItems");
1546  misc_tree_= new TTree("misc_tree","tree for misc.info");
1547  misc_tree_->Branch("ignoreHLT",&ignoreHLT_,"ignoreHLT/O");
1548  misc_tree_->Branch("doPFJets",&doPFJets_,"doPFJets/O");
1549  misc_tree_->Branch("doGenJets",&doGenJets_,"doGenJets/O");
1550  misc_tree_->Branch("workOnAOD",&workOnAOD_,"workOnAOD/O");
1551  misc_tree_->Branch("photonTriggerNames",&photonTrigNamesV_);
1552  misc_tree_->Branch("jetTriggerNames",&jetTrigNamesV_);
1553  misc_tree_->Branch("nProcessed",&nProcessed_,"nProcessed/l");
1554  // put time stamp
1555  time_t ltime;
1556  ltime=time(NULL);
1557  TString str = TString(asctime(localtime(&ltime)));
1558  if (str[str.Length()-1]=='\n') str.Remove(str.Length()-1,1);
1559  TObjString date(str);
1560  date.Write(str.Data());
1561  misc_tree_->Fill();
1562  misc_tree_->Write();
1563  rootfile_->cd();
1564  }
1565 
1566  rootfile_->Close();
1567 }
#define NULL
Definition: scimark2.h:8
std::vector< std::string > photonTrigNamesV_
std::vector< std::string > jetTrigNamesV_
int GammaJetAnalysis::getEtaPhi ( const DetId  id)
private

Definition at line 1932 of file GammaJetAnalysis.cc.

Referenced by analyze().

1933 {
1934  return id.rawId() & 0x3FFF; // Get 14 least-significant digits
1935 }
int GammaJetAnalysis::getEtaPhi ( const HcalDetId  id)
private

Definition at line 1939 of file GammaJetAnalysis.cc.

1940 {
1941  return id.rawId() & 0x3FFF; // Get 14 least-significant digits
1942 }
float GammaJetAnalysis::pfEcalIso ( const reco::Photon localPho1,
edm::Handle< reco::PFCandidateCollection pfHandle,
float  dRmax,
float  dRVetoBarrel,
float  dRVetoEndcap,
float  etaStripBarrel,
float  etaStripEndcap,
float  energyBarrel,
float  energyEndcap,
reco::PFCandidate::ParticleType  pfToUse 
)

Definition at line 1620 of file GammaJetAnalysis.cc.

References reco::Photon::clone(), debug_, deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, reco::LeafCandidate::energy(), HLT_25ns10e33_v2_cff::etaStripBarrel, HLT_25ns10e33_v2_cff::etaStripEndcap, i, reco::Photon::isEB(), edm::Ref< C, T, F >::isNonnull(), reco::LeafCandidate::momentum(), reco::PFCandidate::particleId(), edm::Handle< T >::product(), reco::LeafCandidate::pt(), reco::Photon::superCluster(), reco::PFCandidate::superClusterRef(), and reco::PFCandidate::vertex().

Referenced by analyze(), and pfHcalIso().

1620  {
1621  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "Inside pfEcalIso";
1622  reco::Photon* localPho = localPho1->clone();
1623  float dRVeto;
1624  float etaStrip;
1625 
1626  if (localPho->isEB()) {
1627  dRVeto = dRVetoBarrel;
1628  etaStrip = etaStripBarrel;
1629  } else {
1630  dRVeto = dRVetoEndcap;
1631  etaStrip = etaStripEndcap;
1632  }
1633  const reco::PFCandidateCollection* forIsolation = pfHandle.product();
1634  int nsize = forIsolation->size();
1635  float sum = 0;
1636  for (int i=0; i<nsize; i++) {
1637  const reco::PFCandidate& pfc = (*forIsolation)[i];
1638  if (pfc.particleId() == pfToUse) {
1639  // Do not include the PFCandidate associated by SC Ref to the reco::Photon
1640  if(pfc.superClusterRef().isNonnull() && localPho->superCluster().isNonnull()) {
1641  if (pfc.superClusterRef() == localPho->superCluster())
1642  continue;
1643  }
1644 
1645  if (localPho->isEB()) {
1646  if (fabs(pfc.pt()) < energyBarrel)
1647  continue;
1648  } else {
1649  if (fabs(pfc.energy()) < energyEndcap)
1650  continue;
1651  }
1652  // Shift the photon direction vector according to the PF vertex
1653  math::XYZPoint pfvtx = pfc.vertex();
1654  math::XYZVector photon_directionWrtVtx(localPho->superCluster()->x() - pfvtx.x(),
1655  localPho->superCluster()->y() - pfvtx.y(),
1656  localPho->superCluster()->z() - pfvtx.z());
1657 
1658  float dEta = fabs(photon_directionWrtVtx.Eta() - pfc.momentum().Eta());
1659  float dR = deltaR(photon_directionWrtVtx.Eta(), photon_directionWrtVtx.Phi(), pfc.momentum().Eta(), pfc.momentum().Phi());
1660 
1661  if (dEta < etaStrip)
1662  continue;
1663 
1664  if(dR > dRmax || dR < dRVeto)
1665  continue;
1666 
1667  sum += pfc.pt();
1668  }
1669  }
1670  return sum;
1671 }
virtual Photon * clone() const
returns a clone of the candidate
int i
Definition: DBlmapReader.cc:9
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
virtual double energy() const final
energy
virtual const Point & vertex() const
vertex position (overwritten by PF...)
Definition: PFCandidate.cc:647
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
virtual Vector momentum() const final
spatial momentum vector
T const * product() const
Definition: Handle.h:81
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
double deltaR(const reco::Jet *j1, const reco::Jet *j2)
bool isEB() const
Definition: Photon.h:120
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:39
virtual ParticleType particleId() const
Definition: PFCandidate.h:373
virtual double pt() const final
transverse momentum
reco::SuperClusterRef superClusterRef() const
return a reference to the corresponding SuperCluster if any
Definition: PFCandidate.cc:600
float GammaJetAnalysis::pfHcalIso ( const reco::Photon localPho,
edm::Handle< reco::PFCandidateCollection pfHandle,
float  dRmax,
float  dRveto,
reco::PFCandidate::ParticleType  pfToUse 
)

Definition at line 1675 of file GammaJetAnalysis.cc.

References debug_, and pfEcalIso().

Referenced by analyze().

1675  {
1676  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "Inside pfHcalIso";
1677  return pfEcalIso(localPho, pfHandle, dRmax, dRveto, dRveto, 0.0, 0.0, 0.0, 0.0, pfToUse);
1678 
1679 }
float pfEcalIso(const reco::Photon *localPho1, edm::Handle< reco::PFCandidateCollection > pfHandle, float dRmax, float dRVetoBarrel, float dRVetoEndcap, float etaStripBarrel, float etaStripEndcap, float energyBarrel, float energyEndcap, reco::PFCandidate::ParticleType pfToUse)
std::vector< float > GammaJetAnalysis::pfTkIsoWithVertex ( const reco::Photon localPho1,
edm::Handle< reco::PFCandidateCollection pfHandle,
edm::Handle< reco::VertexCollection vtxHandle,
float  dRmax,
float  dRvetoBarrel,
float  dRvetoEndcap,
float  ptMin,
float  dzMax,
float  dxyMax,
reco::PFCandidate::ParticleType  pfToUse 
)

Definition at line 1683 of file GammaJetAnalysis.cc.

References reco::Photon::clone(), debug_, deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, i, reco::Photon::isEB(), reco::LeafCandidate::momentum(), reco::PFCandidate::particleId(), edm::Handle< T >::product(), reco::LeafCandidate::pt(), PtMinSelector_cfg::ptMin, mps_fire::result, reco::Photon::superCluster(), and reco::PFCandidate::trackRef().

Referenced by analyze().

1683  {
1684 
1685  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "Inside pfTkIsoWithVertex()";
1686  reco::Photon* localPho = localPho1->clone();
1687 
1688  float dRveto;
1689  if (localPho->isEB())
1690  dRveto = dRvetoBarrel;
1691  else
1692  dRveto = dRvetoEndcap;
1693 
1694  std::vector<float> result;
1695  const reco::PFCandidateCollection* forIsolation = pfHandle.product();
1696 
1697  //Calculate isolation sum separately for each vertex
1698  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "vtxHandle->size() = " << vtxHandle->size();
1699  for(unsigned int ivtx=0; ivtx<(vtxHandle->size()); ++ivtx) {
1700  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "Vtx " << ivtx;
1701  // Shift the photon according to the vertex
1702  reco::VertexRef vtx(vtxHandle, ivtx);
1703  math::XYZVector photon_directionWrtVtx(localPho->superCluster()->x() - vtx->x(),
1704  localPho->superCluster()->y() - vtx->y(),
1705  localPho->superCluster()->z() - vtx->z());
1706  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "pfTkIsoWithVertex :: Will Loop over the PFCandidates";
1707  float sum = 0;
1708  // Loop over the PFCandidates
1709  for(unsigned i=0; i<forIsolation->size(); i++) {
1710  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "inside loop";
1711  const reco::PFCandidate& pfc = (*forIsolation)[i];
1712 
1713  //require that PFCandidate is a charged hadron
1714  if (debug_>1) {
1715  edm::LogInfo("GammaJetAnalysis") << "pfToUse=" << pfToUse;
1716  edm::LogInfo("GammaJetAnalysis") << "pfc.particleId()=" << pfc.particleId();
1717  }
1718 
1719  if (pfc.particleId() == pfToUse) {
1720  if (debug_>1) {
1721  edm::LogInfo("GammaJetAnalysis") << "\n ***** HERE pfc.particleId() == pfToUse ";
1722  edm::LogInfo("GammaJetAnalysis") << "pfc.pt()=" << pfc.pt();
1723  }
1724  if (pfc.pt() < ptMin) continue;
1725 
1726  float dz = fabs(pfc.trackRef()->dz(vtx->position()));
1727  if (dz > dzMax) continue;
1728 
1729  float dxy = fabs(pfc.trackRef()->dxy(vtx->position()));
1730  if(fabs(dxy) > dxyMax) continue;
1731  float dR = deltaR(photon_directionWrtVtx.Eta(), photon_directionWrtVtx.Phi(), pfc.momentum().Eta(), pfc.momentum().Phi());
1732  if(dR > dRmax || dR < dRveto) continue;
1733  sum += pfc.pt();
1734  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "pt=" << pfc.pt();
1735  }
1736  }
1737  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "sum=" << sum;
1738  sum = sum*1.0;
1739  result.push_back(sum);
1740  }
1741  if (debug_>1) {
1742  edm::LogInfo("GammaJetAnalysis") << "Will return result";
1743  edm::LogInfo("GammaJetAnalysis") << "result" << &result;
1744  edm::LogInfo("GammaJetAnalysis") << "Result returned";
1745  }
1746  return result;
1747 }
virtual Photon * clone() const
returns a clone of the candidate
int i
Definition: DBlmapReader.cc:9
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
tuple result
Definition: mps_fire.py:83
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:433
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
virtual Vector momentum() const final
spatial momentum vector
T const * product() const
Definition: Handle.h:81
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
double deltaR(const reco::Jet *j1, const reco::Jet *j2)
bool isEB() const
Definition: Photon.h:120
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:39
virtual ParticleType particleId() const
Definition: PFCandidate.h:373
virtual double pt() const final
transverse momentum

Member Data Documentation

bool GammaJetAnalysis::allowNoPhoton_
private

Definition at line 157 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

TTree* GammaJetAnalysis::calo_tree_
private

Definition at line 199 of file GammaJetAnalysis.h.

int GammaJetAnalysis::debug_
private
unsigned int GammaJetAnalysis::debugEvent
private

Definition at line 138 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

int GammaJetAnalysis::debugHLTTrigNames
private

Definition at line 139 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

bool GammaJetAnalysis::doGenJets_
private

Definition at line 191 of file GammaJetAnalysis.h.

Referenced by analyze(), beginJob(), endJob(), and GammaJetAnalysis().

bool GammaJetAnalysis::doPFJets_
private

Definition at line 190 of file GammaJetAnalysis.h.

Referenced by analyze(), beginJob(), endJob(), and GammaJetAnalysis().

int GammaJetAnalysis::eventNumber_
private

Definition at line 210 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::eventPtHat_
private

Definition at line 211 of file GammaJetAnalysis.h.

Referenced by analyze(), beginJob(), and GammaJetAnalysis().

float GammaJetAnalysis::eventWeight_
private

Definition at line 211 of file GammaJetAnalysis.h.

Referenced by analyze(), beginJob(), and GammaJetAnalysis().

std::string GammaJetAnalysis::genEventInfoName_
private

Definition at line 149 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

std::string GammaJetAnalysis::genJetCollName_
private

Definition at line 147 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

std::string GammaJetAnalysis::genParticleCollName_
private

Definition at line 148 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

std::string GammaJetAnalysis::hbheRecHitName_
private

Definition at line 150 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

std::string GammaJetAnalysis::hfRecHitName_
private

Definition at line 151 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

HLTPrescaleProvider GammaJetAnalysis::hltPrescaleProvider_
private

Definition at line 203 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginRun().

std::string GammaJetAnalysis::hoRecHitName_
private

Definition at line 152 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

bool GammaJetAnalysis::ignoreHLT_
private

Definition at line 193 of file GammaJetAnalysis.h.

Referenced by beginRun(), endJob(), and GammaJetAnalysis().

double GammaJetAnalysis::jet2EtMax_
private

Definition at line 161 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

double GammaJetAnalysis::jet3EtMax_
private

Definition at line 162 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

double GammaJetAnalysis::jetEtMin_
private

Definition at line 160 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

std::vector<int> GammaJetAnalysis::jetTrigFired_
private

Definition at line 206 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

std::vector<std::string> GammaJetAnalysis::jetTrigNamesV_
private

Definition at line 164 of file GammaJetAnalysis.h.

Referenced by analyze(), beginRun(), endJob(), and GammaJetAnalysis().

std::vector<int> GammaJetAnalysis::jetTrigPrescale_
private

Definition at line 207 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

int GammaJetAnalysis::lumiBlock_
private

Definition at line 210 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::met_phi_
private

Definition at line 218 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::met_sumEt_
private

Definition at line 218 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::met_value_
private

MET info.

Definition at line 218 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::metType1_phi_
private

Definition at line 219 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::metType1_sumEt_
private

Definition at line 219 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::metType1_value_
private

Definition at line 219 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

TTree* GammaJetAnalysis::misc_tree_
private

Definition at line 198 of file GammaJetAnalysis.h.

Referenced by endJob().

int GammaJetAnalysis::nGenJets_
private

Definition at line 212 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

int GammaJetAnalysis::nPFJets_
private

Definition at line 213 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

int GammaJetAnalysis::nPhotons_
private

Definition at line 212 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

ULong64_t GammaJetAnalysis::nProcessed_
private

Definition at line 214 of file GammaJetAnalysis.h.

Referenced by analyze(), endJob(), and GammaJetAnalysis().

int GammaJetAnalysis::pf_NPV_
private

Definition at line 215 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::pf_thirdjet_E_
private

Definition at line 282 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::pf_thirdjet_et_
private

Definition at line 280 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::pf_thirdjet_eta_
private

Definition at line 282 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::pf_thirdjet_p_
private

Definition at line 281 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::pf_thirdjet_phi_
private

Definition at line 282 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::pf_thirdjet_pt_
private

Definition at line 281 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::pf_thirdjet_px_
private

Definition at line 281 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::pf_thirdjet_py_
private

Definition at line 281 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::pf_thirdjet_scale_
private

Definition at line 282 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

TTree* GammaJetAnalysis::pf_tree_
private

Definition at line 200 of file GammaJetAnalysis.h.

Referenced by analyze(), beginJob(), and endJob().

float GammaJetAnalysis::pfjet2_area_
private

Definition at line 259 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_candtrack_EcalE_
private

Definition at line 278 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_candtrack_px_
private

Definition at line 278 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_candtrack_py_
private

Definition at line 278 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_candtrack_pz_
private

Definition at line 278 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_ChargedEMFrac_
private

Definition at line 262 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_ChargedHadronFrac_
private

Definition at line 262 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_ChargedMultiplicity_
private

Definition at line 262 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_cluster_dR_
private

Definition at line 276 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_cluster_eta_
private

Definition at line 276 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

int GammaJetAnalysis::pfjet2_cluster_n_
private

Definition at line 275 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_cluster_phi_
private

Definition at line 276 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_E_
private

Definition at line 258 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_E_NPVcorr_
private

Definition at line 259 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_electron_E_
private

Definition at line 265 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_electron_EcalE_
private

Definition at line 265 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

int GammaJetAnalysis::pfjet2_electron_n_
private

Definition at line 268 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_electron_px_
private

Definition at line 265 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_electron_py_
private

Definition at line 265 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_electron_pz_
private

Definition at line 265 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_eta_
private

Definition at line 258 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_gendr_
private

Definition at line 263 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_genE_
private

Definition at line 263 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_genp_
private

Definition at line 263 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_genpt_
private

Definition at line 263 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<int> GammaJetAnalysis::pfjet2_had_candtrackind_
private

Definition at line 271 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_had_E_
private

Definition at line 270 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_had_E_mctruth_
private

Definition at line 270 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_had_EcalE_
private

Definition at line 270 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_had_emf_
private

Definition at line 270 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<int> GammaJetAnalysis::pfjet2_had_id_
private

Definition at line 271 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<int> GammaJetAnalysis::pfjet2_had_mcpdgId_
private

Definition at line 271 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

int GammaJetAnalysis::pfjet2_had_n_
private

Definition at line 269 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<int> GammaJetAnalysis::pfjet2_had_ntwrs_
private

Definition at line 271 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_had_px_
private

Definition at line 270 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_had_py_
private

Definition at line 270 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_had_pz_
private

Definition at line 270 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_had_rawHcalE_
private

Definition at line 270 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_muon_E_
private

Definition at line 266 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_muon_EcalE_
private

Definition at line 266 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

int GammaJetAnalysis::pfjet2_muon_n_
private

Definition at line 268 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_muon_px_
private

Definition at line 266 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_muon_py_
private

Definition at line 266 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_muon_pz_
private

Definition at line 266 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

int GammaJetAnalysis::pfjet2_ncandtracks_
private

Definition at line 277 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

int GammaJetAnalysis::pfjet2_nConstituents_
private

Definition at line 261 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_NeutralEMFrac_
private

Definition at line 260 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_NeutralHadronFrac_
private

Definition at line 260 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

int GammaJetAnalysis::pfjet2_ntwrs_
private

Definition at line 272 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_p_
private

Definition at line 258 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_phi_
private

Definition at line 258 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_photon_E_
private

Definition at line 267 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_photon_EcalE_
private

Definition at line 267 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

int GammaJetAnalysis::pfjet2_photon_n_
private

Definition at line 268 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_photon_px_
private

Definition at line 267 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_photon_py_
private

Definition at line 267 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_photon_pz_
private

Definition at line 267 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_pt_
private

Definition at line 258 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_scale_
private

Definition at line 258 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<int> GammaJetAnalysis::pfjet2_twr_candtrackind_
private

Definition at line 273 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<int> GammaJetAnalysis::pfjet2_twr_clusterind_
private

Definition at line 273 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<int> GammaJetAnalysis::pfjet2_twr_depth_
private

Definition at line 273 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_twr_dR_
private

Definition at line 274 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<int> GammaJetAnalysis::pfjet2_twr_elmttype_
private

Definition at line 273 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_twr_frac_
private

Definition at line 274 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<float> GammaJetAnalysis::pfjet2_twr_hade_
private

Definition at line 274 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<int> GammaJetAnalysis::pfjet2_twr_hadind_
private

Definition at line 273 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<int> GammaJetAnalysis::pfjet2_twr_ieta_
private

Definition at line 273 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<int> GammaJetAnalysis::pfjet2_twr_iphi_
private

Definition at line 273 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::vector<int> GammaJetAnalysis::pfjet2_twr_subdet_
private

Definition at line 273 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_unkown_E_
private

Definition at line 264 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_unkown_EcalE_
private

Definition at line 264 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

int GammaJetAnalysis::pfjet2_unkown_n_
private

Definition at line 268 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_unkown_px_
private

Definition at line 264 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_unkown_py_
private

Definition at line 264 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

float GammaJetAnalysis::pfjet2_unkown_pz_
private

Definition at line 264 of file GammaJetAnalysis.h.

Referenced by beginJob(), and copy_leadingPfJetVars_to_pfJet2().

std::string GammaJetAnalysis::pfJetCollName_
private

Definition at line 145 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

std::string GammaJetAnalysis::pfJetCorrName_
private

Definition at line 146 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::InputTag GammaJetAnalysis::pfMETColl
private

Definition at line 142 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::InputTag GammaJetAnalysis::pfType1METColl
private

Definition at line 142 of file GammaJetAnalysis.h.

Referenced by GammaJetAnalysis().

float GammaJetAnalysis::pho_2nd_pt_
private

Definition at line 223 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

std::string GammaJetAnalysis::photonCollName_
private

Definition at line 144 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

double GammaJetAnalysis::photonJetDPhiMin_
private

Definition at line 159 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

double GammaJetAnalysis::photonPtMin_
private

Definition at line 158 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

std::vector<int> GammaJetAnalysis::photonTrigFired_
private

Definition at line 204 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

std::vector<std::string> GammaJetAnalysis::photonTrigNamesV_
private

Definition at line 163 of file GammaJetAnalysis.h.

Referenced by analyze(), beginRun(), endJob(), and GammaJetAnalysis().

std::vector<int> GammaJetAnalysis::photonTrigPrescale_
private

Definition at line 205 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::ppfjet_area_
private
std::vector<float> GammaJetAnalysis::ppfjet_candtrack_EcalE_
private
std::vector<float> GammaJetAnalysis::ppfjet_candtrack_px_
private
std::vector<float> GammaJetAnalysis::ppfjet_candtrack_py_
private
std::vector<float> GammaJetAnalysis::ppfjet_candtrack_pz_
private
float GammaJetAnalysis::ppfjet_ChargedEMFrac_
private
float GammaJetAnalysis::ppfjet_ChargedHadronFrac_
private
float GammaJetAnalysis::ppfjet_ChargedMultiplicity_
private
std::vector<float> GammaJetAnalysis::ppfjet_cluster_dR_
private
std::vector<float> GammaJetAnalysis::ppfjet_cluster_eta_
private
int GammaJetAnalysis::ppfjet_cluster_n_
private
std::vector<float> GammaJetAnalysis::ppfjet_cluster_phi_
private
float GammaJetAnalysis::ppfjet_E_
private
float GammaJetAnalysis::ppfjet_E_NPVcorr_
private
float GammaJetAnalysis::ppfjet_electron_E_
private
float GammaJetAnalysis::ppfjet_electron_EcalE_
private
int GammaJetAnalysis::ppfjet_electron_n_
private
float GammaJetAnalysis::ppfjet_electron_px_
private
float GammaJetAnalysis::ppfjet_electron_py_
private
float GammaJetAnalysis::ppfjet_electron_pz_
private
float GammaJetAnalysis::ppfjet_eta_
private
float GammaJetAnalysis::ppfjet_gendr_
private
float GammaJetAnalysis::ppfjet_genE_
private
float GammaJetAnalysis::ppfjet_genp_
private
float GammaJetAnalysis::ppfjet_genpt_
private
std::vector<int> GammaJetAnalysis::ppfjet_had_candtrackind_
private
std::vector<float> GammaJetAnalysis::ppfjet_had_E_
private
std::vector<float> GammaJetAnalysis::ppfjet_had_E_mctruth_
private
std::vector<float> GammaJetAnalysis::ppfjet_had_EcalE_
private
std::vector<float> GammaJetAnalysis::ppfjet_had_emf_
private
std::vector<int> GammaJetAnalysis::ppfjet_had_id_
private
std::vector<int> GammaJetAnalysis::ppfjet_had_mcpdgId_
private
int GammaJetAnalysis::ppfjet_had_n_
private
std::vector<int> GammaJetAnalysis::ppfjet_had_ntwrs_
private
std::vector<float> GammaJetAnalysis::ppfjet_had_px_
private
std::vector<float> GammaJetAnalysis::ppfjet_had_py_
private
std::vector<float> GammaJetAnalysis::ppfjet_had_pz_
private
std::vector<float> GammaJetAnalysis::ppfjet_had_rawHcalE_
private
float GammaJetAnalysis::ppfjet_muon_E_
private
float GammaJetAnalysis::ppfjet_muon_EcalE_
private
int GammaJetAnalysis::ppfjet_muon_n_
private
float GammaJetAnalysis::ppfjet_muon_px_
private
float GammaJetAnalysis::ppfjet_muon_py_
private
float GammaJetAnalysis::ppfjet_muon_pz_
private
int GammaJetAnalysis::ppfjet_ncandtracks_
private
int GammaJetAnalysis::ppfjet_nConstituents_
private
float GammaJetAnalysis::ppfjet_NeutralEMFrac_
private
float GammaJetAnalysis::ppfjet_NeutralHadronFrac_
private
int GammaJetAnalysis::ppfjet_ntwrs_
private
float GammaJetAnalysis::ppfjet_p_
private
float GammaJetAnalysis::ppfjet_phi_
private
float GammaJetAnalysis::ppfjet_photon_E_
private
float GammaJetAnalysis::ppfjet_photon_EcalE_
private
int GammaJetAnalysis::ppfjet_photon_n_
private
float GammaJetAnalysis::ppfjet_photon_px_
private
float GammaJetAnalysis::ppfjet_photon_py_
private
float GammaJetAnalysis::ppfjet_photon_pz_
private
float GammaJetAnalysis::ppfjet_pt_
private
float GammaJetAnalysis::ppfjet_scale_
private
std::vector<int> GammaJetAnalysis::ppfjet_twr_candtrackind_
private
std::vector<int> GammaJetAnalysis::ppfjet_twr_clusterind_
private
std::vector<int> GammaJetAnalysis::ppfjet_twr_depth_
private
std::vector<float> GammaJetAnalysis::ppfjet_twr_dR_
private
std::vector<int> GammaJetAnalysis::ppfjet_twr_elmttype_
private
std::vector<float> GammaJetAnalysis::ppfjet_twr_frac_
private
std::vector<float> GammaJetAnalysis::ppfjet_twr_hade_
private
std::vector<int> GammaJetAnalysis::ppfjet_twr_hadind_
private
std::vector<int> GammaJetAnalysis::ppfjet_twr_ieta_
private
std::vector<int> GammaJetAnalysis::ppfjet_twr_iphi_
private
std::vector<int> GammaJetAnalysis::ppfjet_twr_subdet_
private
float GammaJetAnalysis::ppfjet_unkown_E_
private
float GammaJetAnalysis::ppfjet_unkown_EcalE_
private
int GammaJetAnalysis::ppfjet_unkown_n_
private
float GammaJetAnalysis::ppfjet_unkown_px_
private
float GammaJetAnalysis::ppfjet_unkown_py_
private
float GammaJetAnalysis::ppfjet_unkown_pz_
private
std::string GammaJetAnalysis::prodProcess_
private

Definition at line 155 of file GammaJetAnalysis.h.

Referenced by GammaJetAnalysis().

std::string GammaJetAnalysis::pvCollName_
private

Definition at line 154 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

float GammaJetAnalysis::rho2012_
private

Definition at line 222 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

edm::InputTag GammaJetAnalysis::rhoCollection_
private

Definition at line 141 of file GammaJetAnalysis.h.

Referenced by GammaJetAnalysis().

TFile* GammaJetAnalysis::rootfile_
private

Definition at line 196 of file GammaJetAnalysis.h.

Referenced by beginJob(), and endJob().

std::string GammaJetAnalysis::rootHistFilename_
private

Definition at line 153 of file GammaJetAnalysis.h.

Referenced by beginJob(), and GammaJetAnalysis().

int GammaJetAnalysis::runNumber_
private

Definition at line 210 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

int GammaJetAnalysis::tagPho_ConvSafeEleVeto_
private

Definition at line 228 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_EcalIsoDR04_
private

Definition at line 224 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_energy_
private

Definition at line 223 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_eta_
private

Definition at line 223 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_genDeltaR_
private

Definition at line 231 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_genEnergy_
private

Definition at line 230 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_genEta_
private

Definition at line 230 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_genPhi_
private

Definition at line 230 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_genPt_
private

Definition at line 230 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_HcalIsoDR0412_
private

Definition at line 224 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_HcalIsoDR04_
private

Definition at line 224 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_HoE_
private

Definition at line 224 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

int GammaJetAnalysis::tagPho_idLoose_
private

Definition at line 229 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

int GammaJetAnalysis::tagPho_idTight_
private

Definition at line 229 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

std::vector<std::vector<float> > GammaJetAnalysis::tagPho_pfiso_mycharged03
private

Definition at line 226 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_pfiso_myneutral03_
private

Definition at line 225 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_pfiso_myphoton03_
private

Definition at line 224 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_phi_
private

Definition at line 223 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

int GammaJetAnalysis::tagPho_pixelSeed_
private

Definition at line 227 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_pt_
private

Definition at line 223 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_r9_
private

Definition at line 224 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_sieie_
private

Definition at line 223 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

float GammaJetAnalysis::tagPho_TrkIsoHollowDR04_
private

Definition at line 224 of file GammaJetAnalysis.h.

Referenced by analyze(), and beginJob().

edm::EDGetTokenT<reco::BeamSpot> GammaJetAnalysis::tok_BS_
private

Definition at line 185 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<reco::ConversionCollection> GammaJetAnalysis::tok_Conv_
private

Definition at line 184 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<GenEventInfoProduct> GammaJetAnalysis::tok_GenEvInfo_
private

Definition at line 172 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<std::vector<reco::GenJet> > GammaJetAnalysis::tok_GenJet_
private

Definition at line 170 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<std::vector<reco::GenParticle> > GammaJetAnalysis::tok_GenPart_
private

Definition at line 171 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<reco::GsfElectronCollection> GammaJetAnalysis::tok_GsfElec_
private

Definition at line 182 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

Definition at line 173 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

Definition at line 174 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

Definition at line 175 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<edm::ValueMap<Bool_t> > GammaJetAnalysis::tok_loosePhoton_
private

Definition at line 176 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<std::vector<Bool_t> > GammaJetAnalysis::tok_loosePhotonV_
private

Definition at line 178 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<reco::PFCandidateCollection> GammaJetAnalysis::tok_PFCand_
private

Definition at line 180 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<reco::PFJetCollection> GammaJetAnalysis::tok_PFJet_
private

Definition at line 169 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<reco::PFMETCollection> GammaJetAnalysis::tok_PFMET_
private

Definition at line 187 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<reco::PFMETCollection> GammaJetAnalysis::tok_PFType1MET_
private

Definition at line 188 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<reco::PhotonCollection> GammaJetAnalysis::tok_Photon_
private

Definition at line 168 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<std::vector<reco::Vertex> > GammaJetAnalysis::tok_PV_
private

Definition at line 186 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<double> GammaJetAnalysis::tok_Rho_
private

Definition at line 183 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<edm::ValueMap<Bool_t> > GammaJetAnalysis::tok_tightPhoton_
private

Definition at line 177 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<std::vector<Bool_t> > GammaJetAnalysis::tok_tightPhotonV_
private

Definition at line 179 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<edm::TriggerResults> GammaJetAnalysis::tok_TrigRes_
private

Definition at line 189 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

edm::EDGetTokenT<reco::VertexCollection> GammaJetAnalysis::tok_Vertex_
private

Definition at line 181 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().

int GammaJetAnalysis::workOnAOD_
private

Definition at line 192 of file GammaJetAnalysis.h.

Referenced by analyze(), endJob(), and GammaJetAnalysis().

bool GammaJetAnalysis::writeTriggerPrescale_
private

Definition at line 165 of file GammaJetAnalysis.h.

Referenced by analyze(), and GammaJetAnalysis().