CMS 3D CMS Logo

CalIsolationAlgo< T1, C2 > Class Template Reference

#include <PhysicsTools/IsolationAlgos/interface/CalIsolationAlgo.h>

List of all members.

Public Types

typedef double value_type

Public Member Functions

 CalIsolationAlgo (double dRMin, double dRMax, bool do_propagation, double radius, double minZ, double maxZ, bool theIgnoreMaterial)
 CalIsolationAlgo ()
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.

00020 { }

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.

00022                                                                                    :
00023      dRMin_( dRMin ), dRMax_( dRMax ), do_propagation_( do_propagation ),
00024      SrcAtCal(radius, minZ, maxZ, theIgnoreMaterial) { }
  ~CalIsolationAlgo();

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

Definition at line 40 of file CalIsolationAlgo.h.

00040                                            {
00041 }


Member Function Documentation

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

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 CalIsolationAlgo< T1, C2 >::bField_, deltaR(), CalIsolationAlgo< T1, C2 >::do_propagation_, CalIsolationAlgo< T1, C2 >::dRMin_, PropagateToCal::propagate(), and CalIsolationAlgo< T1, C2 >::SrcAtCal.

00044                                                        {
00045   const GlobalPoint Vertex(cand.vx(), cand.vy(), cand.vz());//@@check if this is [cm]!
00046   //GlobalVector Cand(cand.pt(), cand.eta(), cand.phi()); 
00047   GlobalVector Cand(cand.px(), cand.py(), cand.pz()); 
00048 
00051   if (do_propagation_ && cand.charge()!=0) 
00052      SrcAtCal.propagate(Vertex, Cand, cand.charge(), bField_);
00053 
00054   double etSum = 0;
00055   for( typename C2::const_iterator elem = elements.begin(); 
00056        elem != elements.end(); ++elem ) {
00057     double dR = deltaR( elem->eta(), elem->phi(), 
00058                         (double)Cand.eta(), (double)Cand.phi() );
00059     if ( dR < dRMax_ && dR > dRMin_ ) {
00060       etSum += elem->et();
00061     }
00062   }
00063   return etSum;
00064 }

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

Definition at line 27 of file CalIsolationAlgo.h.

References CalIsolationAlgo< T1, C2 >::bField_.

00027                                                  {
00028        bField_ = bField;  }


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 >::operator()(), and CalIsolationAlgo< T1, C2 >::setBfield().

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

Definition at line 33 of file CalIsolationAlgo.h.

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

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.

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

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

Definition at line 35 of file CalIsolationAlgo.h.

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


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:15:42 2009 for CMSSW by  doxygen 1.5.4