]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSsimulation.cxx
AliITSv11 and AliITSBaseGeometry commented out (temporary)
[u/mrichter/AliRoot.git] / ITS / AliITSsimulation.cxx
CommitLineData
b0f5e3fc 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
b361c75d 16#include "TClonesArray.h"
17
b0f5e3fc 18#include "AliITSsimulation.h"
b361c75d 19#include "AliITSpList.h"
b0f5e3fc 20
d4a64099 21ClassImp(AliITSsimulation)
b0f5e3fc 22
b361c75d 23AliITSsimulation::AliITSsimulation(){
24 // constructor
25 fSegmentation = 0;
26 fResponse = 0;
27 fpList = 0;
28}
29//__________________________________________________________________________
30AliITSsimulation::~AliITSsimulation(){
31 // destructor
32 fSegmentation = 0; // local copies of pointer, do not delete
33 fResponse = 0; // local copies of pointer, do not delete
34 delete fpList;
b0f5e3fc 35}
b0f5e3fc 36//__________________________________________________________________________
ac74f489 37AliITSsimulation::AliITSsimulation(const AliITSsimulation &source) :
38 TObject(source){
b361c75d 39 // Copy Constructor
40
41 if(&source == this) return;
42 this->fResponse = source.fResponse;
43 this->fSegmentation = source.fSegmentation;
44 this->fModule = source.fModule;
45 this->fEvent = source.fEvent;
46 this->fpList = source.fpList;
47 return;
b0f5e3fc 48}
49
50//_________________________________________________________________________
b361c75d 51AliITSsimulation& AliITSsimulation::operator=(const AliITSsimulation &source){
52 // Assignment operator
53
54 if(&source == this) return *this;
55 this->fResponse = source.fResponse;
56 this->fSegmentation = source.fSegmentation;
57 this->fModule = source.fModule;
58 this->fEvent = source.fEvent;
59 this->fpList = source.fpList;
60 return *this;
61}
62//______________________________________________________________________
d4a64099 63Bool_t AliITSsimulation::AddSDigitsToModule(TClonesArray *pItemA,Int_t mask ){
b361c75d 64 // Add Summable digits to module maps.
65 Int_t nItems = pItemA->GetEntries();
d4a64099 66 Bool_t sig = kFALSE;
b361c75d 67
68 // cout << "Adding "<< nItems <<" SDigits to module " << fModule << endl;
69 for( Int_t i=0; i<nItems; i++ ) {
70 AliITSpListItem * pItem = (AliITSpListItem *)(pItemA->At( i ));
71 if( pItem->GetModule() != fModule ) {
72 Error( "AddSDigitsToModule","Error reading, SDigits module %d "
73 "!= current module %d: exit",
74 pItem->GetModule(), fModule );
d4a64099 75 return sig;
b361c75d 76 } // end if
d4a64099 77 if(pItem->GetSignal()>0.0 ) sig = kTRUE;
b361c75d 78 fpList->AddItemTo( mask, pItem );
79 } // end for i
d4a64099 80 return sig;
b0f5e3fc 81}