4 #ifndef DataFormats_PatCandidates_Photon_h 5 #define DataFormats_PatCandidates_Photon_h 51 typedef std::pair<std::string,Bool_t>
IdPair;
74 const std::vector<reco::CaloCluster>&
basicClusters()
const {
return basicClusters_ ; }
76 const std::vector<reco::CaloCluster>&
preshowerClusters()
const {
return preshowerClusters_ ; }
104 bool isPhotonIDAvailable(
const std::string & name)
const;
107 const std::vector<IdPair> &
photonIDs()
const {
return photonIDs_; }
110 void setPhotonIDs(
const std::vector<IdPair> & ids) { photonIDs_ = ids; }
116 float trackIso()
const {
return trkSumPtSolidConeDR04(); }
119 float ecalIso()
const {
return ecalRecHitSumEtConeDR04(); }
122 float hcalIso()
const {
return hcalTowerSumEtConeDR04(); }
125 float caloIso()
const {
return ecalIso()+hcalIso(); }
152 if (
size_t(key) >= isolations_.size())
return -1.0;
153 return isolations_[
key];
154 }
else switch (key) {
175 if (
size_t(key) >= isolations_.size()) isolations_.resize(key+1, -1.0);
179 "The key for which you're setting isolation does not correspond " <<
180 "to an individual isolation but to the sum of more independent isolations " <<
181 "(e.g. Calo = Ecal + Hcal), so you can't SET the value, just GET it.\n" <<
182 "Please set up each component independly.\n";
196 puppiChargedHadronIso_ = chargedhadrons_;
197 puppiNeutralHadronIso_ = neutralhadrons_;
198 puppiPhotonIso_ = photons_;
205 for (IsoDepositPairs::const_iterator it = isoDeposits_.begin(), ed = isoDeposits_.end();
208 if (it->first == key)
return & it->second;
222 IsoDepositPairs::iterator it = isoDeposits_.begin(), ed = isoDeposits_.end();
223 for (; it != ed; ++it) {
224 if (it->first == key) { it->second = dep;
return; }
226 isoDeposits_.push_back(std::make_pair(key,dep));
247 float eMax()
const {
return eMax_;}
249 float e2nd()
const {
return e2nd_;}
251 float e3x3()
const {
return e3x3_;}
253 float eTop()
const {
return eTop_;}
257 float eLeft()
const {
return eLeft_;}
262 float see()
const {
return see_;}
264 float spp()
const {
return spp_;}
269 float maxDR()
const {
return maxDR_;}
304 float iPhi()
const {
return iPhi_;}
306 float iEta()
const {
return iEta_;}
319 packedPFCandidates_ = refprod;
320 associatedPackedFCandidateIndices_.clear();
321 associatedPackedFCandidateIndices_.insert(associatedPackedFCandidateIndices_.begin(),
float subClusDPhi2() const
Analysis-level Photon class.
edm::RefVector< PhotonCollection > PhotonRefVector
void setEcalIso(float caloIso)
Sets ecal isolation variable.
float neutralHadronIso() const
void setSubClusDPhi3(float s)
void setTrackIso(float trackIso)
Sets tracker isolation variable.
float chargedHadronIso() const
Accessors for Particle Flow Isolation variables.
float neutralHadronIso() const
float puppiNeutralHadronIso() const
bool passElectronVeto_
-— conversion veto -—
void trackIsoDeposit(const IsoDeposit &dep)
Sets tracker IsoDeposit.
embedPreshowerClusters
embed in AOD externally stored the electron's basic clusters
edm::Ref< PhotonCollection > PhotonRef
void setMaxDRRawEnergy(float m)
float subClusDEta3() const
float subClusDEta2() const
float puChargedHadronIso() const
void setAssociatedPackedPFCandidates(const edm::RefProd< pat::PackedCandidateCollection > &refprod, T beginIndexItr, T endIndexItr)
References to PFCandidates linked to this object (e.g. for isolation vetos or masking before jet recl...
void ecalIsoDeposit(const IsoDeposit &dep)
Sets ecal IsoDeposit.
void setSubClusDPhi2(float s)
embedRecHits
embed in AOD externally stored track (note: gsf electrons don't have a track)
void setIsolationPUPPI(float chargedhadrons_, float neutralhadrons_, float photons_)
Sets PUPPI isolation.
float subClusDPhi1() const
const std::vector< reco::CaloCluster > & basicClusters() const
std::vector< reco::SuperCluster > superCluster_
IsolationKeys
Enum defining isolation keys.
std::vector< reco::CaloCluster > preshowerClusters_
Place to store electron's preshower clusters internally.
void setUserIso(float value, uint8_t index=0)
Sets user isolation variable index.
Photon * clone() const override
required reimplementation of the Candidate's clone method
std::vector< reco::CaloCluster > seedCluster_
Place to store electron's seed cluster internally.
void setHcalIso(float caloIso)
Sets hcal isolation variable.
embedBasicClusters
embed in AOD externally stored the electron's seedcluster
void setIsolation(IsolationKeys key, float value)
float chargedHadronIso() const
void setIsoDeposit(IsolationKeys key, const IsoDeposit &dep)
Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten.
void userIsoDeposit(const IsoDeposit &dep, uint8_t index=0)
Sets user-level IsoDeposit.
std::ostream & operator<<(std::ostream &, BeamSpot beam)
const EcalRecHitCollection * recHits() const
float puppiChargedHadronIso_
float puppiChargedHadronIso() const
float seedEnergy() const
input variables for regression energy corrections
const reco::Candidate * genPhoton() const
return the match to the generated photon
void setMaxDRDEta(float m)
float subClusRawE1() const
float puppiNeutralHadronIso_
void setPhotonIDs(const std::vector< IdPair > &ids)
std::ostream & operator<<(std::ostream &out, const strbitset::index_type &r)
edm::RefProd< pat::PackedCandidateCollection > packedPFCandidates_
const IsoDeposit * hcalIsoDeposit() const
Return the hcal IsoDeposit.
float subClusRawE3() const
void setPassElectronVeto(bool flag)
float patParticleIso() const
float subClusDPhi3() const
float userIso(uint8_t index=0) const
Returns a user defined isolation value.
void setSeedEnergy(float e)
void setSubClusDPhi1(float s)
void hcalIsoDeposit(const IsoDeposit &dep)
Sets hcal IsoDeposit.
void setSubClusDEta1(float s)
std::vector< IdPair > photonIDs_
bool embeddedSuperCluster_
const IsoDeposit * ecalIsoDeposit() const
Return the ecal IsoDeposit.
size_t numberOfSourceCandidatePtrs() const override
get the number of non-null PFCandidates
embedSeedCluster
embed in AOD externally stored supercluster
edm::AtomicPtrCache< std::vector< reco::SuperCluster > > superClusterRelinked_
Place to temporarily store the electron's supercluster after relinking the seed to it...
EcalRecHitCollection recHits_
Place to store electron's RecHits internally (5x5 around seed+ all RecHits)
bool embeddedRecHits_
True if RecHits stored internally.
unsigned int index
index type
bool hasPixelSeed() const
std::pair< std::string, Bool_t > IdPair
void setHasPixelSeed(bool flag)
const std::vector< IdPair > & photonIDs() const
float puppiPhotonIso() const
void setSubClusDEta2(float s)
IsoDepositPairs isoDeposits_
void setSubClusRawE2(float s)
bool passElectronVeto() const
vertex fit method
float maxDRRawEnergy() const
const IsoDeposit * trackIsoDeposit() const
Return the tracker IsoDeposit.
float seedEnergy_
-— input variables for regression energy corrections -—
void setMaxDRDPhi(float m)
embedSuperCluster
embed in AOD externally stored gsf track
void setSubClusDEta3(float s)
bool embeddedSeedCluster_
True if seed cluster is stored internally.
void setSubClusRawE1(float s)
Templated PAT object container.
float userIsolation(IsolationKeys key) const
const IsoDeposit * userIsoDeposit(uint8_t index=0) const
Return a specified user-level IsoDeposit.
void setSubClusRawE3(float s)
std::vector< uint16_t > associatedPackedFCandidateIndices_
float subClusDEta1() const
const IsoDeposit * isoDeposit(IsolationKeys key) const
Returns the IsoDeposit associated with some key, or a null pointer if it is not available.
float subClusRawE2() const
std::vector< std::pair< IsolationKeys, pat::IsoDeposit > > IsoDepositPairs
void setGenPhoton(const reco::GenParticleRef &gp, bool embed=false)
method to set the generated photon
std::vector< Photon > PhotonCollection
std::vector< reco::CaloCluster > basicClusters_
Place to store electron's basic clusters internally.
std::vector< float > isolations_
const std::vector< reco::CaloCluster > & preshowerClusters() const