1 #ifndef PFProducer_PFEGammaAlgo_H 2 #define PFProducer_PFEGammaAlgo_H 44 #include "TMVA/Reader.h" 49 #include <forward_list> 50 #include <unordered_map> 72 typedef std::unordered_map<unsigned int, std::vector<unsigned int> >
AsscMap;
75 typedef std::unordered_map<
const PFGSFElement*,
77 typedef std::unordered_map<
const PFClusterElement*,
79 typedef std::unordered_map<
const PFKFElement*,
96 std::vector<PFBremFlaggedElement>
brems;
162 std::vector< bool >& active
168 std::vector< bool >& active){
208 bool isAMuon(
const reco::PFBlockElement&);
236 std::vector<PFClusterFlaggedElement>&,
240 ClusterMap::mapped_type&);
278 bool removeFreeECAL =
false,
279 bool removeSCECAL =
false);
284 const std::list<ProtoEGObject>&,
384 float PFPhoEta_,
PFPhoPhi_,
PFPhoR9_,
PFPhoR9Corr_,
SCPhiWidth_,
SCEtaWidth_,
PFPhoEt_,
RConv_,
PFPhoEtCorr_,
PFPhoE_,
PFPhoECorr_,
MustE_,
E3x3_;
409 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...)
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_
void setAlphaGamma_ESplanes_fromDB(const ESEEIntercalibConstants *esEEInterCalib)
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
const ESChannelStatus * channelStatus_
void setESChannelStatus(const ESChannelStatus *channelStatus)
void linkRefinableObjectPrimaryGSFTrackToHCAL(ProtoEGObject &)