1 #ifndef PFProducer_PFEGammaAlgo_H
2 #define PFProducer_PFEGammaAlgo_H
40 #include "TMVA/Reader.h"
45 #include <forward_list>
46 #include <unordered_map>
67 typedef std::unordered_map<unsigned int, std::vector<unsigned int> >
AsscMap;
91 std::vector<PFBremFlaggedElement>
brems;
149 std::vector< bool >& active
155 std::vector< bool >& active){
223 std::vector<PFClusterFlaggedElement>&,
227 ClusterMap::mapped_type&);
265 bool removeFreeECAL =
false,
266 bool removeSCECAL =
false);
271 const std::list<ProtoEGObject>&,
371 float PFPhoEta_,
PFPhoPhi_,
PFPhoR9_,
PFPhoR9Corr_,
SCPhiWidth_,
SCEtaWidth_,
PFPhoEt_,
RConv_,
PFPhoEtCorr_,
PFPhoE_,
PFPhoECorr_,
MustE_,
E3x3_;
395 unsigned int track_index);
float EtotBremPinPoutMode
std::vector< int > match_ind
std::unordered_map< unsigned int, std::vector< unsigned int > > AsscMap
Abstract base class for a PFBlock element (track, cluster...)
unsigned int whichTrackAlgo(const reco::TrackRef &trackRef)
std::vector< PFClusterFlaggedElement > ecalclusters
const char * mvaWeightFile_
reco::PFBlockElementSuperCluster PFSCElement
reco::PFCandidateEGammaExtraCollection egExtra_
std::vector< std::pair< unsigned int, unsigned int > > fifthStepKfTrack_
reco::SuperClusterCollection refinedscs_
reco::SuperClusterCollection & getRefinedSCs()
reco::PFBlockRef parentBlock
void unlinkRefinableObjectKFandECALWithBadEoverP(ProtoEGObject &)
std::vector< unsigned int > AddFromElectron_
double sumPtTrackIsoSlopeForPhoton_
GSFToTrackMap boundKFTracks
std::unordered_map< const PFKFElement *, float > KFValMap
float calculate_ele_mva(const pfEGHelpers::HeavyObjectCache *hoc, const ProtoEGObject &, reco::PFCandidateEGammaExtra &)
std::vector< bool > lockExtraKf_
std::pair< const PFClusterElement *, bool > PFClusterFlaggedElement
const reco::Vertex * primaryVertex_
const GBRForest * ReaderGC_
std::vector< std::pair< const reco::PFBlockElement *, const reco::PFBlockElement * > > ElementMap
std::shared_ptr< PFEnergyCalibration > thePFEnergyCalibration
double sumPtTrackIsoForEgammaSC_endcap
std::map< unsigned int, Link > LinkData
std::vector< PFClusterFlaggedElement > hcalClusters
reco::PFBlockElementGsfTrack PFGSFElement
bool isPrimaryTrack(const reco::PFBlockElementTrack &KfEl, const reco::PFBlockElementGsfTrack &GsfEl)
void setPhotonPrimaryVtx(const reco::Vertex &primary)
void linkRefinableObjectPrimaryGSFTrackToECAL(ProtoEGObject &)
const GBRForest * ReaderGCEElR9_
double sumPtTrackIsoSlopeForPhoton
void linkRefinableObjectECALToSingleLegConv(const pfEGHelpers::HeavyObjectCache *hoc, ProtoEGObject &)
const GBRForest * ReaderGCEB_
std::vector< const PFClusterElement * > electronClusters
std::vector< std::vector< PFFlaggedElement > > _splayedblock
std::pair< const PFGSFElement *, bool > PFGSFFlaggedElement
void linkRefinableObjectBremTangentsToECAL(ProtoEGObject &)
const reco::Vertex * primaryVtx
reco::PFBlockRef _currentblock
double sumEtEcalIsoForEgammaSC_endcap
std::pair< const reco::PFBlockElement *, bool > PFFlaggedElement
double sumPtTrackIsoForEgammaSC_barrel
std::pair< const PFSCElement *, bool > PFSCFlaggedElement
std::vector< bool > GsfTrackSingleEcal_
double coneTrackIsoForEgammaSC
const GBRForest * ReaderGCEEhR9_
std::vector< reco::PFCandidate > permElectronCandidates_
edm::Handle< reco::PFCluster::EEtoPSAssociation > eetops_
std::vector< PFKFFlaggedElement > secondaryKFs
void dumpCurrentRefinableObjects() const
void initializeProtoCands(std::list< ProtoEGObject > &)
void linkRefinableObjectPrimaryKFsToSecondaryKFs(ProtoEGObject &)
bool unwrapSuperCluster(const reco::PFBlockElementSuperCluster *, std::vector< PFClusterFlaggedElement > &, ClusterMap &)
reco::PFCandidateEGammaExtraCollection & getEGExtra()
double sumPtTrackIsoForPhoton
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
std::vector< PFGSFFlaggedElement > secondaryGSFs
reco::PFCluster::EEtoPSAssociation EEtoPSAssociation
PFEGammaAlgo(const PFEGConfigInfo &)
bool produceEGCandsWithNoSuperCluster
const PFSCElement * parentSC
void setEEtoPSAssociation(const edm::Handle< EEtoPSAssociation > &eetops)
const GBRForest * ReaderLCEB_
std::vector< reco::PFCandidateEGammaExtra > PFCandidateEGammaExtraCollection
collection of PFCandidateEGammaExtras
std::vector< PFBremFlaggedElement > brems
std::vector< std::pair< CaloClusterPtr::key_type, edm::Ptr< PFCluster > > > EEtoPSAssociation
std::unordered_map< const PFGSFElement *, std::vector< PFKFFlaggedElement > > GSFToTrackMap
std::list< ProtoEGObject > _refinableObjects
reco::PFBlockElementCluster PFClusterElement
reco::PFBlockElementBrem PFBremElement
KFValMap singleLegConversionMvaMap
bool isEGValidCandidate(const pfEGHelpers::HeavyObjectCache *hoc, const reco::PFBlockRef &blockRef, std::vector< bool > &active)
reco::PFCandidateEGammaExtraCollection outcandsextra_
void linkKFTrackToECAL(const PFKFFlaggedElement &, ProtoEGObject &)
reco::PFCandidateCollection & getCandidates()
reco::PFBlock::LinkData _currentlinks
void buildAndRefineEGObjects(const pfEGHelpers::HeavyObjectCache *hoc, const reco::PFBlockRef &block)
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
float EvaluateSingleLegMVA(const pfEGHelpers::HeavyObjectCache *hoc, const reco::PFBlockRef &blockref, const reco::Vertex &primaryvtx, unsigned int track_index)
void fill_extra_info(const ProtoEGObject &, reco::PFCandidateEGammaExtra &)
reco::PFCandidateCollection egCandidate_
bool applyCrackCorrections
double coneEcalIsoForEgammaSC
bool isAMuon(const reco::PFBlockElement &)
reco::ElectronSeedRef electronSeed
std::string mvaWeightFileEleID
bool useEGammaSupercluster
unsigned int nTrackIsoForEgammaSC
reco::PFBlockElementTrack PFKFElement
void linkRefinableObjectGSFTracksToKFs(ProtoEGObject &)
std::vector< std::pair< unsigned int, unsigned int > > convGsfTrack_
std::vector< PFKFFlaggedElement > primaryKFs
std::unordered_map< const PFClusterElement *, std::vector< PFClusterFlaggedElement > > ClusterMap
std::shared_ptr< PFSCEnergyCalibration > thePFSCEnergyCalibration
ElementMap _recoveredlinks
void fillPFCandidates(const pfEGHelpers::HeavyObjectCache *hoc, const std::list< ProtoEGObject > &, reco::PFCandidateCollection &, reco::PFCandidateEGammaExtraCollection &)
const GBRForest * ReaderLCEE_
void removeOrLinkECALClustersToKFTracks()
reco::SuperCluster buildRefinedSuperCluster(const ProtoEGObject &)
void unlinkRefinableObjectKFandECALMatchedToHCAL(ProtoEGObject &, bool removeFreeECAL=false, bool removeSCECAL=false)
std::pair< const PFKFElement *, bool > PFKFFlaggedElement
void mergeROsByAnyLink(std::list< ProtoEGObject > &)
void RunPFEG(const pfEGHelpers::HeavyObjectCache *hoc, const reco::PFBlockRef &blockRef, std::vector< bool > &active)
const GBRForest * ReaderRes_
int attachPSClusters(const PFClusterElement *, ClusterMap::mapped_type &)
void linkRefinableObjectKFTracksToECAL(ProtoEGObject &)
std::string mvaweightfile
void linkRefinableObjectSecondaryKFsToECAL(ProtoEGObject &)
reco::PFCandidateCollection _finalCandidates
double sumPtTrackIsoForPhoton_
void linkRefinableObjectConvSecondaryKFsToSecondaryKFs(ProtoEGObject &)
verbosityLevel verbosityLevel_
reco::PFCandidateCollection outcands_
const GBRForest * ReaderLC_
double sumEtEcalIsoForEgammaSC_barrel
std::vector< PFGSFFlaggedElement > primaryGSFs
std::pair< const PFBremElement *, bool > PFBremFlaggedElement
void linkRefinableObjectPrimaryGSFTrackToHCAL(ProtoEGObject &)