]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MFT/AliMFTDigit.h
Fix for coverity (AdC)
[u/mrichter/AliRoot.git] / MFT / AliMFTDigit.h
1 #ifndef AliMFTDigit_H
2 #define AliMFTDigit_H
3
4 /* Copyright(c) 2004-2006, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice     */
6
7 //====================================================================================================================================================
8 //
9 //      Digit description for the ALICE Muon Forward Tracker
10 //
11 //      Contact author: antonio.uras@cern.ch
12 //
13 //====================================================================================================================================================
14
15 #include "AliDigit.h"
16 #include "AliMFTConstants.h"
17
18 //====================================================================================================================================================
19
20 class AliMFTDigit: public AliDigit {
21
22 public:
23
24   AliMFTDigit();
25
26   virtual ~AliMFTDigit() {}
27
28   void AddOffset2TrackID(Int_t offset) { for(Int_t iTr=0; iTr<fNMCTracks; iTr++) if (fMCLabel[iTr]>0) fMCLabel[iTr]+=offset; }  // needed for merging (?)
29     
30   void SetPlane(Int_t plane) { fPlane = plane; }
31   void SetDetElemID(Int_t detElemID) { fDetElemID = detElemID; }
32   void SetPixID(Int_t pixelX, Int_t pixelY, Int_t pixelZ) { fPixelX = pixelX;  fPixelY = pixelY; fPixelZ = pixelZ; }
33   void SetPixCenter(Double_t pixelCenterX, Double_t pixelCenterY, Double_t pixelCenterZ) { 
34     fPixelCenterX = pixelCenterX;  
35     fPixelCenterY = pixelCenterY; 
36     fPixelCenterZ = pixelCenterZ; 
37   }
38   void SetPixWidth(Double_t pixelWidthX, Double_t pixelWidthY, Double_t pixelWidthZ) { 
39     fPixelWidthX = pixelWidthX;  
40     fPixelWidthY = pixelWidthY;
41     fPixelWidthZ = pixelWidthZ; 
42   }
43   void SetEloss(Double_t sig) { fEloss = sig; fNElectrons = fEloss/fElossPerElectron; }
44
45   void  AddMCLabel(Int_t label); 
46
47   Int_t GetNMCTracks() const { return fNMCTracks; }
48   Int_t GetMCLabel(Int_t track) const { if (track<fNMCTracks && track>=0 && fNMCTracks>0) return fMCLabel[track]; else return -1; }
49
50   Double_t  GetEloss()         const { return fEloss; }
51   Double_t  GetNElectrons()    const { return fNElectrons; }
52   Int_t     GetPlane()         const { return fPlane; }
53   Int_t     GetDetElemID()     const { return fDetElemID; }
54   Int_t     GetPixelX()        const { return fPixelX; }
55   Int_t     GetPixelY()        const { return fPixelY; }
56   Int_t     GetPixelZ()        const { return fPixelZ; }
57   Double_t  GetPixelCenterX()  const { return fPixelCenterX; }
58   Double_t  GetPixelCenterY()  const { return fPixelCenterY; }
59   Double_t  GetPixelCenterZ()  const { return fPixelCenterZ; }
60   Double_t  GetPixelWidthX()   const { return fPixelWidthX; }
61   Double_t  GetPixelWidthY()   const { return fPixelWidthY; }
62   Double_t  GetPixelWidthZ()   const { return fPixelWidthZ; }
63
64 protected:
65     
66   static const Double_t fElossPerElectron;
67   static const Int_t fNMaxMCTracksPerDigit = AliMFTConstants::fNMaxMCTracksPerDigit;
68   
69   Int_t fNMCTracks;
70
71   Int_t fPixelX;
72   Int_t fPixelY;  
73   Int_t fPixelZ;
74   Double_t fPixelCenterX;
75   Double_t fPixelCenterY;
76   Double_t fPixelCenterZ;
77   Double_t fPixelWidthX;
78   Double_t fPixelWidthY;
79   Double_t fPixelWidthZ;
80   Int_t fPlane;     
81   Int_t fDetElemID;     
82   Double_t fEloss;       // total signal as Eloss in the medium
83   Double_t fNElectrons; 
84   
85   Int_t fMCLabel[fNMaxMCTracksPerDigit];
86
87   ClassDef(AliMFTDigit,3)
88
89 };
90
91 //====================================================================================================================================================
92
93 #endif