]>
Commit | Line | Data |
---|---|---|
023ae34b | 1 | #ifndef ALIITSINITGEOMETRY_H |
2 | #define ALIITSINITGEOMETRY_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* | |
7 | $Id$ | |
8 | */ | |
9 | ||
108bd0fe | 10 | ///////////////////////////////////////////////////////////////////// |
6b0f3880 | 11 | // Class to inilize AliITSgeom and the like for both simulation |
108bd0fe | 12 | // and reconstruction. |
6b0f3880 | 13 | ///////////////////////////////////////////////////////////////////// |
14 | ||
023ae34b | 15 | #include <TObject.h> |
023ae34b | 16 | #include <TString.h> |
416d7e17 | 17 | |
18 | class AliITSgeom; | |
023ae34b | 19 | |
108bd0fe | 20 | typedef enum { |
708fec2f | 21 | kvDefault=0,kv11=11 |
108bd0fe | 22 | } AliITSVersion_t; |
23 | ||
6b0f3880 | 24 | class TArrayD; |
25 | class TGeoHMatrix; | |
012f0f4c | 26 | class TDatime; |
023ae34b | 27 | |
28 | class AliITSInitGeometry : public TObject{ | |
29 | public: | |
012f0f4c | 30 | |
31 | AliITSInitGeometry();//Default Constructor | |
d583ec69 | 32 | AliITSInitGeometry(AliITSVersion_t version);//Standard Constructor |
023ae34b | 33 | //virtual ~AliITSInitGeometry(); // Destructor |
34 | // | |
012f0f4c | 35 | // Create and initialize geometry from TGeo |
36 | AliITSgeom* CreateAliITSgeom(); | |
d583ec69 | 37 | AliITSgeom* CreateAliITSgeom(Int_t major); |
012f0f4c | 38 | Bool_t InitAliITSgeom(AliITSgeom *geom);//Initilize geometry from gGeoManager |
39 | // Getters and Setters | |
023ae34b | 40 | // Getters and Setters |
d583ec69 MM |
41 | void SetVersion(AliITSVersion_t maj) {// Set version |
42 | fMajorVersion=maj;} | |
023ae34b | 43 | TString GetGeometryName()const {return fName;}// Return geometry name |
44 | void SetGeometryName(const Char_t *name){fName = name;}// Set Geometry name | |
108bd0fe | 45 | Int_t GetMajorVersion()const {return (Int_t)fMajorVersion;} // Return geometry major version |
023ae34b | 46 | Bool_t GetTiming()const{return fTiming;} // return routine timing flag |
47 | void SetTiming(Bool_t time=kTRUE){fTiming=time;}// Set routine timing (on) | |
48 | Bool_t GetSegGeom()const{return fSegGeom;} // return flag indecating the use of AliITSsegmentation or AliITSgeomS?D class in fShape. | |
49 | void SetSegGeom(Bool_t seg=kTRUE){fSegGeom = seg;}// Set the use of AliITSsegmentation class' instead of AliITSgeomS?D class in fShape | |
50 | Bool_t GetDecoding()const{return fDecode;}// Return flag indecating wether to use new/old decoding | |
51 | void SetDecoding(Bool_t newdec=kFALSE){fDecode = newdec;}// Set flag to use new/old decoding | |
012f0f4c | 52 | // Set debug level. debug=0 no debug info outputted. |
53 | void SetDebug(Int_t debug=0){fDebug=debug;}; | |
54 | // Retrun debug value | |
55 | Int_t GetDebug()const{return fDebug;}; | |
56 | // Decode module number into old layer, ladder, and detector numbers | |
57 | void DecodeDetectorLayers(Int_t mod,Int_t &lay,Int_t &lad,Int_t &det); | |
58 | // find module number by layer, and copy numbers | |
59 | void DecodeDetector(Int_t &mod,Int_t lay,Int_t cpn0, | |
60 | Int_t cpn1,Int_t cpn2) const; | |
61 | // Given module number, find copy numbers. | |
62 | void RecodeDetector(Int_t mod,Int_t &cpn0,Int_t &cpn1,Int_t &cpn2); | |
d583ec69 | 63 | // fills the string str with the version number |
012f0f4c | 64 | Bool_t WriteVersionString(Char_t *str,Int_t length, |
d583ec69 | 65 | AliITSVersion_t maj)const; |
108bd0fe | 66 | |
012f0f4c | 67 | private: |
d583ec69 MM |
68 | // decodes the string str with the version number |
69 | Bool_t ReadVersionString(const Char_t *str,AliITSVersion_t &maj)const; | |
70 | ||
012f0f4c | 71 | // Decode module number into old layer, ladder, and detector numbers |
012f0f4c | 72 | void DecodeDetectorLayersv11(Int_t mod,Int_t &lay, |
717cdf18 | 73 | Int_t &lad,Int_t &det); |
012f0f4c | 74 | // find module number by layer, and copy numbers |
717cdf18 | 75 | void DecodeDetectorv11(Int_t &mod,Int_t lay,Int_t cpn0,Int_t cpn1, |
76 | Int_t cpn2)const; | |
012f0f4c | 77 | // Given module number, find copy numbers. |
78 | void RecodeDetectorv11(Int_t mod,Int_t &cpn0,Int_t &cpn1, | |
708fec2f | 79 | Int_t &cpn2); |
325d8c32 | 80 | // Virtual MC code |
108bd0fe | 81 | Bool_t InitAliITSgeomV11(AliITSgeom *geom); |
023ae34b | 82 | Bool_t GetTransformation(const TString &volumePath,TGeoHMatrix &mat); |
83 | Bool_t GetShape(const TString &volumePath,TString &shapeType,TArrayD &par); | |
012f0f4c | 84 | void TransposeTGeoHMatrix(TGeoHMatrix *m) const; |
023ae34b | 85 | |
012f0f4c | 86 | TString fName; // Geometry name |
012f0f4c | 87 | AliITSVersion_t fMajorVersion; // Geometry swich value |
88 | Bool_t fTiming; // Flag to start inilization timing | |
89 | Bool_t fSegGeom; // Flag to switch between the old use of | |
90 | // AliITSgeomS?D class, or AliITSsegmentation | |
91 | // class in fShape of AliITSgeom class. | |
92 | Bool_t fDecode; // Flag for new/old decoding | |
93 | Int_t fDebug; // Debug flag | |
108bd0fe | 94 | |
023ae34b | 95 | |
96 | ClassDef(AliITSInitGeometry,0) // create/Init AliITSgeom | |
97 | // 0 in ClassDef indicates that this class will not be "saved" in a file. | |
98 | }; | |
99 | ||
100 | #endif | |
101 |