1 #ifndef PFProducer_PFEGammaAlgo_H
2 #define PFProducer_PFEGammaAlgo_H
40 #include "TMVA/Reader.h"
45 #include <forward_list>
46 #include <unordered_map>
65 typedef std::unordered_map<unsigned int, std::vector<unsigned int> >
AsscMap;
87 std::vector<PFBremFlaggedElement>
brems;
143 std::vector< bool >& active
148 std::vector< bool >& active){
215 std::vector<PFClusterFlaggedElement>&,
219 ClusterMap::mapped_type&);
256 bool removeFreeECAL =
false,
257 bool removeSCECAL =
false);
362 float PFPhoEta_,
PFPhoPhi_,
PFPhoR9_,
PFPhoR9Corr_,
SCPhiWidth_,
SCEtaWidth_,
PFPhoEt_,
RConv_,
PFPhoEtCorr_,
PFPhoE_,
PFPhoECorr_,
MustE_,
E3x3_;
385 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...)
bool EvaluateSingleLegMVA(const reco::PFBlockRef &blockref, const reco::Vertex &primaryvtx, unsigned int track_index)
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()
void RunPFEG(const reco::PFBlockRef &blockRef, std::vector< bool > &active)
reco::PFBlockRef parentBlock
void unlinkRefinableObjectKFandECALWithBadEoverP(ProtoEGObject &)
std::vector< unsigned int > AddFromElectron_
double sumPtTrackIsoSlopeForPhoton_
GSFToTrackMap boundKFTracks
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
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_
void linkRefinableObjectECALToSingleLegConv(ProtoEGObject &)
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
reco::PFCandidateEGammaExtraCollection outcandsextra_
void linkKFTrackToECAL(const PFKFFlaggedElement &, ProtoEGObject &)
void buildAndRefineEGObjects(const reco::PFBlockRef &block)
reco::PFCandidateCollection & getCandidates()
reco::PFBlock::LinkData _currentlinks
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
void fill_extra_info(const ProtoEGObject &, reco::PFCandidateEGammaExtra &)
reco::PFCandidateCollection egCandidate_
bool applyCrackCorrections
double coneEcalIsoForEgammaSC
bool isAMuon(const reco::PFBlockElement &)
reco::ElectronSeedRef electronSeed
float calculate_ele_mva(const ProtoEGObject &, reco::PFCandidateEGammaExtra &)
std::string mvaWeightFileEleID
bool useEGammaSupercluster
unsigned int nTrackIsoForEgammaSC
reco::PFBlockElementTrack PFKFElement
bool isEGValidCandidate(const reco::PFBlockRef &blockRef, std::vector< bool > &active)
void linkRefinableObjectGSFTracksToKFs(ProtoEGObject &)
std::vector< std::pair< unsigned int, unsigned int > > convGsfTrack_
TMVA::Reader * tmvaReaderEle_
std::vector< PFKFFlaggedElement > primaryKFs
std::unordered_map< const PFClusterElement *, std::vector< PFClusterFlaggedElement > > ClusterMap
std::shared_ptr< PFSCEnergyCalibration > thePFSCEnergyCalibration
ElementMap _recoveredlinks
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 > &)
const GBRForest * ReaderRes_
int attachPSClusters(const PFClusterElement *, ClusterMap::mapped_type &)
void linkRefinableObjectKFTracksToECAL(ProtoEGObject &)
std::string mvaweightfile
TMVA::Reader * tmvaReader_
void linkRefinableObjectSecondaryKFsToECAL(ProtoEGObject &)
reco::PFCandidateCollection _finalCandidates
double sumPtTrackIsoForPhoton_
void linkRefinableObjectConvSecondaryKFsToSecondaryKFs(ProtoEGObject &)
verbosityLevel verbosityLevel_
reco::PFCandidateCollection outcands_
void fillPFCandidates(const std::list< ProtoEGObject > &, reco::PFCandidateCollection &, reco::PFCandidateEGammaExtraCollection &)
const GBRForest * ReaderLC_
double sumEtEcalIsoForEgammaSC_barrel
std::vector< PFGSFFlaggedElement > primaryGSFs
std::pair< const PFBremElement *, bool > PFBremFlaggedElement
void linkRefinableObjectPrimaryGSFTrackToHCAL(ProtoEGObject &)