CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
PtIsolationAlgo< T, C > Class Template Reference

#include <PtIsolationAlgo.h>

Public Types

typedef double value_type
 

Public Member Functions

double operator() (const T &, const C &) const
 
 PtIsolationAlgo ()
 
 PtIsolationAlgo (double dRMin, double dRMax, double dzMax, double d0Max, double ptMin)
 

Private Attributes

double d0Max_
 
double dRMax_
 
double dRMin_
 
double dzMax_
 
double ptMin_
 

Detailed Description

template<typename T, typename C>
class PtIsolationAlgo< T, C >

Definition at line 10 of file PtIsolationAlgo.h.

Member Typedef Documentation

◆ value_type

template<typename T, typename C>
typedef double PtIsolationAlgo< T, C >::value_type

Definition at line 12 of file PtIsolationAlgo.h.

Constructor & Destructor Documentation

◆ PtIsolationAlgo() [1/2]

template<typename T, typename C>
PtIsolationAlgo< T, C >::PtIsolationAlgo ( )
inline

Definition at line 13 of file PtIsolationAlgo.h.

13 {}

◆ PtIsolationAlgo() [2/2]

template<typename T, typename C>
PtIsolationAlgo< T, C >::PtIsolationAlgo ( double  dRMin,
double  dRMax,
double  dzMax,
double  d0Max,
double  ptMin 
)
inline

Definition at line 14 of file PtIsolationAlgo.h.

Member Function Documentation

◆ operator()()

template<typename T, typename C>
double PtIsolationAlgo< T, C >::operator() ( const T cand,
const C &  elements 
) const

Definition at line 23 of file PtIsolationAlgo.h.

23  {
24  double ptSum = 0;
25  double candVz = cand.vz();
26  double candEta = cand.eta();
27  double candPhi = cand.phi();
28  for (typename C::const_iterator elem = elements.begin(); elem != elements.end(); ++elem) {
29  double elemPt = elem->pt();
30  if (elemPt < ptMin_)
31  continue;
32  double elemVx = elem->vx();
33  double elemVy = elem->vy();
34  double elemD0 = sqrt(elemVx * elemVx + elemVy * elemVy);
35  if (elemD0 > d0Max_)
36  continue;
37  double dz = fabs(elem->vz() - candVz);
38  if (dz > dzMax_)
39  continue;
40  double dR = deltaR(elem->eta(), elem->phi(), candEta, candPhi);
41  if ((dR > dRMax_) || (dR < dRMin_))
42  continue;
43  ptSum += elemPt;
44  }
45  return ptSum;
46 }

Member Data Documentation

◆ d0Max_

template<typename T, typename C>
double PtIsolationAlgo< T, C >::d0Max_
private

Definition at line 19 of file PtIsolationAlgo.h.

◆ dRMax_

template<typename T, typename C>
double PtIsolationAlgo< T, C >::dRMax_
private

Definition at line 19 of file PtIsolationAlgo.h.

◆ dRMin_

template<typename T, typename C>
double PtIsolationAlgo< T, C >::dRMin_
private

Definition at line 19 of file PtIsolationAlgo.h.

◆ dzMax_

template<typename T, typename C>
double PtIsolationAlgo< T, C >::dzMax_
private

Definition at line 19 of file PtIsolationAlgo.h.

◆ ptMin_

template<typename T, typename C>
double PtIsolationAlgo< T, C >::ptMin_
private

Definition at line 19 of file PtIsolationAlgo.h.

AlignmentTrackSelector_cfi.d0Max
d0Max
Definition: AlignmentTrackSelector_cfi.py:22
ptMin
constexpr float ptMin
Definition: PhotonIDValueMapProducer.cc:155
HLT_FULL_cff.dRMin
dRMin
Definition: HLT_FULL_cff.py:8664
dzMax
constexpr float dzMax
Definition: PhotonIDValueMapProducer.cc:152
PtIsolationAlgo::dzMax_
double dzMax_
Definition: PtIsolationAlgo.h:19
PtIsolationAlgo::ptMin_
double ptMin_
Definition: PtIsolationAlgo.h:19
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
cand
Definition: decayParser.h:32
PtIsolationAlgo::d0Max_
double d0Max_
Definition: PtIsolationAlgo.h:19
PtIsolationAlgo::dRMin_
double dRMin_
Definition: PtIsolationAlgo.h:19
metBenchmark_cfi.dRMax
dRMax
Definition: metBenchmark_cfi.py:18
bookConverter.elements
elements
Definition: bookConverter.py:147
PVValHelper::dz
Definition: PVValidationHelpers.h:50
PtIsolationAlgo::dRMax_
double dRMax_
Definition: PtIsolationAlgo.h:19
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7