Correct formula for phi, in case of current local X <0, in GetLocalXat and GetPhiZat
[u/mrichter/AliRoot.git] / ITS / AliITSgeomSSD.h
CommitLineData
a3d834a0 1#ifndef ALIITSGEOMSSD_H
2#define ALIITSGEOMSSD_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
58005f18 7
85f1e34a 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
4024ebf6 15#include <TObject.h>
8253cd9a 16#include <TBRIK.h>
e8189707 17
8253cd9a 18class TShape;
e8189707 19
8253cd9a 20class AliITSgeomSSD : public TObject {
58005f18 21
4024ebf6 22 public:
31b8cd63 23 AliITSgeomSSD(); // default constructor
8253cd9a 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
85f5e9c2 28 AliITSgeomSSD& operator=(const AliITSgeomSSD &source); // = opt.
31b8cd63 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
023ae34b 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
31b8cd63 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
8253cd9a 39 if(i>=0&&i<fNp) return fLowEdgeP[i+1]-fLowEdgeP[i];else return 0.0;}
31b8cd63 40 virtual Float_t GetCathodePitch(Int_t i=0) const { // cathode pitch for cathode i
8253cd9a 41 if(i>0&&i<fNn) return fLowEdgeN[1]-fLowEdgeN[0];else return 0.0;}
31b8cd63 42 virtual Float_t GetAnodeAngle() const {return fAngleP;}//anode strip angle.
43 virtual Float_t GetCathodeAngle() const {return fAngleN;}//cathode strip angle.
8253cd9a 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
023ae34b 47 fName = name;fTitle = title;fMat = mat; fDx=dx;fDy=dy;fDz=dz;};
8253cd9a 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
31b8cd63 64 virtual void Print(ostream *os) const; // Output streamer to standard out.
8253cd9a 65 virtual void Read(istream *is); // Input streamer to standard in.
d2f55a22 66 virtual void Print(Option_t *option="") const {TObject::Print(option);}
67 virtual Int_t Read(const char *name) {return TObject::Read(name);}
8253cd9a 68
69 protected:
70 // -+-> x
71 // |
72 // V
73 // z
023ae34b 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
8253cd9a 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).
58005f18 86 // or what other or different information that is needed.
4024ebf6 87
023ae34b 88 ClassDef(AliITSgeomSSD,2) // ITS SSD detector geometry class
4024ebf6 89
8253cd9a 90};
91// Input and output function for standard C++ input/output.
92ostream &operator<<(ostream &os,AliITSgeomSSD &source);
93istream &operator>>(istream &os,AliITSgeomSSD &source);
58005f18 94#endif
8253cd9a 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 */
4024ebf6 100
8253cd9a 101/*
102 $Id$
103*/
4024ebf6 104
8253cd9a 105//#include "AliITSgeomSSD.h"
4024ebf6 106
107
8253cd9a 108class TShape;
4024ebf6 109
8253cd9a 110class AliITSgeomSSD175 : public AliITSgeomSSD {
4024ebf6 111
8253cd9a 112 public:
113 AliITSgeomSSD175();
85f5e9c2 114 AliITSgeomSSD175& operator=(const AliITSgeomSSD175 &source);
8253cd9a 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 */
4024ebf6 132
8253cd9a 133/*
134 $Id$
135*/
4024ebf6 136
8253cd9a 137//#include "AliITSgeomSSD.h"
4024ebf6 138
139
8253cd9a 140class TShape;
4024ebf6 141
8253cd9a 142class AliITSgeomSSD275and75 : public AliITSgeomSSD {
143
144 public:
145 AliITSgeomSSD275and75();
e99dbc71 146 AliITSgeomSSD275and75(Int_t npar,Float_t *par);
85f5e9c2 147 AliITSgeomSSD275and75& operator=(const AliITSgeomSSD275and75 &source);
8253cd9a 148
d2f55a22 149 // This clas now has version 0 so that it will not be
8253cd9a 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
8253cd9a 173class TShape;
174
175class AliITSgeomSSD75and275 : public AliITSgeomSSD {
176
177 public:
178 AliITSgeomSSD75and275();
e99dbc71 179 AliITSgeomSSD75and275(Int_t npar,Float_t *par);
85f5e9c2 180 virtual AliITSgeomSSD75and275& operator=(const AliITSgeomSSD75and275 &source);
8253cd9a 181
d2f55a22 182 // This clas now has version 0 so that it will not be
8253cd9a 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
d2f55a22 194
195