]>
Commit | Line | Data |
---|---|---|
0fe8fa07 | 1 | #ifndef AliRICHDigit_h |
2 | #define AliRICHDigit_h | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | #include <AliDigit.h> | |
7 | #include "AliRICHParam.h" | |
8 | ||
9 | class AliRICHDigit :public AliDigit | |
10 | { | |
11 | public: | |
12 | AliRICHDigit():AliDigit(),fCFM(0),fChamber(0),fPadX(0),fPadY(0),fQdc(-1){fTracks[0]=fTracks[1]=fTracks[2]=-1;} | |
13 | AliRICHDigit(Int_t c,TVector pad,Double_t q,Int_t cfm,Int_t tid0,Int_t tid1,Int_t tid2):fCFM(cfm) | |
14 | {fPadX=(Int_t)pad[0];fPadY=(Int_t)pad[1];fQdc=q;fChamber=10*c+AliRICHParam::Pad2Sec(pad);fTracks[0]=tid0;fTracks[1]=tid1;fTracks[2]=tid2;} | |
15 | virtual ~AliRICHDigit() {;} | |
16 | ||
17 | Int_t Compare(const TObject *pObj) const | |
18 | {if(Id()==((AliRICHDigit*)pObj)->Id())return 0;else if(Id()>((AliRICHDigit*)pObj)->Id())return 1;else return -1;} //virtual | |
19 | virtual Bool_t IsSortable() const{return kTRUE;} //sort interface | |
20 | virtual void Print(Option_t *option="") const; //virtual | |
21 | //private part | |
22 | Int_t ChFbMi() const{return fCFM;} //particle mixture for this digit | |
23 | Int_t C() const{return fChamber/10;} //chamber number | |
24 | Int_t S() const{return fChamber-(fChamber/10)*10;} //sector number | |
25 | Int_t X() const{return fPadX;} //x position of the pad | |
26 | Int_t Y() const{return fPadY;} //y postion of the pad | |
27 | TVector Pad() const{Float_t v[2]={fPadX,fPadY}; return TVector(2,v);} | |
28 | Int_t Id() const{return fChamber*10000000+fPadX*1000+fPadY;} //absolute id of this pad | |
29 | Double_t Q() const{return fQdc;} //charge in terms of ADC channels | |
30 | void AddTidOffset(Int_t offset) | |
31 | {for (Int_t i=0; i<3; i++) if (fTracks[i]>0) fTracks[i]+=offset;}; | |
32 | protected: | |
33 | Int_t fCFM; //1000000*Ncerenkovs+1000*Nfeedbacks+Nmips | |
34 | Int_t fChamber; //10*chamber number+ sector number | |
35 | Int_t fPadX; //pad number along X | |
36 | Int_t fPadY; //pad number along Y | |
37 | Double_t fQdc; //QDC value, fractions are permitted for summable procedure | |
38 | ClassDef(AliRICHDigit,3) //RICH digit class | |
39 | };//class AliRICHDigit | |
40 | ||
41 | #endif |