CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
ConeIsolationAlgorithm Class Reference

#include <ConeIsolationAlgorithm.h>

Public Member Functions

 ConeIsolationAlgorithm ()
 
 ConeIsolationAlgorithm (const edm::ParameterSet &parameters)
 
std::pair< float, reco::IsolatedTauTagInfotag (const reco::JetTracksAssociationRef &jetTracks, const reco::Vertex &pv)
 
 ~ConeIsolationAlgorithm ()
 

Static Public Member Functions

static void fillDescription (edm::ParameterSetDescription &desc)
 

Private Attributes

double dZ_vertex
 
double isolation_cone
 
double m_cutMaxChiSquared
 
double m_cutMaxTIP
 
double m_cutMinPt
 
int m_cutPixelHits
 
int m_cutTotalHits
 
double matching_cone
 
int n_tracks_isolation_ring
 
double pt_min_isolation
 
double pt_min_leadTrack
 
double signal_cone
 
bool useFixedSizeCone
 
bool useVertexConstrain_
 
double variableConeParameter
 
double variableMaxCone
 
double variableMinCone
 

Detailed Description

Definition at line 17 of file ConeIsolationAlgorithm.h.

Constructor & Destructor Documentation

◆ ConeIsolationAlgorithm() [1/2]

ConeIsolationAlgorithm::ConeIsolationAlgorithm ( const edm::ParameterSet parameters)

Definition at line 8 of file ConeIsolationAlgorithm.cc.

8  {
9  //FIXME: use unsigned int where needed
10  m_cutPixelHits = parameters.getParameter<int>("MinimumNumberOfPixelHits"); // not used
11  m_cutTotalHits = parameters.getParameter<int>("MinimumNumberOfHits");
12  m_cutMaxTIP = parameters.getParameter<double>("MaximumTransverseImpactParameter");
13  m_cutMinPt = parameters.getParameter<double>("MinimumTransverseMomentum");
14  m_cutMaxChiSquared = parameters.getParameter<double>("MaximumChiSquared");
15  dZ_vertex = parameters.getParameter<double>("DeltaZetTrackVertex"); // to be modified
16  useVertexConstrain_ = parameters.getParameter<bool>("useVertex");
17 
18  matching_cone = parameters.getParameter<double>("MatchingCone");
19  signal_cone = parameters.getParameter<double>("SignalCone");
20  isolation_cone = parameters.getParameter<double>("IsolationCone");
21  pt_min_isolation = parameters.getParameter<double>("MinimumTransverseMomentumInIsolationRing");
22  pt_min_leadTrack = parameters.getParameter<double>("MinimumTransverseMomentumLeadingTrack");
23  n_tracks_isolation_ring = parameters.getParameter<int>("MaximumNumberOfTracksIsolationRing");
24 
25  useFixedSizeCone = parameters.getParameter<bool>("UseFixedSizeCone");
26  variableConeParameter = parameters.getParameter<double>("VariableConeParameter");
27  variableMaxCone = parameters.getParameter<double>("VariableMaxCone");
28  variableMinCone = parameters.getParameter<double>("VariableMinCone");
29 }

◆ ConeIsolationAlgorithm() [2/2]

ConeIsolationAlgorithm::ConeIsolationAlgorithm ( )
default

◆ ~ConeIsolationAlgorithm()

ConeIsolationAlgorithm::~ConeIsolationAlgorithm ( )
inline

Definition at line 26 of file ConeIsolationAlgorithm.h.

26 {}

Member Function Documentation

◆ fillDescription()

void ConeIsolationAlgorithm::fillDescription ( edm::ParameterSetDescription desc)
static

Definition at line 31 of file ConeIsolationAlgorithm.cc.

31  {
32  desc.add<int>("MinimumNumberOfPixelHits", 2);
33  desc.add<int>("MinimumNumberOfHits", 8);
34  desc.add<double>("MaximumTransverseImpactParameter", 0.03);
35  desc.add<double>("MinimumTransverseMomentum", 1.0);
36  desc.add<double>("MaximumChiSquared", 100.0);
37  desc.add<double>("DeltaZetTrackVertex", 0.2);
38  desc.add<bool>("useVertex", true);
39  desc.add<double>("MatchingCone", 0.1);
40  desc.add<double>("SignalCone", 0.07);
41  desc.add<double>("IsolationCone", 0.45);
42  desc.add<double>("MinimumTransverseMomentumInIsolationRing", 0.0);
43  desc.add<double>("MinimumTransverseMomentumLeadingTrack", 6.0);
44  desc.add<int>("MaximumNumberOfTracksIsolationRing", 0);
45  desc.add<bool>("UseFixedSizeCone", true);
46  desc.add<double>("VariableConeParameter", 3.5);
47  desc.add<double>("VariableMaxCone", 0.17);
48  desc.add<double>("VariableMinCone", 0.05);
49 }

