]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSgeomSDD.h
Correction of the Z position of Q2 quadrupole from Chiara Oppedisano
[u/mrichter/AliRoot.git] / ITS / AliITSgeomSDD.h
index 034173f9a7bcb26079ddf2e94ad92f543453addc..792a13ec5b161e54c0889c52f27346c0dd3af57a 100644 (file)
@@ -4,6 +4,15 @@
  * See cxx source for full Copyright notice                               */
 
 /* $Id$ */
+
+
+////////////////////////////////////////////////////////////////////////
+// This class is for the Silicon Drift Detector, SDD, specific geometry.
+// It is being replaced by AliITSsegmentationSDD class. This file also
+// constains classes derived from AliITSgeomSDD which do nothing but
+// initilize this one with predefined values.
+////////////////////////////////////////////////////////////////////////
+
 #include <TObject.h>
 #include <TBRIK.h>
 
@@ -21,19 +30,16 @@ class AliITSgeomSDD: public TObject {
     void ResetSDD(const Float_t *box,Float_t per,Float_t vel,
                  Float_t axL,Float_t axR,
                  Int_t nA0,Float_t *le0,Int_t nA1,Float_t *le1);
-    virtual TShape *GetShape() const {return fShapeSDD;}
-    virtual Float_t GetDx() const { // Get TBRIK Dx
-       if(fShapeSDD!=0) return fShapeSDD->GetDx();
-       else return 0.0;}
-    virtual Float_t GetDy() const {// Get TBRIK Dy
-       if(fShapeSDD!=0) return fShapeSDD->GetDy();
-       else return 0.0;}
-    virtual Float_t GetDz() const {// Get TBRIK Dz
-       if(fShapeSDD!=0) return fShapeSDD->GetDz();
-       else return 0.0;}
-    virtual Float_t GetAnodeX(Int_t a,Int_t s) const { // returns X position of anode
-       if(s==0) return fAnodeXL; else return fAnodeXR;}
-    virtual Float_t GetAnodeZ(Int_t a,Int_t s)const { // returns X position of anode
+    virtual TShape *GetShape() const {return new TBRIK(fName.Data(),
+                          fTitle.Data(),fMat.Data(),GetDx(),GetDy(),GetDz());}
+    virtual Float_t GetDx() const {return fDx;} // Get TBRIK Dx
+    virtual Float_t GetDy() const {return fDy;}// Get TBRIK Dy
+    virtual Float_t GetDz() const {return fDz;}// Get TBRIK Dz
+    virtual Float_t GetAnodeX(Int_t a,Int_t s) const {
+       // returns X position of anode
+       a = 0; if(s==0) return fAnodeXL; else return fAnodeXR;}
+    virtual Float_t GetAnodeZ(Int_t a,Int_t s)const {
+       // returns X position of anode
        if(s==0) return 0.5*(fAnodeLowEdgeL[a]+fAnodeLowEdgeL[a+1]);
        else return 0.5*(fAnodeLowEdgeR[a]+fAnodeLowEdgeR[a+1]);}
     virtual void SetNAnodesL(Int_t s)
@@ -45,12 +51,14 @@ class AliITSgeomSDD: public TObject {
     virtual void SetDriftVelocity(Float_t s)
        {fDvelocity = s;} // sets the SDD Drift velocity cm/s.
     virtual void SetShape(char *name,char *title,char *mat,
-                         Float_t dx,Float_t dy,Float_t dz)
-                        {fShapeSDD = new TBRIK(name,title,mat,dx,dy,dz);}
+                         Float_t dx,Float_t dy,Float_t dz){fName=name;
+                         fTitle=title;fMat=mat;fDx=dx;fDy=dy;fDz=dz;}
     virtual void Local2Det(Float_t xl,Float_t zl,Int_t &a,Int_t &t,Int_t &s);
     virtual void Det2Local(Int_t a,Int_t t,Int_t s,Float_t &xl,Float_t &zl);
     virtual void Print(ostream *os) const; // Output streamer to standard out.
     virtual void Read(istream *is);   // Input streamer to standard in.
+    virtual void Print(Option_t *option="") const {TObject::Print(option);}
+    virtual Int_t Read(const char *name) {return TObject::Read(name);}
     // or what other or different information that is needed.
 
  protected:
@@ -65,9 +73,14 @@ class AliITSgeomSDD: public TObject {
     Float_t fAnodeXR;   // Anode location in x Right side
     Float_t *fAnodeLowEdgeL; //[fNAnodesL] Anode spacing left edge
     Float_t *fAnodeLowEdgeR; //[fNAnodesR] Anode spacing right edge
-    TBRIK *fShapeSDD;     // shape of sensitive volume
+    TString fName;  // Object name
+    TString fTitle; // Ojbect title
+    TString fMat;   // Object material name  Replacement for TBRIK
+    Float_t fDx;    // half length in z  Replacement for TBRIK
+    Float_t fDy;    // half length in y  Replacement for TBRIK
+    Float_t fDz;    // half length in z  Replacement for TBRIK
 
-    ClassDef(AliITSgeomSDD,1) // ITS SDD detector geometry class
+    ClassDef(AliITSgeomSDD,2) // ITS SDD detector geometry class
 
 };
 // Input and output function for standard C++ input/output.
@@ -91,7 +104,7 @@ class AliITSgeomSDD256 : public AliITSgeomSDD {
 
  public:
     AliITSgeomSDD256();
-    AliITSgeomSDD256(Int_t npar,Float_t *par);
+    AliITSgeomSDD256(Int_t npar,const Float_t *par);
 
     // This clas now has version 0 so that it will not be written to a root
     // file. This is good since there are no longer any data members to this
@@ -116,7 +129,6 @@ istream &operator>>(istream &os,AliITSgeomSDD256 &source);
 
 //#include "AliITSgeomSDD.h"
 
-
 class AliITSgeomSDD300 : public AliITSgeomSDD {
 
  public: