1 #ifndef ALIITSUINITGEOMETRY_H
2 #define ALIITSUINITGEOMETRY_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 $Id: AliITSUInitGeometry.h $
10 /////////////////////////////////////////////////////////////////////
11 // Class to inilize AliITSgeom and the like for both simulation
12 // and reconstruction.
13 /////////////////////////////////////////////////////////////////////
17 #include "AliITSgeom.h"
23 class AliITSUInitGeometry : public TObject{
26 AliITSUInitGeometry();//Default Constructor
27 AliITSUInitGeometry(AliITSVersion_t version,Int_t minorversion=2);//Standard Constructor
28 //virtual ~AliITSUInitGeometry(); // Destructor
30 // Create and initialize geometry from TGeo
31 AliITSgeom* CreateAliITSgeom();
32 AliITSgeom* CreateAliITSgeom(Int_t major,Int_t minor);
33 Bool_t InitAliITSgeom(AliITSgeom *geom);//Initilize geometry from gGeoManager
34 TString GetGeometryName()const {return fName;}// Return geometry name
35 void SetGeometryName(const Char_t *name){fName = name;}// Set Geometry name
36 Bool_t GetTiming()const{return fTiming;} // return routine timing flag
37 void SetTiming(Bool_t time=kTRUE){fTiming=time;}// Set routine timing (on)
38 void SetDebug(Int_t debug=0){fDebug=debug;};
40 Int_t GetDebug()const{return fDebug;};
41 // Decode module number into old layer, ladder, and detector numbers
42 void DecodeDetectorLayers(Int_t mod,Int_t &lay,Int_t &lad,Int_t &det);
43 // find module number by layer, and copy numbers
44 void DecodeDetector(Int_t &mod,Int_t lay,Int_t cpn0,
45 Int_t cpn1,Int_t cpn2) const;
46 // Given module number, find copy numbers.
47 void RecodeDetector(Int_t mod,Int_t &cpn0,Int_t &cpn1,Int_t &cpn2);
48 Int_t GetNumberOfLayers();
49 Int_t GetNumberOfLadders(const Int_t lay) const;
50 Int_t GetNumberOfModules(const Int_t lay) const;
51 Int_t GetLayerDetTypeID(const Int_t lay) const;
54 // Decode module number into old layer, ladder, and detector numbers
55 void DecodeDetectorLayersv11(Int_t mod,Int_t &lay,
56 Int_t &lad,Int_t &det);
57 // find module number by layer, and copy numbers
58 void DecodeDetectorv11(Int_t &mod,Int_t lay,Int_t cpn0,Int_t cpn1,
60 // Given module number, find copy numbers.
61 void RecodeDetectorv11(Int_t mod,Int_t &cpn0,Int_t &cpn1,
63 // Decode module number into old layer, ladder, and detector numbers
64 void DecodeDetectorvUpgrade(Int_t &mod,Int_t lay,Int_t cpn0,Int_t cpn1,
66 // find module number by layer, and copy numbers
67 void RecodeDetectorvUpgrade(Int_t mod,Int_t &cpn0,Int_t &cpn1,
69 // Given module number, find copy numbers.
70 void DecodeDetectorLayersvUpgrade(Int_t mod,Int_t &lay,Int_t &lad,
74 Bool_t InitAliITSgeomV11(AliITSgeom *geom);
75 Bool_t InitAliITSgeomVUpgrade(AliITSgeom *geom);
76 Bool_t GetTransformation(const TString &volumePath,TGeoHMatrix &mat);
77 Bool_t GetShape(const TString &volumePath,TString &shapeType,TArrayD &par);
78 void TransposeTGeoHMatrix(TGeoHMatrix *m) const;
80 TString fName; // Geometry name
81 Bool_t fTiming; // Flag to start inilization timing
82 Int_t fDebug; // Debug flag
84 ClassDef(AliITSUInitGeometry,0) // create/Init AliITSgeom
85 // 0 in ClassDef indicates that this class will not be "saved" in a file.