References submitPVResolutionJobs::desc.

Referenced by ConeIsolation::fillDescriptions().

◆ tag()

pair< float, IsolatedTauTagInfo > ConeIsolationAlgorithm::tag ( const reco::JetTracksAssociationRef jetTracks,
const reco::Vertex pv 
)

Definition at line 51 of file ConeIsolationAlgorithm.cc.

52  {
55 
56  // Selection of the Tracks
57  float z_pv = pv.z();
58  for (auto&& track : tracks) {
60  fabs((track)->dxy(pv.position())) < m_cutMaxTIP && (track)->recHitsSize() >= (unsigned int)m_cutTotalHits &&
61  (track)->hitPattern().numberOfValidPixelHits() >= m_cutPixelHits) {
62  if (useVertexConstrain_ && z_pv > -500.) {
63  if (fabs((track)->dz(pv.position())) < dZ_vertex)
64  myTracks.push_back(track);
65  } else
66  myTracks.push_back(track);
67  }
68  }
69  IsolatedTauTagInfo resultExtended(myTracks, jetTracks);
70 
71  double r_sigCone = signal_cone;
72  double energyJet = jetTracks->first->energy();
73  if (not useFixedSizeCone) {
74  r_sigCone = std::min(variableMaxCone, variableConeParameter / energyJet);
75  r_sigCone = std::max((double)r_sigCone, variableMinCone);
76  }
77 
78  // now I can use it for the discriminator;
79  math::XYZVector jetDir(jetTracks->first->px(), jetTracks->first->py(), jetTracks->first->pz());
80  float discriminator = 0.;
81  if (useVertexConstrain_) {
82  // In this case all the selected tracks comes from the same vertex, so no need to pass the dZ_vertex requirement to the discriminator
83  const TrackRef myLeadTk = resultExtended.leadingSignalTrack(matching_cone, pt_min_leadTrack);
84  resultExtended.setLeadingTrack(myLeadTk);
85  discriminator = resultExtended.discriminator(
87  resultExtended.setDiscriminator(discriminator);
88  } else {
89  // In this case the dZ_vertex is used to associate the tracks to the Z_imp parameter of the Leading Track
90  const TrackRef myLeadTk = resultExtended.leadingSignalTrack(matching_cone, pt_min_leadTrack);
91  resultExtended.setLeadingTrack(myLeadTk);
92  discriminator = resultExtended.discriminator(jetDir,
94  r_sigCone,
99  dZ_vertex);
100  resultExtended.setDiscriminator(discriminator);
101  }
102 
103  return std::make_pair(discriminator, resultExtended);
104 }

References PDWG_TauSkim_cff::discriminator, reco::IsolatedTauTagInfo::discriminator(), PVValHelper::dxy, PVValHelper::dz, createfilelist::int, HLT_FULL_cff::jetTracks, reco::IsolatedTauTagInfo::leadingSignalTrack(), SiStripPI::max, min(), TrackCollections2monitor_cff::normalizedChi2, DiDispStaMuonMonitor_cfi::pt, edm::RefVector< C, T, F >::push_back(), MetAnalyzer::pv(), reco::IsolatedTauTagInfo::setDiscriminator(), reco::IsolatedTauTagInfo::setLeadingTrack(), HLT_FULL_cff::track, and tracks.

Member Data Documentation

◆ dZ_vertex

double ConeIsolationAlgorithm::dZ_vertex
private

Definition at line 45 of file ConeIsolationAlgorithm.h.

◆ isolation_cone

double ConeIsolationAlgorithm::isolation_cone
private

Definition at line 42 of file ConeIsolationAlgorithm.h.

◆ m_cutMaxChiSquared

double ConeIsolationAlgorithm::m_cutMaxChiSquared
private

Definition at line 39 of file ConeIsolationAlgorithm.h.

◆ m_cutMaxTIP

double ConeIsolationAlgorithm::m_cutMaxTIP
private

Definition at line 37 of file ConeIsolationAlgorithm.h.

◆ m_cutMinPt

double ConeIsolationAlgorithm::m_cutMinPt
private

Definition at line 38 of file ConeIsolationAlgorithm.h.

◆ m_cutPixelHits

int ConeIsolationAlgorithm::m_cutPixelHits
private

Definition at line 35 of file ConeIsolationAlgorithm.h.

◆ m_cutTotalHits

int ConeIsolationAlgorithm::m_cutTotalHits
private

Definition at line 36 of file ConeIsolationAlgorithm.h.

◆ matching_cone

double ConeIsolationAlgorithm::matching_cone
private

Definition at line 40 of file ConeIsolationAlgorithm.h.

