]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliMultiplicity.h
ALL QA naming conventions and files in AliQA
[u/mrichter/AliRoot.git] / STEER / AliMultiplicity.h
1 #ifndef ALIMULTIPLICITY_H
2 #define ALIMULTIPLICITY_H
3
4 #include<TObject.h>
5
6 ////////////////////////////////////////////////////////
7 ////   Class containing multiplicity information      //
8 ////   to stored in the ESD                           //
9 ////////////////////////////////////////////////////////
10
11 class AliMultiplicity : public TObject {
12
13  public:
14
15   AliMultiplicity();               // default constructor
16   // standard constructor
17   AliMultiplicity(Int_t ntr,Float_t *t, Float_t *ph, Float_t *df, Int_t *labels,
18                   Int_t ns, Float_t *ts, Float_t *ps);
19   AliMultiplicity(const AliMultiplicity& m);
20   AliMultiplicity& operator=(const AliMultiplicity& m);
21   virtual ~AliMultiplicity();
22 // methods to access tracklet information
23   Int_t GetNumberOfTracklets() const {return fNtracks;}
24   Double_t GetTheta(Int_t i) const { if(i>=0 && i<fNtracks) {return fTh[i];}
25   else {Error("GetTheta","Invalid track number %d",i); return -9999.;}}
26   Double_t GetPhi(Int_t i) const { if(i>=0 && i<fNtracks) {return fPhi[i];}
27   else {Error("GetPhi","Invalid track number %d",i); return -9999.;}}
28   Double_t GetDeltaPhi(Int_t i) const {if(i>=0 && i<fNtracks) {return fDeltPhi[i];}
29   else {Error("GetDeltaPhi","Invalid track number %d",i); return -9999.;}}
30   Int_t GetLabel(Int_t i) const {if(i>=0 && i<fNtracks) {return fLabels[i];}
31   else {Error("GetLabel","Invalid track number %d",i); return -9999;}}
32 // methods to access single cluster information
33   Int_t GetNumberOfSingleClusters() const {return fNsingle;}
34   Double_t GetThetaSingle(Int_t i) const { if(i>=0 && i<fNsingle) {return fThsingle[i];}
35   else {Error("GetThetaSingle","Invalid cluster number %d",i); return -9999.;}}
36   Double_t GetPhiSingle(Int_t i) const { if(i>=0 && i<fNsingle) {return fPhisingle[i];}
37   else {Error("GetPhisingle","Invalid cluster number %d",i); return -9999.;}}
38
39   Short_t GetFiredChips(Int_t layer) { return fFiredChips[layer]; }
40   void SetFiredChips(Int_t layer, Short_t firedChips) { fFiredChips[layer] = firedChips; }
41
42   protected:
43   void Duplicate(const AliMultiplicity &m);  // used by copy ctr.
44
45   Int_t fNtracks;            // Number of tracklets
46   Int_t fNsingle;            // Number of clusters on SPD layer 1, not associated
47   Int_t *fLabels;            //[fNtracks] array with labels of tracklets
48                              // with a tracklet on SPD layer 2
49   Double32_t *fTh;           //[fNtracks] array with theta values
50   Double32_t *fPhi;          //[fNtracks] array with phi values
51   Double32_t *fDeltPhi;      //[fNtracks] array with delta phi values
52   Double32_t *fThsingle;     //[fNsingle] array with theta values of L1 clusters
53   Double32_t *fPhisingle;    //[fNsingle] array with phi values of L2 clusters
54   Short_t fFiredChips[2]; // number of fired chips in the two SPD layers
55
56   ClassDef(AliMultiplicity,6);
57 };
58
59 #endif