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