LCOV - code coverage report
Current view: top level - ITSMFT/MFT/MFTbase - AliMFTCluster.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 39 2.6 %
Date: 2016-06-14 17:26:59 Functions: 1 45 2.2 %

          Line data    Source code
       1             : #ifndef AliMFTCluster_H
       2             : #define AliMFTCluster_H 
       3             : 
       4             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             :  * See cxx source for full Copyright notice                               */
       6             : 
       7             : //====================================================================================================================================================
       8             : //
       9             : //      Class for the description of the clusters of the ALICE Muon Forward Tracker
      10             : //
      11             : //      Contact author: antonio.uras@cern.ch
      12             : //
      13             : //====================================================================================================================================================
      14             : 
      15             : #include "AliMUONRawCluster.h"
      16             : #include "AliMUONVCluster.h"
      17             : #include "AliMFTDigit.h"
      18             : #include "TClonesArray.h"
      19             : #include "TObject.h"
      20             : #include "AliMFTConstants.h"
      21             : 
      22             : //====================================================================================================================================================
      23             : 
      24             : class AliMFTCluster : public TObject {
      25             : 
      26             : public:
      27             : 
      28             :   AliMFTCluster();
      29             :   AliMFTCluster(const AliMFTCluster&);
      30             :   AliMFTCluster& operator=(const AliMFTCluster&);
      31           0 :   virtual ~AliMFTCluster() { if(fDigitsInCluster){fDigitsInCluster->Delete(); delete fDigitsInCluster; fDigitsInCluster=NULL;}}
      32             :   
      33           0 :   virtual void Clear(const Option_t* /*opt*/) { if(fDigitsInCluster) {fDigitsInCluster->Delete(); delete fDigitsInCluster; fDigitsInCluster = 0x0;} }
      34             :   
      35           0 :   void SetXYZ(Double_t x, Double_t y, Double_t z) { fX=x; fY=y; fZ=z; }
      36             :   
      37           0 :   void SetX(Double_t x) { if(fIsClusterEditable) fX = x; }
      38           0 :   void SetY(Double_t y) { if(fIsClusterEditable) fY = y; }
      39           0 :   void SetZ(Double_t z) { if(fIsClusterEditable) fZ = z; }
      40             : 
      41           0 :   Double_t GetX() const { return fX; }
      42           0 :   Double_t GetY() const { return fY; }
      43           0 :   Double_t GetZ() const { return fZ; }
      44             :   
      45           0 :   void SetErrXYZ(Double_t errX, Double_t errY, Double_t errZ) { if(fIsClusterEditable) { fErrX = errX; fErrY = errY; fErrZ = errZ; } }
      46             :        
      47           0 :   void SetErrX(Double_t errX) { if(fIsClusterEditable) fErrX = errX; }
      48           0 :   void SetErrY(Double_t errY) { if(fIsClusterEditable) fErrY = errY; }
      49           0 :   void SetErrZ(Double_t errZ) { if(fIsClusterEditable) fErrZ = errZ; }
      50             : 
      51           0 :   Double_t GetErrX()  const { return fErrX; }
      52           0 :   Double_t GetErrY()  const { return fErrY; }
      53           0 :   Double_t GetErrZ()  const { return fErrZ; }
      54           0 :   Double_t GetErrX2() const { return fErrX*fErrX; }
      55           0 :   Double_t GetErrY2() const { return fErrY*fErrY; }
      56           0 :   Double_t GetErrZ2() const { return fErrZ*fErrZ; }
      57             :   
      58           0 :   void     SetNElectrons(Double_t nElectrons) { if(fIsClusterEditable) fNElectrons = nElectrons; }
      59           0 :   Double_t GetNElectrons() const { return fNElectrons; }
      60             :   
      61             :   void  AddMCLabel(Int_t label);
      62           0 :   Int_t GetNMCTracks() const { return fNMCTracks; }
      63           0 :   Int_t GetMCLabel(Int_t track) const { if (track<fNMCTracks && track>=0) return fMCLabel[track]; else return -1; }
      64           0 :   void  SetMCLabel(Int_t track, Int_t labelMC) { if (track<fNMCTracks && track>=0) fMCLabel[track]=labelMC; }
      65             : 
      66           0 :   void  SetPlane(Int_t plane) { if(fIsClusterEditable) fPlane = plane; }
      67           0 :   Int_t GetPlane() const { return fPlane; }
      68             : 
      69           0 :   void SetDetElemID(Int_t detElemID) { fDetElemID = detElemID; }
      70           0 :   Int_t GetDetElemID() { return fDetElemID; }
      71             : 
      72           0 :   void  SetSize(Int_t size) { if(fIsClusterEditable) fSize = size; }
      73           0 :   Int_t GetSize() const { return fSize; }
      74             : 
      75           0 :   void SetLocalChi2(Double_t chi2) { fLocalChi2 = chi2; }
      76           0 :   void SetTrackChi2(Double_t chi2) { fTrackChi2 = chi2; }
      77             : 
      78           0 :   Double_t GetLocalChi2() { return fLocalChi2; }
      79           0 :   Double_t GetTrackChi2() { return fTrackChi2; }
      80             : 
      81             :   Bool_t AddPixel(AliMFTDigit *pixel);
      82             : 
      83           0 :   Bool_t IsClusterEditable() { return fIsClusterEditable; }
      84           0 :   void SetClusterEditable(Bool_t isClusterEditable) { fIsClusterEditable = isClusterEditable; }
      85             :   void TerminateCluster();
      86             : 
      87             :   Double_t GetDistanceFromPixel(AliMFTDigit *pixel);
      88             : 
      89           0 :   void SetClusterFront(Bool_t clusterFront) { if(fIsClusterEditable) fIsClusterFront = clusterFront; }
      90           0 :   Bool_t IsClusterFront() { return fIsClusterFront; }
      91             : 
      92             :   AliMUONRawCluster* CreateMUONCluster();
      93             :   
      94             : private:
      95             : 
      96             :   static const Int_t fNMaxMCTracks         = AliMFTConstants::fNMaxMCTracksPerCluster;
      97             :   static const Int_t fNMaxDigitsPerCluster = AliMFTConstants::fNMaxDigitsPerCluster;
      98             :   
      99             :   Double_t fX, fY, fZ;   // cluster global coordinates
     100             :   Double_t fErrX, fErrY, fErrZ;
     101             : 
     102             :   Double_t fNElectrons;
     103             :   Int_t fNMCTracks;
     104             :   Int_t fPlane, fDetElemID;
     105             :   Int_t fMCLabel[fNMaxMCTracks];
     106             : 
     107             :   Int_t fSize;   // the number of digits composing the cluster
     108             : 
     109             :   Double_t fTrackChi2; // Chi2 of the track when the associated cluster was attached
     110             :   Double_t fLocalChi2; // Local chi2 of the associated cluster with respect to the track
     111             :   
     112             :   TClonesArray *fDigitsInCluster;   //! (Temporary) Array of the digits composing the cluster
     113             : 
     114             :   Bool_t fIsClusterEditable, fIsClusterFront;
     115             : 
     116          14 :   ClassDef(AliMFTCluster, 1)
     117             : 
     118             : };
     119             : 
     120             : //====================================================================================================================================================
     121             :         
     122             : #endif
     123             : 

Generated by: LCOV version 1.11