AliRoot Core  edcc906 (edcc906)
AliVMultiplicity.h
Go to the documentation of this file.
1 #ifndef ALIVMULTIPLICITY_H
2 #define ALIVMULTIPLICITY_H
3 
4 #include <TNamed.h>
5 #include <TMath.h>
6 class TBits;
7 
9 // //
10 // Base virtual class for multiplicity information //
11 // //
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  //
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 Short_t GetNumberOfFiredChips(Int_t) const = 0;
57  virtual void SetFiredChips(Int_t, Short_t) = 0;
58  virtual void SetFastOrFiredChips(UInt_t ) = 0;
59  virtual void SetFastOrFiredChipMap(const TBits&) = 0;
60  virtual const TBits& GetFastOrFiredChips() const = 0;
61  virtual const TBits& GetFastOrFiredChipMap() const {return GetFastOrFiredChips();}
62  virtual Bool_t TestFastOrFiredChips(UInt_t) const = 0;
63  virtual void SetFiredChipMap(const TBits &) = 0;
64  virtual void SetFiredChipMap(UInt_t) = 0;
65  virtual const TBits& GetFiredChipMap() const = 0;
66  virtual Bool_t TestFiredChipMap(UInt_t chipKey) const = 0;
67  //
68  virtual void Print(Option_t *opt="") const = 0;
69  //
70  virtual UInt_t GetNumberOfITSClusters(Int_t /*layer*/) const { return 0; }
71  virtual UInt_t GetNumberOfSPDClusters() const { return 0; }
72  virtual void SetITSClusters(Int_t /*layer*/, UInt_t /*clusters*/) {}
73  ClassDef(AliVMultiplicity,1);
74 };
75 
76 
77 #endif
Bool_t GetScaleDThetaBySin2T() const
virtual const TBits & GetFastOrFiredChips() const =0
AliVMultiplicity & operator=(const AliVMultiplicity &m)
void SetMultTrackRefs(Bool_t v)
virtual Double_t GetDeltaPhi(Int_t i) const =0
virtual const TBits & GetFiredChipMap() const =0
Double_t GetEta(Int_t i) const
virtual ~AliVMultiplicity()
virtual void SetFastOrFiredChips(UInt_t)=0
virtual Int_t * GetLabels() const =0
AliVMultiplicity(const char *name, const char *title)
AliVMultiplicity(const AliVMultiplicity &m)
virtual void Clear(Option_t *opt="")
virtual Double_t * GetTheta() const =0
virtual void Print(Option_t *opt="") const =0
virtual void SetFiredChips(Int_t, Short_t)=0
virtual void SetFiredChipMap(const TBits &)=0
virtual void SetITSClusters(Int_t, UInt_t)
virtual Double_t * GetDeltPhi() const =0
virtual Int_t * GetLabels2() const =0
virtual UInt_t GetNumberOfITSClusters(Int_t) const
Bool_t GetMultTrackRefs() const
virtual Bool_t TestFastOrFiredChips(UInt_t) const =0
virtual void SetLabel(Int_t i, Int_t layer, Int_t label)=0
virtual Bool_t TestFiredChipMap(UInt_t chipKey) const =0
virtual Short_t GetNumberOfFiredChips(Int_t) const =0
virtual Double_t * GetPhi() const =0
virtual Int_t GetLabel(Int_t i, Int_t layer) const =0
virtual Int_t GetNumberOfTracklets() const =0
virtual void SetFastOrFiredChipMap(const TBits &)=0
virtual UInt_t GetNumberOfSPDClusters() const
void SetScaleDThetaBySin2T(Bool_t v)
virtual const TBits & GetFastOrFiredChipMap() const