CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
reco::PFTau3ProngSummary Class Reference

#include <PFTau3ProngSummary.h>

Public Types

enum  { ambiguity, minus, plus, nsolutions }
 
enum  { dimension = 3 }
 
enum  { covarianceSize = dimension * ( dimension + 1 ) / 2 }
 
typedef math::Error< dimension >
::type 
CovMatrix
 
typedef math::XYZPoint Point
 
typedef math::XYZVector Vector
 

Public Member Functions

const TLorentzVector & A1_LV () const
 
virtual bool AddSolution (unsigned int solution, const TLorentzVector &tau, const std::vector< TLorentzVector > &daughter_p4, const std::vector< int > &daughter_charge, const std::vector< int > &daughter_PDGID, bool has3ProngSolution, double solutionChi2, double thetaGJsig)
 
PFTau3ProngSummaryclone () const
 
const std::vector< int > & Daughter_Charge (unsigned int i) const
 
const std::vector
< TLorentzVector > & 
Daughter_P4 (unsigned int i) const
 
const std::vector< int > & Daughter_PDGID (unsigned int i) const
 
CovMatrix flightLenghtCov () const
 
const VectorflightLength () const
 
double flightLengthSig () const
 
bool has3ProngSolution (unsigned int i) const
 
bool hasSecondaryVertex () const
 
const TVector3 & HelixFitSecondaryVertex () const
 
const CovMatrixHelixFitSecondaryVertexCov () const
 
double M_12 () const
 
double M_13 () const
 
double M_23 () const
 
double M_A1 () const
 
 PFTau3ProngSummary ()
 constructor from values More...
 
 PFTau3ProngSummary (reco::PFTauTransverseImpactParameterRef TIP, TLorentzVector a1, double vertex_chi2, double vertex_ndf)
 
 PFTau3ProngSummary (reco::PFTauTransverseImpactParameterRef TIP, TLorentzVector a1, double vertex_chi2, double vertex_ndf, TVector3 sv, CovMatrix svcov)
 
const
reco::PFTauTransverseImpactParameterRef
PFTauTIP () const
 
const VertexRefprimaryVertex () const
 
CovMatrix primaryVertexCov () const
 
const VertexRefsecondaryVertex () const
 
CovMatrix secondaryVertexCov () const
 
double SignificanceOfThetaGJ (unsigned int i) const
 
double Solution_Chi2 (unsigned int i) const
 
const TLorentzVector & Tau (unsigned int i) const
 
int Tau_Charge () const
 
double Vertex_chi2 () const
 
double Vertex_ndf () const
 
double Vertex_Prob () const
 
virtual ~PFTau3ProngSummary ()
 

Private Attributes

TLorentzVector a1_
 
std::vector< std::vector< int > > daughter_charge_
 
std::vector< std::vector
< TLorentzVector > > 
daughter_p4_
 
std::vector< std::vector< int > > daughter_PDGID_
 
std::vector< bool > has3ProngSolution_
 
std::vector< double > solution_Chi2_
 
TVector3 sv_
 
CovMatrix svcov_
 
std::vector< TLorentzVector > tau_p4_
 
std::vector< double > thetaGJsig_
 
reco::PFTauTransverseImpactParameterRef TIP_
 
double vertex_chi2_
 
double vertex_ndf_
 

Detailed Description

Definition at line 26 of file PFTau3ProngSummary.h.

Member Typedef Documentation

Definition at line 31 of file PFTau3ProngSummary.h.

Definition at line 32 of file PFTau3ProngSummary.h.

Definition at line 33 of file PFTau3ProngSummary.h.

Member Enumeration Documentation

anonymous enum
anonymous enum
Enumerator
dimension 

Definition at line 29 of file PFTau3ProngSummary.h.

anonymous enum

Constructor & Destructor Documentation

PFTau3ProngSummary::PFTau3ProngSummary ( )

constructor from values

Definition at line 44 of file PFTau3ProngSummary.cc.

References daughter_charge_, daughter_p4_, daughter_PDGID_, has3ProngSolution_, i, nsolutions, solution_Chi2_, tau_p4_, and thetaGJsig_.

