]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSgeomSDD.h
Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
[u/mrichter/AliRoot.git] / ITS / AliITSgeomSDD.h
1 #ifndef ALIITSGEOMSDD_H
2 #define ALIITSGEOMSDD_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 #include <TObject.h>
8 #include <TBRIK.h>
9
10 class ostream;
11 class istream;
12 class TShape;
13
14 class AliITSgeomSDD: public TObject {
15  public:
16     AliITSgeomSDD();
17     AliITSgeomSDD(const Float_t *box,Float_t per,Float_t vel,
18                   Float_t axL,Float_t axR,
19                   Int_t nA0,Float_t *le0,Int_t nA1,Float_t *le1);
20     AliITSgeomSDD(AliITSgeomSDD &source);
21     AliITSgeomSDD& operator=(AliITSgeomSDD &source);
22     virtual ~AliITSgeomSDD();
23     void ResetSDD(const Float_t *box,Float_t per,Float_t vel,
24                   Float_t axL,Float_t axR,
25                   Int_t nA0,Float_t *le0,Int_t nA1,Float_t *le1);
26     virtual TShape *GetShape() const {return fShapeSDD;}
27     virtual Float_t GetDx() const { // Get TBRIK Dx
28         if(fShapeSDD!=0) return fShapeSDD->GetDx();
29         else return 0.0;}
30     virtual Float_t GetDy() const {// Get TBRIK Dy
31         if(fShapeSDD!=0) return fShapeSDD->GetDy();
32         else return 0.0;}
33     virtual Float_t GetDz() const {// Get TBRIK Dz
34         if(fShapeSDD!=0) return fShapeSDD->GetDz();
35         else return 0.0;}
36     virtual Float_t GetAnodeX(Int_t a,Int_t s) const { // returns X position of anode
37         if(s==0) return fAnodeXL; else return fAnodeXR;}
38     virtual Float_t GetAnodeZ(Int_t a,Int_t s)const { // returns X position of anode
39         if(s==0) return 0.5*(fAnodeLowEdgeL[a]+fAnodeLowEdgeL[a+1]);
40         else return 0.5*(fAnodeLowEdgeR[a]+fAnodeLowEdgeR[a+1]);}
41     virtual void SetNAnodesL(Int_t s)
42         {fNAnodesL = s;} // sets the number of anodes on side 0.
43     virtual void SetNAnodesR(Int_t s)
44         {fNAnodesR = s;} // sets the anodes spacing for side 1.
45     virtual void SetSamplingPeriod(Float_t s)
46         {fPeriod = s;} // sets the clock sampling period s.
47     virtual void SetDriftVelocity(Float_t s)
48         {fDvelocity = s;} // sets the SDD Drift velocity cm/s.
49     virtual void SetShape(char *name,char *title,char *mat,
50                           Float_t dx,Float_t dy,Float_t dz)
51                          {fShapeSDD = new TBRIK(name,title,mat,dx,dy,dz);}
52     virtual void Local2Det(Float_t xl,Float_t zl,Int_t &a,Int_t &t,Int_t &s);
53     virtual void Det2Local(Int_t a,Int_t t,Int_t s,Float_t &xl,Float_t &zl);
54     virtual void Print(ostream *os) const; // Output streamer to standard out.
55     virtual void Read(istream *is);   // Input streamer to standard in.
56     // or what other or different information that is needed.
57
58  protected:
59     // (L)  -+-> x  (R)
60     //       |
61     //       V z
62     Float_t fPeriod; // ADC sampiling period
63     Float_t fDvelocity; // Drift velocity
64     Int_t   fNAnodesL;  // number of Anodes on size 0
65     Int_t   fNAnodesR;  // number of Anodes on size 1
66     Float_t fAnodeXL;   // Anode location in x Left side
67     Float_t fAnodeXR;   // Anode location in x Right side
68     Float_t *fAnodeLowEdgeL; //[fNAnodesL] Anode spacing left edge
69     Float_t *fAnodeLowEdgeR; //[fNAnodesR] Anode spacing right edge
70     TBRIK *fShapeSDD;     // shape of sensitive volume
71
72     ClassDef(AliITSgeomSDD,1) // ITS SDD detector geometry class
73
74 };
75 // Input and output function for standard C++ input/output.
76 ostream &operator<<(ostream &os,AliITSgeomSDD &source);
77 istream &operator>>(istream &os,AliITSgeomSDD &source);
78 #endif
79 //======================================================================
80 #ifndef ALIITSGEOMSDD256_H
81 #define ALIITSGEOMSDD256_H
82 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
83  * See cxx source for full Copyright notice                               */
84
85 /*
86   $Id$
87 */
88
89 //#include "AliITSgeomSDD.h"
90
91 class ostream;
92 class istream;
93
94 class AliITSgeomSDD256 : public AliITSgeomSDD {
95
96  public:
97     AliITSgeomSDD256();
98
99     // This clas now has version 0 so that it will not be written to a root
100     // file. This is good since there are no longer any data members to this
101     // class. It is only designed to make it easer to define this standard
102     // SDD detector geometry.
103     ClassDef(AliITSgeomSDD256,0) // ITS SDD detector geometry class for 256 anodes per side
104
105 };
106 // Input and output function for standard C++ input/output.
107 ostream &operator<<(ostream &os,AliITSgeomSDD256 &source);
108 istream &operator>>(istream &os,AliITSgeomSDD256 &source);
109 #endif
110 //======================================================================
111 #ifndef ALIITSGEOMSDD300_H
112 #define ALIITSGEOMSDD300_H
113 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
114  * See cxx source for full Copyright notice                               */
115
116 /*
117   $Id$
118 */
119
120 //#include "AliITSgeomSDD.h"
121
122 class ostream;
123 class istream;
124
125 class AliITSgeomSDD300 : public AliITSgeomSDD {
126
127  public:
128     AliITSgeomSDD300();
129
130     // This clas now has version 0 so that it will not be written to a root
131     // file. This is good since there are no longer any data members to this
132     // class. It is only designed to make it easer to define this standard
133     // SDD detector geometry.
134     ClassDef(AliITSgeomSDD300,0) // ITS SDD detector geometry class for 300 anodes per side
135
136 };
137 // Input and output function for standard C++ input/output.
138 ostream &operator<<(ostream &os,AliITSgeomSDD300 &source);
139 istream &operator>>(istream &os,AliITSgeomSDD300 &source);
140 #endif