CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
CalIsolationAlgo< T1, C2 > Class Template Reference

#include <CalIsolationAlgo.h>

Public Types

typedef double value_type
 

Public Member Functions

 CalIsolationAlgo ()
 
 CalIsolationAlgo (double dRMin, double dRMax, bool do_propagation, double radius, double minZ, double maxZ, bool theIgnoreMaterial)
 
double operator() (const T1 &, const C2 &) const
 
void setBfield (const MagneticField *bField)
 
 ~CalIsolationAlgo ()
 

Private Attributes

const MagneticFieldbField_
 
bool do_propagation_
 
double dRMax_
 
double dRMin_
 
PropagateToCal SrcAtCal
 

Detailed Description

template<typename T1, typename C2>
class CalIsolationAlgo< T1, C2 >

Definition at line 17 of file CalIsolationAlgo.h.

Member Typedef Documentation

◆ value_type

template<typename T1 , typename C2 >
typedef double CalIsolationAlgo< T1, C2 >::value_type

Definition at line 19 of file CalIsolationAlgo.h.

Constructor & Destructor Documentation

◆ CalIsolationAlgo() [1/2]

template<typename T1 , typename C2 >
CalIsolationAlgo< T1, C2 >::CalIsolationAlgo ( )
inline

Definition at line 20 of file CalIsolationAlgo.h.

20 {}

◆ CalIsolationAlgo() [2/2]

template<typename T1 , typename C2 >
CalIsolationAlgo< T1, C2 >::CalIsolationAlgo ( double  dRMin,
double  dRMax,
bool  do_propagation,
double  radius,
double  minZ,
double  maxZ,
bool  theIgnoreMaterial 
)
inline

Definition at line 21 of file CalIsolationAlgo.h.

23  : dRMin_(dRMin),
24  dRMax_(dRMax),
25  do_propagation_(do_propagation),
26  SrcAtCal(radius, minZ, maxZ, theIgnoreMaterial) {}

◆ ~CalIsolationAlgo()

template<typename T1 , typename C2 >
CalIsolationAlgo< T1, C2 >::~CalIsolationAlgo ( )

Definition at line 40 of file CalIsolationAlgo.h.

40 {}

Member Function Documentation

◆ operator()()

template<typename T1 , typename C2 >
double CalIsolationAlgo< T1, C2 >::operator() ( const T1 &  cand,
const C2 &  elements 
) const

Extrapolate charged particles from their vertex to the point of entry into the calorimeter, if this is requested in the cfg file.

Definition at line 43 of file CalIsolationAlgo.h.

43  {
44  const GlobalPoint Vertex(cand.vx(), cand.vy(), cand.vz()); //@@check if this is [cm]!
45  //GlobalVector Cand(cand.pt(), cand.eta(), cand.phi());
46  GlobalVector Cand(cand.px(), cand.py(), cand.pz());
47 
50  if (do_propagation_ && cand.charge() != 0)
51  SrcAtCal.propagate(Vertex, Cand, cand.charge(), bField_);
52 
53  double etSum = 0;
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_) {
57  etSum += elem->et();
58  }
59  }
60  return etSum;
61 }

References PbPb_ZMuSkimMuonDPG_cff::deltaR, HGC3DClusterGenMatchSelector_cfi::dR, bookConverter::elements, and HltBtagValidation_cff::Vertex.

◆ setBfield()

template<typename T1 , typename C2 >
void CalIsolationAlgo< T1, C2 >::setBfield ( const MagneticField bField)
inline

Definition at line 29 of file CalIsolationAlgo.h.

29 { bField_ = bField; }

References Calorimetry_cff::bField, and CalIsolationAlgo< T1, C2 >::bField_.

Member Data Documentation

◆ bField_

template<typename T1 , typename C2 >
const MagneticField* CalIsolationAlgo< T1, C2 >::bField_
private

Definition at line 35 of file CalIsolationAlgo.h.

Referenced by CalIsolationAlgo< T1, C2 >::setBfield().

◆ do_propagation_

template<typename T1 , typename C2 >
bool CalIsolationAlgo< T1, C2 >::do_propagation_
private

Definition at line 34 of file CalIsolationAlgo.h.

◆ dRMax_

template<typename T1 , typename C2 >
double CalIsolationAlgo< T1, C2 >::dRMax_
private

Definition at line 33 of file CalIsolationAlgo.h.

◆ dRMin_

template<typename T1 , typename C2 >
double CalIsolationAlgo< T1, C2 >::dRMin_
private

Definition at line 33 of file CalIsolationAlgo.h.

◆ SrcAtCal

template<typename T1 , typename C2 >
PropagateToCal CalIsolationAlgo< T1, C2 >::SrcAtCal
private

Definition at line 36 of file CalIsolationAlgo.h.

Vector3DBase
Definition: Vector3DBase.h:8
CalIsolationAlgo::bField_
const MagneticField * bField_
Definition: CalIsolationAlgo.h:35
CalIsolationAlgo::SrcAtCal
PropagateToCal SrcAtCal
Definition: CalIsolationAlgo.h:36
HLT_FULL_cff.dRMin
dRMin
Definition: HLT_FULL_cff.py:8664
CosmicsPD_Skims.maxZ
maxZ
Definition: CosmicsPD_Skims.py:136
Point3DBase< float, GlobalTag >
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
CalIsolationAlgo::dRMin_
double dRMin_
Definition: CalIsolationAlgo.h:33
cand
Definition: decayParser.h:32
CalIsolationAlgo::do_propagation_
bool do_propagation_
Definition: CalIsolationAlgo.h:34
metBenchmark_cfi.dRMax
dRMax
Definition: metBenchmark_cfi.py:18
bookConverter.elements
elements
Definition: bookConverter.py:147
HltBtagValidation_cff.Vertex
Vertex
Definition: HltBtagValidation_cff.py:32
CalIsolationAlgo::dRMax_
double dRMax_
Definition: CalIsolationAlgo.h:33
Calorimetry_cff.bField
bField
Definition: Calorimetry_cff.py:292
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
PropagateToCal::propagate
bool propagate(const GlobalPoint &vertex, GlobalVector &Cand, int charge, const MagneticField *bField) const
Definition: PropagateToCal.cc:15
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
CosmicGenFilterHelix_cff.minZ
minZ
i.e.
Definition: CosmicGenFilterHelix_cff.py:9