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