26 #include <unordered_map>
45 sprintf(buf,
"BarVeto%.2f-EndVeto%.2f",
50 while( decimal != std::string::npos ) {
75 "ElectronPFIsolationWithConeVeto");
84 bool isEB = ( seed->seed().subdetId() ==
EcalBarrel );
89 if( aspacked->charge() != 0 ) {
90 bool is_vertex_allowed =
false;
92 if( vtxtype == aspacked->fromPV() ) {
93 is_vertex_allowed =
true;
97 result *= ( is_vertex_allowed );
99 result *= deltar2 > vetoConeSize2 && deltar2 <
_coneSize2 ;
101 result *= deltar2 > vetoConeSize2 && deltar2 <
_coneSize2;
104 <<
"The supplied candidate to be used as isolation "
105 <<
"was neither a reco::PFCandidate nor a pat::PackedCandidate!";
IsolationConeDefinitionBase(const edm::ParameterSet &c)
ElectronPFIsolationWithConeVeto & operator=(const ElectronPFIsolationWithConeVeto &)=delete
bool isInIsolationCone(const reco::CandidatePtr &physob, const reco::CandidatePtr &other) const overridefinal
const std::string _isolateAgainst
T const * get() const
Returns C++ pointer to the item.
const float _vetoConeSize2EE
edm::EDGetTokenT< reco::VertexCollection > _vtxToken
edm::Ptr< reco::GsfElectron > GsfElectronPtr
edm::Ptr< pat::PackedCandidate > PackedCandidatePtr
double deltaR2(const T1 &t1, const T2 &t2)
ElectronPFIsolationWithConeVeto(const edm::ParameterSet &c)
bool isNonnull() const
Checks for non-null.
void setConsumes(edm::ConsumesCollector)
virtual ~ElectronPFIsolationWithConeVeto()
Destructor.
const float _vetoConeSize2EB
const std::vector< unsigned > _miniAODVertexCodes
std::string _additionalCode
#define DEFINE_EDM_PLUGIN(factory, type, name)
Power< A, B >::type pow(const A &a, const B &b)