1 #ifndef IsolationUtils_CalIsolationAlgo_h
2 #define IsolationUtils_CalIsolationAlgo_h
16 template <
typename T1,
typename C2>
22 double dRMin,
double dRMax,
bool do_propagation,
double radius,
double minZ,
double maxZ,
bool theIgnoreMaterial)
26 SrcAtCal(radius, minZ, maxZ, theIgnoreMaterial) {}
30 double operator()(
const T1 &,
const C2 &)
const;
39 template <
typename T1,
typename C2>
42 template <
typename T1,
typename C2>
44 const GlobalPoint Vertex(cand.vx(), cand.vy(), cand.vz());
50 if (do_propagation_ && cand.charge() != 0)
51 SrcAtCal.propagate(Vertex, Cand, cand.charge(), bField_);
54 for (
typename C2::const_iterator elem = elements.begin(); elem != elements.end(); ++elem) {
55 double dR =
deltaR(elem->eta(), elem->phi(), (double)Cand.eta(), (double)Cand.phi());
56 if (dR < dRMax_ && dR > dRMin_) {
void setBfield(const MagneticField *bField)
const MagneticField * bField_
double operator()(const T1 &, const C2 &) const
CalIsolationAlgo(double dRMin, double dRMax, bool do_propagation, double radius, double minZ, double maxZ, bool theIgnoreMaterial)