26 #include <unordered_map>
46 sprintf(buf,
"BarVeto%.2f-EndVeto%.2f",
51 while( decimal != std::string::npos ) {
77 "PhotonPFIsolationWithConeVeto");
86 bool isEB = ( seed->seed().subdetId() ==
EcalBarrel );
91 if( aspacked->charge() != 0 ) {
92 bool is_vertex_allowed =
false;
95 is_vertex_allowed =
true;
99 result &= ( is_vertex_allowed );
101 result &= deltar2 > vetoConeSize2 && deltar2 <
_coneSize2 ;
103 result &= deltar2 > vetoConeSize2 && deltar2 <
_coneSize2;
106 <<
"The supplied candidate to be used as isolation "
107 <<
"was neither a reco::PFCandidate nor a pat::PackedCandidate!";
IsolationConeDefinitionBase(const edm::ParameterSet &c)
const unsigned _vertexIndex
void setConsumes(edm::ConsumesCollector)
T const * get() const
Returns C++ pointer to the item.
bool isInIsolationCone(const reco::CandidatePtr &photon, const reco::CandidatePtr &pfCandidate) const overridefinal
const std::vector< unsigned > _miniAODVertexCodes
virtual ~PhotonPFIsolationWithConeVeto()
Destructor.
edm::Ptr< pat::PackedCandidate > PackedCandidatePtr
const std::string _isolateAgainst
const float _vetoConeSize2EB
PhotonPFIsolationWithConeVeto & operator=(const PhotonPFIsolationWithConeVeto &)=delete
const float _vetoConeSize2EE
edm::EDGetTokenT< reco::VertexCollection > _vtxToken
bool isNonnull() const
Checks for non-null.
edm::Ptr< reco::Photon > recoPhotonPtr
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
std::string _additionalCode
#define DEFINE_EDM_PLUGIN(factory, type, name)
PhotonPFIsolationWithConeVeto(const edm::ParameterSet &c)
Power< A, B >::type pow(const A &a, const B &b)