}
- AliAODHeader *aodHeader = fAOD->GetHeader();
+ AliAODHeader *aodHeader = dynamic_cast<AliAODHeader*>(fAOD->GetHeader());
+ if(!aodHeader) AliFatal("Not a standard AOD");
fCentrality = (Int_t)aodHeader->GetCentralityP()->GetCentralityPercentile(fCentralityEstimator.Data());
/* Int_t cent = -1;
Int_t gID = aodTrack1->GetID();
//if( aodTrack->GetID() != (-aodTrack1->GetID() -1) ) continue;
- newAodTrack = gID >= 0 ? aodTrack1 : fAOD->GetTrack(trackMap->GetValue(-1-gID)); //Take those global track who corresponds to TPC only track
+ newAodTrack = gID >= 0 ? aodTrack1 : dynamic_cast<AliAODTrack*>(fAOD->GetTrack(trackMap->GetValue(-1-gID))); //Take those global track who corresponds to TPC only track
+ if(!newAodTrack) AliFatal("Not a standard AOD");
Float_t dxy = 0., dz = 0.;
fTPCSig->Fill(newAodTrack->GetTPCmomentum(),tpcSignal);
Float_t nsigmaTPCPID = -999.;
- Float_t nsigmaTOFPID = -999.;
+ //Float_t nsigmaTOFPID = -999.;
//Float_t nsigmaTPCTOFPID = -999.;
nsigmaTPCPID = TMath::Abs(fPIDResponse->NumberOfSigmasTPC(newAodTrack,fParticleSpecies));
- nsigmaTOFPID = TMath::Abs(fPIDResponse->NumberOfSigmasTOF(newAodTrack,fParticleSpecies));
+ //nsigmaTOFPID = TMath::Abs(fPIDResponse->NumberOfSigmasTOF(newAodTrack,fParticleSpecies));
if ( nsigmaTPCPID < fNSigmaCut ){
- Double_t fContainerCh[3] = { fCentrality, nPlusCharge, nMinusCharge};
- Double_t fContainerPid[3] = { fCentrality, nPartile, nAntiParticle};
+ Double_t fContainerCh[3] = { static_cast<Double_t>(fCentrality), nPlusCharge, nMinusCharge};
+ Double_t fContainerPid[3] = { static_cast<Double_t>(fCentrality), nPartile, nAntiParticle};
fTHnCentNplusNminusCh->Fill(fContainerCh);
if( fUsePid ){
-
+ gPid = (Int_t)fParticleSpecies;
fTHnCentNplusNminusPid[gPid]->Fill(fContainerPid);
// cout << "nCentrality "<< fCentrality <<", nParticle="<< nPartile << ", nMinusParticle=" << nAntiParticle << endl;
return;
}
- AliAODHeader *aodHeader = fAOD->GetHeader();
+ AliAODHeader *aodHeader = dynamic_cast<AliAODHeader*>(fAOD->GetHeader());
+ if(!aodHeader) AliFatal("Not a standard AOD");
fCentrality = (Int_t)aodHeader->GetCentralityP()->GetCentralityPercentile(fCentralityEstimator.Data());
//if( aodTrack->GetID() != (-aodTrack1->GetID() -1) ) continue;
- newAodTrack = gID >= 0 ? aodTrack1 : fAOD->GetTrack(trackMap->GetValue(-1-gID)); //Take those global track who corresponds to TPC only track
+ newAodTrack = gID >= 0 ? aodTrack1 : dynamic_cast<AliAODTrack*>(fAOD->GetTrack(trackMap->GetValue(-1-gID))); //Take those global track who corresponds to TPC only track
+ if(!newAodTrack) AliFatal("Not a standard AOD");
//cout << dxy << endl;
fTPCSig->Fill(newAodTrack->GetTPCmomentum(),tpcSignal);
Float_t nsigmaTPCPID = -999.;
- Float_t nsigmaTOFPID = -999.;
+ //Float_t nsigmaTOFPID = -999.;
//Float_t nsigmaTPCTOFPID = -999.;
nsigmaTPCPID = TMath::Abs(fPIDResponse->NumberOfSigmasTPC(newAodTrack,fParticleSpecies));
- nsigmaTOFPID = TMath::Abs(fPIDResponse->NumberOfSigmasTOF(newAodTrack,fParticleSpecies));
+ //nsigmaTOFPID = TMath::Abs(fPIDResponse->NumberOfSigmasTOF(newAodTrack,fParticleSpecies));
if ( nsigmaTPCPID < fNSigmaCut ){
//cout << "nCentrality "<< fCentrality <<", nParticle="<< nPartile << ", nMinusParticle=" << nAntiParticle << endl;
- Double_t fContainerCh[3] = { fCentrality, nPlusCharge, nMinusCharge};
- Double_t fContainerPid[3] = { fCentrality, nPartile, nAntiParticle};
+ Double_t fContainerCh[3] = { static_cast<Double_t>(fCentrality), nPlusCharge, nMinusCharge};
+ Double_t fContainerPid[3] = { static_cast<Double_t>(fCentrality), nPartile, nAntiParticle};
fTHnCentNplusNminusCh->Fill(fContainerCh);
if( fUsePid ){
-
+
+ gPid = (Int_t)fParticleSpecies;
fTHnCentNplusNminusPid[gPid]->Fill(fContainerPid);
}
}//MC-Truth Track loop--
- Double_t fContainerChTruth[3] = { fCentrality, nPlusChargeTruth, nMinusChargeTruth };
- Double_t fContainerPidTruth[3] = { fCentrality, nPartileTruth, nAntiParticleTruth };
+ Double_t fContainerChTruth[3] = { static_cast<Double_t>(fCentrality), nPlusChargeTruth, nMinusChargeTruth };
+ Double_t fContainerPidTruth[3] = { static_cast<Double_t>(fCentrality), nPartileTruth, nAntiParticleTruth };
//cout << "Cent=" << fCentrality << " MC-PlusChrgT=" << nPlusChargeTruth << " MC-MinusChrgT=" << nMinusChargeTruth << endl;
fTHnCentNplusNminusChTruth->Fill(fContainerChTruth);
if( fUsePid ){
-
+ gPid = (Int_t)fParticleSpecies;
fTHnCentNplusNminusPidTruth[gPid]->Fill(fContainerPidTruth);
}