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