fAliITSQADataMakerRec->GetRecPointsData(i+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Reset();
}
}
- Int_t firMod=AliITSgeomTGeo::GetModuleIndex(3,1,1);
+ // AliITSgeomTGeo::GetModuleIndex() issues an error in case the arguments
+ // are illegal and returns -1
+ Int_t firMod=TMath::Max(0,AliITSgeomTGeo::GetModuleIndex(3,1,1));
Int_t lasMod=AliITSgeomTGeo::GetModuleIndex(5,1,1);
for(Int_t module=firMod; module<lasMod;module++){
//AliInfo(Form("Module %d\n",module));
" - LDC: "<<rawReader->GetLDCId()<<
" - Size: "<<rawReader->GetDataSize()<<
" - Equipment size: "<<rawReader->GetEquipmentSize()<<endl;*/
- gSizePerDDL[rawReader->GetDDLID()] = rawReader->GetDataSize();
+ Int_t ddlid = rawReader->GetDDLID();
+ if(ddlid<0){
+ AliError("GetDDLID returns a negative value");
+ continue;
+ }
+ gSizePerDDL[ddlid] = rawReader->GetDataSize();
//gSizePerLDC[rawReader->GetLDCId()-8] = rawReader->GetDataSize();
AliITSgeomTGeo::GetModuleId(gSSDStream.GetModuleID(),gLayer,gLadder,gModule);
gHistPosition = (gLayer == 5) ? ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER5 + gModule - 1) : ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER6 + gModule + fgkSSDMODULESLAYER5 - 1);
Int_t npoints = 0;
Float_t cluglo[3]={0.,0.,0.};
//printf("*-*-*-*-*-*-*---*-*-*-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints STEP1 \n");
- Int_t firMod = AliITSgeomTGeo::GetModuleIndex(5,1,1);
+ // AliITSgeomTGeo::GetModuleIndex() issues an error in case the arguments
+ // are illegal and returns -1
+ Int_t firMod = TMath::Max(0,AliITSgeomTGeo::GetModuleIndex(5,1,1));
Int_t lasMod = AliITSgeomTGeo::GetNModules();
for(Int_t module = firMod; module < lasMod; module++){
recpoints = rpcont->UncheckedGetClusters(module);
if (ddlID==-1) { // we may need to read one word to get the blockAttr
if (!ReadNextShort()) return -1;
ddlID = fRawReader->GetDDLID();
+ if(ddlID<0){
+ AliError("fRawReader->GetDDLID() returns a negative value");
+ ddlID=0;
+ }
}
// reset flags and counters
fEqPLBytesRead = 2;
flag=0;
-
- fModuleID = fgkDDLModuleMap[fRawReader->GetDDLID()][relModuleID];
+ Int_t ddlid=fRawReader->GetDDLID();
+ if(ddlid<0){
+ AliError("fRawReader->GetDDLID returns a negative value");
+ ddlid=0;
+ }
+ fModuleID = fgkDDLModuleMap[ddlid][relModuleID];
fCoord2 = (fData >> 12) & 0x000007FF;
fCoord1 = (fCoord2 < 768) ? 0 : 1; // strip 0 - 767 are Pside, strip 768 - 1535 are Nside
Int_t ladmod=fLadders[ladder-1]+ladl2;
if(ladmod>AliITSgeomTGeo::GetNLadders(2)) ladmod=ladmod-AliITSgeomTGeo::GetNLadders(2);
Int_t modul2=AliITSgeomTGeo::GetModuleIndex(2,ladmod,k+1);
+ if(modul2<0)continue;
if(!fUseModule[modul2]) continue;
itsRec=rpcont->UncheckedGetClusters(modul2);
Int_t nrecp2 = itsRec->GetEntries();
Int_t ladmod=fLadders[ladder-1]+ladl2;
if(ladmod>AliITSgeomTGeo::GetNLadders(2)) ladmod=ladmod-AliITSgeomTGeo::GetNLadders(2);
Int_t modul2=AliITSgeomTGeo::GetModuleIndex(2,ladmod,k+1);
+ if(modul2<0)continue;
if(!fUseModule[modul2]) continue;
itsRec=recpArr[modul2]; // rpcont->UncheckedGetClusters(modul2);
Int_t nrecp2 = nEntriesMod[modul2]; // itsRec->GetEntries();
} // end if outsize of detector
s = 0.0;
i = -1;
- while(z>s){
- i++;
- s += fCellSizeZ[i];
- } // end while
+ do {
+ i++;
+ s += fCellSizeZ[i];
+ } while(z>s);
s -= fCellSizeZ[i];
col = (Float_t) i + (z-s)/fCellSizeZ[i];
return col;