1 #ifndef ALIMULTIPLICITY_H
2 #define ALIMULTIPLICITY_H
8 ////////////////////////////////////////////////////////
9 //// Class containing multiplicity information //
10 //// to stored in the ESD //
11 ////////////////////////////////////////////////////////
13 class AliMultiplicity : public TObject {
17 AliMultiplicity(); // default constructor
18 // standard constructor
19 AliMultiplicity(Int_t ntr,Float_t *t, Float_t *ph, Float_t *df, Int_t *labels,
20 Int_t* labelsL2, Int_t ns, Float_t *ts, Float_t *ps, Short_t nfcL1, Short_t nfcL2, TBits fFastOrFiredChips);
21 AliMultiplicity(const AliMultiplicity& m);
22 AliMultiplicity& operator=(const AliMultiplicity& m);
23 virtual void Copy(TObject &obj) const;
24 virtual ~AliMultiplicity();
25 // methods to access tracklet information
26 Int_t GetNumberOfTracklets() const {return fNtracks;}
27 Double_t GetTheta(Int_t i) const { if(i>=0 && i<fNtracks) {return fTh[i];}
28 else {Error("GetTheta","Invalid track number %d",i); return -9999.;}}
29 Double_t GetEta(Int_t i) const { if(i>=0 && i<fNtracks) {return -TMath::Log(TMath::Tan(fTh[i]/2.));}
30 else {Error("GetTheta","Invalid track number %d",i); return -9999.;}}
31 Double_t GetPhi(Int_t i) const { if(i>=0 && i<fNtracks) {return fPhi[i];}
32 else {Error("GetPhi","Invalid track number %d",i); return -9999.;}}
33 Double_t GetDeltaPhi(Int_t i) const {if(i>=0 && i<fNtracks) {return fDeltPhi[i];}
34 else {Error("GetDeltaPhi","Invalid track number %d",i); return -9999.;}}
36 Int_t GetLabel(Int_t i, Int_t layer) const;
38 // methods to access single cluster information
39 Int_t GetNumberOfSingleClusters() const {return fNsingle;}
40 Double_t GetThetaSingle(Int_t i) const { if(i>=0 && i<fNsingle) {return fThsingle[i];}
41 else {Error("GetThetaSingle","Invalid cluster number %d",i); return -9999.;}}
42 Double_t GetPhiSingle(Int_t i) const { if(i>=0 && i<fNsingle) {return fPhisingle[i];}
43 else {Error("GetPhisingle","Invalid cluster number %d",i); return -9999.;}}
45 Short_t GetNumberOfFiredChips(Int_t layer) const { return fFiredChips[layer]; }
46 void SetFiredChips(Int_t layer, Short_t firedChips) { fFiredChips[layer] = firedChips; }
48 void SetFastOrFiredChips(UInt_t chipKey){fFastOrFiredChips.SetBitNumber(chipKey);}
49 TBits GetFastOrFiredChips() const {return fFastOrFiredChips;}
50 Bool_t TestFastOrFiredChips(UInt_t chipKey) const {return fFastOrFiredChips.TestBitNumber(chipKey);}
53 void Duplicate(const AliMultiplicity &m); // used by copy ctr.
55 Int_t fNtracks; // Number of tracklets
56 Int_t fNsingle; // Number of clusters on SPD layer 1, not associated
57 // with a tracklet on SPD layer 2
58 Int_t *fLabels; //[fNtracks] array with labels of cluster in L1 used for tracklet
59 Int_t *fLabelsL2; //[fNtracks] array with labels of cluster in L2 used for tracklet
60 Double32_t *fTh; //[fNtracks] array with theta values
61 Double32_t *fPhi; //[fNtracks] array with phi values
62 Double32_t *fDeltPhi; //[fNtracks] array with delta phi values
63 Double32_t *fThsingle; //[fNsingle] array with theta values of L1 clusters
64 Double32_t *fPhisingle; //[fNsingle] array with phi values of L2 clusters
65 Short_t fFiredChips[2]; // Number of fired chips in the two SPD layers
67 TBits fFastOrFiredChips; // Map of FastOr fired chips
69 ClassDef(AliMultiplicity,8);
72 inline Int_t AliMultiplicity::GetLabel(Int_t i, Int_t layer) const
74 if(i>=0 && i<fNtracks) {
77 } else if (layer == 1) {
81 Warning("GetLabel", "No information for layer 2 available !");
85 Error("GetLabel","Invalid layer number %d",layer); return -9999;
88 Error("GetLabel","Invalid track number %d",i); return -9999;