LCOV - code coverage report
Current view: top level - STEER/ESD - AliESDMuonCluster.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 6 23 26.1 %
Date: 2016-06-14 17:26:59 Functions: 7 27 25.9 %

          Line data    Source code
       1             : #ifndef ALIESDMUONCLUSTER_H
       2             : #define ALIESDMUONCLUSTER_H
       3             : 
       4             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             : * See cxx source for full Copyright notice                               */
       6             : 
       7             : // $Id$
       8             : 
       9             : /// \class AliESDMuonCluster
      10             : /// \brief Class to describe the MUON clusters in the Event Summary Data
      11             : //  Author Philippe Pillot, Subatech
      12             : 
      13             : 
      14             : #include <TObject.h>
      15             : #include <TArrayI.h>
      16             : 
      17             : class AliESDEvent;
      18             : class TClonesArray;
      19             : 
      20             : class AliESDMuonCluster : public TObject {
      21             : public:
      22             :   AliESDMuonCluster(); // Constructor
      23             :   virtual ~AliESDMuonCluster(); //< Destructor
      24             :   AliESDMuonCluster(const AliESDMuonCluster& cluster);
      25             :   AliESDMuonCluster& operator=(const AliESDMuonCluster& cluster);
      26             :   virtual void Copy(TObject &obj) const;
      27             :   
      28             :   virtual void Clear(Option_t* opt = "");
      29             :   
      30             :   /// Set coordinates (cm)
      31         324 :   void     SetXYZ(Double_t x, Double_t y, Double_t z) {fXYZ[0] = x; fXYZ[1] = y; fXYZ[2] = z;}
      32             :   /// Return X-position (cm)
      33           0 :   Double_t GetX() const {return fXYZ[0];}
      34             :   /// Return Y-position (cm)
      35           0 :   Double_t GetY() const {return fXYZ[1];}
      36             :   /// Return Z-position (cm)
      37           0 :   Double_t GetZ() const {return fXYZ[2];}
      38             :   
      39             :   /// Set (X,Y) resolution (cm)
      40         324 :   void     SetErrXY(Double_t errX, Double_t errY) {fErrXY[0] = errX; fErrXY[1] = errY;}
      41             :   /// Return X-resolution (cm)
      42           0 :   Double_t GetErrX() const  {return fErrXY[0];}
      43             :   /// Return X-resolution**2 (cm**2)
      44           0 :   Double_t GetErrX2() const {return fErrXY[0]*fErrXY[0];}
      45             :   /// Return Y-resolution (cm)
      46           0 :   Double_t GetErrY() const  {return fErrXY[1];}
      47             :   /// Return Y-resolution**2 (cm**2)
      48           0 :   Double_t GetErrY2() const {return fErrXY[1]*fErrXY[1];}
      49             :   
      50             :   /// Set the total charge
      51         324 :   void     SetCharge(Double_t charge) {fCharge = charge;}
      52             :   /// Return the total charge
      53           0 :   Double_t GetCharge() const {return fCharge;}
      54             :   
      55             :   /// Set the chi2 value
      56         324 :   void     SetChi2(Double_t chi2) {fChi2 = chi2;}
      57             :   /// Return the chi2 value
      58           0 :   Double_t GetChi2() const {return fChi2;}
      59             :   
      60             :   /// Return chamber id (0..), part of the uniqueID
      61           0 :   Int_t    GetChamberId() const    {return (GetUniqueID() & 0xF0000000) >> 28;}
      62             :   /// Return detection element id, part of the uniqueID
      63           0 :   Int_t    GetDetElemId() const    {return (GetUniqueID() & 0x0FFE0000) >> 17;}
      64             :   /// Return the index of this cluster (0..), part of the uniqueID
      65           0 :   Int_t    GetClusterIndex() const {return (GetUniqueID() & 0x0001FFFF);}
      66             :   
      67             :   // Add the given pad Id to the list associated to the cluster
      68             :   void     AddPadId(UInt_t padId);
      69             :   // Fill the list pads'Id associated to the cluster with the given list
      70             :   void     SetPadsId(Int_t nPads, const UInt_t *padsId);
      71             :   /// Return the number of pads associated to this cluster
      72           0 :   Int_t    GetNPads() const {return fNPads;}
      73             :   /// Return the Id of pad i
      74           0 :   UInt_t   GetPadId(Int_t i) const {return (fPadsId && i >= 0 && i < fNPads) ? static_cast<UInt_t>(fPadsId->At(i)) : 0;}
      75             :   /// Return the array of pads'Id
      76           0 :   const UInt_t* GetPadsId() const {return fPadsId ? reinterpret_cast<UInt_t*>(fPadsId->GetArray()) : 0x0;}
      77             :   /// Return kTrue if the pads'Id are stored
      78           0 :   Bool_t   PadsStored() const {return (fNPads > 0);}
      79             :   
      80             :   // Transfer pads to the new ESD structure
      81             :   void     MovePadsToESD(AliESDEvent &esd);
      82             :   
      83             :   /// Set the corresponding MC track number
      84         324 :   void  SetLabel(Int_t label) {fLabel = label;}
      85             :   /// Return the corresponding MC track number
      86           0 :   Int_t GetLabel() const {return fLabel;}
      87             :   
      88             :   void     Print(Option_t */*option*/ = "") const;
      89             :   
      90             :   
      91             : protected:
      92             :   Double32_t fXYZ[3];   ///< cluster position
      93             :   Double32_t fErrXY[2]; ///< transverse position errors
      94             :   Double32_t fCharge;   ///< cluster charge
      95             :   Double32_t fChi2;     ///< cluster chi2
      96             :   
      97             :   mutable TClonesArray* fPads;  ///< Array of pads attached to the cluster -- deprecated
      98             :   
      99             :   Int_t    fNPads;  ///< number of pads attached to the cluster
     100             :   TArrayI* fPadsId; ///< array of Ids of pads attached to the cluster
     101             :   
     102             :   Int_t fLabel; ///< point to the corresponding MC track
     103             :   
     104             :   
     105         180 :   ClassDef(AliESDMuonCluster, 4) // MUON ESD cluster class
     106             : };
     107             : 
     108             : #endif

Generated by: LCOV version 1.11