1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 #include "TClonesArray.h"
18 #include "AliITSsimulation.h"
19 #include "AliITSpList.h"
21 ClassImp(AliITSsimulation)
23 AliITSsimulation::AliITSsimulation(){
32 //__________________________________________________________________________
33 AliITSsimulation::~AliITSsimulation(){
35 fSegmentation = 0; // local copies of pointer, do not delete
36 fResponse = 0; // local copies of pointer, do not delete
39 //__________________________________________________________________________
40 AliITSsimulation::AliITSsimulation(const AliITSsimulation &s) : TObject(s){
47 //_________________________________________________________________________
48 AliITSsimulation& AliITSsimulation::operator=(const AliITSsimulation &s){
49 // Assignment operator
51 if(&s == this) return *this;
52 this->fResponse = s.fResponse;
53 this->fSegmentation = s.fSegmentation;
54 this->fModule = s.fModule;
55 this->fEvent = s.fEvent;
56 this->fpList = s.fpList;
59 //______________________________________________________________________
60 Bool_t AliITSsimulation::AddSDigitsToModule(TClonesArray *pItemA,Int_t mask ){
61 // Add Summable digits to module maps.
62 Int_t nItems = pItemA->GetEntries();
65 // cout << "Adding "<< nItems <<" SDigits to module " << fModule << endl;
66 for( Int_t i=0; i<nItems; i++ ) {
67 AliITSpListItem * pItem = (AliITSpListItem *)(pItemA->At( i ));
68 if( pItem->GetModule() != fModule ) {
69 Error( "AddSDigitsToModule","Error reading, SDigits module %d "
70 "!= current module %d: exit",
71 pItem->GetModule(), fModule );
74 if(pItem->GetSignal()>0.0 ) sig = kTRUE;
75 fpList->AddItemTo( mask, pItem );