Referenced by clone().

44  {
45  for(unsigned int i=0;i<nsolutions;i++){
46  has3ProngSolution_.push_back(false);
47  solution_Chi2_.push_back(0);
48  thetaGJsig_.push_back(0);
49  tau_p4_.push_back(TLorentzVector(0,0,0,0));
50  daughter_PDGID_.push_back(std::vector<int>());
51  daughter_charge_.push_back(std::vector<int>());
52  daughter_p4_.push_back(std::vector<TLorentzVector>());
53  }
54 }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > has3ProngSolution_
std::vector< double > thetaGJsig_
std::vector< double > solution_Chi2_
std::vector< TLorentzVector > tau_p4_
std::vector< std::vector< int > > daughter_charge_
std::vector< std::vector< int > > daughter_PDGID_
std::vector< std::vector< TLorentzVector > > daughter_p4_
PFTau3ProngSummary::PFTau3ProngSummary ( reco::PFTauTransverseImpactParameterRef  TIP,
TLorentzVector  a1,
double  vertex_chi2,
double  vertex_ndf 
)

Definition at line 7 of file PFTau3ProngSummary.cc.

References a1_, daughter_charge_, daughter_p4_, daughter_PDGID_, has3ProngSolution_, i, nsolutions, solution_Chi2_, sv_, svcov_, tau_p4_, thetaGJsig_, TIP_, vertex_chi2_, and vertex_ndf_.

7  {
8  TIP_=TIP;
9  for(unsigned int i=0;i<nsolutions;i++){
10  has3ProngSolution_.push_back(false);
11  solution_Chi2_.push_back(0);
12  thetaGJsig_.push_back(0);
13  tau_p4_.push_back(TLorentzVector(0,0,0,0));
14  daughter_PDGID_.push_back(std::vector<int>());
15  daughter_charge_.push_back(std::vector<int>());
16  daughter_p4_.push_back(std::vector<TLorentzVector>());
17  }
18  a1_=a1;
19  sv_=TVector3(TIP_->secondaryVertex()->x(),TIP_->secondaryVertex()->y(),TIP_->secondaryVertex()->z());
20  svcov_=TIP_->secondaryVertexCov();
21  vertex_chi2_=vertex_chi2;
22  vertex_ndf_=vertex_ndf;
23 }
int i
Definition: DBlmapReader.cc:9
reco::PFTauTransverseImpactParameterRef TIP_
std::vector< bool > has3ProngSolution_
std::vector< double > thetaGJsig_
std::vector< double > solution_Chi2_
std::vector< TLorentzVector > tau_p4_
std::vector< std::vector< int > > daughter_charge_
std::vector< std::vector< int > > daughter_PDGID_
std::vector< std::vector< TLorentzVector > > daughter_p4_
PFTau3ProngSummary::PFTau3ProngSummary ( reco::PFTauTransverseImpactParameterRef  TIP,
TLorentzVector  a1,
double  vertex_chi2,
double  vertex_ndf,
TVector3  sv,
CovMatrix  svcov 
)

Definition at line 25 of file PFTau3ProngSummary.cc.

References a1_, daughter_charge_, daughter_p4_, daughter_PDGID_, has3ProngSolution_, i, nsolutions, solution_Chi2_, sv_, svcov_, tau_p4_, thetaGJsig_, TIP_, vertex_chi2_, and vertex_ndf_.

25  {
26  TIP_=TIP;
27  for(unsigned int i=0;i<nsolutions;i++){
28  has3ProngSolution_.push_back(false);
29  solution_Chi2_.push_back(0);
30  thetaGJsig_.push_back(0);
31  tau_p4_.push_back(TLorentzVector(0,0,0,0));
32  daughter_PDGID_.push_back(std::vector<int>());
33  daughter_charge_.push_back(std::vector<int>());
34  daughter_p4_.push_back(std::vector<TLorentzVector>());
35  }
36  a1_=a1;
37  sv_=sv;
38  svcov_=svcov;
39  vertex_chi2_=vertex_chi2;
40  vertex_ndf_=vertex_ndf;
41 }
int i
Definition: DBlmapReader.cc:9
reco::PFTauTransverseImpactParameterRef TIP_
std::vector< bool > has3ProngSolution_
std::vector< double > thetaGJsig_
std::vector< double > solution_Chi2_
std::vector< TLorentzVector > tau_p4_
std::vector< std::vector< int > > daughter_charge_
std::vector< std::vector< int > > daughter_PDGID_
std::vector< std::vector< TLorentzVector > > daughter_p4_
virtual reco::PFTau3ProngSummary::~PFTau3ProngSummary ( )
inlinevirtual

