R()->GetLoader()->GetRunLoader()->GetEvent(iEventN);
R()->GetLoader()->MakeTree("R"); R()->MakeBranch("R");
- R()->ResetDigits(); R()->ClustersReset();
+ R()->DigitsReset(); R()->ClustersReset();
R()->GetLoader()->TreeD()->GetEntry(0);
for(Int_t iChamber=1;iChamber<=kNchambers;iChamber++){//chambers loop
R()->GetLoader()->TreeR()->Fill(); R()->GetLoader()->WriteRecPoints("OVERWRITE");//write out clusters for current event
}//events loop
- R()->ResetDigits();//reset and unload everything
+ R()->DigitsReset();//reset and unload everything
R()->ClustersReset();
R()->GetLoader() ->UnloadDigits();
R()->GetLoader() ->UnloadRecPoints();
for(Int_t iDigN=0;iDigN<3*pCluster->Size()-1;iDigN++) {//loop on digits to sort tids
AliDebug(1,Form("%4i for digit n. %4i",contribs[pindex[iDigN]],iDigN));
if(contribs[pindex[iDigN]]!=contribs[pindex[iDigN+1]]) {
- TParticle* particle = pStack->Particle(contribs[pindex[iDigN]]);
- if (!particle) continue;
+ Int_t thecontrib = contribs[pindex[iDigN]];
+ if (thecontrib>=pStack->GetNtrack()) continue;//PH this should not happen
+ TParticle* particle = pStack->Particle(thecontrib);
+ if (!particle) continue;//PH this should not happen
Int_t code = particle->GetPdgCode();
Double_t charge = 0;
if(particle->GetPDG()) charge=particle->GetPDG()->Charge();
}//loop on digits to sort Tid
if (contribs[pindex[3*pCluster->Size()-1]]!=-1) {
+ Int_t thecontrib = contribs[pindex[3*pCluster->Size()-1]];
+ if (thecontrib<pStack->GetNtrack()){
+ //PH the opposite should not happen
- TParticle* particle = pStack->Particle(contribs[pindex[3*pCluster->Size()-1]]);
- Int_t code = particle->GetPdgCode();
- Double_t charge = 0;
- if(particle->GetPDG()) charge=particle->GetPDG()->Charge();
- AliDebug(1,Form(" charge of particle %f",charge));
- if(code==50000050) iNckovs++;
- if(code==50000051) iNfeeds++;
- if(charge!=0) iNmips++;
+ TParticle* particle = pStack->Particle(thecontrib);
+ if (particle) {
+ //PH the opposite should not happen
+ Int_t code = particle->GetPdgCode();
+ Double_t charge = 0;
+ if(particle->GetPDG()) charge=particle->GetPDG()->Charge();
+ AliDebug(1,Form(" charge of particle %f",charge));
+ if(code==50000050) iNckovs++;
+ if(code==50000051) iNfeeds++;
+ if(charge!=0) iNmips++;
+ }
+ }
}
pCluster->CFM(iNckovs,iNfeeds,iNmips);
}
}
if(iNotMax==0) {
- TVector2 x2=AliRICHParam::Pad2Loc(pad1);
- fLocalX[fNlocals]=x2.X();fLocalY[fNlocals]=x2.Y();
- fLocalQ[fNlocals] = (Double_t)padQ1;
- fLocalC[fNlocals] = padC1;
- fNlocals++;
+ if (fNlocals<100) {
+ TVector2 x2=AliRICHParam::Pad2Loc(pad1);
+ fLocalX[fNlocals]=x2.X();fLocalY[fNlocals]=x2.Y();
+ fLocalQ[fNlocals] = (Double_t)padQ1;
+ fLocalC[fNlocals] = padC1;
+ fNlocals++;
+ }
}
}
AliDebug(1,Form("Number of local maxima found ---> %i",fNlocals));