1 #ifndef PFProducer_PFEGammaAlgo_H
2 #define PFProducer_PFEGammaAlgo_H
26 #include "TMVA/Reader.h"
35 class PFCandidateCollectioon;
44 const boost::shared_ptr<PFSCEnergyCalibration>& thePFSCEnergyCalibration,
45 const boost::shared_ptr<PFEnergyCalibration>& thePFEnergyCalibration,
46 bool applyCrackCorrections,
49 bool useEGammaSupercluster,
50 double sumEtEcalIsoForEgammaSC_barrel,
51 double sumEtEcalIsoForEgammaSC_endcap,
52 double coneEcalIsoForEgammaSC,
53 double sumPtTrackIsoForEgammaSC_barrel,
54 double sumPtTrackIsoForEgammaSC_endcap,
55 unsigned int nTrackIsoForEgammaSC,
56 double coneTrackIsoForEgammaSC,
62 double sumPtTrackIsoForPhoton,
63 double sumPtTrackIsoSlopeForPhoton
103 std::vector< bool >& active
120 typedef std::map< unsigned int, std::vector<unsigned int> >
AssMap;
131 AssMap& associatedToBrems_,
132 AssMap& associatedToEcal_,
133 std::vector<bool>& active,
142 std::vector<unsigned int> &elemsToLock,
145 AssMap& associatedToBrems_,
146 AssMap& associatedToEcal_);
151 std::vector<unsigned int> &elemsToLock,
154 AssMap& associatedToBrems_,
155 AssMap& associatedToEcal_,
156 std::vector<bool>& active);
257 float PFPhoEta_,
PFPhoPhi_,
PFPhoR9_,
PFPhoR9Corr_,
SCPhiWidth_,
SCEtaWidth_,
PFPhoEt_,
RConv_,
PFPhoEtCorr_,
PFPhoE_,
PFPhoECorr_,
MustE_,
E3x3_;
276 std::vector<reco::PFCandidateEGammaExtra>
egExtra_;
283 std::vector< bool >& active
288 unsigned int track_index);
290 double ClustersPhiRMS(std::vector<reco::CaloCluster>PFClusters,
float PFPhoPhi);
294 std::vector<int>
getPFMustacheClus(
int nClust, std::vector<float>& ClustEt, std::vector<float>& ClustEta, std::vector<float>& ClustPhi);
298 std::vector<reco::PFCandidate>&
299 tempElectronCandidates,
std::vector< reco::PFCandidateEGammaExtra > egExtra_
float EtotBremPinPoutMode
std::vector< int > match_ind
bool EvaluateSingleLegMVA(const reco::PFBlockRef &blockref, const reco::Vertex &primaryvtx, unsigned int track_index)
unsigned int whichTrackAlgo(const reco::TrackRef &trackRef)
boost::shared_ptr< PFSCEnergyCalibration > thePFSCEnergyCalibration_
const char * mvaWeightFile_
bool useEGammaSupercluster_
std::vector< std::pair< unsigned int, unsigned int > > fifthStepKfTrack_
const std::vector< reco::PFCandidate > & getCandidates()
void RunPFEG(const reco::PFBlockRef &blockRef, std::vector< bool > &active)
std::vector< unsigned int > AddFromElectron_
bool SetLinks(const reco::PFBlockRef &blockRef, AssMap &associatedToGsf_, AssMap &associatedToBrems_, AssMap &associatedToEcal_, std::vector< bool > &active, const reco::Vertex &primaryVertex)
double sumPtTrackIsoSlopeForPhoton_
bool applyCrackCorrections_
std::vector< bool > lockExtraKf_
const reco::Vertex * primaryVertex_
const GBRForest * ReaderGC_
bool isPrimaryTrack(const reco::PFBlockElementTrack &KfEl, const reco::PFBlockElementGsfTrack &GsfEl)
void setPhotonPrimaryVtx(const reco::Vertex &primary)
const GBRForest * ReaderGCEElR9_
void EarlyConversion(std::vector< reco::PFCandidate > &tempElectronCandidates, const reco::PFBlockElementSuperCluster *sc)
const GBRForest * ReaderGCEB_
void setGBRForest(const GBRForest *LCorrForest, const GBRForest *GCorrForest, const GBRForest *ResForest)
boost::shared_ptr< PFEnergyCalibration > thePFEnergyCalibration_
std::vector< bool > GsfTrackSingleEcal_
float EvaluateGCorrMVA(reco::PFCandidate, std::vector< reco::CaloCluster >PFClusters)
void AddElectronElements(unsigned int gsf_index, std::vector< unsigned int > &elemsToLock, const reco::PFBlockRef &blockRef, AssMap &associatedToGsf_, AssMap &associatedToBrems_, AssMap &associatedToEcal_)
const GBRForest * ReaderGCEEhR9_
std::vector< reco::PFCandidate > permElectronCandidates_
float EvaluateLCorrMVA(reco::PFClusterRef clusterRef)
double ClustersPhiRMS(std::vector< reco::CaloCluster >PFClusters, float PFPhoPhi)
double coneTrackIsoForEgammaSC_
double sumPtTrackIsoForEgammaSC_endcap_
const GBRForest * ReaderLCEB_
bool AddElectronCandidate(unsigned int gsf_index, reco::SuperClusterRef scref, std::vector< unsigned int > &elemsToLock, const reco::PFBlockRef &blockRef, AssMap &associatedToGsf_, AssMap &associatedToBrems_, AssMap &associatedToEcal_, std::vector< bool > &active)
const std::vector< reco::PFCandidateEGammaExtra > & getEGExtra()
unsigned int nTrackIsoForEgammaSC_
double sumPtTrackIsoForEgammaSC_barrel_
float EvaluateResMVA(reco::PFCandidate, std::vector< reco::CaloCluster >PFClusters)
double coneEcalIsoForEgammaSC_
bool isEGValidCandidate(const reco::PFBlockRef &blockRef, std::vector< bool > &active)
std::vector< std::pair< unsigned int, unsigned int > > convGsfTrack_
TMVA::Reader * tmvaReaderEle_
const GBRForest * ReaderLCEE_
std::map< unsigned int, std::vector< unsigned int > > AssMap
Particle reconstructed by the particle flow algorithm.
std::vector< int > getPFMustacheClus(int nClust, std::vector< float > &ClustEt, std::vector< float > &ClustEta, std::vector< float > &ClustPhi)
double sumEtEcalIsoForEgammaSC_endcap_
double sumEtEcalIsoForEgammaSC_barrel_
const GBRForest * ReaderRes_
TMVA::Reader * tmvaReader_
double sumPtTrackIsoForPhoton_
verbosityLevel verbosityLevel_
const GBRForest * ReaderLC_
void setGBRForest(const GBRForest *LCorrForestEB, const GBRForest *LCorrForestEE, const GBRForest *GCorrForestBarrel, const GBRForest *GCorrForestEndcapHr9, const GBRForest *GCorrForestEndcapLr9, const GBRForest *PFEcalResolution)
PFEGammaAlgo(const double mvaEleCut, std::string mvaWeightFileEleID, const boost::shared_ptr< PFSCEnergyCalibration > &thePFSCEnergyCalibration, const boost::shared_ptr< PFEnergyCalibration > &thePFEnergyCalibration, bool applyCrackCorrections, bool usePFSCEleCalib, bool useEGElectrons, bool useEGammaSupercluster, double sumEtEcalIsoForEgammaSC_barrel, double sumEtEcalIsoForEgammaSC_endcap, double coneEcalIsoForEgammaSC, double sumPtTrackIsoForEgammaSC_barrel, double sumPtTrackIsoForEgammaSC_endcap, unsigned int nTrackIsoForEgammaSC, double coneTrackIsoForEgammaSC, std::string mvaweightfile, double mvaConvCut, bool useReg, std::string X0_Map, const reco::Vertex &primary, double sumPtTrackIsoForPhoton, double sumPtTrackIsoSlopeForPhoton)
std::vector< reco::PFCandidate > egCandidate_