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

174 {}

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 181 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, asciidump::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_, HcalRecHitsCustom_cff::hfreco, reco::CaloCluster::hitsAndFractions(), hltConfig_, reco::PFBlockElement::HO, hoRecHitName_, HcalRecHitsCustom_cff::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_, HLTConfigProvider::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.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 1276 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.

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

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

1571  {
1572  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "beginRun()";
1573 
1574  if (!ignoreHLT_) {
1575  int noPhotonTrigger= (photonTrigNamesV_.size()==0) ? 1:0;
1576  int noJetTrigger= (jetTrigNamesV_.size()==0) ? 1:0;
1577  if (!noPhotonTrigger &&
1578  (photonTrigNamesV_.size()==1) &&
1579  (photonTrigNamesV_[0].length()==0)) noPhotonTrigger=1;
1580  if (!noJetTrigger &&
1581  (jetTrigNamesV_.size()==1) &&
1582  (jetTrigNamesV_[0].length()==0)) noJetTrigger=1;
1583  if (noPhotonTrigger && noJetTrigger) {
1584  ignoreHLT_=true;
1585  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "HLT trigger ignored: no trigger requested";
1586  }
1587  } else {
1588  // clear trigger names, if needed
1589  photonTrigNamesV_.clear();
1590  jetTrigNamesV_.clear();
1591  }
1592 
1593  if (!ignoreHLT_) {
1594  if (debug_>0) edm::LogInfo("GammaJetAnalysis") << "Initializing trigger information for individual run";
1595  bool changed(true);
1596  std::string processName="HLT";
1597  if (hltConfig_.init(iRun,setup,processName,changed)) {
1598  // if init returns TRUE, initialisation has succeeded!
1599  if (changed) {
1600  // The HLT config has actually changed wrt the previous Run, hence rebook your
1601  // histograms or do anything else dependent on the revised HLT config
1602  }
1603  }
1604  else {
1605  // if init returns FALSE, initialisation has NOT succeeded, which indicates a problem
1606  // with the file and/or code and needs to be investigated!
1608  << " HLT config extraction failure with process name " << processName;
1609  // In this case, all access methods will return empty values!
1610  }
1611  }
1612 }
HLTConfigProvider hltConfig_
std::vector< std::string > photonTrigNamesV_
std::vector< std::string > jetTrigNamesV_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
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  }
bool isValid() const
const reco::Photon * photon(void) const
virtual double phi() const
momentum azimuthal angle
void GammaJetAnalysis::clear_leadingPfJetVars ( )
private

Definition at line 1749 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().

1749  {
1750  ppfjet_pt_ = ppfjet_p_ = ppfjet_E_ = 0;
1756  ppfjet_ChargedEMFrac_ = 0.;
1758  // Reset particle variables
1764  ppfjet_had_n_ = 0;
1765  ppfjet_ntwrs_ = 0;
1766  ppfjet_cluster_n_ = 0;
1767  ppfjet_ncandtracks_ = 0;
1768 
1769  ppfjet_had_E_.clear();
1770  ppfjet_had_px_.clear();
1771  ppfjet_had_py_.clear();
1772  ppfjet_had_pz_.clear();
1773  ppfjet_had_EcalE_.clear();
1774  ppfjet_had_rawHcalE_.clear();
1775  ppfjet_had_emf_.clear();
1776  ppfjet_had_E_mctruth_.clear();
1777  ppfjet_had_id_.clear();
1778  ppfjet_had_candtrackind_.clear();
1779  ppfjet_had_mcpdgId_.clear();
1780  ppfjet_had_ntwrs_.clear();
1781  ppfjet_twr_ieta_.clear();
1782  ppfjet_twr_iphi_.clear();
1783  ppfjet_twr_depth_.clear();
1784  ppfjet_twr_subdet_.clear();
1785  ppfjet_twr_candtrackind_.clear();
1786  ppfjet_twr_hadind_.clear();
1787  ppfjet_twr_elmttype_.clear();
1788  ppfjet_twr_hade_.clear();
1789  ppfjet_twr_frac_.clear();
1790  ppfjet_twr_dR_.clear();
1791  ppfjet_twr_clusterind_.clear();
1792  ppfjet_cluster_eta_.clear();
1793  ppfjet_cluster_phi_.clear();
1794  ppfjet_cluster_dR_.clear();
1795  ppfjet_candtrack_px_.clear();
1796  ppfjet_candtrack_py_.clear();
1797  ppfjet_candtrack_pz_.clear();
1798  ppfjet_candtrack_EcalE_.clear();
1799 
1800 }
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 1804 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().

1804  {
1806  pfjet2_p_ = ppfjet_p_;
1807  pfjet2_E_ = ppfjet_E_;
1819 
1824 
1830 
1836 
1842 
1848 
1854 
1863 
1868 
1878 
1882 
1887 
1893 }
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 1897 of file GammaJetAnalysis.cc.

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

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

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

Definition at line 1907 of file GammaJetAnalysis.cc.

References mathSSE::sqrt().

1908 {
1909  double deta = eta1 - eta2;
1910  double dphi = std::fabs(phi1 - phi2);
1911  if(dphi>3.1415927) dphi = 2*3.1415927 - dphi;
1912  return std::sqrt(deta*deta + dphi*dphi);
1913 }
T sqrt(T t)
Definition: SSEVec.h:48
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 eta() const
momentum pseudorapidity
bool isValid() const
const reco::Photon * photon(void) const
double deltaR(const reco::Jet *j1, const reco::Jet *j2)
virtual double phi() const
momentum azimuthal angle
void GammaJetAnalysis::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1532 of file GammaJetAnalysis.cc.

