- AliITSDDLModuleMapSDD* ddlmap=fDetTypeSim->GetDDLModuleMapSDD();
- inputSDD->SetDDLModuleMap(ddlmap);
- while(inputSDD->Next()){
- if(inputSDD->IsCompletedModule()==kFALSE &&
- inputSDD->IsCompletedDDL()==kFALSE){
-
- Int_t module = inputSDD->GetModuleID();
- Int_t anode = inputSDD->GetCoord1()+segSDD->NpzHalf()*inputSDD->GetChannel();
- Int_t time = inputSDD->GetCoord2();
- Int_t signal10 = inputSDD->GetSignal();
- Int_t index = AliITSpList::GetIndex(anode,time,scalef*npx);
-
- if (module >= size) continue;
- last = modA[module]->GetEntries();
- TClonesArray& dum = *modA[module];
- new (dum[last]) AliITSpListItem(-1, -1, module, index, Double_t(signal10));
- ((AliITSpListItem*) dum.At(last))->AddSignalAfterElect(module, index, Double_t(signal10));
- }
+ AliITSDDLModuleMapSDD* ddlmap=fDetTypeSim->GetDDLModuleMapSDD();
+ inputSDD->SetDDLModuleMap(ddlmap);
+ while(inputSDD->Next()){
+ countRW++; // RS
+ if(inputSDD->IsCompletedModule()==kFALSE &&
+ inputSDD->IsCompletedDDL()==kFALSE){
+
+ Int_t module = inputSDD->GetModuleID();
+ Int_t anode = inputSDD->GetCoord1()+segSDD->NpzHalf()*inputSDD->GetChannel();
+ Int_t time = inputSDD->GetCoord2();
+ Int_t signal10 = inputSDD->GetSignal();
+ Int_t index = AliITSpList::GetIndex(anode,time,scalef*npx);
+
+ if (module >= size) continue;
+ last = fModA[module]->GetEntries();
+ TClonesArray& dum = *fModA[module];
+ int label = kMaxLabel;
+ if (rawID2clusID) { // RS If the raw->cluster ID is set (filled by cluster finder) store cluster ID's in SDigits
+ if (rawID2clusID->GetSize()<=countRW) {AliError(Form("The buffer of rawSDD to clusSDD ID's is shorter than current rawSDD ID=%d",countRW));}
+ else label = (*rawID2clusID)[countRW];
+ }
+ new (dum[last]) AliITSpListItem(label, -1, module, index, Double_t(signal10));
+ ((AliITSpListItem*) dum.At(last))->AddSignalAfterElect(module, index, Double_t(signal10));