]>
Commit | Line | Data |
---|---|---|
9a003bdc | 1 | #ifndef ALIVMULTIPLICITY_H |
2 | #define ALIVMULTIPLICITY_H | |
3 | ||
4 | #include <TNamed.h> | |
5 | #include <TMath.h> | |
6 | ||
7 | ||
8 | ////////////////////////////////////////////////////////// | |
9 | // // | |
10 | // Base virtual class for multiplicity information // | |
11 | // // | |
12 | ////////////////////////////////////////////////////////// | |
13 | ||
14 | class AliVMultiplicity : public TNamed { | |
15 | ||
16 | public: | |
17 | // | |
18 | enum {kMultTrackRefs =BIT(14), // in new format (old is default for bwd.comp.) multiple cluster->track references are allowed | |
19 | kScaleDThtbySin2=BIT(15), // scale Dtheta by 1/sin^2(theta). Default is DON'T scale, for bwd.comp. | |
20 | kSPD2Sng =BIT(16) // are SPD2 singles stored? | |
21 | }; | |
22 | // | |
23 | AliVMultiplicity() {} | |
24 | AliVMultiplicity(const char* name, const char* title) : TNamed(name,title) {} | |
25 | AliVMultiplicity(const AliVMultiplicity& m) : TNamed(m) {} | |
26 | AliVMultiplicity& operator=(const AliVMultiplicity& m) {if (this!=&m) TNamed::operator=(m); return *this;} | |
27 | virtual ~AliVMultiplicity() {} | |
28 | // | |
29 | // methods to access tracklet information | |
30 | Bool_t GetMultTrackRefs() const {return TestBit(kMultTrackRefs);} | |
31 | Bool_t GetScaleDThetaBySin2T() const {return TestBit(kScaleDThtbySin2);} | |
32 | void SetMultTrackRefs(Bool_t v) {SetBit(kMultTrackRefs,v);} | |
33 | void SetScaleDThetaBySin2T(Bool_t v) {SetBit(kScaleDThtbySin2,v);} | |
34 | // | |
35 | virtual void Clear(Option_t* opt=""); | |
36 | // | |
37 | virtual Int_t GetNumberOfTracklets() const = 0; | |
38 | virtual Double_t GetTheta(Int_t i) const = 0; | |
39 | virtual Double_t GetPhi(Int_t i) const = 0; | |
40 | virtual Double_t GetDeltaPhi(Int_t i) const = 0; | |
41 | virtual Int_t GetLabel(Int_t i, Int_t layer) const = 0; | |
42 | virtual void SetLabel(Int_t i, Int_t layer, Int_t label) = 0; | |
43 | Double_t GetEta(Int_t i) const | |
44 | { | |
45 | if(i>=0 && i<GetNumberOfTracklets()) return -TMath::Log(TMath::Tan(GetTheta(i)/2.)); | |
46 | Error("GetEta","Invalid track number %d",i); return -9999.; | |
47 | } | |
48 | // | |
49 | // array getters | |
50 | virtual Double_t* GetTheta() const = 0; | |
51 | virtual Double_t* GetPhi() const = 0; | |
52 | virtual Double_t* GetDeltPhi() const = 0; | |
53 | virtual Int_t* GetLabels() const = 0; | |
54 | virtual Int_t* GetLabels2() const = 0; | |
55 | // | |
56 | virtual void Print(Option_t *opt="") const = 0; | |
57 | // | |
58 | ClassDef(AliVMultiplicity,1); | |
59 | }; | |
60 | ||
61 | ||
62 | #endif |