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 //______________________________________________________________________
24 AliITSsimulation::AliITSsimulation(): TObject(),
31 // Default constructor
37 // a default constructed AliITSsimulation class
39 //______________________________________________________________________
40 AliITSsimulation::AliITSsimulation(AliITSsegmentation *seg,
41 AliITSresponse *res): TObject(),
48 // Default constructor
50 // AliITSsegmentation *seg Segmentation class to be used
51 // AliITSresponse *res Response class to be used.
55 // a default constructed AliITSsimulation class
57 //__________________________________________________________________________
58 AliITSsimulation::~AliITSsimulation(){
67 fSegmentation = 0; // local copies of pointer, do not delete
68 fResponse = 0; // local copies of pointer, do not delete
71 //__________________________________________________________________________
72 AliITSsimulation::AliITSsimulation(const AliITSsimulation &s) : TObject(s){
75 // const AliITSsimulation &s simulation class to copy from
79 // a standard constructed AliITSsimulation class with values the same
86 //_________________________________________________________________________
87 AliITSsimulation& AliITSsimulation::operator=(const AliITSsimulation &s){
88 // Assignment operator
90 // const AliITSsimulation &s simulation class to copy from
94 // a standard constructed AliITSsimulation class with values the same
97 if(&s == this) return *this;
98 this->fResponse = s.fResponse;
99 this->fSegmentation = s.fSegmentation;
100 this->fModule = s.fModule;
101 this->fEvent = s.fEvent;
102 this->fpList = s.fpList;
105 //______________________________________________________________________
106 Bool_t AliITSsimulation::AddSDigitsToModule(TClonesArray *pItemA,Int_t mask ){
107 // Add Summable digits to module maps.
109 // TClonesArray *pItemA Array of AliITSpListItems (SDigits).
110 // Int_t mask Track number off set value (see
111 // AliITSpList::AddItemTo).
115 // kTRUE if there is a signal >0 else kFALSE
116 Int_t nItems = pItemA->GetEntries();
119 // cout << "Adding "<< nItems <<" SDigits to module " << fModule << endl;
120 for( Int_t i=0; i<nItems; i++ ) {
121 AliITSpListItem * pItem = (AliITSpListItem *)(pItemA->At( i ));
122 if( pItem->GetModule() != fModule ) {
123 Error( "AddSDigitsToModule","Error reading, SDigits module %d "
124 "!= current module %d: exit",
125 pItem->GetModule(), fModule );
128 if(pItem->GetSignal()>0.0 ) sig = kTRUE;
129 fpList->AddItemTo( mask, pItem );