Updates concerning the geometry: versioning system, new V11hybrid version, bug fixes...
[u/mrichter/AliRoot.git] / ITS / AliITSvtest.h
CommitLineData
3fccfd9e 1#ifndef ALIITSVTEST_H
2#define ALIITSVTEST_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8////////////////////////////////////////////////////////////////////////
9// Manager and hits classes for ITS version 5
10////////////////////////////////////////////////////////////////////////
11
012f0f4c 12#include "AliITSInitGeometry.h"
3fccfd9e 13#include "AliITS.h"
14
15class TBRIK;
16class AliITSvtest : public AliITS {
012f0f4c 17 public:
18 AliITSvtest(); // Default constructor
19 AliITSvtest(const Char_t *title,Int_t version=0); // Standard Constructor
20 // Constructor for Euclid geometries
21 AliITSvtest(const char *fileeuc,const char *filetme,
22 const char *name, const char *title);
23 virtual ~AliITSvtest(); // Destructor
24 void CreateGeometry(); // Create test geometry
25 void CreateMaterials(); // Create test geometry materials
26 void Init(); // Initlizie test geometry for transport
27 Int_t IsVersion() const {// returns the ITS version number
28 return kvtest;}
29 void StepManager(); // Transport step manager
30 void SetWriteDet(Bool_t det=kTRUE){ // set .det write
31 fGeomDetOut = det;}
32 void SetWriteDet(const char *f){ // set write file
33 fWrite=f;fGeomDetOut = kTRUE;}
34 void SetReadDet(Bool_t det=kTRUE){ //set .det read
35 fGeomDetIn = det;}
36 void SetReadDet(const char *f){ // set read file
37 fRead=f;fGeomDetIn = kTRUE;}
38 void SetEUCLIDFileName(const char *f){ // set write file
39 fEuclidGeometry=f;fEuclidOut = kTRUE;}
40 void SetMinorVersion(Int_t v){ // Choose between existing minor versions
41 fMinorVersion = 1;if(v==1) fMinorVersion = 1;
bae7e562 42 else if(v==2) fMinorVersion = 2;
43 else Warning("SetMinorVersion","Undefined Minor Version setting =1");}
012f0f4c 44 Bool_t GetWriteDet() const { // returns value GeomDetOut flag.
45 return fGeomDetOut;}
46 Bool_t GetReadDet() const { // returns value GeomDetIn flag.
47 return fGeomDetIn;}
48 Char_t *GetEULIIDFileName() const{ // return .euc file name
49 return (Char_t*)(fEuclidGeometry.Data());}
50 Char_t *GetReadDetFileName()const{ // return .det read file name
51 if(!fRead.IsNull()) return (Char_t*)(fRead.Data());
52 else return GetEULIIDFileName();}
53 Char_t *GetWriteDetFileName()const{ // return .det write file name
54 if(!fWrite.IsNull()) return (Char_t*)(fWrite.Data());
55 else return GetEULIIDFileName();}
56 Int_t GetMajorVersion() const {// return Major Version Number
bae7e562 57 return fMajorVersion;}
012f0f4c 58 Int_t GetMinorVersion() const {// return Major Version Number
bae7e562 59 return fMinorVersion;}
012f0f4c 60 // Print class in ascii form to stream
61 void PrintAscii(ostream *os)const;
62 // Read in class in ascii form from stream
63 void ReadAscii(istream *is);
64
65 protected:
66 // Units, Convert from k?? to cm,degree,GeV,seconds,
67 static const Double_t fgkmicron; // Convert micron to TGeom's cm.
68 static const Double_t fgkmm; // Convert mm to TGeom's cm.
69 static const Double_t fgkcm; // Convert cm to TGeom's cm.
70 static const Double_t fgkDegree; //Convert degrees to TGeom's degrees
71 static const Double_t fgkRadian; //To Radians
72 static const Double_t fgkgcm3; // Density in g/cm^3
73 static const Double_t fgkCelsius; // Temperature in degrees Celcius
74 static const Double_t fgkPascal; // Preasure in Pascal
75 static const Double_t fgkKPascal; // Preasure in KPascal
76 static const Double_t fgkeV; // Energy in eV
77 static const Double_t fgkKeV; // Energy in KeV
78 static const Double_t fgkMeV; // Energy in MeV
79 static const Double_t fgkGeV; // Energy in GeV
80
bae7e562 81
82 private:
e939a978 83 AliITSvtest(const AliITSvtest &source); // copy constructor
84 AliITSvtest& operator=(const AliITSvtest &source); // assignment operator
012f0f4c 85 void CreateMaterialsEuclid(); // Create test geometry materials from Euclid
86 void CreateGeometryEuclid(); // Create test geometry Geometry from Euclid
87 void InitEuclid(); // Create test geometry Init for Euclid
88 void CreateMaterials2(); // Create test geometry materials from geometry2
89 void CreateGeometry2(); // Create test geometry Geometry from geometry2
90 void Init2(); // Create test geometry Init for geometry2
bae7e562 91 // TString fEuclidGeomtery,fEuclidMaterial defined in AliModule.
012f0f4c 92 Bool_t fGeomDetOut; // Flag to write .det file out
93 Bool_t fGeomDetIn; // Flag to read .det file or directly from Geat.
94 Int_t fMajorVersion; // Major version number == IsVersion
95 Int_t fMinorVersion; // Minor version number
96 TString fEuclidGeomDet;// file where detector transormation are define.
97 TString fRead; //! file name to read .det file
98 TString fWrite; //! file name to write .det file
99 AliITSInitGeometry fIgm;//! Geometry initilization object
100
101 ClassDef(AliITSvtest,2) //Hits manager for ITS test version, Private ITS class for different test geometries
3fccfd9e 102};
012f0f4c 103// Input and output function for standard C++ input/output.
104ostream &operator<<(ostream &os,const AliITSvtest &s);
105istream &operator>>(istream &is,AliITSvtest &s);
3fccfd9e 106
107#endif