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 **************************************************************************/
15 //////////////////////////////////////////////////////////////////////////////
16 // This is the base class for ITS detector signal simulations. Data members //
17 // include are a pointer to the AliITSDetTypeSim clas in order to access //
18 // segmentation and response objects //
19 // classes. See the detector specific implementations for the propper code. //
20 //////////////////////////////////////////////////////////////////////////////
21 #include "TClonesArray.h"
23 #include "AliITSsimulation.h"
24 #include "AliITSpList.h"
26 ClassImp(AliITSsimulation)
28 //______________________________________________________________________
29 AliITSsimulation::AliITSsimulation(): TObject(),
34 // Default constructor
40 // a default constructed AliITSsimulation class
43 //______________________________________________________________________
44 AliITSsimulation::AliITSsimulation(AliITSDetTypeSim *dettyp): TObject(),
49 // Default constructor
51 // AliITSDetTypeSim * : object used to access segmentation and response
55 // a default constructed AliITSsimulation class
58 //__________________________________________________________________________
59 AliITSsimulation::~AliITSsimulation(){
73 //__________________________________________________________________________
74 AliITSsimulation::AliITSsimulation(const AliITSsimulation &s) : TObject(s){
77 // const AliITSsimulation &s simulation class to copy from
81 // a standard constructed AliITSsimulation class with values the same
88 //_________________________________________________________________________
89 AliITSsimulation& AliITSsimulation::operator=(const AliITSsimulation &s){
90 // Assignment operator
92 // const AliITSsimulation &s simulation class to copy from
96 // a standard constructed AliITSsimulation class with values the same
99 if(&s == this) return *this;
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 );