Definition at line 40 of file PFTau3ProngSummary.h.

40 {}

Member Function Documentation

const TLorentzVector& reco::PFTau3ProngSummary::A1_LV ( ) const
inline

Definition at line 60 of file PFTau3ProngSummary.h.

References a1_.

60 { return a1_; }
bool PFTau3ProngSummary::AddSolution ( unsigned int  solution,
const TLorentzVector &  tau,
const std::vector< TLorentzVector > &  daughter_p4,
const std::vector< int > &  daughter_charge,
const std::vector< int > &  daughter_PDGID,
bool  has3ProngSolution,
double  solutionChi2,
double  thetaGJsig 
)
virtual

Definition at line 61 of file PFTau3ProngSummary.cc.

References daughter_charge_, daughter_p4_, daughter_PDGID_, has3ProngSolution_, nsolutions, solution_Chi2_, metsig::tau, tau_p4_, and thetaGJsig_.

Referenced by PFTau3ProngReco::produce().

63  {
64  if(solution<nsolutions){
65  has3ProngSolution_[solution]=true;
66  solution_Chi2_[solution]=solutionChi2;
67  thetaGJsig_[solution]=thetaGJsig;
68  tau_p4_[solution]=tau;
69  daughter_PDGID_[solution]=daughter_PDGID;
70  daughter_charge_[solution]=daughter_charge;
71  daughter_p4_[solution]=daughter_p4;
72  return true;
73  }
74  return false;
75 }
std::vector< bool > has3ProngSolution_
std::vector< double > thetaGJsig_
std::vector< double > solution_Chi2_
std::vector< TLorentzVector > tau_p4_
std::vector< std::vector< int > > daughter_charge_
std::vector< std::vector< int > > daughter_PDGID_
std::vector< std::vector< TLorentzVector > > daughter_p4_
PFTau3ProngSummary * PFTau3ProngSummary::clone ( void  ) const

Definition at line 56 of file PFTau3ProngSummary.cc.

References PFTau3ProngSummary().

56  {
57  return new PFTau3ProngSummary(*this);
58 }
PFTau3ProngSummary()
constructor from values
const std::vector<int>& reco::PFTau3ProngSummary::Daughter_Charge ( unsigned int  i) const
inline

Definition at line 77 of file PFTau3ProngSummary.h.

References daughter_charge_, and i.

