]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSsimulation.cxx
Fix in assignment of label to SDD RecPoints (F. Prino)
[u/mrichter/AliRoot.git] / ITS / AliITSsimulation.cxx
index 3f61040b5c786e8cc904bef3904e7767bba80d85..838cbd0fd9201fda6fff3e30aba856b31c3b09f8 100644 (file)
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
-
+//////////////////////////////////////////////////////////////////////////////
+// This is the base class for ITS detector signal simulations. Data members //
+// include are a pointer to the AliITSDetTypeSim clas in order to access    //
+// segmentation and response objects                                        // 
+// classes. See the detector specific implementations for the propper code. //
+//////////////////////////////////////////////////////////////////////////////
 #include "TClonesArray.h"
 
 #include "AliITSsimulation.h"
@@ -22,8 +27,7 @@ ClassImp(AliITSsimulation)
 
 //______________________________________________________________________
 AliITSsimulation::AliITSsimulation(): TObject(),
-fResponse(0),
-fSegmentation(0),
+fDetType(0),
 fpList(0),
 fModule(0),
 fEvent(0),
@@ -37,18 +41,15 @@ fDebug(0){
     //    a default constructed AliITSsimulation class
 }
 //______________________________________________________________________
-AliITSsimulation::AliITSsimulation(AliITSsegmentation *seg,
-                                   AliITSresponse *res): TObject(),
-fResponse(res),
-fSegmentation(seg),
+AliITSsimulation::AliITSsimulation(AliITSDetTypeSim *dettyp): TObject(),
+fDetType(dettyp),
 fpList(0),
 fModule(0),
 fEvent(0),
 fDebug(0){
     // Default constructor
     // Inputs:
-    //    AliITSsegmentation *seg  Segmentation class to be used
-    //    AliITSresponse     *res  Response class to be used.
+    //    AliITSDetTypeSim * : object used to access segmentation and response
     // Outputs:
     //    none.
     // Return:
@@ -64,12 +65,18 @@ AliITSsimulation::~AliITSsimulation(){
     // Return:
     //    none.
 
-    fSegmentation = 0; // local copies of pointer, do not delete
-    fResponse     = 0; // local copies of pointer, do not delete
-    delete fpList;
-}
+    if(fpList){
+      delete fpList;
+      fpList = 0;
+    }
+   }
 //__________________________________________________________________________
-AliITSsimulation::AliITSsimulation(const AliITSsimulation &s) : TObject(s){
+AliITSsimulation::AliITSsimulation(const AliITSsimulation &s) : TObject(s),
+fDetType(s.fDetType),
+fpList(s.fpList),
+fModule(s.fModule),
+fEvent(s.fEvent),
+fDebug(s.fDebug){
     //     Copy Constructor
     // Inputs:
     //    const AliITSsimulation &s  simulation class to copy from
@@ -79,8 +86,6 @@ AliITSsimulation::AliITSsimulation(const AliITSsimulation &s) : TObject(s){
     //    a standard constructed AliITSsimulation class with values the same
     //    as that of s.
  
-    *this = s;
-    return;
 }
 
 //_________________________________________________________________________
@@ -95,8 +100,6 @@ AliITSsimulation&  AliITSsimulation::operator=(const AliITSsimulation &s){
     //    as that of s.
 
     if(&s == this) return *this;
-    this->fResponse     = s.fResponse; 
-    this->fSegmentation = s.fSegmentation;
     this->fModule       = s.fModule;
     this->fEvent        = s.fEvent;
     this->fpList        = s.fpList;