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