◆ n_tracks_isolation_ring

int ConeIsolationAlgorithm::n_tracks_isolation_ring
private

Definition at line 46 of file ConeIsolationAlgorithm.h.

◆ pt_min_isolation

double ConeIsolationAlgorithm::pt_min_isolation
private

Definition at line 43 of file ConeIsolationAlgorithm.h.

◆ pt_min_leadTrack

double ConeIsolationAlgorithm::pt_min_leadTrack
private

Definition at line 44 of file ConeIsolationAlgorithm.h.

◆ signal_cone

double ConeIsolationAlgorithm::signal_cone
private

Definition at line 41 of file ConeIsolationAlgorithm.h.

◆ useFixedSizeCone

bool ConeIsolationAlgorithm::useFixedSizeCone
private

Definition at line 48 of file ConeIsolationAlgorithm.h.

◆ useVertexConstrain_

bool ConeIsolationAlgorithm::useVertexConstrain_
private

Definition at line 47 of file ConeIsolationAlgorithm.h.

◆ variableConeParameter

double ConeIsolationAlgorithm::variableConeParameter
private

Definition at line 49 of file ConeIsolationAlgorithm.h.

◆ variableMaxCone

double ConeIsolationAlgorithm::variableMaxCone
private

Definition at line 50 of file ConeIsolationAlgorithm.h.

◆ variableMinCone

double ConeIsolationAlgorithm::variableMinCone
private

Definition at line 51 of file ConeIsolationAlgorithm.h.

ConeIsolationAlgorithm::useVertexConstrain_
bool useVertexConstrain_
Definition: ConeIsolationAlgorithm.h:47
BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:30
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
ConeIsolationAlgorithm::isolation_cone
double isolation_cone
Definition: ConeIsolationAlgorithm.h:42
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
min
T min(T a, T b)
Definition: MathUtil.h:58
ConeIsolationAlgorithm::m_cutTotalHits
int m_cutTotalHits
Definition: ConeIsolationAlgorithm.h:36
edm::RefVector< reco::TrackCollection >
ConeIsolationAlgorithm::m_cutMaxChiSquared
double m_cutMaxChiSquared
Definition: ConeIsolationAlgorithm.h:39
ConeIsolationAlgorithm::dZ_vertex
double dZ_vertex
Definition: ConeIsolationAlgorithm.h:45
ConeIsolationAlgorithm::m_cutMaxTIP
double m_cutMaxTIP
Definition: ConeIsolationAlgorithm.h:37
edm::Ref< TrackCollection >
ConeIsolationAlgorithm::pt_min_leadTrack
double pt_min_leadTrack
Definition: ConeIsolationAlgorithm.h:44
ConeIsolationAlgorithm::variableMinCone
double variableMinCone
Definition: ConeIsolationAlgorithm.h:51
PDWG_TauSkim_cff.discriminator
discriminator
Definition: PDWG_TauSkim_cff.py:7
ConeIsolationAlgorithm::n_tracks_isolation_ring
int n_tracks_isolation_ring
Definition: ConeIsolationAlgorithm.h:46
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:159
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
ConeIsolationAlgorithm::m_cutPixelHits
int m_cutPixelHits
Definition: ConeIsolationAlgorithm.h:35
ConeIsolationAlgorithm::variableConeParameter
double variableConeParameter
Definition: ConeIsolationAlgorithm.h:49
HLT_FULL_cff.jetTracks
jetTracks
Definition: HLT_FULL_cff.py:50866
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
ConeIsolationAlgorithm::signal_cone
double signal_cone
Definition: ConeIsolationAlgorithm.h:41
ConeIsolationAlgorithm::m_cutMinPt
double m_cutMinPt
Definition: ConeIsolationAlgorithm.h:38
createfilelist.int
int
Definition: createfilelist.py:10
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
ConeIsolationAlgorithm::variableMaxCone
double variableMaxCone
Definition: ConeIsolationAlgorithm.h:50
ConeIsolationAlgorithm::useFixedSizeCone
bool useFixedSizeCone
Definition: ConeIsolationAlgorithm.h:48
edm::RefVector::push_back
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:67
TrackCollections2monitor_cff.normalizedChi2
normalizedChi2
Definition: TrackCollections2monitor_cff.py:247
ConeIsolationAlgorithm::pt_min_isolation
double pt_min_isolation
Definition: ConeIsolationAlgorithm.h:43
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
PVValHelper::dxy
Definition: PVValidationHelpers.h:48
PVValHelper::dz
Definition: PVValidationHelpers.h:51
ConeIsolationAlgorithm::matching_cone
double matching_cone
Definition: ConeIsolationAlgorithm.h:40
reco::IsolatedTauTagInfo
Definition: IsolatedTauTagInfo.h:20