]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSgeomSSD.cxx
corrected command guidance
[u/mrichter/AliRoot.git] / ITS / AliITSgeomSSD.cxx
index 191244160942c0726e18a513516ad158f833384b..004ea550a512fd26f7b26089e0326b8e2655d920 100644 (file)
 
 /*
 $Log$
+Revision 1.11  2001/05/16 08:17:49  hristov
+Bug fixed in the StepManager to account for the difference in the geometry tree for the ITS pixels. This fixes both the funny distribution of pixel coordinates and the missing hits/digits/points in many sectors of the ITS pixel barrel. Also included is a patch to properly get and use the detector dimensions through out the ITS code. (B.Nilsen)
+
+Revision 1.10  2001/02/09 00:00:57  nilsen
+Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
+bugs in iostream based streamers used to read and write .det files. Fixed
+some detector sizes. Fixed bugs in some default-special constructors.
+
+Revision 1.9  2001/02/03 00:00:30  nilsen
+New version of AliITSgeom and related files. Now uses automatic streamers,
+set up for new formatted .det file which includes detector information.
+Additional smaller modifications are still to come.
+
 Revision 1.8  2000/10/02 16:32:43  barbera
 Forward declaration added
 
@@ -35,6 +48,14 @@ Revision 1.2  1999/09/29 09:24:20  fca
 Introduction of the Copyright and cvs Log
 
 */
+
+////////////////////////////////////////////////////////////////////////
+// This class is for the Silicon Strip Detector, SSD, specific geometry.
+// It is being replaced by AliITSsegmentationSSD class. This file also
+// constains classes derived from AliITSgeomSSD which do nothing but
+// initilize this one with predefined values.
+////////////////////////////////////////////////////////////////////////
+
 #include <iostream.h>
 #include <iomanip.h>
 #include <stdlib.h>
@@ -44,19 +65,49 @@ Introduction of the Copyright and cvs Log
 #include "AliITSgeomSSD.h"
 
 ClassImp(AliITSgeomSSD)
