]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSgeomSSD.cxx
AliTrackReference constructor without passing pointer to VMC.
[u/mrichter/AliRoot.git] / ITS / AliITSgeomSSD.cxx
index 592857d3991e5cf1c0774ebe57e31787908dff5d..6e0321e16e6c77632752d70e46fee428edcfa1f5 100644 (file)
 
 /*
 $Log$
+Revision 1.18  2002/12/03 09:03:06  hristov
+Changes needed on Itanium (F.Carminati)
+
+Revision 1.17  2002/10/22 14:45:41  alibrary
+Introducing Riostream.h
+
+Revision 1.16  2002/10/14 14:57:00  hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
+Revision 1.14.6.1  2002/06/10 17:51:15  hristov
+Merged with v3-08-02
+
+Revision 1.15  2002/05/19 18:17:03  hristov
+Changes needed by ICC/IFC compiler (Intel)
+
+Revision 1.14  2001/11/19 16:17:03  nilsen
+Applyed fixes to bugs found by Rene Brun. With many thanks. Some additonal
+bugs found by Rene require more work to fix. Will be fixed soon.
+
+Revision 1.13  2001/10/12 22:07:20  nilsen
+A patch for C++ io manipulation functions so that they will work both
+with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
+other platforms.
+
+Revision 1.12  2001/08/24 21:06:37  nilsen
+Added more documentation, fixed up some coding violations, and some
+forward declorations.
+
+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
@@ -45,8 +76,15 @@ Revision 1.2  1999/09/29 09:24:20  fca
 Introduction of the Copyright and cvs Log
 
 */
-#include <iostream.h>
-#include <iomanip.h>
+
+////////////////////////////////////////////////////////////////////////
+// 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 <Riostream.h>
 #include <stdlib.h>
 #include <TShape.h>
 #include <TBRIK.h>
