]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSsimulation.cxx
Modifications associated with remerging the Ba/Sa and Dubna pixel simulations,
[u/mrichter/AliRoot.git] / ITS / AliITSsimulation.cxx
index 167dadd0992d426948e7ccd1af5af03795d06a19..3f61040b5c786e8cc904bef3904e7767bba80d85 100644 (file)
 
 ClassImp(AliITSsimulation)
 
-AliITSsimulation::AliITSsimulation(){
-    // constructor
-    fSegmentation = 0;
-    fResponse     = 0;
-    fpList        = 0;
+//______________________________________________________________________
+AliITSsimulation::AliITSsimulation(): TObject(),
+fResponse(0),
+fSegmentation(0),
+fpList(0),
+fModule(0),
+fEvent(0),
+fDebug(0){
+    // Default constructor
+    // Inputs:
+    //    none.
+    // Outputs:
+    //    none.
+    // Return:
+    //    a default constructed AliITSsimulation class
+}
+//______________________________________________________________________
+AliITSsimulation::AliITSsimulation(AliITSsegmentation *seg,
+                                   AliITSresponse *res): TObject(),
+fResponse(res),
+fSegmentation(seg),
+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.
+    // Outputs:
+    //    none.
+    // Return:
+    //    a default constructed AliITSsimulation class
 }
 //__________________________________________________________________________
 AliITSsimulation::~AliITSsimulation(){
     // destructor
+    // Inputs:
+    //    none.
+    // Outputs:
+    //    none.
+    // Return:
+    //    none.
+
     fSegmentation = 0; // local copies of pointer, do not delete
     fResponse     = 0; // local copies of pointer, do not delete
     delete fpList;
 }
 //__________________________________________________________________________
-AliITSsimulation::AliITSsimulation(const AliITSsimulation &source) : 
-    TObject(source){
-    //     Copy Constructor 
+AliITSsimulation::AliITSsimulation(const AliITSsimulation &s) : TObject(s){
+    //     Copy Constructor
+    // Inputs:
+    //    const AliITSsimulation &s  simulation class to copy from
+    // Outputs:
+    //    none.
+    // Return:
+    //    a standard constructed AliITSsimulation class with values the same
+    //    as that of s.
  
-    if(&source == this) return;
-    this->fResponse     = source.fResponse;
-    this->fSegmentation = source.fSegmentation;
-    this->fModule       = source.fModule;
-    this->fEvent        = source.fEvent;
-    this->fpList        = source.fpList;
+    *this = s;
     return;
 }
 
 //_________________________________________________________________________
-AliITSsimulation&  AliITSsimulation::operator=(const AliITSsimulation &source){
+AliITSsimulation&  AliITSsimulation::operator=(const AliITSsimulation &s){
     //    Assignment operator
+    // Inputs:
+    //    const AliITSsimulation &s  simulation class to copy from
+    // Outputs:
+    //    none.
+    // Return:
+    //    a standard constructed AliITSsimulation class with values the same
+    //    as that of s.
 
-    if(&source == this) return *this;
-    this->fResponse     = source.fResponse; 
-    this->fSegmentation = source.fSegmentation;
-    this->fModule       = source.fModule;
-    this->fEvent        = source.fEvent;
-    this->fpList        = source.fpList;
+    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;
     return *this;
 }
 //______________________________________________________________________
 Bool_t AliITSsimulation::AddSDigitsToModule(TClonesArray *pItemA,Int_t mask ){
     // Add Summable digits to module maps.
+    // Inputs:
+    //    TClonesArray *pItemA  Array of AliITSpListItems (SDigits).
+    //    Int_t         mask    Track number off set value (see 
+    //                          AliITSpList::AddItemTo).
+    // Outputs:
+    //    none.
+    // Return:
+    //    kTRUE if there is a signal >0 else kFALSE
     Int_t nItems = pItemA->GetEntries();
     Bool_t sig = kFALSE;
  
@@ -70,11 +121,11 @@ Bool_t AliITSsimulation::AddSDigitsToModule(TClonesArray *pItemA,Int_t mask ){
         AliITSpListItem * pItem = (AliITSpListItem *)(pItemA->At( i ));
         if( pItem->GetModule() != fModule ) {
             Error( "AddSDigitsToModule","Error reading, SDigits module %d "
-                  "!= current module %d: exit",
-                  pItem->GetModule(), fModule );
+                   "!= current module %d: exit",
+                   pItem->GetModule(), fModule );
             return sig;
         } // end if
-       if(pItem->GetSignal()>0.0 ) sig = kTRUE;
+        if(pItem->GetSignal()>0.0 ) sig = kTRUE;
         fpList->AddItemTo( mask, pItem );
     } // end for i
     return sig;