LCOV - code coverage report
Current view: top level - STEER/ESD - AliCascadeVertexer.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 21 36 58.3 %
Date: 2016-06-14 17:26:59 Functions: 7 17 41.2 %

          Line data    Source code
       1             : #ifndef ALICASCADEVERTEXER_H
       2             : #define ALICASCADEVERTEXER_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : //------------------------------------------------------------------
       7             : //                    Cascade Vertexer Class
       8             : //          Reads V0s and tracks, writes out cascade vertices
       9             : //    Origin: Christian Kuhn, IReS, Strasbourg, christian.kuhn@ires.in2p3.fr
      10             : //------------------------------------------------------------------
      11             : 
      12             : #include "TObject.h"
      13             : #include "TMath.h"
      14             : 
      15             : class AliESDEvent;
      16             : class AliESDv0;
      17             : class AliExternalTrackParam;
      18             : 
      19             : //_____________________________________________________________________________
      20          32 : class AliCascadeVertexer : public TObject {
      21             : public:
      22             :   AliCascadeVertexer();
      23             :   void SetCuts(const Double_t cuts[8]);
      24             :   static void SetDefaultCuts(const Double_t cuts[8]);
      25             : 
      26             :   Int_t V0sTracks2CascadeVertices(AliESDEvent *event);
      27             :   Double_t Det(Double_t a00, Double_t a01, Double_t a10, Double_t a11) const;
      28             :   Double_t Det(Double_t a00,Double_t a01,Double_t a02,
      29             :                Double_t a10,Double_t a11,Double_t a12,
      30             :                Double_t a20,Double_t a21,Double_t a22) const;
      31             : 
      32             :   Double_t PropagateToDCA(AliESDv0 *vtx,AliExternalTrackParam *trk,Double_t b);
      33             : 
      34             :   void GetCuts(Double_t cuts[8]) const;
      35             :   static void GetDefaultCuts(Double_t cuts[8]);
      36             : 
      37             : private:
      38             :   static
      39             :   Double_t fgChi2max;   // maximal allowed chi2 
      40             :   static
      41             :   Double_t fgDV0min;    // min. allowed V0 impact parameter
      42             :   static
      43             :   Double_t fgMassWin;   // window around the Lambda mass
      44             :   static
      45             :   Double_t fgDBachMin;  // min. allowed bachelor impact parameter
      46             :   static
      47             :   Double_t fgDCAmax;    // maximal allowed DCA between the V0 and the track 
      48             :   static
      49             :   Double_t fgCPAmin;    // minimal allowed cosine of the cascade pointing angle
      50             :   static
      51             :   Double_t fgRmin, fgRmax;// max & min radii of the fiducial volume
      52             :   
      53             :   Double_t fChi2max;    // maximal allowed chi2 
      54             :   Double_t fDV0min;     // min. allowed V0 impact parameter
      55             :   Double_t fMassWin;    // window around the Lambda mass
      56             :   Double_t fDBachMin;   // min. allowed bachelor impact parameter
      57             :   Double_t fDCAmax;     // maximal allowed DCA between the V0 and the track 
      58             :   Double_t fCPAmin;     // minimal allowed cosine of the cascade pointing angle
      59             :   Double_t fRmin2, fRmax2;// max & min radii^2 of the fiducial volume
      60             :   Double_t fRmaxMargin2;// (rmax+margin)^2  for fast checks
      61             :   
      62         188 :   ClassDef(AliCascadeVertexer,4)  // cascade verterxer 
      63             : };
      64             : 
      65             : inline AliCascadeVertexer::AliCascadeVertexer() 
      66           8 : :TObject(),
      67           8 :   fChi2max(fgChi2max), 
      68           8 :   fDV0min(fgDV0min),
      69           8 :   fMassWin(fgMassWin),
      70           8 :   fDBachMin(fgDBachMin),
      71           8 :   fDCAmax(fgDCAmax),
      72           8 :   fCPAmin(fgCPAmin), 
      73           8 :   fRmin2(fgRmin*fgRmin),
      74           8 :   fRmax2(fgRmax*fgRmax),
      75           8 :   fRmaxMargin2((fgRmax+5)*(fgRmax+5))
      76          40 : {
      77          16 : }
      78             : 
      79             : inline void AliCascadeVertexer::SetCuts(const Double_t cuts[8]) {
      80          16 :   fChi2max=cuts[0]; 
      81           8 :   fDV0min=cuts[1];   fMassWin=cuts[2]; fDBachMin=cuts[3];
      82           8 :   fDCAmax=cuts[4];   fCPAmin=cuts[5];
      83           8 :   fRmin2=cuts[6]*cuts[6]; 
      84           8 :   fRmax2=cuts[7]*cuts[7]; 
      85           8 :   fRmaxMargin2 = (cuts[7]+5)*(cuts[7]+5);
      86           8 : }
      87             : 
      88             : inline void AliCascadeVertexer::SetDefaultCuts(const Double_t cuts[8]) {
      89           0 :   fgChi2max=cuts[0]; 
      90           0 :   fgDV0min=cuts[1];   fgMassWin=cuts[2]; fgDBachMin=cuts[3];
      91           0 :   fgDCAmax=cuts[4];   fgCPAmin=cuts[5];
      92           0 :   fgRmin=cuts[6];     fgRmax=cuts[7]; 
      93           0 : }
      94             : 
      95             : inline void AliCascadeVertexer::GetCuts(Double_t cuts[8]) const {
      96           0 :   cuts[0]=fChi2max; 
      97           0 :   cuts[1]=fDV0min;   cuts[2]=fMassWin;  cuts[3]=fDBachMin;
      98           0 :   cuts[4]=fDCAmax;   cuts[5]=fCPAmin;
      99           0 :   cuts[6]=TMath::Sqrt(fRmin2);     cuts[7]=TMath::Sqrt(fRmax2); 
     100           0 : }
     101             : 
     102             : inline void AliCascadeVertexer::GetDefaultCuts(Double_t cuts[8]) {
     103           0 :   cuts[0]=fgChi2max; 
     104           0 :   cuts[1]=fgDV0min;   cuts[2]=fgMassWin;  cuts[3]=fgDBachMin;
     105           0 :   cuts[4]=fgDCAmax;   cuts[5]=fgCPAmin;
     106           0 :   cuts[6]=fgRmin;     cuts[7]=fgRmax; 
     107           0 : }
     108             : 
     109             : #endif
     110             : 

Generated by: LCOV version 1.11