Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:46:20

0001 #ifndef Alignment_TwoBodyDecay_TwoBodyDecayVirtualMeasurement_h
0002 #define Alignment_TwoBodyDecay_TwoBodyDecayVirtualMeasurement_h
0003 
0004 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
0005 #include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h"
0006 #include "DataFormats/Math/interface/Point3D.h"
0007 //#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0008 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0009 
0010 /** /class TwoBodyDecayVirtualMeasurement
0011  *
0012  *  Container-class for the virtual measurements (beam profile, mass-constraint)
0013  * included into the estimation of the properties of two-body decays (see
0014  * TwoBodyDecayEstimator).
0015  *
0016  *  /author Edmund Widl
0017  */
0018 
0019 class TwoBodyDecayVirtualMeasurement {
0020 public:
0021   TwoBodyDecayVirtualMeasurement(const double primaryMass,
0022                                  const double primaryWidth,
0023                                  const double secondaryMass,
0024                                  const reco::BeamSpot &beamSpot)
0025       : thePrimaryMass(primaryMass),
0026         thePrimaryWidth(primaryWidth),
0027         theSecondaryMass(secondaryMass),
0028         theBeamSpot(beamSpot) {}
0029 
0030   TwoBodyDecayVirtualMeasurement(const TwoBodyDecayVirtualMeasurement &other)
0031       : thePrimaryMass(other.thePrimaryMass),
0032         thePrimaryWidth(other.thePrimaryWidth),
0033         theSecondaryMass(other.theSecondaryMass),
0034         theBeamSpot(other.theBeamSpot) {}
0035 
0036   inline const double &primaryMass(void) const { return thePrimaryMass; }
0037   inline const double &primaryWidth(void) const { return thePrimaryWidth; }
0038   inline const double &secondaryMass(void) const { return theSecondaryMass; }
0039 
0040   inline const reco::BeamSpot &beamSpot(void) const { return theBeamSpot; }
0041   inline const AlgebraicVector beamSpotPosition(void) const { return convertXYZPoint(theBeamSpot.position()); }
0042   inline const AlgebraicSymMatrix beamSpotError(void) const { return extractBeamSpotError(); }
0043 
0044 private:
0045   inline const AlgebraicVector convertXYZPoint(const math::XYZPoint &p) const {
0046     AlgebraicVector v(3);
0047     v(1) = p.x();
0048     v(2) = p.y();
0049     v(3) = p.z();
0050     return v;
0051   }
0052 
0053   inline const AlgebraicSymMatrix extractBeamSpotError() const {
0054     AlgebraicSymMatrix bse(3, 0);
0055     bse[0][0] = theBeamSpot.BeamWidthX();
0056     bse[1][1] = theBeamSpot.BeamWidthY();
0057     bse[2][2] = theBeamSpot.sigmaZ();
0058     return bse;
0059   }
0060 
0061   const double thePrimaryMass;
0062   const double thePrimaryWidth;
0063   const double theSecondaryMass;
0064   const reco::BeamSpot &theBeamSpot;
0065 };
0066 
0067 #endif