LCOV - code coverage report
Current view: top level - TRD/TRDbase - AliTRDtrackletMCM.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 16 44 36.4 %
Date: 2016-06-14 17:26:59 Functions: 17 46 37.0 %

          Line data    Source code
       1             : #ifndef ALITRDTRACKLETMCM_H
       2             : #define ALITRDTRACKLETMCM_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : /* $Id: AliTRDtrackletMCM.h 27496 2008-07-22 08:35:45Z cblume $ */
       7             : 
       8             : //-----------------------------------
       9             : //
      10             : // TRD tracklet word (as from FEE)
      11             : // only 32-bit of information + detector ID
      12             : //
      13             : //----------------------------------
      14             : 
      15             : #include "AliTRDtrackletBase.h"
      16             : #include "AliTRDgeometry.h"
      17             : #include "AliTRDpadPlane.h"
      18             : 
      19             : class AliTRDtrackletMCM : public AliTRDtrackletBase {
      20             :  public:
      21             :   AliTRDtrackletMCM(UInt_t trackletWord = 0);
      22             :   AliTRDtrackletMCM(UInt_t trackletWword, Int_t hcid);
      23             :   AliTRDtrackletMCM(UInt_t trackletWword, Int_t hcid, Int_t rob, Int_t mcm);
      24             :   AliTRDtrackletMCM(const AliTRDtrackletMCM &rhs);
      25             :   ~AliTRDtrackletMCM();
      26             : 
      27             :   // ----- Getters for contents of tracklet word -----
      28             :   Int_t GetYbin() const;
      29             :   Int_t GetdY() const;
      30        5336 :   Int_t GetZbin() const { return ((fTrackletWord >> 20) & 0xf); }
      31         146 :   Int_t GetPID() const { return ((fTrackletWord >> 24) & 0xff); }
      32             : 
      33             :   // ----- Getters for MCM-tracklet information -----
      34           0 :   Int_t GetMCM() const { return fMCM; }
      35           0 :   Int_t GetROB() const { return fROB; }
      36         866 :   Int_t GetLabel() const { return fLabel[0]; }
      37           0 :   Int_t GetLabel(const Int_t i) const { return fLabel[i]; }
      38           0 :   Bool_t HasLabel(const Int_t label) const { return (fLabel[0] == label || fLabel[1] == label || fLabel[2] == label); }
      39             : 
      40             :   // ----- Getters for offline corresponding values -----
      41           0 :   Bool_t CookPID() { return kFALSE; }
      42         146 :   Double_t GetPID(Int_t /* is */) const { return GetPID()/256.; }
      43        1908 :   Int_t GetDetector() const { return fHCId / 2; }
      44        2872 :   Int_t GetHCId() const { return fHCId; }
      45           0 :   Float_t GetdYdX() const { return (GetdY() * 140e-4 / 3.); }
      46           0 :   Float_t GetX() const { return fGeo->GetTime0((fHCId % 12) / 2); }
      47           0 :   Float_t GetY() const { return (GetYbin() * 160e-4); }
      48           0 :   Float_t GetZ() const { return fGeo->GetPadPlane((fHCId % 12) / 2, (fHCId / 12) % 5)->GetRowPos( 4 * (fROB / 2) + fMCM / 4) -
      49           0 :       fGeo->GetPadPlane((fHCId % 12) / 2, (fHCId /12) % 5)->GetRowSize(4 * (fROB / 2) + fMCM / 4) * .5; }
      50           0 :   Float_t GetLocalZ() const { return GetZ() -
      51           0 :       (fGeo->GetPadPlane((fHCId % 12) / 2, (fHCId / 12) % 5)->GetRow0()+fGeo->GetPadPlane((fHCId % 12) / 2, (fHCId / 12) % 5)->GetRowEnd())/2.; }
      52             : 
      53           0 :   Int_t GetQ0() const { return fQ0; }
      54           0 :   Int_t GetQ1() const { return fQ1; }
      55           0 :   Int_t GetNHits() const { return fNHits; }
      56           0 :   Int_t GetNHits0() const { return fNHits0; }
      57           0 :   Int_t GetNHits1() const { return fNHits1; }
      58             : 
      59        1438 :   UInt_t GetTrackletWord() const { return fTrackletWord; }
      60           0 :   void SetTrackletWord(UInt_t trackletWord) { fTrackletWord = trackletWord; }
      61             : 
      62           0 :   void SetDetector(Int_t id) { fHCId = 2 * id + (GetYbin() < 0 ? 0 : 1); }
      63           0 :   void SetHCId(Int_t id) { fHCId = id; }
      64           0 :   void SetMCM(Int_t mcm) { fMCM = mcm; }
      65           0 :   void SetROB(Int_t rob) { fROB = rob; }
      66             :   void SetLabel(Int_t label[]);
      67        1438 :   void SetQ0(Int_t charge) { fQ0 = charge; }
      68        1438 :   void SetQ1(Int_t charge) { fQ1 = charge; }
      69        1438 :   void SetNHits(Int_t nhits) { fNHits = nhits; }
      70        1438 :   void SetNHits0(Int_t nhits) { fNHits0 = nhits; }
      71        1438 :   void SetNHits1(Int_t nhits) { fNHits1 = nhits; }
      72             : 
      73        1438 :   void SetSlope(Float_t slope) { fSlope = slope; }
      74        1438 :   void SetOffset(Float_t offset) { fOffset = offset; }
      75        1438 :   void SetError(Float_t error) { fError = error; }
      76             :   void SetClusters(Float_t *res, Float_t *q, Int_t n);
      77             : 
      78           0 :   Float_t GetSlope() const { return fSlope; }
      79           0 :   Float_t GetOffset() const { return fOffset; }
      80           0 :   Float_t GetError() const { return fError; }
      81           0 :   Int_t   GetNClusters() const { return fNClusters; }
      82           0 :   Float_t *GetResiduals() const { return fResiduals; }
      83           0 :   Float_t *GetClsCharges() const { return fClsCharges; }
      84             : 
      85             :  protected:
      86             :   AliTRDgeometry *fGeo; //! TRD geometry
      87             : 
      88             :   Int_t fHCId;                  // half-chamber ID (only transient)
      89             :   UInt_t fTrackletWord;         // tracklet word: PID | Z | deflection length | Y
      90             :                                 //          bits:  12   4            7          13
      91             :   Int_t fMCM; // MCM no. in which the tracklet was found
      92             :   Int_t fROB; // ROB no. on which the tracklet was found
      93             : 
      94             :   Int_t fQ0; // accumulated charge in the first time window
      95             :   Int_t fQ1; // accumulated charge in the second time window
      96             : 
      97             :   Int_t fNHits;  // no. of contributing clusters
      98             :   Int_t fNHits0; // no. of contributing clusters in window 0
      99             :   Int_t fNHits1; // no. of contributing clusters in window 1
     100             : 
     101             :   Int_t fLabel[3]; // up to 3 labels for MC track
     102             : 
     103             :   Float_t  fSlope;            // tracklet slope
     104             :   Float_t  fOffset;           // tracklet offset
     105             :   Float_t  fError;            // tracklet error
     106             :   Int_t    fNClusters;        // no. of clusters
     107             :   Float_t *fResiduals;        //[fNClusters] cluster to tracklet residuals
     108             :   Float_t *fClsCharges;       //[fNClusters] cluster charge
     109             : 
     110             :  private:
     111             :   AliTRDtrackletMCM& operator=(const AliTRDtrackletMCM &rhs);   // not implemented
     112             : 
     113         922 :   ClassDef(AliTRDtrackletMCM, 2);
     114             : };
     115             : 
     116             : #endif

Generated by: LCOV version 1.11