LCOV - code coverage report
Current view: top level - ITS/ITSrec - AliITSSumTP.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 27 3.7 %
Date: 2016-06-14 17:26:59 Functions: 1 26 3.8 %

          Line data    Source code
       1             : #ifndef ALIITSSUMTP_H
       2             : #define ALIITSSUMTP_H
       3             : 
       4             : ///////////////////////////////////////////////////////////////////
       5             : //                                                               //
       6             : // Class for ITS trackpoints summary + some aux. info  )         //
       7             : // Author: Ruben Shahoian                                        //
       8             : //                                                               //
       9             : ///////////////////////////////////////////////////////////////////
      10             : 
      11             : /* $Id$ */
      12             : 
      13             : class AliTrackPointArray;
      14             : #include <TObjArray.h>
      15             : #include "AliESDVertex.h"
      16             : 
      17             : class AliITSSumTP : public TObject
      18             : {
      19             :  public:
      20             :   enum {kCrvTPC,kCrvTPCErr,kCrvGlo,kCrvGloErr,kNVarPerTrack};
      21             :   enum {kTPCInX,kTPCInY,kTPCInZ,kTPCSpare};
      22             :   //
      23           0 :   AliITSSumTP() : fTracks(0),fVertex(),fNVars(0),fCrvVars(0),fTPCVars(0) {fTracks.SetOwner(kTRUE);}
      24             :   AliITSSumTP(const AliITSSumTP& src);
      25           0 :   virtual ~AliITSSumTP() {Reset();}
      26             :   AliITSSumTP &operator=(const  AliITSSumTP& src);
      27             :   virtual void Print(Option_t* opt="") const;
      28             :   //
      29           0 :   AliESDVertex& GetVertex()             const {return (AliESDVertex&)fVertex;}
      30           0 :   AliTrackPointArray* GetTrack(Int_t i) const {return (AliTrackPointArray*)fTracks[i];}
      31           0 :   TObjArray&   GetTracks()              const {return (TObjArray&) fTracks;}
      32           0 :   Int_t        GetNTracks()             const {return fNVars/kNVarPerTrack;}
      33           0 :   Double_t     GetCrvTPC(Int_t i)       const {return fCrvVars[i*kNVarPerTrack+kCrvTPC];}
      34           0 :   Double_t     GetCrvTPCErr(Int_t i)    const {return fCrvVars[i*kNVarPerTrack+kCrvTPCErr];}
      35           0 :   Double_t     GetCrvGlo(Int_t i)       const {return fCrvVars[i*kNVarPerTrack+kCrvGlo];}
      36           0 :   Double_t     GetCrvGloErr(Int_t i)    const {return fCrvVars[i*kNVarPerTrack+kCrvGloErr];}
      37             :   void         GetTPCInnerXYZ(int i, double* xyz) const;
      38             :   void         SetTPCInnerXYZ(int i, const double* xyz);
      39             :   //
      40             :   void         Reset();
      41             :   void         BookNTracks(Int_t n);
      42           0 :   void         SetCrvTPC(Int_t i, Double_t v)       {fCrvVars[i*kNVarPerTrack+kCrvTPC] = v;}
      43           0 :   void         SetCrvTPCErr(Int_t i, Double_t v)    {fCrvVars[i*kNVarPerTrack+kCrvTPCErr] = v;}
      44           0 :   void         SetCrvGlo(Int_t i, Double_t v)       {fCrvVars[i*kNVarPerTrack+kCrvGlo] = v;}
      45           0 :   void         SetCrvGloErr(Int_t i, Double_t v)    {fCrvVars[i*kNVarPerTrack+kCrvGloErr] = v;}
      46           0 :   void         AddTrack(AliTrackPointArray* trc)    {fTracks.AddLast((TObject*)trc);}
      47           0 :   void         SetVertex(const AliESDVertex* vtx)   {fVertex = *vtx;}
      48             :   //
      49             :  protected:
      50             :   //
      51             :   TObjArray    fTracks;               // TrackPoints
      52             :   AliESDVertex fVertex;               // ESD Vertex
      53             :   Int_t        fNVars;                // Ntracks*kNVarPerTrack
      54             :   Double32_t*  fCrvVars;               //[fNVars];
      55             :   Double32_t*  fTPCVars;               //[fNVars];
      56             : 
      57             : 
      58         116 :   ClassDef(AliITSSumTP,2)
      59             : };
      60             : 
      61             : 
      62             : //---------------------------------------------------------------
      63             : inline void AliITSSumTP::GetTPCInnerXYZ(int i, double* xyz) const
      64             : {
      65             :   // get tpc inner coordinates
      66           0 :   if (!fTPCVars) {xyz[0]=xyz[1]=xyz[2]=0; return;}  // for BWD compatibility
      67           0 :   xyz[0] = fTPCVars[i*kNVarPerTrack+kTPCInX];
      68           0 :   xyz[1] = fTPCVars[i*kNVarPerTrack+kTPCInY];
      69           0 :   xyz[2] = fTPCVars[i*kNVarPerTrack+kTPCInZ];
      70           0 : }
      71             : 
      72             : //---------------------------------------------------------------
      73             : inline void AliITSSumTP::SetTPCInnerXYZ(int i, const double* xyz)
      74             : {
      75             :   // Set tpc inner coordinates
      76           0 :   if (!fTPCVars) return; // for BWD compatibility
      77           0 :   fTPCVars[i*kNVarPerTrack+kTPCInX] = xyz[0];
      78           0 :   fTPCVars[i*kNVarPerTrack+kTPCInY] = xyz[1];
      79           0 :   fTPCVars[i*kNVarPerTrack+kTPCInZ] = xyz[2];
      80           0 : }
      81             : 
      82             : 
      83             : #endif
      84             : 

Generated by: LCOV version 1.11