Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:57:29

0001 #ifndef Alignment_TwoBodyDecay_TwoBodyDecayDerivatives_h
0002 #define Alignment_TwoBodyDecay_TwoBodyDecayDerivatives_h
0003 
0004 #include "Alignment/TwoBodyDecay/interface/TwoBodyDecay.h"
0005 
0006 /** /class TwoBodyDecayDerivatives
0007  *
0008  *  This class provides the derivatives matrices need by the class
0009  * TwoBodyDecayEstimator.
0010  *
0011  *  /author Edmund Widl
0012  */
0013 
0014 class TwoBodyDecayDerivatives {
0015 public:
0016   enum { dimension = 6 };
0017 
0018   enum DerivativeParameterName { px = 1, py = 2, pz = 3, theta = 4, phi = 5, mass = 6 };
0019 
0020   TwoBodyDecayDerivatives(double mPrimary = 91.1876, double mSecondary = 0.105658);
0021   ~TwoBodyDecayDerivatives();
0022 
0023   /**Derivatives of the lab frame momenta (in cartesian representation) of the
0024    * secondaries w.r.t. z=(px,py,pz,theta,phi,m).
0025    */
0026   const std::pair<AlgebraicMatrix, AlgebraicMatrix> derivatives(const TwoBodyDecay &tbd) const;
0027 
0028   /**Derivatives of the lab frame momenta (in cartesian representation) of the
0029    * secondaries w.r.t. z=(px,py,pz,theta,phi,m).
0030    */
0031   const std::pair<AlgebraicMatrix, AlgebraicMatrix> derivatives(const TwoBodyDecayParameters &param) const;
0032 
0033   /**Derivatives of the lab frame momenta (in cartesian representation) of the
0034    * secondaries w.r.t. the selected parameters.
0035    */
0036   const std::pair<AlgebraicMatrix, AlgebraicMatrix> selectedDerivatives(const TwoBodyDecay &tbd,
0037                                                                         const std::vector<bool> &selector) const;
0038 
0039   /**Derivatives of the lab frame momenta (in cartesian representation) of the
0040    * secondaries w.r.t. the selected parameters.
0041    */
0042   const std::pair<AlgebraicMatrix, AlgebraicMatrix> selectedDerivatives(const TwoBodyDecayParameters &param,
0043                                                                         const std::vector<bool> &selector) const;
0044 
0045 private:
0046   /**Derivatives of the lab frame momenta of the secondaries w.r.t. px of the
0047    * primary particle.
0048    */
0049   const std::pair<AlgebraicMatrix, AlgebraicMatrix> dqsdpx(const TwoBodyDecayParameters &param) const;
0050 
0051   /**Derivatives of the lab frame momenta of the secondaries w.r.t. py of the
0052    * primary particle.
0053    */
0054   const std::pair<AlgebraicMatrix, AlgebraicMatrix> dqsdpy(const TwoBodyDecayParameters &param) const;
0055 
0056   /**Derivatives of the lab frame momenta of the secondaries w.r.t. pz of the
0057    * primary particle.
0058    */
0059   const std::pair<AlgebraicMatrix, AlgebraicMatrix> dqsdpz(const TwoBodyDecayParameters &param) const;
0060 
0061   /**Derivatives of the lab frame momenta of the secondaries w.r.t. the decay
0062    * angle theta in the primary's rest frame.
0063    */
0064   const std::pair<AlgebraicMatrix, AlgebraicMatrix> dqsdtheta(const TwoBodyDecayParameters &param) const;
0065 
0066   /**Derivatives of the lab frame momenta of the secondaries w.r.t. the decay
0067    * angle phi in the primary's rest frame.
0068    */
0069   const std::pair<AlgebraicMatrix, AlgebraicMatrix> dqsdphi(const TwoBodyDecayParameters &param) const;
0070 
0071   /**Derivatives of the lab frame momenta of the secondaries w.r.t. the mass of
0072    * the primary
0073    */
0074   const std::pair<AlgebraicMatrix, AlgebraicMatrix> dqsdm(const TwoBodyDecayParameters &param) const;
0075 
0076   const std::pair<AlgebraicMatrix, AlgebraicMatrix> dqsdzi(const TwoBodyDecayParameters &param,
0077                                                            const DerivativeParameterName &i) const;
0078 
0079   double thePrimaryMass;
0080   double theSecondaryMass;
0081 };
0082 
0083 #endif