LCOV - code coverage report
Current view: top level - STEER/AOD - AliAODv0.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 2 65 3.1 %
Date: 2016-06-14 17:26:59 Functions: 3 53 5.7 %

          Line data    Source code
       1             : #ifndef ALIAODV0_H
       2             : #define ALIAODV0_H
       3             : /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : //-------------------------------------------------------------------------
       7             : //     Analysis Oriented Data (AOD) V0 vertex class
       8             : //     Authors: B.Hippolyte, IPHC, hippolyt@in2p3.fr 
       9             : //              G.Van Buren, BNL,  gene@bnl.gov      (original STAR MuDsts)
      10             : //-------------------------------------------------------------------------
      11             : 
      12             : #include "AliAODRecoDecay.h"
      13             : 
      14             : class AliAODv0 : public AliAODRecoDecay {
      15             : 
      16             : public:
      17             : 
      18             :   AliAODv0();
      19             :   AliAODv0(AliAODVertex *rAODVertex, Double_t rDcaV0Daughters, Double_t rDcaV0ToPrimVertex,
      20             :            const Double_t *rMomPos, const Double_t *rMomNeg, Double_t *rDcaDaughterToPrimVertex);
      21             :   virtual ~AliAODv0();
      22             : 
      23             :   AliAODv0(const AliAODv0& rAliAODv0);
      24             :   AliAODv0& operator=(const AliAODv0& rAliAODv0);
      25             : 
      26             :   void     Fill(AliAODVertex *rAODVertex, Double_t rDcaV0Daughters, Double_t rDcaV0ToPrimVertex,
      27             :                 const Double_t *rMomPos, const Double_t *rMomNeg, const Double_t *rDcaDaughterToPrimVertex);
      28             :   void     ResetV0();
      29             :   void     Print(Option_t* option = "") const;
      30             : 
      31          16 :   void     SetOnFlyStatus(Bool_t status){fOnFlyStatus=status;}
      32           0 :   Bool_t   GetOnFlyStatus() const {return fOnFlyStatus;}
      33             : 
      34             :   Double_t DecayVertexV0X() const;
      35             :   Double_t DecayVertexV0Y() const;
      36             :   Double_t DecayVertexV0Z() const;
      37             : 
      38             :   Double_t DecayLengthV0(const Double_t *) const;
      39             :                      
      40             :   Double_t DcaV0Daughters()     const;
      41             :   Double_t DcaV0ToPrimVertex()  const;
      42             :   Double_t DcaPosToPrimVertex() const; 
      43             :   Double_t DcaNegToPrimVertex() const; 
      44             :   Double_t RadiusV0()           const;
      45             :   Double_t OpenAngleV0()        const;
      46             : 
      47             :   Double_t MomPosX() const;
      48             :   Double_t MomPosY() const;
      49             :   Double_t MomPosZ() const;
      50             :   Double_t MomNegX() const;
      51             :   Double_t MomNegY() const;
      52             :   Double_t MomNegZ() const;
      53             : 
      54             :   Double_t Chi2V0()  const;
      55             : 
      56             :   Double_t MomV0X()  const;
      57             :   Double_t MomV0Y()  const;
      58             :   Double_t MomV0Z()  const;
      59             : 
      60             :   Double_t Ptot2Pos() const;
      61             :   Double_t Ptot2Neg() const;
      62             :   Double_t Ptot2V0()  const;
      63             :   Double_t Pt2V0()    const;
      64             :   Double_t MomPosAlongV0() const;
      65             :   Double_t MomNegAlongV0() const;
      66             :   Double_t AlphaV0() const;
      67             :   Double_t PtArmV0() const;
      68             :   Double_t EPosProton() const;
      69             :   Double_t ENegProton() const;
      70             :   Double_t EPosPion() const;
      71             :   Double_t ENegPion() const;
      72             :   Double_t ELambda() const;
      73             :   Double_t EK0Short() const;
      74             :   Double_t MassLambda() const;
      75             :   Double_t MassAntiLambda() const;
      76             :   Double_t MassK0Short() const;
      77             :   Double_t RapK0Short() const;
      78             :   Double_t RapLambda() const;
      79             :   Double_t PseudoRapV0()    const;
      80             :   Double_t PseudoRapPos()   const;
      81             :   Double_t PseudoRapNeg()   const;
      82             :   
      83             :   Short_t  GetPosID()       const;
      84             :   Short_t  GetNegID()       const;
      85           0 :   Int_t    GetLabel()       const {return -1;} // Dummy
      86           0 :   Int_t    PdgCode()        const {return  0;} // Dummy
      87             :   
      88           0 :   virtual Bool_t   GetPxPyPz(Double_t */*p*/) const { return kFALSE; }
      89           0 :   virtual void     SetID(Short_t /*id*/) {;}
      90             : 
      91             :   
      92             : protected:
      93             :   Double32_t fDcaV0ToPrimVertex;    // dca of V0 to primary vertex 
      94             :   Bool_t     fOnFlyStatus;          // if kTRUE, then this V0 is recontructed
      95             :                                     // "on fly" during the tracking
      96         182 :   ClassDef(AliAODv0,2)
      97             : };
      98             : 
      99           0 : inline Double_t AliAODv0::DecayVertexV0X() const {return this->GetSecVtxX();}
     100           0 : inline Double_t AliAODv0::DecayVertexV0Y() const {return this->GetSecVtxY();}
     101           0 : inline Double_t AliAODv0::DecayVertexV0Z() const {return this->GetSecVtxZ();}
     102             : 
     103             : inline Double_t AliAODv0::DecayLengthV0(const Double_t *tParentVertexPosition) const {
     104           0 :   return ::sqrt(::pow(DecayVertexV0X() - tParentVertexPosition[0],2) +
     105           0 :                 ::pow(DecayVertexV0Y() - tParentVertexPosition[1],2) +
     106           0 :                 ::pow(DecayVertexV0Z() - tParentVertexPosition[2],2));
     107             : }
     108             : 
     109           0 : inline Double_t AliAODv0::DcaV0Daughters() const {return fDCA[0];}
     110           0 : inline Double_t AliAODv0::DcaV0ToPrimVertex() const {return fDcaV0ToPrimVertex;}
     111           0 : inline Double_t AliAODv0::DcaPosToPrimVertex() const {return fd0[0];}
     112           0 : inline Double_t AliAODv0::DcaNegToPrimVertex() const {return fd0[1];}
     113             : 
     114             : inline Double_t AliAODv0::RadiusV0() const {
     115           0 :   return RadiusSecVtx();
     116             : }
     117             : 
     118             : inline Double_t AliAODv0::OpenAngleV0() const {
     119           0 :   Double_t lScalPtot1Ptot2 = PxProng(0)*PxProng(1)+PyProng(0)*PyProng(1)+PzProng(0)*PzProng(1);
     120           0 :   Double_t lPtot1xPtot2 = Ptot2Pos()*Ptot2Neg();
     121           0 :   return ::acos(lScalPtot1Ptot2/::sqrt(lPtot1xPtot2) );
     122             : }
     123             : 
     124           0 : inline Double_t AliAODv0::MomPosX() const {return fPx[0];}
     125           0 : inline Double_t AliAODv0::MomPosY() const {return fPy[0];}
     126           0 : inline Double_t AliAODv0::MomPosZ() const {return fPz[0];}
     127           0 : inline Double_t AliAODv0::MomNegX() const {return fPx[1];}
     128           0 : inline Double_t AliAODv0::MomNegY() const {return fPy[1];}
     129           0 : inline Double_t AliAODv0::MomNegZ() const {return fPz[1];}
     130             : 
     131           0 : inline Double_t AliAODv0::Chi2V0() const {return GetSecondaryVtx()->GetChi2perNDF();}
     132             : 
     133             : // Compare eventually AliAODv0::MomV0X() and AliAODRecoDecay::Px()
     134           0 : inline Double_t AliAODv0::MomV0X() const {return MomPosX()+MomNegX();}
     135           0 : inline Double_t AliAODv0::MomV0Y() const {return MomPosY()+MomNegY();}
     136           0 : inline Double_t AliAODv0::MomV0Z() const {return MomPosZ()+MomNegZ();}
     137             : 
     138             : inline Double_t AliAODv0::Ptot2Pos() const {
     139           0 :   return (::pow(MomPosX(),2) + ::pow(MomPosY(),2) + ::pow(MomPosZ(),2) );
     140             : }
     141             : inline Double_t AliAODv0::Ptot2Neg() const {
     142           0 :   return (::pow(MomNegX(),2) + ::pow(MomNegY(),2) + ::pow(MomNegZ(),2) );
     143             : }
     144           0 : inline Double_t AliAODv0::Ptot2V0() const {return ( Pt2V0() + ::pow(MomV0Z(),2) );}
     145             : inline Double_t AliAODv0::Pt2V0() const {
     146           0 :   return (::pow(MomV0X(),2) + ::pow(MomV0Y(),2) );
     147             : }
     148             : 
     149             : inline Double_t AliAODv0::MomPosAlongV0() const {
     150           0 :   Double_t lPtot2V0 = Ptot2V0();
     151           0 :   if (lPtot2V0)
     152           0 :     return (MomPosX()*MomV0X() +
     153           0 :             MomPosY()*MomV0Y() +
     154           0 :             MomPosZ()*MomV0Z()) / ::sqrt(lPtot2V0);
     155           0 :   return 0.;
     156           0 : }
     157             : 
     158             : inline Double_t AliAODv0::MomNegAlongV0() const {
     159           0 :   Double_t lPtot2V0 = Ptot2V0();
     160           0 :   if (lPtot2V0)
     161           0 :     return (MomNegX()*MomV0X() +
     162           0 :             MomNegY()*MomV0Y() +
     163           0 :             MomNegZ()*MomV0Z()) / ::sqrt(lPtot2V0);
     164           0 :   return 0.;
     165           0 : }
     166             : 
     167             : inline Double_t AliAODv0::AlphaV0() const {
     168           0 :   return Alpha();
     169             : }
     170             : inline Double_t AliAODv0::PtArmV0() const {
     171           0 :   return QtProng(0);
     172             : }
     173             : 
     174             : inline Double_t AliAODv0::EPosProton() const {
     175           0 :   return EProng(0,2212);
     176             : }
     177             : 
     178             : inline Double_t AliAODv0::ENegProton() const {
     179           0 :   return EProng(1,2212);
     180             : }
     181             : 
     182             : inline Double_t AliAODv0::EPosPion() const {
     183           0 :   return EProng(0,211);
     184             : }
     185             : 
     186             : inline Double_t AliAODv0::ENegPion() const {
     187           0 :   return EProng(1,211);
     188             : }
     189             : 
     190             : inline Double_t AliAODv0::ELambda() const {
     191           0 :   return E(3122);
     192             : }
     193             : 
     194             : inline Double_t AliAODv0::EK0Short() const {
     195           0 :   return E(310);
     196             : }
     197             : 
     198             : inline Double_t AliAODv0::MassLambda() const {
     199           0 :   return InvMass2Prongs(0,1,2212,211);
     200             : }
     201             : 
     202             : inline Double_t AliAODv0::MassAntiLambda() const {
     203           0 :   return InvMass2Prongs(0,1,211,2212);
     204             : }
     205             : 
     206             : inline Double_t AliAODv0::MassK0Short() const {
     207           0 :   return InvMass2Prongs(0,1,211,211);
     208             : }
     209             : 
     210             : inline Double_t AliAODv0::RapK0Short() const {
     211           0 :   return Y(310);
     212             : }
     213             : 
     214             : inline Double_t AliAODv0::RapLambda() const {
     215           0 :   return Y(3122);
     216             : }
     217             : 
     218             : inline Double_t AliAODv0::PseudoRapV0() const {
     219           0 :   return Eta();
     220             : }
     221             : 
     222             : inline Double_t AliAODv0::PseudoRapPos()   const {
     223           0 :   return EtaProng(0);
     224             : }
     225             : 
     226             : inline Double_t AliAODv0::PseudoRapNeg()   const {
     227           0 :   return EtaProng(1);
     228             : }
     229             : //----------------------------------------------------------------------------
     230             : 
     231             : #endif

Generated by: LCOV version 1.11