@@ -110,9 +148,9 @@ void AliITSgeomSSD::ResetSSD(const Float_t *box,Float_t ap,Float_t an,
 AliITSgeomSSD::~AliITSgeomSSD(){
     // Destructor.
 
-    delete fLowEdgeP; fLowEdgeP = 0;
-    delete fLowEdgeN; fLowEdgeN = 0;
-    delete fShapeSSD; fShapeSSD = 0;
+    if(fLowEdgeP) delete [] fLowEdgeP; fLowEdgeP = 0;
+    if(fLowEdgeN) delete [] fLowEdgeN; fLowEdgeN = 0;
+    if(fShapeSSD) delete  fShapeSSD; fShapeSSD = 0;
     fNp = 0;
     fNn = 0;
     fAngleP = 0.0;
@@ -161,6 +199,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;
 
@@ -191,8 +237,20 @@ void AliITSgeomSSD::Print(ostream *os) const {
 ////////////////////////////////////////////////////////////////////////
 // Standard output format for this class.
 ////////////////////////////////////////////////////////////////////////
-    Int_t fmt;
     Int_t i;
+#if defined __GNUC__
+#if __GNUC__ > 2
+    ios::fmtflags fmt;
+#else
+    Int_t fmt;
+#endif
+#else
+#if defined __ICC || defined __ECC
+    ios::fmtflags fmt;
+#else
+    Int_t fmt;
+#endif
+#endif
 
     fmt = os->setf(ios::scientific);  // set scientific floating point output
     *os << "TBRIK" << " ";
@@ -253,6 +311,37 @@ istream &operator>>(istream &is,AliITSgeomSSD &r){
 //======================================================================
 /*
 $Log$
+Revision 1.18  2002/12/03 09:03:06  hristov
+Changes needed on Itanium (F.Carminati)
+
+Revision 1.17  2002/10/22 14:45:41  alibrary
+Introducing Riostream.h
+
+Revision 1.16  2002/10/14 14:57:00  hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
+Revision 1.14.6.1  2002/06/10 17:51:15  hristov
+Merged with v3-08-02
+
+Revision 1.15  2002/05/19 18:17:03  hristov
+Changes needed by ICC/IFC compiler (Intel)
+
+Revision 1.14  2001/11/19 16:17:03  nilsen
+Applyed fixes to bugs found by Rene Brun. With many thanks. Some additonal
+bugs found by Rene require more work to fix. Will be fixed soon.
+
+Revision 1.13  2001/10/12 22:07:20  nilsen
+A patch for C++ io manipulation functions so that they will work both
+with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
+other platforms.
+
+Revision 1.12  2001/08/24 21:06:37  nilsen
+Added more documentation, fixed up some coding violations, and some
+forward declorations.
+
+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
@@ -321,6 +410,37 @@ istream &operator>>(istream &is,AliITSgeomSSD175 &r){
 //======================================================================
 /*
 $Log$
+Revision 1.18  2002/12/03 09:03:06  hristov
+Changes needed on Itanium (F.Carminati)
+
+Revision 1.17  2002/10/22 14:45:41  alibrary
+Introducing Riostream.h
+
+Revision 1.16  2002/10/14 14:57:00  hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
+Revision 1.14.6.1  2002/06/10 17:51:15  hristov
+Merged with v3-08-02
+
+Revision 1.15  2002/05/19 18:17:03  hristov
+Changes needed by ICC/IFC compiler (Intel)
+
+Revision 1.14  2001/11/19 16:17:03  nilsen
+Applyed fixes to bugs found by Rene Brun. With many thanks. Some additonal
+bugs found by Rene require more work to fix. Will be fixed soon.
+
+Revision 1.13  2001/10/12 22:07:20  nilsen
+A patch for C++ io manipulation functions so that they will work both
+with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
+other platforms.
+
+Revision 1.12  2001/08/24 21:06:37  nilsen
+Added more documentation, fixed up some coding violations, and some
+forward declorations.
+
+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
@@ -345,6 +465,10 @@ AliITSgeomSSD275and75::AliITSgeomSSD275and75() : AliITSgeomSSD(){
 //----------------------------------------------------------------------
 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
@@ -369,8 +493,8 @@ AliITSgeomSSD275and75::AliITSgeomSSD275and75(Int_t npar,Float_t *par) :
 //    cout << "AliITSgeomSSD275and75 default creator called: start" << endl;
     AliITSgeomSSD::ResetSSD(par,kangleA,kangleC,
                                 kNstrips+1,leA,kNstrips+1,leC);
-    delete leA;
-    delete leC;
+    delete [] leA;
+    delete [] leC;
 //    cout << "AliITSgeomSSD275and75 default creator called: end" << endl;
 }
 //________________________________________________________________________
@@ -394,6 +518,37 @@ istream &operator>>(istream &is,AliITSgeomSSD275and75 &r){
 //======================================================================
 /*
 $Log$
+Revision 1.18  2002/12/03 09:03:06  hristov
+Changes needed on Itanium (F.Carminati)
+
+Revision 1.17  2002/10/22 14:45:41  alibrary
+Introducing Riostream.h
+
+Revision 1.16  2002/10/14 14:57:00  hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
+Revision 1.14.6.1  2002/06/10 17:51:15  hristov
+Merged with v3-08-02
+
+Revision 1.15  2002/05/19 18:17:03  hristov
+Changes needed by ICC/IFC compiler (Intel)
+
+Revision 1.14  2001/11/19 16:17:03  nilsen
+Applyed fixes to bugs found by Rene Brun. With many thanks. Some additonal
+bugs found by Rene require more work to fix. Will be fixed soon.
+
+Revision 1.13  2001/10/12 22:07:20  nilsen
+A patch for C++ io manipulation functions so that they will work both
+with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
+other platforms.
+
+Revision 1.12  2001/08/24 21:06:37  nilsen
+Added more documentation, fixed up some coding violations, and some
+forward declorations.
+
+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
@@ -416,6 +571,10 @@ AliITSgeomSSD75and275::AliITSgeomSSD75and275() : AliITSgeomSSD(){
 }
 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