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 () const
 
float discriminator (double, double, double, bool, bool) 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.

24 {}

Referenced by clone().

◆ ~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.

27 { return new TauImpactParameterInfo(*this); }

References TauImpactParameterInfo().

◆ discriminator() [1/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 }

◆ discriminator() [2/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.

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 }

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().

◆ getIsolatedTauTag()

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

Definition at line 49 of file TauImpactParameterInfo.cc.

49 { return isolatedTaus; }

◆ getTrackData()

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

Definition at line 31 of file TauImpactParameterInfo.cc.

31  {
33 
34  if (iter != trackDataMap.end())
35  return &(iter->val);
36 
37  return nullptr; // if track not found return 0
38 }

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

◆ setIsolatedTauTag()

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

Definition at line 45 of file TauImpactParameterInfo.cc.

45  {
46  isolatedTaus = isolationRef;
47 }

Referenced by ImpactParameterAlgorithm::tag().

◆ storeTrackData()

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

Definition at line 40 of file TauImpactParameterInfo.cc.

41  {
42  trackDataMap.insert(trackRef, trackData);
43 }

Referenced by ImpactParameterAlgorithm::tag().

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.

Measurement1D
Definition: Measurement1D.h:11
edm::AssociationMap::find
const_iterator find(const key_type &k) const
find element with specified reference key
Definition: AssociationMap.h:173
edm::Ref::isNull
bool isNull() const
Checks for null.
Definition: Ref.h:235
Measurement1D::value
double value() const
Definition: Measurement1D.h:25
reco::TauImpactParameterInfo::TauImpactParameterInfo
TauImpactParameterInfo()
Definition: TauImpactParameterInfo.h:24
reco::TauImpactParameterTrackData::transverseIp
Measurement1D transverseIp
Definition: TauImpactParameterInfo.h:13
edm::Ref< TrackCollection >
edm::AssociationMap::end
const_iterator end() const
last iterator over the map (read only)
Definition: AssociationMap.h:171
edm::AssociationMap< edm::OneToValue< reco::TrackCollection, reco::TauImpactParameterTrackData > >::const_iterator
friend struct const_iterator
Definition: AssociationMap.h:274
Measurement1D::significance
double significance() const
Definition: Measurement1D.h:29
reco::TauImpactParameterInfo::trackDataMap
TrackTauImpactParameterAssociationCollection trackDataMap
Definition: TauImpactParameterInfo.h:39
reco::TauImpactParameterInfo::getTrackData
const TauImpactParameterTrackData * getTrackData(const reco::TrackRef &) const
Definition: TauImpactParameterInfo.cc:31
reco::TauImpactParameterTrackData
Definition: TauImpactParameterInfo.h:12
reco::TauImpactParameterTrackData::ip3D
Measurement1D ip3D
Definition: TauImpactParameterInfo.h:14
edm::AssociationMap::insert
void insert(const key_type &k, const data_type &v)
insert an association
Definition: AssociationMap.h:166
reco::TauImpactParameterInfo::discriminator
float discriminator() const
Definition: TauImpactParameterInfo.cc:26
reco::TauImpactParameterInfo::isolatedTaus
IsolatedTauTagInfoRef isolatedTaus
Definition: TauImpactParameterInfo.h:40