CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
reco::TauImpactParameterInfo Class Reference

#include <TauImpactParameterInfo.h>

Public Member Functions

virtual TauImpactParameterInfoclone () const
 
float discriminator (double, double, double, bool, bool) const
 
float discriminator () const
 
const IsolatedTauTagInfoRefgetIsolatedTauTag () const
 
const TauImpactParameterTrackDatagetTrackData (const reco::TrackRef &) const
 
void setIsolatedTauTag (const IsolatedTauTagInfoRef &)
 
void storeTrackData (const reco::TrackRef &, const TauImpactParameterTrackData &)
 
 TauImpactParameterInfo ()
 
virtual ~TauImpactParameterInfo ()
 

Private Attributes

IsolatedTauTagInfoRef isolatedTaus
 
TrackTauImpactParameterAssociationCollection trackDataMap
 

Detailed Description

Definition at line 22 of file TauImpactParameterInfo.h.

Constructor & Destructor Documentation

◆ TauImpactParameterInfo()

reco::TauImpactParameterInfo::TauImpactParameterInfo ( )
inline

Definition at line 24 of file TauImpactParameterInfo.h.

Referenced by clone().

24 {}

◆ ~TauImpactParameterInfo()

virtual reco::TauImpactParameterInfo::~TauImpactParameterInfo ( )
inlinevirtual

Definition at line 25 of file TauImpactParameterInfo.h.

25 {}

Member Function Documentation

◆ clone()

virtual TauImpactParameterInfo* reco::TauImpactParameterInfo::clone ( void  ) const
inlinevirtual

Definition at line 27 of file TauImpactParameterInfo.h.

References TauImpactParameterInfo().

◆ discriminator() [1/2]

float reco::TauImpactParameterInfo::discriminator ( double  ip_min,
double  ip_max,
double  sip_min,
bool  use_sign,
bool  use3D 
) const

Definition at line 8 of file TauImpactParameterInfo.cc.

References PDWG_TauSkim_cff::discriminator, reco::TauImpactParameterTrackData::ip3D, edm::Ref< C, T, F >::isNull(), Measurement1D::significance(), reco::TauImpactParameterTrackData::transverseIp, and Measurement1D::value().

Referenced by ImpactParameterAlgorithm::tag().

9  {
10  double discriminator = isolatedTaus->discriminator();
11 
12  const TrackRef leadingTrack = isolatedTaus->leadingSignalTrack(0.4, 1.);
13 
14  if (!leadingTrack.isNull()) {
15  const TauImpactParameterTrackData* ipData = getTrackData(leadingTrack);
16  Measurement1D ip = ipData->transverseIp;
17  if (use3D)
18  ip = ipData->ip3D;
19 
20  if (ip.value() < ip_min || ip.value() > ip_max || ip.significance() < sip_min) {
21  discriminator = 0;
22  }
23  }
24  return discriminator;
25 }
bool isNull() const
Checks for null.
Definition: Ref.h:235
IsolatedTauTagInfoRef isolatedTaus
double value() const
Definition: Measurement1D.h:25
double significance() const
Definition: Measurement1D.h:29
const TauImpactParameterTrackData * getTrackData(const reco::TrackRef &) const

◆ discriminator() [2/2]

float reco::TauImpactParameterInfo::discriminator ( ) const

Definition at line 26 of file TauImpactParameterInfo.cc.

26  {
27  //default discriminator: returns the value of the discriminator of the jet tag
28  return isolatedTaus->discriminator();
29 }
IsolatedTauTagInfoRef isolatedTaus

◆ getIsolatedTauTag()

const IsolatedTauTagInfoRef & reco::TauImpactParameterInfo::getIsolatedTauTag ( ) const

Definition at line 49 of file TauImpactParameterInfo.cc.

49 { return isolatedTaus; }
IsolatedTauTagInfoRef isolatedTaus

◆ getTrackData()

const reco::TauImpactParameterTrackData * TauImpactParameterInfo::getTrackData ( const reco::TrackRef trackRef) const

Definition at line 31 of file TauImpactParameterInfo.cc.

References edm::AssociationMap< edm::OneToValue< reco::TrackCollection, reco::TauImpactParameterTrackData > >::const_iterator.

31  {
33 
34  if (iter != trackDataMap.end())
35  return &(iter->val);
36 
37  return nullptr; // if track not found return 0
38 }
const_iterator find(const key_type &k) const
find element with specified reference key
const_iterator end() const
last iterator over the map (read only)
TrackTauImpactParameterAssociationCollection trackDataMap

◆ setIsolatedTauTag()

void reco::TauImpactParameterInfo::setIsolatedTauTag ( const IsolatedTauTagInfoRef isolationRef)

Definition at line 45 of file TauImpactParameterInfo.cc.

Referenced by ImpactParameterAlgorithm::tag().

45  {
46  isolatedTaus = isolationRef;
47 }
IsolatedTauTagInfoRef isolatedTaus

◆ storeTrackData()

void reco::TauImpactParameterInfo::storeTrackData ( const reco::TrackRef trackRef,
const TauImpactParameterTrackData trackData 
)

Definition at line 40 of file TauImpactParameterInfo.cc.

Referenced by ImpactParameterAlgorithm::tag().

41  {
42  trackDataMap.insert(trackRef, trackData);
43 }
void insert(const key_type &k, const data_type &v)
insert an association
TrackTauImpactParameterAssociationCollection trackDataMap

Member Data Documentation

◆ isolatedTaus

IsolatedTauTagInfoRef reco::TauImpactParameterInfo::isolatedTaus
private

Definition at line 40 of file TauImpactParameterInfo.h.

◆ trackDataMap

TrackTauImpactParameterAssociationCollection reco::TauImpactParameterInfo::trackDataMap
private

Definition at line 39 of file TauImpactParameterInfo.h.