1 #ifndef ALIITSDigitUpgrade_H
2 #define ALIITSDigitUpgrade_H
3 /* Copyright(c) 2004-2006, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5 /////////////////////////////////////////////////////////////
6 // Authors A.Mastroserio //
8 // annalisa.mastroserio@cern.ch //
9 // cristina.terrevoli@cern.ch //
11 // Digit class for ITS upgrade //
13 /////////////////////////////////////////////////////////////
19 //______________________________________________________________________
20 class AliITSDigitUpgrade: public AliDigit {
24 AliITSDigitUpgrade(Int_t *digits);
25 AliITSDigitUpgrade(ULong_t pixid, Float_t eloss);
26 AliITSDigitUpgrade(const AliITSDigitUpgrade &d); //copy ctor
28 virtual ~AliITSDigitUpgrade(){/*destructor*/;}
29 //____________________________________________________________________________________________________
32 void AddTidOffset(Int_t offset) {for(Int_t i=0; i<3; i++) if (fTracks[i]>0) fTracks[i]+=offset;} //needed for merging
36 void SetSignal(Float_t sig) {fSignal = sig;}
37 void SetLayer(Int_t layer) {fNLayer = layer;}
38 void SetModule(Int_t module) {fModule = module ;}
39 void SetNelectrons(Double_t nele) {fNelectrons = nele;}
40 void SetTrackID(Int_t tid) {fTracks[0]=tid;}
41 void SetPixId(ULong_t nx, ULong_t nz) {fPixId = 100000*nx + nz ;}
42 void SetPixId(ULong_t pixid){fPixId = pixid;}
43 void SetTids(Int_t tids[3]){ for(Int_t i=0; i<3; i++) fTracks[i]=tids[i];} // tracks participating to form the digit
44 void SetSignalID(Float_t eloss[3]){for(Int_t i=0; i< 3; i++) fSignalID[i]=eloss[i];}
48 Float_t GetSignal() const {return fSignal;}
49 Int_t GetLayer() const {return fNLayer;}
50 Int_t GetModule() const {return fModule;}
51 Double_t GetNelectrons() const {return fNelectrons;}
52 ULong_t GetPixId(){return fPixId;}
53 Int_t GetxPixelNumber() const {return fPixId/100000;}
54 Int_t GetzPixelNumber() const {return fPixId%100000;}
56 void GetPosition(Int_t ilayer, Int_t nx, Int_t nz, Double_t &xloc, Double_t &zloc);
57 Float_t GetSignalID(Int_t ipart) {if(ipart<0 || ipart >2) return -1; else return fSignalID[ipart];}
60 inline Int_t Compare (const TObject *pObj)const;
61 Bool_t IsSortable() const {return kTRUE;}
66 Float_t fSignal; // Signal as Eloss in the medium
73 ClassDef(AliITSDigitUpgrade,3) // Simulated digit object for ITS upgrade
77 Int_t AliITSDigitUpgrade::Compare(const TObject *pObj) const
79 // Arguments: pObj - pointer to object to compare with
83 if (fModule>((AliITSDigitUpgrade*)pObj)->GetModule()) result=1;
85 else if(fModule==((AliITSDigitUpgrade*)pObj)->GetModule()){
86 if (fPixId==((AliITSDigitUpgrade*)pObj)->GetPixId()) result=0;
87 else if(fPixId >((AliITSDigitUpgrade*)pObj)->GetPixId()) result=1;