]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - ITS/AliITSgeomSSD.h
hopefully the last refinements for correct type conversion in calibration
[u/mrichter/AliRoot.git] / ITS / AliITSgeomSSD.h
... / ...
CommitLineData
1#ifndef ALIITSGEOMSSD_H
2#define ALIITSGEOMSSD_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// This class is for the Silicon Strip Detector, SSD, specific geometry.
10// It is being replaced by AliITSsegmentationSSD class. This file also
11// constains classes derived from AliITSgeomSSD which do nothing but
12// initilize this one with predefined values.
13////////////////////////////////////////////////////////////////////////
14
15#include <TObject.h>
16#include <TBRIK.h>
17
18class TShape;
19
20class AliITSgeomSSD : public TObject {
21
22 public:
23 AliITSgeomSSD(); // default constructor
24 AliITSgeomSSD(const Float_t *box,Float_t ap,Float_t an,
25 Int_t np,Float_t *p,Int_t nn,Float_t *n); // Constructor
26 virtual ~AliITSgeomSSD(); // Destructor
27 AliITSgeomSSD(const AliITSgeomSSD &source);// copy constructor
28 virtual AliITSgeomSSD& operator=(const AliITSgeomSSD &source); // = opt.
29 void ResetSSD(const Float_t *box,Float_t ap,Float_t an,
30 Int_t np,Float_t *p,Int_t nn,Float_t *n); // Filler
31 virtual TShape *GetShape() const {return new TBRIK(fName.Data(),
32 fTitle.Data(),fMat.Data(),GetDx(),GetDy(),GetDz());}// get shape
33 virtual Float_t GetDx() const {return fDx;}// get Dx
34 virtual Float_t GetDy() const {return fDy;}// get Dy
35 virtual Float_t GetDz() const {return fDz;}// get Dz
36 virtual Int_t GetNAnodes() const {return fNp-1;}//the number of Anodes "P"
37 virtual Int_t GetNCathodess() const {return fNn-1;}//the number of Cathodes "N"
38 virtual Float_t GetAnodePitch(Int_t i=0) const { //anode pitch for anode i
39 if(i>=0&&i<fNp) return fLowEdgeP[i+1]-fLowEdgeP[i];else return 0.0;}
40 virtual Float_t GetCathodePitch(Int_t i=0) const { // cathode pitch for cathode i
41 if(i>0&&i<fNn) return fLowEdgeN[1]-fLowEdgeN[0];else return 0.0;}
42 virtual Float_t GetAnodeAngle() const {return fAngleP;}//anode strip angle.
43 virtual Float_t GetCathodeAngle() const {return fAngleN;}//cathode strip angle.
44 virtual void SetShape(char *name,char *title,char *mat,
45 Float_t dx,Float_t dy,Float_t dz){
46 // defines TBRIK with given paramters
47 fName = name;fTitle = title;fMat = mat; fDx=dx;fDy=dy;fDz=dz;};
48 virtual void SetNAnodes(Int_t n) {// sets the number of Anodes "P" and
49 // allocates array of low edges.
50 fNp=n+1;delete fLowEdgeP;fLowEdgeP = new Float_t[fNp];}
51 virtual void SetNCathotess(Int_t n) {// sets the number of Anodes "N" and
52 // allocates array of low edges.
53 fNn=n+1;delete fLowEdgeN;fLowEdgeN =new Float_t[fNn];}
54 virtual void SetAnodeLowEdges(Float_t *p){// sets Anode low edges +1.
55 for(Int_t i=0;i<fNp;i++)fLowEdgeP[i]=p[i];}
56 virtual void SetCathodeLowEdges(Float_t *p){// sets Cathodes low edges +1.
57 for(Int_t i=0;i<fNn;i++)fLowEdgeN[i]=p[i];}
58 virtual void SetAnodeAngle(Float_t a){fAngleP=a;} //sets anode angle.
59 virtual void SetCathodeAngle(Float_t a){fAngleN=a;}//sets cathode angle.
60
61 virtual void Local2Det(Float_t x,Float_t z,Int_t &a,Int_t &c);
62 virtual void Det2Local(Int_t a,Int_t c,Float_t &x,Float_t &z);
63
64 virtual void Print(ostream *os) const; // Output streamer to standard out.
65 virtual void Read(istream *is); // Input streamer to standard in.
66 virtual void Print(Option_t *option="") const {TObject::Print(option);}
67 virtual Int_t Read(const char *name) {return TObject::Read(name);}
68
69 protected:
70 // -+-> x
71 // |
72 // V
73 // z
74 TString fName; // Object name Replacement for TBRIK
75 TString fTitle; // Ojbect title Replacement for TBRIK
76 TString fMat; // Object material name Replacement for TBRIK
77 Float_t fDx; // half length in z Replacement for TBRIK
78 Float_t fDy; // half length in y Replacement for TBRIK
79 Float_t fDz; // half length in z Replacement for TBRIK
80 Int_t fNp; // Number of Anode strips.
81 Int_t fNn; // Number of Cathode strips.
82 Float_t *fLowEdgeP; //[fNp] Anode side strip pitch angle==0.
83 Float_t *fLowEdgeN; //[fNn] Cathode side strip pich angle==0.
84 Float_t fAngleP; // Anode side strip angle (rad).
85 Float_t fAngleN; // Cathode side strip angle (rad).
86 // or what other or different information that is needed.
87
88 ClassDef(AliITSgeomSSD,2) // ITS SSD detector geometry class
89
90};
91// Input and output function for standard C++ input/output.
92ostream &operator<<(ostream &os,AliITSgeomSSD &source);
93istream &operator>>(istream &os,AliITSgeomSSD &source);
94#endif
95//======================================================================
96#ifndef ALIITSGEOMSSD175_H
97#define ALIITSGEOMSSD175_H
98/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
99 * See cxx source for full Copyright notice */
100
101/*
102 $Id$
103*/
104
105//#include "AliITSgeomSSD.h"
106
107
108class TShape;
109
110class AliITSgeomSSD175 : public AliITSgeomSSD {
111
112 public:
113 AliITSgeomSSD175();
114 virtual AliITSgeomSSD& operator=(const AliITSgeomSSD &source);
115
116 // This clas now has version 0 so that it will not be written to a root
117 // file. This is good since there are no longer any data members to this
118 // class. It is only designed to make it easer to define this standard
119 // SDD detector geometry.
120 ClassDef(AliITSgeomSSD175,0) // ITS SSD detector with stips at +- 0.0175 rad.
121
122};
123// Input and output function for standard C++ input/output.
124ostream &operator<<(ostream &os,AliITSgeomSSD175 &source);
125istream &operator>>(istream &os,AliITSgeomSSD175 &source);
126#endif
127//======================================================================
128#ifndef ALIITSGEOMSSD27575_H
129#define ALIITSGEOMSSD27575_H
130/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
131 * See cxx source for full Copyright notice */
132
133/*
134 $Id$
135*/
136
137//#include "AliITSgeomSSD.h"
138
139
140class TShape;
141
142class AliITSgeomSSD275and75 : public AliITSgeomSSD {
143
144 public:
145 AliITSgeomSSD275and75();
146 AliITSgeomSSD275and75(Int_t npar,Float_t *par);
147 virtual AliITSgeomSSD& operator=(const AliITSgeomSSD &source);
148
149 // This clas now has version 0 so that it will not be
150 // This clas now has version 0 so that it will not be written to a root
151 // file. This is good since there are no longer any data members to this
152 // class. It is only designed to make it easer to define this standard
153 // SDD detector geometry.
154 ClassDef(AliITSgeomSSD275and75,0) // ITS SSD detector with 0.0275 and 0.0075 rad strip angles.
155
156};
157// Input and output function for standard C++ input/output.
158ostream &operator<<(ostream &os,AliITSgeomSSD275and75 &source);
159istream &operator>>(istream &os,AliITSgeomSSD275and75 &source);
160#endif
161//======================================================================
162#ifndef ALIITSGEOMSSD75275_H
163#define ALIITSGEOMSSD75275_H
164/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
165 * See cxx source for full Copyright notice */
166
167/*
168 $Id$
169*/
170
171//#include "AliITSgeomSSD.h"
172
173class TShape;
174
175class AliITSgeomSSD75and275 : public AliITSgeomSSD {
176
177 public:
178 AliITSgeomSSD75and275();
179 AliITSgeomSSD75and275(Int_t npar,Float_t *par);
180 virtual AliITSgeomSSD& operator=(const AliITSgeomSSD &source);
181
182 // This clas now has version 0 so that it will not be
183 // This clas now has version 0 so that it will not be written to a root
184 // file. This is good since there are no longer any data members to this
185 // class. It is only designed to make it easer to define this standard
186 // SSD detector geometry.
187 ClassDef(AliITSgeomSSD75and275,0) // ITS SSD detector geometry class for 0.0075 and 0.0275 rad angled strips.
188
189};
190// Input and output function for standard C++ input/output.
191ostream &operator<<(ostream &os,AliITSgeomSSD75and275 &source);
192istream &operator>>(istream &os,AliITSgeomSSD75and275 &source);
193#endif
194
195