+
+
+AliITSgeomSSD::AliITSgeomSSD(){
+// Default constructor
+    fShapeSSD = 0;
+    fNp       = 0;
+    fNn       = 0;
+    fLowEdgeP = 0;
+    fLowEdgeN = 0;
+    fAngleP   = 0.0;
+    fAngleN   = 0.0;
+}
+//----------------------------------------------------------------------
 AliITSgeomSSD::AliITSgeomSSD(const Float_t *box,Float_t ap,Float_t an,
                             Int_t np,Float_t *p,Int_t nn,Float_t *n){
 ////////////////////////////////////////////////////////////////////////
 //    Standard Constructor. *box={dx,dy,dz}, ap=anode angle, an=cathode angle,
 // nn= number of cathodes+1,*n= array of cathode low edges+highest edge,
 // np= number of anodes+1, *p= array of anode low edges+lighest edge.
+///////////////////////////////////////////////////////////////////////
+    fShapeSSD = 0;
+    fNp       = 0;
+    fNn       = 0;
+    fLowEdgeP = 0;
+    fLowEdgeN = 0;
+    fAngleP   = 0.0;
+    fAngleN   = 0.0;
+    ResetSSD(box,ap,an,np,p,nn,n);
+}
+//----------------------------------------------------------------------
+void AliITSgeomSSD::ResetSSD(const Float_t *box,Float_t ap,Float_t an,
+                            Int_t np,Float_t *p,Int_t nn,Float_t *n){
+////////////////////////////////////////////////////////////////////////
+//    Standard Filler. *box={dx,dy,dz}, ap=anode angle, an=cathode angle,
+// nn= number of cathodes+1,*n= array of cathode low edges+highest edge,
+// np= number of anodes+1, *p= array of anode low edges+lighest edge.
 ///////////////////////////////////////////////////////////////////////
     Int_t i;
 
     fShapeSSD = new TBRIK("ActiveSSD","Active volume of SSD","SSD SI DET",
                          box[0],box[1],box[2]);
-    if(fLowEdgeP!=0) delete fLowEdgeP;
-    if(fLowEdgeN!=0) delete fLowEdgeN;
+//    if(fLowEdgeP!=0) delete fLowEdgeP;
+//    if(fLowEdgeN!=0) delete fLowEdgeN;
     fNp = np;
     fNn = nn;
     fAngleP = ap;
@@ -121,6 +172,14 @@ AliITSgeomSSD& AliITSgeomSSD::operator=(const AliITSgeomSSD &source) {
 }
 //______________________________________________________________________
 void AliITSgeomSSD::Local2Det(Float_t x,Float_t z,Int_t &a,Int_t &c){
+    // Given a GEANT detector local coordinate, cm, this function returns
+    // the detector specific P and N side strip numbers.
+    // Inputs are:
+    // Float_t x   Geant detector local x coordinate in cm
+    // Float_t z   Geant detector local z coordinate in cm
+    // outputs are:
+    // Int_t &a    Detector anode strip number (P side)
+    // Int_t &c    Detector cathode strip number (N side)
     Float_t d,b;
     Int_t i;
 
@@ -147,11 +206,11 @@ void AliITSgeomSSD::Det2Local(Int_t a,Int_t c,Float_t &x,Float_t &z){
     return;
 }
 //______________________________________________________________________
-void AliITSgeomSSD::Print(ostream *os){
+void AliITSgeomSSD::Print(ostream *os) const {
 ////////////////////////////////////////////////////////////////////////
 // Standard output format for this class.
 ////////////////////////////////////////////////////////////////////////
-    ios::fmtflags fmt;
+    Int_t fmt;
     Int_t i;
 
     fmt = os->setf(ios::scientific);  // set scientific floating point output
@@ -188,7 +247,7 @@ void AliITSgeomSSD::Read(istream *is){
     if(fLowEdgeN !=0) delete fLowEdgeN;
     fLowEdgeP = new Float_t[fNp];
     fLowEdgeN = new Float_t[fNn];
-    for(i=0;0<fNp;i++) *is >> fLowEdgeP[i];
+    for(i=0;i<fNp;i++) *is >> fLowEdgeP[i];
     for(i=0;i<fNn;i++) *is >> fLowEdgeN[i];
     return;
 }
@@ -213,6 +272,19 @@ istream &operator>>(istream &is,AliITSgeomSSD &r){
 //======================================================================
 /*
 $Log$
+Revision 1.11  2001/05/16 08:17:49  hristov
+Bug fixed in the StepManager to account for the difference in the geometry tree for the ITS pixels. This fixes both the funny distribution of pixel coordinates and the missing hits/digits/points in many sectors of the ITS pixel barrel. Also included is a patch to properly get and use the detector dimensions through out the ITS code. (B.Nilsen)
+
+Revision 1.10  2001/02/09 00:00:57  nilsen
+Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
+bugs in iostream based streamers used to read and write .det files. Fixed
+some detector sizes. Fixed bugs in some default-special constructors.
+
+Revision 1.9  2001/02/03 00:00:30  nilsen
+New version of AliITSgeom and related files. Now uses automatic streamers,
+set up for new formatted .det file which includes detector information.
+Additional smaller modifications are still to come.
+
 */
 
 //#include "AliITSgeomSSD175.h"
@@ -244,7 +316,7 @@ AliITSgeomSSD175::AliITSgeomSSD175() : AliITSgeomSSD(){
     leA[kNstrips] =  kDxyz[0];
     leC[kNstrips] = -kDxyz[0];
 //    cout << "AliITSgeomSSD175 default creator called: start" << endl;
-    AliITSgeomSSD::AliITSgeomSSD(kDxyz,kangle,-kangle,
+    AliITSgeomSSD::ResetSSD(kDxyz,kangle,-kangle,
                                 kNstrips+1,leA,kNstrips+1,leC);
     delete leA;
     delete leC;
@@ -271,6 +343,19 @@ istream &operator>>(istream &is,AliITSgeomSSD175 &r){
 //======================================================================
 /*
 $Log$
+Revision 1.11  2001/05/16 08:17:49  hristov
+Bug fixed in the StepManager to account for the difference in the geometry tree for the ITS pixels. This fixes both the funny distribution of pixel coordinates and the missing hits/digits/points in many sectors of the ITS pixel barrel. Also included is a patch to properly get and use the detector dimensions through out the ITS code. (B.Nilsen)
+
+Revision 1.10  2001/02/09 00:00:57  nilsen
+Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
+bugs in iostream based streamers used to read and write .det files. Fixed
+some detector sizes. Fixed bugs in some default-special constructors.
+
+Revision 1.9  2001/02/03 00:00:30  nilsen
+New version of AliITSgeom and related files. Now uses automatic streamers,
+set up for new formatted .det file which includes detector information.
+Additional smaller modifications are still to come.
+
 */
 
 //#include "AliITSgeomSSD275and75.h"
@@ -281,6 +366,14 @@ AliITSgeomSSD275and75::AliITSgeomSSD275and75() : AliITSgeomSSD(){
 ////////////////////////////////////////////////////////////////////////
 //    default constructor
 ////////////////////////////////////////////////////////////////////////
+}
+//----------------------------------------------------------------------
+AliITSgeomSSD275and75::AliITSgeomSSD275and75(Int_t npar,Float_t *par) : 
+                                                            AliITSgeomSSD(){
+    // Default constructor for AliITSgeomSSD with strip angles of
+    // 275 miliradians and 75 miliradians. This constructor initlizes
+    // AliITSgeomSSD with the correct values. This is the miror image
+    // of the AliITSgeomSSD75and275 class.
     const Float_t kDxyz[] ={3.6500,0.0150,2.000};//cm. (Geant 3.12 units)
     // Size of sensitive detector area x,y(thickness),z
     const Float_t kangleA  = 0.0275; // angle in rad. of anode and cathodes
@@ -303,7 +396,7 @@ AliITSgeomSSD275and75::AliITSgeomSSD275and75() : AliITSgeomSSD(){
     leA[kNstrips] =  kDxyz[0];
     leC[kNstrips] = -kDxyz[0];
 //    cout << "AliITSgeomSSD275and75 default creator called: start" << endl;
-    AliITSgeomSSD::AliITSgeomSSD(kDxyz,kangleA,kangleC,
+    AliITSgeomSSD::ResetSSD(par,kangleA,kangleC,
                                 kNstrips+1,leA,kNstrips+1,leC);
     delete leA;
     delete leC;
@@ -330,6 +423,19 @@ istream &operator>>(istream &is,AliITSgeomSSD275and75 &r){
 //======================================================================
 /*
 $Log$
+Revision 1.11  2001/05/16 08:17:49  hristov
+Bug fixed in the StepManager to account for the difference in the geometry tree for the ITS pixels. This fixes both the funny distribution of pixel coordinates and the missing hits/digits/points in many sectors of the ITS pixel barrel. Also included is a patch to properly get and use the detector dimensions through out the ITS code. (B.Nilsen)
+
+Revision 1.10  2001/02/09 00:00:57  nilsen
+Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
+bugs in iostream based streamers used to read and write .det files. Fixed
+some detector sizes. Fixed bugs in some default-special constructors.
+
+Revision 1.9  2001/02/03 00:00:30  nilsen
+New version of AliITSgeom and related files. Now uses automatic streamers,
+set up for new formatted .det file which includes detector information.
+Additional smaller modifications are still to come.
+
 */
 //#include "AliITSgeomSSD75and275.h"
 
@@ -339,6 +445,13 @@ AliITSgeomSSD75and275::AliITSgeomSSD75and275() : AliITSgeomSSD(){
 ////////////////////////////////////////////////////////////////////////
 //    default constructor
 ////////////////////////////////////////////////////////////////////////
+}
+AliITSgeomSSD75and275::AliITSgeomSSD75and275(Int_t npar,Float_t *par) : 
+                                                            AliITSgeomSSD(){
+    // Default constructor for AliITSgeomSSD with strip angles of
+    // 75 miliradians and 275 miliradians. This constructor initlizes
+    // AliITSgeomSSD with the correct values. This is the miror image
+    // of the AliITSgeomSSD275and75 class.
     const Float_t kDxyz[] ={3.6500,0.0150,2.000};//cm. (Geant 3.12 units)
     // Size of sensitive detector area x,y(thickness),z
     const Float_t kangleA  = 0.0075; // angle in rad. of anode and cathodes
@@ -361,7 +474,7 @@ AliITSgeomSSD75and275::AliITSgeomSSD75and275() : AliITSgeomSSD(){
     leA[kNstrips] =  kDxyz[0];
     leC[kNstrips] = -kDxyz[0];
 //    cout << "AliITSgeomSSD275and75 default creator called: start" << endl;
-    AliITSgeomSSD::AliITSgeomSSD(kDxyz,kangleA,kangleC,
+    AliITSgeomSSD::ResetSSD(par,kangleA,kangleC,
                                 kNstrips+1,leA,kNstrips+1,leC);
     delete leA;
     delete leC;