if(GetReader()->ReadStack())
{
stack = GetMCStack() ;
- if ( !stack ) AliFatal("Stack not available, is the MC handler called? STOP");
+ if ( !stack )
+ {
+ AliFatal("Stack not available, is the MC handler called? STOP");
+ return;
+ }
}
else if(GetReader()->ReadAODMCParticles())
{
//Get the list of MC particles
mcparticles = GetReader()->GetAODMCParticles();
- if ( !mcparticles ) AliFatal("Standard MCParticles not available! STOP");
+ if ( !mcparticles )
+ {
+ AliFatal("Standard MCParticles not available! STOP");
+ return;
+ }
}
}// is data and MC
Float_t eprim = 0;
//Float_t ptprim = 0;
- if(GetReader()->ReadStack())
+ if( GetReader()->ReadStack() )
{
if(label >= stack->GetNtrack())
{
//ptprim = primary->Pt();
}
- else if(GetReader()->ReadAODMCParticles())
+ else if( GetReader()->ReadAODMCParticles() )
{
- //Check which is the input
- if(ph->GetInputFileIndex() == 0)
+ if(label >= mcparticles->GetEntriesFast())
{
- if(!mcparticles) continue;
-
- if(label >= mcparticles->GetEntriesFast())
- {
- AliDebug(1,Form("*** large label ***: label %d, n tracks %d",label, mcparticles->GetEntriesFast()));
- continue ;
- }
- //Get the particle
- aodprimary = (AliAODMCParticle*) mcparticles->At(label);
-
+ AliDebug(1,Form("*** large label ***: label %d, n tracks %d",label, mcparticles->GetEntriesFast()));
+ continue ;
}
+ //Get the particle
+ aodprimary = (AliAODMCParticle*) mcparticles->At(label);
if(!aodprimary)
{
if( GetReader()->ReadStack() )
{
stack = GetMCStack();
- if(!stack ) return;
+ if( !stack )
+ {
+ AliFatal("Stack not available, is the MC handler called? STOP");
+ return;
+ }
nprim = stack->GetNtrack();
}
if( GetReader()->ReadAODMCParticles() )
{
mcparticles = GetReader()->GetAODMCParticles();
- if( !mcparticles ) return;
+ if( !mcparticles )
+ {
+ AliFatal("Standard MCParticles not available!");
+ return;
+ }
nprim = mcparticles->GetEntriesFast();
}
{
stack = GetMCStack() ;
if(!stack)
+ {
AliFatal("Stack not available, is the MC handler called? STOP");
+ return;
+ }
}
else if(GetReader()->ReadAODMCParticles())
{
//Get the list of MC particles
mcparticles = GetReader()->GetAODMCParticles();
if(!mcparticles)
+ {
AliFatal("Standard MCParticles not available!");
+ return;
+ }
}
}// is data and MC
}
else if(GetReader()->ReadAODMCParticles())
{
- //Check which is the input
- if(ph->GetInputFileIndex() == 0)
+ if(label >= mcparticles->GetEntriesFast())
{
- if(!mcparticles) continue;
-
- if(label >= mcparticles->GetEntriesFast())
- {
- AliDebug(2,Form("*** large label ***: label %d, n tracks %d",label, mcparticles->GetEntriesFast()));
- continue ;
- }
-
- //Get the particle
- aodprimary = (AliAODMCParticle*) mcparticles->At(label);
-
+ AliDebug(2,Form("*** large label ***: label %d, n tracks %d",label, mcparticles->GetEntriesFast()));
+ continue ;
}
+ //Get the particle
+ aodprimary = (AliAODMCParticle*) mcparticles->At(label);
+
if(!aodprimary)
{
AliDebug(2,Form("*** no primary ***: label %d", label));