15 TFile *fgbr1 =
new TFile(
"/afs/cern.ch/work/r/rpatel/public/TMVARegressionBarrelLC.root",
"READ");
16 TFile *fgbr2 =
new TFile(
"/afs/cern.ch/work/r/rpatel/public/TMVARegressionEndCapLC.root",
"READ");
19 tf1=
new TFile(
"PF_test.root",
"RECREATE");
20 pf=
new TTree(
"pf",
"PFPhotons");
21 pfclus=
new TTree(
"pflcus",
"PFClusters");
22 pf->Branch(
"isConv", &
isConv_,
"isConv/I");
25 pf->Branch(
"PFPS1", &
PFPS1_,
"PFPS1/F");
26 pf->Branch(
"PFPS2", &
PFPS2_,
"PFPS2/F");
27 pf->Branch(
"MustE", &
MustE_,
"MustE/F");
30 pf->Branch(
"PFdEta", &
PFdEta_,
"PFdEta/F");
31 pf->Branch(
"PFdPhi", &
PFdPhi_,
"PFdPhi/F");
34 pf->Branch(
"VtxZ", &
VtxZ_,
"VtxZ/F");
53 PhotonCollection::const_iterator iPfPho;
54 PhotonCollection::const_iterator iPho;
74 for(reco::PhotonCollection::const_iterator iPho = recoPhotons->begin(); iPho!=recoPhotons->end(); ++iPho) {
90 std::pair<float, float>VertexZ=ggPFPhoton.
SLPoint();
113 std::vector<reco::CaloCluster>PFC=ggPFPhoton.
PFClusters();
118 std::vector<reco::CaloCluster>PFC;
119 std::vector<reco::PFCandidatePtr>insideBox;
120 std::vector<DetId>MatchedRH;
121 ggPFPhoton.
PhotonPFCandMatch(*(iPho->superCluster()), insideBox,PFParticles,PFC, MatchedRH);
125 SCRawE_=iPho->superCluster()->rawEnergy();
T getParameter(std::string const &) const
edm::InputTag esRecHitCollection_
void PhotonPFCandMatch(reco::SuperCluster sc, std::vector< reco::PFCandidatePtr > &insideBox, edm::Handle< PFCandidateCollection > &pfCandidates, vector< reco::CaloCluster > &PFClust, std::vector< DetId > &MatchedRH)
#define DEFINE_FWK_MODULE(type)
const GBRForest * PFLCEndcap_
ggPFPhotonAnalyzer(const edm::ParameterSet &iConfig)
virtual void analyze(const edm::Event &, const edm::EventSetup &es)
std::pair< float, float > SLPoint()
edm::InputTag ebReducedRecHitCollection_
std::vector< reco::CaloCluster > PFClusters()
edm::InputTag beamSpotCollection_
const CaloSubdetectorGeometry * geomEnd_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag PFElectronTag_
edm::InputTag recoPhotonTag_
edm::InputTag eeReducedRecHitCollection_
const CaloSubdetectorGeometry * geomBar_
const GBRForest * PFLCBarrel_
edm::InputTag PFPhotonTag_
virtual void beginRun(const edm::Run &r, const edm::EventSetup &c)
double getPFPhoECorr(std::vector< reco::CaloCluster >PFClusters, const GBRForest *ReaderLCEB, const GBRForest *ReaderLCEE)