Go to the documentation of this file.00001 #ifndef Alignment_TwoBodyDecay_TwoBodyDecayVirtualMeasurement_h
00002 #define Alignment_TwoBodyDecay_TwoBodyDecayVirtualMeasurement_h
00003
00004 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
00005 #include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h"
00006 #include "DataFormats/Math/interface/Point3D.h"
00007
00008 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
00009
00019 class TwoBodyDecayVirtualMeasurement
00020 {
00021
00022 public:
00023
00024 TwoBodyDecayVirtualMeasurement( const double primaryMass,
00025 const double primaryWidth,
00026 const double secondaryMass,
00027 const reco::BeamSpot& beamSpot ) :
00028 thePrimaryMass( primaryMass ),
00029 thePrimaryWidth( primaryWidth ),
00030 theSecondaryMass( secondaryMass ),
00031 theBeamSpot( beamSpot ) {}
00032
00033 TwoBodyDecayVirtualMeasurement( const TwoBodyDecayVirtualMeasurement & other ) :
00034 thePrimaryMass( other.thePrimaryMass ),
00035 thePrimaryWidth( other.thePrimaryWidth ),
00036 theSecondaryMass( other.theSecondaryMass ),
00037 theBeamSpot( other.theBeamSpot ) {}
00038
00039 inline const double & primaryMass( void ) const { return thePrimaryMass; }
00040 inline const double & primaryWidth( void ) const { return thePrimaryWidth; }
00041 inline const double & secondaryMass( void ) const { return theSecondaryMass; }
00042
00043 inline const reco::BeamSpot & beamSpot( void ) const { return theBeamSpot; }
00044 inline const AlgebraicVector beamSpotPosition( void ) const { return convertXYZPoint( theBeamSpot.position() ); }
00045 inline const AlgebraicSymMatrix beamSpotError( void ) const { return extractBeamSpotError(); }
00046
00047 private:
00048
00049 inline const AlgebraicVector convertXYZPoint( const math::XYZPoint & p ) const
00050 { AlgebraicVector v(3); v(1)=p.x(); v(2)=p.y(); v(3)=p.z(); return v; }
00051
00052 inline const AlgebraicSymMatrix extractBeamSpotError() const
00053 { AlgebraicSymMatrix bse(3,0); bse[0][0] = theBeamSpot.BeamWidthX(); bse[1][1] = theBeamSpot.BeamWidthY(); bse[2][2] = theBeamSpot.sigmaZ(); return bse; }
00054
00055 const double & thePrimaryMass;
00056 const double & thePrimaryWidth;
00057 const double & theSecondaryMass;
00058 const reco::BeamSpot & theBeamSpot;
00059
00060 };
00061
00062 #endif