Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:17

0001 #ifndef DataFormats_TauReco_PFTauTransverseImpactParameter_h
0002 #define DataFormats_TauReco_PFTauTransverseImpactParameter_h
0003 
0004 /* class PFTauTransverseImpactParameter
0005  * 
0006  * Stores information on the impact paramters and flight length of the hadronic decay of a tau lepton
0007  *
0008  * author: Ian M. Nugent
0009  * This work is based on the impact parameter work by Rosamaria Venditti and reconstructing the 3 prong taus.
0010  * The idea of the fully reconstructing the tau using a kinematic fit comes from
0011  * Lars Perchalla and Philip Sauerland Theses under Achim Stahl supervision. This
0012  * work was continued by Ian M. Nugent and Vladimir Cherepanov.
0013  * Thanks goes to Christian Veelken and Evan Klose Friis for their help and suggestions. 
0014  */
0015 
0016 #include "DataFormats/Math/interface/Vector3D.h"
0017 #include "DataFormats/Math/interface/Point3D.h"
0018 #include "DataFormats/Math/interface/Error.h"
0019 #include "DataFormats/VertexReco/interface/Vertex.h"
0020 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0021 #include "TVector3.h"
0022 
0023 namespace reco {
0024   class PFTauTransverseImpactParameter {
0025     enum { dimension = 3 };
0026     enum { covarianceSize = dimension * (dimension + 1) / 2 };
0027 
0028   public:
0029     typedef math::Error<dimension>::type CovMatrix;
0030     typedef math::XYZPoint Point;
0031     typedef math::XYZVector Vector;
0032 
0033     PFTauTransverseImpactParameter() {}
0034     /// constructor from values
0035     PFTauTransverseImpactParameter(const Point&, double, double, const Point&, double, double, const VertexRef&);
0036     PFTauTransverseImpactParameter(const Point&,
0037                                    double,
0038                                    double,
0039                                    const Point&,
0040                                    double,
0041                                    double,
0042                                    const VertexRef&,
0043                                    const Point&,
0044                                    double,
0045                                    const VertexRef&);
0046 
0047     virtual ~PFTauTransverseImpactParameter() {}
0048     PFTauTransverseImpactParameter* clone() const;
0049 
0050     const Point& dxy_PCA() const { return pca_; }
0051     double dxy() const { return dxy_; }
0052     double dxy_error() const { return dxy_error_; }
0053     double dxy_Sig() const { return (dxy_error_ != 0) ? (dxy_ / dxy_error_) : 0.; }
0054     const Point& ip3d_PCA() const { return pca3d_; }
0055     double ip3d() const { return ip3d_; }
0056     double ip3d_error() const { return ip3d_error_; }
0057     double ip3d_Sig() const { return (ip3d_error_ != 0) ? (ip3d_ / ip3d_error_) : 0.; }
0058     const VertexRef& primaryVertex() const { return PV_; }
0059     Point primaryVertexPos() const;
0060     CovMatrix primaryVertexCov() const;
0061     bool hasSecondaryVertex() const { return hasSV_; }
0062     const Vector& flightLength() const;
0063     double flightLengthSig() const;
0064     CovMatrix flightLengthCov() const;
0065     const VertexRef& secondaryVertex() const { return SV_; }
0066     Point secondaryVertexPos() const;
0067     CovMatrix secondaryVertexCov() const;
0068 
0069   private:
0070     Point pca_;
0071     double dxy_{0};
0072     double dxy_error_{0};
0073     Point pca3d_;
0074     double ip3d_{0};
0075     double ip3d_error_{0};
0076     VertexRef PV_;
0077     bool hasSV_{false};
0078     Vector FlightLength_;
0079     double FlightLengthSig_{0};
0080     VertexRef SV_;
0081   };
0082 }  // namespace reco
0083 
0084 #endif