CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TauImpactParameterInfo.cc
Go to the documentation of this file.
3 
4 using namespace edm;
5 using namespace reco;
6 using namespace std;
7 
8 float reco::TauImpactParameterInfo::discriminator (double ip_min,double ip_max,double sip_min,bool use_sign, bool use3D) const {
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) ip = ipData->ip3D;
18 
19  if( ip.value() < ip_min ||
20  ip.value() > ip_max ||
21  ip.significance() < sip_min ){
22  discriminator = 0;
23  }
24  }
25  return discriminator;
26 }
28  //default discriminator: returns the value of the discriminator of the jet tag
29  return isolatedTaus->discriminator();
30 }
31 
32 const reco::TauImpactParameterTrackData* TauImpactParameterInfo::getTrackData(const reco::TrackRef & trackRef) const {
33 
35  = trackDataMap.find(trackRef);
36 
37  if (iter != trackDataMap.end()) return &(iter->val);
38 
39  return 0; // if track not found return 0
40 }
41 
43  const reco::TauImpactParameterTrackData& trackData) {
44 
45  trackDataMap.insert(trackRef, trackData);
46 }
47 
49  isolatedTaus = isolationRef;
50 }
51 
53  return isolatedTaus;
54 }
55 
void setIsolatedTauTag(const IsolatedTauTagInfoRef &)
tuple discriminator
bool isNull() const
Checks for null.
Definition: Ref.h:249
double significance() const
Definition: Measurement1D.h:32
const IsolatedTauTagInfoRef & getIsolatedTauTag() const
double value() const
Definition: Measurement1D.h:28
void storeTrackData(const reco::TrackRef &, const TauImpactParameterTrackData &)