References doGenJets_, doPFJets_, ignoreHLT_, jetTrigNamesV_, misc_tree_, nProcessed_, NULL, pf_tree_, photonTrigNamesV_, rootfile_, cond::rpcobgas::time, and workOnAOD_.

1532  {
1533  rootfile_->cd();
1534 
1535  if(doPFJets_){
1536  pf_tree_->Write();
1537  }
1538  // write miscItems
1539  // Save info about the triggers and other misc items
1540  {
1541  rootfile_->cd();
1542  rootfile_->mkdir("miscItems");
1543  rootfile_->cd("miscItems");
1544  misc_tree_= new TTree("misc_tree","tree for misc.info");
1545  misc_tree_->Branch("ignoreHLT",&ignoreHLT_,"ignoreHLT/O");
1546  misc_tree_->Branch("doPFJets",&doPFJets_,"doPFJets/O");
1547  misc_tree_->Branch("doGenJets",&doGenJets_,"doGenJets/O");
1548  misc_tree_->Branch("workOnAOD",&workOnAOD_,"workOnAOD/O");
1549  misc_tree_->Branch("photonTriggerNames",&photonTrigNamesV_);
1550  misc_tree_->Branch("jetTriggerNames",&jetTrigNamesV_);
1551  misc_tree_->Branch("nProcessed",&nProcessed_,"nProcessed/l");
1552  // put time stamp
1553  time_t ltime;
1554  ltime=time(NULL);
1555  TString str = TString(asctime(localtime(&ltime)));
1556  if (str[str.Length()-1]=='\n') str.Remove(str.Length()-1,1);
1557  TObjString date(str);
1558  date.Write(str.Data());
1559  misc_tree_->Fill();
1560  misc_tree_->Write();
1561  rootfile_->cd();
1562  }
1563 
1564  rootfile_->Close();
1565 }
#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 1930 of file GammaJetAnalysis.cc.

Referenced by analyze().

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

Definition at line 1937 of file GammaJetAnalysis.cc.

1938 {
1939  return id.rawId() & 0x3FFF; // Get 14 least-significant digits
1940 }
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 1618 of file GammaJetAnalysis.cc.

References reco::Photon::clone(), debug_, deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, reco::LeafCandidate::energy(), HLT_25ns14e33_v1_cff::etaStripBarrel, HLT_25ns14e33_v1_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().

1618  {
1619  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "Inside pfEcalIso";
1620  reco::Photon* localPho = localPho1->clone();
1621  float dRVeto;
1622  float etaStrip;
1623 
1624  if (localPho->isEB()) {
1625  dRVeto = dRVetoBarrel;
1626  etaStrip = etaStripBarrel;
1627  } else {
1628  dRVeto = dRVetoEndcap;
1629  etaStrip = etaStripEndcap;
1630  }
1631  const reco::PFCandidateCollection* forIsolation = pfHandle.product();
1632  int nsize = forIsolation->size();
1633  float sum = 0;
1634  for (int i=0; i<nsize; i++) {
1635  const reco::PFCandidate& pfc = (*forIsolation)[i];
1636  if (pfc.particleId() == pfToUse) {
1637  // Do not include the PFCandidate associated by SC Ref to the reco::Photon
1638  if(pfc.superClusterRef().isNonnull() && localPho->superCluster().isNonnull()) {
1639  if (pfc.superClusterRef() == localPho->superCluster())
1640  continue;
1641  }
1642 
1643  if (localPho->isEB()) {
1644  if (fabs(pfc.pt()) < energyBarrel)
1645  continue;
1646  } else {
1647  if (fabs(pfc.energy()) < energyEndcap)
1648  continue;
1649  }
1650  // Shift the photon direction vector according to the PF vertex
1651  math::XYZPoint pfvtx = pfc.vertex();
1652  math::XYZVector photon_directionWrtVtx(localPho->superCluster()->x() - pfvtx.x(),
1653  localPho->superCluster()->y() - pfvtx.y(),
1654  localPho->superCluster()->z() - pfvtx.z());
1655 
1656  float dEta = fabs(photon_directionWrtVtx.Eta() - pfc.momentum().Eta());
1657  float dR = deltaR(photon_directionWrtVtx.Eta(), photon_directionWrtVtx.Phi(), pfc.momentum().Eta(), pfc.momentum().Phi());
1658 
1659  if (dEta < etaStrip)
1660  continue;
1661 
1662  if(dR > dRmax || dR < dRVeto)
1663  continue;
1664 
1665  sum += pfc.pt();
1666  }
1667  }
1668  return sum;
1669 }
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:250
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
virtual Vector momentum() const
spatial momentum vector
virtual double pt() const
transverse momentum
virtual double energy() const
energy
virtual const Point & vertex() const
vertex position (overwritten by PF...)
Definition: PFCandidate.cc:647
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
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
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 1673 of file GammaJetAnalysis.cc.

References debug_, and pfEcalIso().

Referenced by analyze().

1673  {
1674  if (debug_>1) edm::LogInfo("GammaJetAnalysis") << "Inside pfHcalIso";
1675  return pfEcalIso(localPho, pfHandle, dRmax, dRveto, dRveto, 0.0, 0.0, 0.0, 0.0, pfToUse);
1676 
1677 }
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 1681 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, query::result, reco::Photon::superCluster(), and reco::PFCandidate::trackRef().

Referenced by analyze().

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

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().

HLTConfigProvider GammaJetAnalysis::hltConfig_
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().