CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

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

Definition at line 19 of file CalIsolationAlgo.h.

Constructor & Destructor Documentation

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

Definition at line 20 of file CalIsolationAlgo.h.

20 { }
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.

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

Definition at line 40 of file CalIsolationAlgo.h.

40  {
41 }

Member Function Documentation

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 44 of file CalIsolationAlgo.h.

References deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, and HTMLExport::elem().

44  {
45  const GlobalPoint Vertex(cand.vx(), cand.vy(), cand.vz());//@@check if this is [cm]!
46  //GlobalVector Cand(cand.pt(), cand.eta(), cand.phi());
47  GlobalVector Cand(cand.px(), cand.py(), cand.pz());
48 
51  if (do_propagation_ && cand.charge()!=0)
52  SrcAtCal.propagate(Vertex, Cand, cand.charge(), bField_);
53 
54  double etSum = 0;
55  for( typename C2::const_iterator elem = elements.begin();
56  elem != elements.end(); ++elem ) {
57  double dR = deltaR( elem->eta(), elem->phi(),
58  (double)Cand.eta(), (double)Cand.phi() );
59  if ( dR < dRMax_ && dR > dRMin_ ) {
60  etSum += elem->et();
61  }
62  }
63  return etSum;
64 }
const MagneticField * bField_
dictionary elements
bool propagate(const GlobalPoint &vertex, GlobalVector &Cand, int charge, const MagneticField *bField) const
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
PropagateToCal SrcAtCal
template<typename T1 , typename C2 >
void CalIsolationAlgo< T1, C2 >::setBfield ( const MagneticField bField)
inline

Member Data Documentation

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

Definition at line 34 of file CalIsolationAlgo.h.

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

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

Definition at line 33 of file CalIsolationAlgo.h.

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

Definition at line 32 of file CalIsolationAlgo.h.

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

Definition at line 32 of file CalIsolationAlgo.h.

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

Definition at line 35 of file CalIsolationAlgo.h.