]>
Commit | Line | Data |
---|---|---|
1d9af2d5 | 1 | #ifndef ALIITSUPGRADE_H |
2 | #define ALIITSUPGRADE_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* $Id$ */ | |
8 | ||
9 | //======================================================================== | |
10 | // | |
11 | // Geometry of the Inner Tracking System Upgrade based on TGeo | |
12 | // | |
13 | // | |
14 | // Authors: A. Mastroserio | |
15 | // C. Terrevoli | |
16 | // annalisa.mastroserio@cern.ch | |
17 | // cristina.terrevoli@ba.infn.it | |
18 | // | |
19 | //======================================================================== | |
20 | ||
21 | // | |
22 | //ITS class for new geometry based on TGeo | |
23 | // | |
24 | ||
25 | #include "AliITS.h" //base class | |
26 | #include "AliITSsegmentationUpgrade.h" | |
27 | #include "AliITSupgradeDigitizer.h" | |
28 | #include <TArrayS.h> | |
0ac80088 | 29 | |
1d9af2d5 | 30 | class TGeoVolume; |
31 | class TGeoVolumeAssembly; | |
32 | class TArrayD; | |
33 | class TClonesArray; | |
34 | class TObjArray; | |
35 | class AiITShit; | |
36 | class AliITSupgrade : public AliITS //TObject-TNamed-AliModule-AliDetector-AliITS-AliITSupgrade | |
37 | { | |
38 | public: | |
387f1a9e | 39 | AliITSupgrade(); //default ctor |
ebaa7604 | 40 | AliITSupgrade(const char *name, const char *title, Bool_t isBeamPipe=kFALSE); //ctor for standard ITS |
1d9af2d5 | 41 | AliITSupgrade(const char *name, const char *title, TArrayD widths, TArrayD radii,TArrayD halfLengths, TArrayD radiiCu, TArrayD widthsCu, TArrayS copper,Bool_t bp, Double_t radiusBP, Double_t widthPB, Double_t halfLengthsBP); //ctor |
42 | virtual ~AliITSupgrade(); //dtor | |
84ab81bf | 43 | Int_t IsVersion() const {return 110;}// same as ITSv11Hybrid to comply with the AliITSInitGeom cases |
44 | ||
1d9af2d5 | 45 | |
46 | //framework part+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
47 | void AddAlignableVolumes() const; //from AliModule invoked from AliMC | |
48 | void CreateMaterials (); //from AliModule invoked from AliMC | |
49 | void CreateGeometry (); //from AliModule invoked from AliMC | |
1d9af2d5 | 50 | void StepManager (); //from AliModule invoked from AliMC::Stepping() |
51 | void Hits2SDigits(); | |
52 | void MakeBranch (Option_t *opt=""); //from AliModule invokde from AliRun::Tree2Tree() to make requested ITSupgrade branch | |
53 | void SetTreeAddress ( ); //from AliModule invoked from AliRun::GetEvent(), AliLoader::SetTAddrInDet() | |
54 | ||
55 | //create containers++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
56 | void HitCreate() {if(fHits)return; fHits=new TClonesArray("AliITShit"); fNhits=0; }//create hits list | |
57 | ||
58 | TObjArray* SDigitsList() const{return fSdigits;}//get digits list for all layers | |
59 | TClonesArray* SDigitsList(Int_t layer) const{return fSdigits ? (TClonesArray *)fSdigits->At(layer):0;}//get sdigits list for a layer | |
60 | void SDigitsCreate() {if (fSdigits) return; | |
61 | fSdigits=new TObjArray(fNlayers); | |
62 | for(Int_t i=0;i<fNlayers;i++)fSdigits->AddAt(new TClonesArray("AliITSDigitUpgrade"),i);}//create digits list | |
63 | void SDigitsReset () {if(fSdigits) for(int i=0;i<fNlayers;i++)fSdigits->At(i)->Clear(); }//clean sdigits list | |
64 | ||
65 | ||
66 | ||
67 | TObjArray* DigitsList() const{return fDigits;}//get digits list for all layers | |
68 | TClonesArray* DigitsList(Int_t layer) const{return fDigits ? (TClonesArray *)fDigits->At(layer):0;}//get digits list for chamber | |
69 | void DigitsCreate() {if (fDigits) return; | |
70 | fDigits=new TObjArray(fNlayers); | |
71 | for(Int_t i=0;i<fNlayers;i++)fDigits->AddAt(new TClonesArray("AliITSDigitUpgrade"),i);}//create digits list | |
72 | void DigitsReset () {if(fDigits)for(int i=0;i<fNlayers;i++)fDigits->At(i)->Clear(); }//clean digits list | |
73 | ||
1d9af2d5 | 74 | AliDigitizer* CreateDigitizer (AliRunDigitizer *m) const {return new AliITSupgradeDigitizer(m);} //from AliModule invoked from AliSimulation::RunDigitization() |
75 | ||
76 | void Hit2SumDig(TClonesArray *hits,TObjArray *pSDig, Int_t *nSdigit); | |
77 | ||
78 | enum EMedia {kAir=0,kSi=1,kBe=2, kCu=3}; //media ids used in CreateMaterials | |
79 | ||
80 | ||
81 | // Geometry/segmentation creation part | |
82 | TGeoVolumeAssembly * CreateVol(); | |
0ac80088 | 83 | TGeoVolumeAssembly * CreateVol(Bool_t cil); |
84 | ||
1d9af2d5 | 85 | void SetFullSegmentation(TArrayD xsize, TArrayD zsize); |
86 | ||
387f1a9e | 87 | void SetRadius(Double_t r, Int_t lay) {fRadii.AddAt(r,lay);} |
88 | void SetWidth(Double_t w, Int_t lay) {fWidths.AddAt(w,lay);} | |
89 | void SetRadiusCu(Double_t rCu, Int_t lay) {fRadiiCu.AddAt(rCu,lay);} | |
90 | void SetWidthCu(Double_t wCu, Int_t lay) {fWidthsCu.AddAt(wCu,lay);} | |
91 | void SetSegmentationX(Double_t x, Int_t lay); | |
92 | void SetSegmentationZ(Double_t z, Int_t lay); | |
0ac80088 | 93 | void SetNSectors(Int_t nsect) {fNSectors=nsect;} |
1d9af2d5 | 94 | void StepHistory(); |
387f1a9e | 95 | void PrintSummary(); |
1d9af2d5 | 96 | |
97 | protected: | |
98 | TArrayD fWidths; | |
99 | TArrayD fRadii; | |
0ac80088 | 100 | Int_t fNSectors; |
1d9af2d5 | 101 | TArrayD fRadiiCu; |
102 | TArrayD fWidthsCu; | |
103 | TArrayS fCopper; | |
104 | Bool_t fBeampipe; | |
105 | Double_t fRadiusBP; | |
106 | Double_t fWidthBP; | |
107 | Double_t fHalfLengthBP; | |
108 | Int_t fNlayers; | |
109 | TArrayD fHalfLength; | |
110 | TObjArray *fSdigits; //![fNlayers] list of sdigits | |
111 | TObjArray *fDigits; //![fNlayers] list of digits per layer | |
1d9af2d5 | 112 | AliITSsegmentationUpgrade *fSegmentation; |
113 | ||
114 | private: | |
115 | AliITSupgrade(const AliITSupgrade& u); //dummy copy constructor | |
116 | AliITSupgrade &operator=(const AliITSupgrade& u); //dummy assignment operator | |
117 | ||
118 | ClassDef(AliITSupgrade,2) //ITS Upgrade full version for simulation | |
119 | ||
120 | }; | |
121 | ||
122 | #endif | |
123 |