]>
Commit | Line | Data |
---|---|---|
d3da6dc4 | 1 | #ifndef AliHMPID_h |
2 | #define AliHMPID_h | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | #include <AliDetector.h> //base class | |
7 | #include <TClonesArray.h> //XxxCreate() | |
3c6274c1 | 8 | #include <TObjArray.h> //fDig,fClu field |
d3da6dc4 | 9 | |
423554a3 | 10 | //. |
11 | //HMPID base class | |
12 | //. | |
d3da6dc4 | 13 | |
14 | class AliHMPID : public AliDetector //TObject-TNamed-AliModule-AliDetector-AliHMPID | |
15 | { | |
16 | public: | |
17 | //ctor & dtor | |
59d9d4b3 | 18 | AliHMPID(const char *nm,const char *ttl); //named ctor |
19 | AliHMPID( ):AliDetector( ),fDoFeed(kTRUE),fSdi(0),fDig(0),fClu(0) {} //default ctor | |
d3da6dc4 | 20 | virtual ~AliHMPID(); |
21 | //framework part | |
d3da6dc4 | 22 | virtual void CreateMaterials ( )=0; //from AliModule invoked from AliMC::ConstructGeometry() to define detector materials |
23 | virtual void CreateGeometry ( )=0; //from AliModule invoked from AliMC::ConstructGeometry() to build detector for simulation | |
d1bf51e1 | 24 | |
d3da6dc4 | 25 | virtual Int_t IsVersion ( )const=0; //from AliModule not used |
26 | virtual void Init ( )=0; //from AliModule invoked from AliMC::InitGeometry() after CreateGeometry() to do VolID initialization | |
661663fa | 27 | virtual void DefineOpticalProperties() {} //from AliModule invoked from AliMC::ConstructOpGeometry() to set Cerenkov properties |
d3da6dc4 | 28 | void MakeBranch (Option_t *opt=""); //from AliModule invokde from AliRun::Tree2Tree() to make requested HMPID branch |
29 | void SetTreeAddress ( ); //from AliModule invoked from AliRun::GetEvent(), AliLoader::SetTAddrInDet() | |
30 | virtual void StepManager ( )=0; //from AliModule invoked from AliMC | |
31 | //private part +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
1d4857c5 | 32 | void HitCreate( ) {if(fHits)return; fHits=new TClonesArray("AliHMPIDHit"); fNhits=0; }//create hits list |
d3da6dc4 | 33 | |
34 | TClonesArray* SdiLst ( )const{return fSdi; }//get sdigits list | |
1d4857c5 | 35 | void SdiCreate( ) {if(fSdi)return; fSdi=new TClonesArray("AliHMPIDDigit"); }//create sdigits list |
d3da6dc4 | 36 | void SdiReset ( ) {if(fSdi) fSdi ->Clear(); }//clean sdigits list |
d3da6dc4 | 37 | |
38 | TObjArray* DigLst ( )const{return fDig; }//get digits list for all chambers | |
39 | TClonesArray* DigLst (Int_t c )const{return fDig ? (TClonesArray *)fDig->At(c):0; }//get digits list for chamber | |
470d5932 | 40 | void DigCreate( ) { |
41 | if (fDig) return; //PH do not recreate existing containers | |
42 | fDig=new TObjArray(7);for(Int_t i=0;i<7;i++)fDig->AddAt(new TClonesArray("AliHMPIDDigit"),i); }//create digits list | |
d3da6dc4 | 43 | void DigReset ( ) {if(fDig)for(int i=0;i<7;i++)fDig->At(i)->Clear(); }//clean digits list |
d3da6dc4 | 44 | |
3c6274c1 | 45 | TObjArray* CluLst ( )const{return fClu; }//get clusters list for all chambers |
d3da6dc4 | 46 | TClonesArray* CluLst (Int_t c )const{return fClu ? (TClonesArray *)fClu->At(c):0; }//get clusters list for chamber |
470d5932 | 47 | void CluCreate( ) { |
48 | if (fClu) return; //PH do not recreate existing containers | |
49 | fClu=new TObjArray(7); for(Int_t i=0;i<7;i++)fClu->AddAt(new TClonesArray("AliHMPIDCluster"),i); }//create clusters list | |
d3da6dc4 | 50 | void CluReset ( ) {if(fClu)for(int i=0;i<7;i++)fClu->At(i)->Clear(); }//clean clusters list |
d3da6dc4 | 51 | protected: |
59d9d4b3 | 52 | Bool_t fDoFeed; //! Flag to switch on/off Feedback photon creation |
d3da6dc4 | 53 | TClonesArray *fSdi; //! list of sdigits |
54 | TObjArray *fDig; //! each chamber holds it's one list of digits | |
55 | TObjArray *fClu; //! each chamber holds it's one list of clusters | |
56 | ||
1d4857c5 | 57 | private: |
d3da6dc4 | 58 | AliHMPID(const AliHMPID &rich ); |
59 | AliHMPID& operator=(const AliHMPID&); | |
60 | ||
61 | ClassDef(AliHMPID,11) //Main HMPID class | |
62 | };//class AliHMPID | |
cf7e313e | 63 | |
d3da6dc4 | 64 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
65 | #endif |