77 { return daughter_charge_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< std::vector< int > > daughter_charge_
const std::vector<TLorentzVector>& reco::PFTau3ProngSummary::Daughter_P4 ( unsigned int  i) const
inline

Definition at line 78 of file PFTau3ProngSummary.h.

References daughter_p4_, and i.

78 { return daughter_p4_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< std::vector< TLorentzVector > > daughter_p4_
const std::vector<int>& reco::PFTau3ProngSummary::Daughter_PDGID ( unsigned int  i) const
inline

Definition at line 76 of file PFTau3ProngSummary.h.

References daughter_PDGID_, and i.

76 { return daughter_PDGID_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< std::vector< int > > daughter_PDGID_
CovMatrix reco::PFTau3ProngSummary::flightLenghtCov ( ) const
inline

Definition at line 57 of file PFTau3ProngSummary.h.

References TIP_.

57 { return TIP_->flightLengthCov(); }
reco::PFTauTransverseImpactParameterRef TIP_
const Vector& reco::PFTau3ProngSummary::flightLength ( ) const
inline

Definition at line 55 of file PFTau3ProngSummary.h.

References TIP_.

55 { return TIP_->flightLength(); }
reco::PFTauTransverseImpactParameterRef TIP_
double reco::PFTau3ProngSummary::flightLengthSig ( ) const
inline

Definition at line 56 of file PFTau3ProngSummary.h.

References TIP_.

56 { return TIP_->flightLengthSig(); }
reco::PFTauTransverseImpactParameterRef TIP_
bool reco::PFTau3ProngSummary::has3ProngSolution ( unsigned int  i) const
inline

Definition at line 71 of file PFTau3ProngSummary.h.

References has3ProngSolution_, and i.

71 { return has3ProngSolution_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > has3ProngSolution_
bool reco::PFTau3ProngSummary::hasSecondaryVertex ( ) const
inline

Definition at line 52 of file PFTau3ProngSummary.h.

References TIP_.

52 { return TIP_->hasSecondaryVertex(); }
reco::PFTauTransverseImpactParameterRef TIP_
const TVector3& reco::PFTau3ProngSummary::HelixFitSecondaryVertex ( ) const
inline

Definition at line 66 of file PFTau3ProngSummary.h.

References sv_.

66 {return sv_; }
const CovMatrix& reco::PFTau3ProngSummary::HelixFitSecondaryVertexCov ( ) const
inline

Definition at line 67 of file PFTau3ProngSummary.h.

References svcov_.

67 {return svcov_; }
double PFTau3ProngSummary::M_12 ( ) const

Definition at line 78 of file PFTau3ProngSummary.cc.

References DeDxDiscriminatorTools::charge(), daughter_charge_, daughter_p4_, has3ProngSolution_, i, j, and Tau_Charge().

78  {
79  for(unsigned int i=0;i<has3ProngSolution_.size();i++){
80  if(has3ProngSolution_[i]==true){
81  int charge=Tau_Charge();
82  TLorentzVector LV;
83  for(unsigned int j=0;j<daughter_p4_[i].size();j++){
84  if(daughter_charge_[i][j]==charge)LV+=daughter_p4_[i][j];
85  }
86  return LV.M();
87  }
88  }
89  return 0.0;
90 }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > has3ProngSolution_
double charge(const std::vector< uint8_t > &Ampls)
math::XYZTLorentzVectorD LV
int j
Definition: DBlmapReader.cc:9
std::vector< std::vector< int > > daughter_charge_
std::vector< std::vector< TLorentzVector > > daughter_p4_
double PFTau3ProngSummary::M_13 ( ) const

Definition at line 91 of file PFTau3ProngSummary.cc.

References DeDxDiscriminatorTools::charge(), daughter_charge_, daughter_p4_, newFWLiteAna::found, has3ProngSolution_, i, j, and Tau_Charge().

91  {
92  for(unsigned int i=0;i<has3ProngSolution_.size();i++){
93  if(has3ProngSolution_[i]==true){
94  int charge=Tau_Charge();
95  TLorentzVector LV_opp;
96  for(unsigned int j=0;j<daughter_p4_[i].size();j++){
97  if(daughter_charge_[i][j]==-1*charge)LV_opp=daughter_p4_[i][j];
98  }
99  TLorentzVector LV_pair;
100  bool found(false);
101  for(unsigned int j=0;j<daughter_p4_[i].size();j++){
102  if(daughter_charge_[i][j]==charge){
103  TLorentzVector LV=daughter_p4_[i][j];
104  LV+=LV_opp;
105  if(!found)LV_pair=LV;
106  else if(LV_pair.M()>LV.M())LV_pair=LV;
107  found=true;
108  }
109  }
110  if(found)return LV_pair.M();
111  }
112  }
113  return 0.0;
114 }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > has3ProngSolution_
double charge(const std::vector< uint8_t > &Ampls)
math::XYZTLorentzVectorD LV
int j
Definition: DBlmapReader.cc:9
std::vector< std::vector< int > > daughter_charge_
std::vector< std::vector< TLorentzVector > > daughter_p4_
double PFTau3ProngSummary::M_23 ( ) const

Definition at line 116 of file PFTau3ProngSummary.cc.

References DeDxDiscriminatorTools::charge(), daughter_charge_, daughter_p4_, newFWLiteAna::found, has3ProngSolution_, i, j, and Tau_Charge().

116  {
117  for(unsigned int i=0;i<has3ProngSolution_.size();i++){
118  if(has3ProngSolution_[i]==true){
119  int charge=Tau_Charge();
120  TLorentzVector LV_opp;
121  for(unsigned int j=0;j<daughter_p4_[i].size();j++){
122  if(daughter_charge_[i][j]==-1*charge)LV_opp=daughter_p4_[i][j];
123  }
124  TLorentzVector LV_pair;
125  bool found(false);
126  for(unsigned int j=0;j<daughter_p4_[i].size();j++){
127  if(daughter_charge_[i][j]==charge){
128  TLorentzVector LV=daughter_p4_[i][j];
129  LV+=LV_opp;
130  if(!found)LV_pair=LV;
131  else if(LV_pair.M()<LV.M())LV_pair=LV;
132  found=true;
133  }
134  }
135  if(found)return LV_pair.M();
136  }
137  }
138  return 0.0;
139 }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > has3ProngSolution_
double charge(const std::vector< uint8_t > &Ampls)
math::XYZTLorentzVectorD LV
int j
Definition: DBlmapReader.cc:9
std::vector< std::vector< int > > daughter_charge_
std::vector< std::vector< TLorentzVector > > daughter_p4_
double reco::PFTau3ProngSummary::M_A1 ( ) const
inline

Definition at line 61 of file PFTau3ProngSummary.h.

References a1_.

61 { return a1_.M(); }
const reco::PFTauTransverseImpactParameterRef& reco::PFTau3ProngSummary::PFTauTIP ( ) const
inline

Definition at line 48 of file PFTau3ProngSummary.h.

References TIP_.

48 { return TIP_; }
reco::PFTauTransverseImpactParameterRef TIP_
const VertexRef& reco::PFTau3ProngSummary::primaryVertex ( ) const
inline

Definition at line 50 of file PFTau3ProngSummary.h.

References TIP_.

50 { return TIP_->primaryVertex(); }
reco::PFTauTransverseImpactParameterRef TIP_
CovMatrix reco::PFTau3ProngSummary::primaryVertexCov ( ) const
inline

Definition at line 51 of file PFTau3ProngSummary.h.

References TIP_.

51 { return TIP_->primaryVertexCov(); }
reco::PFTauTransverseImpactParameterRef TIP_
const VertexRef& reco::PFTau3ProngSummary::secondaryVertex ( ) const
inline

Definition at line 53 of file PFTau3ProngSummary.h.

References TIP_.

53 { return TIP_->secondaryVertex(); }
reco::PFTauTransverseImpactParameterRef TIP_
CovMatrix reco::PFTau3ProngSummary::secondaryVertexCov ( ) const
inline

Definition at line 54 of file PFTau3ProngSummary.h.

References TIP_.

54 { return TIP_->secondaryVertexCov(); }
reco::PFTauTransverseImpactParameterRef TIP_
double reco::PFTau3ProngSummary::SignificanceOfThetaGJ ( unsigned int  i) const
inline

Definition at line 73 of file PFTau3ProngSummary.h.

References i, and thetaGJsig_.

73 { return thetaGJsig_[i]; } // 0 or less means the theta_GF has
int i
Definition: DBlmapReader.cc:9
std::vector< double > thetaGJsig_
double reco::PFTau3ProngSummary::Solution_Chi2 ( unsigned int  i) const
inline

Definition at line 72 of file PFTau3ProngSummary.h.

References i, and solution_Chi2_.

72 { return solution_Chi2_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< double > solution_Chi2_
const TLorentzVector& reco::PFTau3ProngSummary::Tau ( unsigned int  i) const
inline

Definition at line 75 of file PFTau3ProngSummary.h.

References i, and tau_p4_.

75 { return tau_p4_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< TLorentzVector > tau_p4_
int PFTau3ProngSummary::Tau_Charge ( ) const

Definition at line 141 of file PFTau3ProngSummary.cc.

References DeDxDiscriminatorTools::charge(), daughter_charge_, daughter_p4_, has3ProngSolution_, i, and j.

Referenced by M_12(), M_13(), and M_23().

141  {
142  for(unsigned int i=0;i<has3ProngSolution_.size();i++){
143  if(has3ProngSolution_[i]==true){
144  int charge;
145  for(unsigned int j=0;j<daughter_p4_[i].size();j++)charge+=daughter_charge_[i][j];
146  return charge;
147  }
148  }
149  return 0;
150 }
int i
Definition: DBlmapReader.cc:9
std::vector< bool > has3ProngSolution_
double charge(const std::vector< uint8_t > &Ampls)
int j
Definition: DBlmapReader.cc:9
std::vector< std::vector< int > > daughter_charge_
std::vector< std::vector< TLorentzVector > > daughter_p4_
double reco::PFTau3ProngSummary::Vertex_chi2 ( ) const
inline

Definition at line 68 of file PFTau3ProngSummary.h.

References vertex_chi2_.

68 { return vertex_chi2_; }
double reco::PFTau3ProngSummary::Vertex_ndf ( ) const
inline

Definition at line 69 of file PFTau3ProngSummary.h.

References vertex_ndf_.

69 { return vertex_ndf_; }
double reco::PFTau3ProngSummary::Vertex_Prob ( ) const
inline

Definition at line 70 of file PFTau3ProngSummary.h.

References vertex_chi2_, and vertex_ndf_.

70 { return TMath::Prob(vertex_chi2_, vertex_ndf_); }

Member Data Documentation

TLorentzVector reco::PFTau3ProngSummary::a1_
private

Definition at line 82 of file PFTau3ProngSummary.h.

Referenced by A1_LV(), M_A1(), and PFTau3ProngSummary().

std::vector<std::vector<int> > reco::PFTau3ProngSummary::daughter_charge_
private
std::vector<std::vector<TLorentzVector> > reco::PFTau3ProngSummary::daughter_p4_
private
std::vector<std::vector<int> > reco::PFTau3ProngSummary::daughter_PDGID_
private

Definition at line 91 of file PFTau3ProngSummary.h.

Referenced by AddSolution(), Daughter_PDGID(), and PFTau3ProngSummary().

std::vector<bool> reco::PFTau3ProngSummary::has3ProngSolution_
private
std::vector<double> reco::PFTau3ProngSummary::solution_Chi2_
private

Definition at line 88 of file PFTau3ProngSummary.h.

Referenced by AddSolution(), PFTau3ProngSummary(), and Solution_Chi2().

TVector3 reco::PFTau3ProngSummary::sv_
private

Definition at line 83 of file PFTau3ProngSummary.h.

Referenced by HelixFitSecondaryVertex(), and PFTau3ProngSummary().

CovMatrix reco::PFTau3ProngSummary::svcov_
private

Definition at line 84 of file PFTau3ProngSummary.h.

Referenced by HelixFitSecondaryVertexCov(), and PFTau3ProngSummary().

std::vector<TLorentzVector> reco::PFTau3ProngSummary::tau_p4_
private

Definition at line 90 of file PFTau3ProngSummary.h.

Referenced by AddSolution(), PFTau3ProngSummary(), and Tau().

std::vector<double> reco::PFTau3ProngSummary::thetaGJsig_
private

Definition at line 89 of file PFTau3ProngSummary.h.

Referenced by AddSolution(), PFTau3ProngSummary(), and SignificanceOfThetaGJ().

reco::PFTauTransverseImpactParameterRef reco::PFTau3ProngSummary::TIP_
private
double reco::PFTau3ProngSummary::vertex_chi2_
private

Definition at line 85 of file PFTau3ProngSummary.h.

Referenced by PFTau3ProngSummary(), Vertex_chi2(), and Vertex_Prob().

double reco::PFTau3ProngSummary::vertex_ndf_
private

Definition at line 86 of file PFTau3ProngSummary.h.

Referenced by PFTau3ProngSummary(), Vertex_ndf(), and Vertex_Prob().