Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
PhysicsTools
IsolationUtils
interface
TrkCalIsolationAlgo.h
Go to the documentation of this file.
1
#ifndef IsolationUtils_TrkCalIsolationAlgo_h
2
#define IsolationUtils_TrkCalIsolationAlgo_h
3
/* \class TrkCalIsolationAlgo<T1, C2>
4
*
5
* \author Christian Autermann, U Hamburg
6
*/
7
#include "
DataFormats/Math/interface/deltaR.h
"
8
9
template
<
typename
T1,
typename
C2>
10
class
TrkCalIsolationAlgo
{
11
public
:
12
typedef
double
value_type
;
13
TrkCalIsolationAlgo
( );
14
TrkCalIsolationAlgo
(
double
dRMin
,
double
dRMax
) :
dRMin_
( dRMin ),
dRMax_
( dRMax ) { }
15
~TrkCalIsolationAlgo
() { }
16
double
operator()
(
const
T1 &,
const
C2 &)
const
;
17
18
private
:
19
double
dRMin_
,
dRMax_
;
20
};
21
22
//This source (track) already has defined outer eta and phi.
23
//This is the track's end point in the tracker, this should be close
24
//the tracks entry into the calorimeter.
25
//A specialized template operator () for tracks in the CalIsolationAlgo class is not
26
//feasable, since the () operator cannot be overloaded.
27
template
<
typename
T1,
typename
C2>
double
TrkCalIsolationAlgo<T1,C2>::
28
operator()
(
const
T1 & cand,
const
C2 &
elements
)
const
{
29
double
etSum = 0;
30
for
(
typename
C2::const_iterator
elem
= elements.begin();
31
elem
!= elements.end(); ++
elem
) {
32
double
dR
=
deltaR
(
elem
->eta(),
elem
->phi(),
33
cand.outerEta(), cand.outerPhi() );
34
if
( dR < dRMax_ && dR > dRMin_ ) {
35
etSum +=
elem
->et();
36
}
37
}
38
return
etSum;
39
}
40
41
#endif
TrkCalIsolationAlgo::dRMax_
double dRMax_
Definition:
TrkCalIsolationAlgo.h:19
TrkCalIsolationAlgo::value_type
double value_type
Definition:
TrkCalIsolationAlgo.h:12
bookConverter.elements
dictionary elements
Definition:
bookConverter.py:146
deltaR.h
HLT_25ns10e33_v2_cff.dRMin
tuple dRMin
Definition:
HLT_25ns10e33_v2_cff.py:4687
TrkCalIsolationAlgo::TrkCalIsolationAlgo
TrkCalIsolationAlgo()
HTMLExport.elem
def elem
Definition:
HTMLExport.py:18
PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi.dR
tuple dR
Definition:
PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi.py:19
deltaR
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition:
TreeUtility.cc:17
HLT_25ns10e33_v2_cff.dRMax
tuple dRMax
Definition:
HLT_25ns10e33_v2_cff.py:4697
TrkCalIsolationAlgo::dRMin_
double dRMin_
Definition:
TrkCalIsolationAlgo.h:19
TrkCalIsolationAlgo
Definition:
TrkCalIsolationAlgo.h:10
TrkCalIsolationAlgo::operator()
double operator()(const T1 &, const C2 &) const
Definition:
TrkCalIsolationAlgo.h:28
TrkCalIsolationAlgo::~TrkCalIsolationAlgo
~TrkCalIsolationAlgo()
Definition:
TrkCalIsolationAlgo.h:15
TrkCalIsolationAlgo::TrkCalIsolationAlgo
TrkCalIsolationAlgo(double dRMin, double dRMax)
Definition:
TrkCalIsolationAlgo.h:14
Generated for CMSSW Reference Manual by
1.8.5