AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()->SetFillAOD(kTRUE);
}
- if(fV0Reader == NULL){
+ // if(fV0Reader == NULL){ // coverty does not permit this test
// Write warning here cuts and so on are default if this ever happens
- }
+ // }
if (fMCEvent ) {
// To avoid crashes due to unzip errors. Sometimes the trees are not there.
}
AliKFParticle twoGammaCandidate(*twoGammaDecayCandidateDaughter0,*twoGammaDecayCandidateDaughter1);
- fHistograms->FillHistogram("ESD_RecalculateGG_InvMass",twoGammaCandidate.GetMass());
- fHistograms->FillHistogram("ESD_RecalculateGG_InvMass_vs_Pt",twoGammaCandidate.GetMass(),twoGammaCandidate.GetPt());
+ if(fHistograms != NULL){
+ fHistograms->FillHistogram("ESD_RecalculateGG_InvMass",twoGammaCandidate.GetMass());
+ fHistograms->FillHistogram("ESD_RecalculateGG_InvMass_vs_Pt",twoGammaCandidate.GetMass(),twoGammaCandidate.GetPt());
+ }
}
}
}
// Determine if the event was generated with pythia or phojet and return the process type
// Check if mcEvt is fine
- if (!mcEvt) {
+ if (!mcEvt) { // coverty does not allow this, the check is done elsewhere
AliFatal("NULL mc event");
+ return -1;
}
// Determine if it was a pythia or phojet header, and return the correct process type
AliGenEventHeader * htmp = mcEvt->GenEventHeader();
if(!htmp) {
AliFatal("Cannot Get MC Header!!");
+ return -1;
}
if( TString(htmp->IsA()->GetName()) == "AliGenPythiaEventHeader") {
headPy = (AliGenPythiaEventHeader*) htmp;
fMappingContainer->SetOwner(kTRUE);
fMappingContainer->SetName("Mapping histograms");
}
- if(fMappingContainer != NULL){
- fMappingContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
- }
+ fMappingContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
}
else if(histogramString.Contains("Background")){// means it should be put in the background folder
if(fBackgroundContainer == NULL){
fBackgroundContainer->SetOwner(kTRUE);
fBackgroundContainer->SetName("Background histograms");
}
- if(fBackgroundContainer != NULL){
- fBackgroundContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
- }
+ fBackgroundContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
}
else if(histogramString.Contains("Debug")){// means it should be put in the debug folder
if(fDebugContainer == NULL){
fDebugContainer->SetOwner(kTRUE);
fDebugContainer->SetName("Debug histograms");
}
- if(fDebugContainer != NULL){
- fDebugContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
- }
+ fDebugContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
}
else if(histogramString.Contains("Resolution")){// means it should be put in the resolution folder
if(fResolutionContainer == NULL){
fResolutionContainer->SetOwner(kTRUE);
fResolutionContainer->SetName("Resolution histograms");
}
- if(fResolutionContainer != NULL){
- fResolutionContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
- }
+ fResolutionContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
}
else if(histogramString.Contains("TrueConv")){// means it should be put in the true conv folder
if(fMatchContainer == NULL){
fMatchContainer->SetOwner(kTRUE);
fMatchContainer->SetName("True conversion histograms");
}
- if(fMatchContainer != NULL){
- fMatchContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
- }
+ fMatchContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
}
else if(histogramString.Contains("ESD")){// means it should be put in the ESD folder
if(fESDContainer == NULL){
fESDContainer->SetOwner(kTRUE);
fESDContainer->SetName("ESD histograms");
}
- if(fESDContainer != NULL){
- fESDContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
- }
+ fESDContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
}
else if(histogramString.Contains("MC")){// means it should be put in the MC folder
if(fMCContainer == NULL){
fMCContainer->SetOwner(kTRUE);
fMCContainer->SetName("MC histograms");
}
- if(fMCContainer != NULL){
- fMCContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
- }
+ fMCContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
}
else if(histogramString.Contains("Table")){// means it should be put in the Table Folder
if(fTableContainer == NULL){
fTableContainer->SetOwner(kTRUE);
fTableContainer->SetName("Tables");
}
- if(fTableContainer != NULL){
- fTableContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
- }
+ fTableContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
}
else{
if(fOtherContainer == NULL){
fOtherContainer->SetOwner(kTRUE);
fOtherContainer->SetName("Other histograms");
}
- if(fOtherContainer != NULL){
- fOtherContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
- }
+ fOtherContainer->Add((TH1*)fHistogramMap->GetValue(histogramString.Data()));
}
histogramName = NULL;
} // end while
+
if(fMappingContainer != NULL){
fOutputContainer->Add(fMappingContainer);
}
if(fMotherCandidateLorentzVector != NULL){
delete fMotherCandidateLorentzVector;
}
- if(fUseKFParticle){
- fMotherCandidateLorentzVector = new TLorentzVector(*fNegativeTrackLorentzVector + *fPositiveTrackLorentzVector);
- }
- else if(fUseESDTrack){
- fMotherCandidateLorentzVector = new TLorentzVector(*fNegativeTrackLorentzVector + *fPositiveTrackLorentzVector);
- }
+
+ fMotherCandidateLorentzVector = new TLorentzVector(*fNegativeTrackLorentzVector + *fPositiveTrackLorentzVector);
if(fPositiveTrackPID==-11 && fNegativeTrackPID==11){
fMotherCandidateLorentzVector->SetXYZM(fMotherCandidateLorentzVector->Px() ,fMotherCandidateLorentzVector->Py(),fMotherCandidateLorentzVector->Pz(),0.);
//fESDEvent->GetTrack(fCurrentV0->GetPindex());
//-AM for switchtracks==true the above is a bug
- negTrack->GetTPCpid(negProbArray);
- posTrack->GetTPCpid(posProbArray);
-
- // if(negProbArray != NULL && posProbArray != NULL){ // this is not allowed anymore for some reason(RC19)
if(negProbArray && posProbArray){
+
+ negTrack->GetTPCpid(negProbArray);
+ posTrack->GetTPCpid(posProbArray);
+
+ // if(negProbArray != NULL && posProbArray != NULL){ // this is not allowed anymore for some reason(RC19)
if(negProbArray[GetSpeciesIndex(-1)]>=negProbCut && posProbArray[GetSpeciesIndex(1)]>=posProbCut){
iResult=kTRUE;
}
AliESDtrack* negTrack = GetNegativeESDTrack();
AliESDtrack* posTrack = GetPositiveESDTrack();
-
- negTrack->GetTPCpid(negProbArray);
- posTrack->GetTPCpid(posProbArray);
-
- // if(negProbArray!=NULL && posProbArray!=NULL){ // this is not allowed anymore for some reason(RC19)
if(negProbArray && posProbArray){
+ negTrack->GetTPCpid(negProbArray);
+ posTrack->GetTPCpid(posProbArray);
+
+ // if(negProbArray!=NULL && posProbArray!=NULL){ // this is not allowed anymore for some reason(RC19)
negPIDProb = negProbArray[GetSpeciesIndex(-1)];
posPIDProb = posProbArray[GetSpeciesIndex(1)];
}
delete [] posProbArray;
delete [] negProbArray;
}
+
void AliV0Reader::GetPIDProbabilityMuonPion(Double_t &negPIDProb,Double_t & posPIDProb){
// see header file for documentation
AliESDtrack* negTrack = GetNegativeESDTrack();
AliESDtrack* posTrack = GetPositiveESDTrack();
- negTrack->GetTPCpid(negProbArray);
- posTrack->GetTPCpid(posProbArray);
-
- // if(negProbArray!=NULL && posProbArray!=NULL){ // this is not allowed anymore for some reason(RC19)
if(negProbArray && posProbArray){
+ negTrack->GetTPCpid(negProbArray);
+ posTrack->GetTPCpid(posProbArray);
+
+ // if(negProbArray!=NULL && posProbArray!=NULL){ // this is not allowed anymore for some reason(RC19)
+
negPIDProb = negProbArray[1]+negProbArray[2];
posPIDProb = posProbArray[1]+posProbArray[2];
}
/*
*Get the PID of the MC mother particle
*/
- Int_t GetMotherMCParticlePDGCode() const{if(fMotherMCParticle != NULL){ cout<<"MCParticle exists"<<endl;} return fMotherMCParticle->GetPdgCode();}
+ Int_t GetMotherMCParticlePDGCode() const{return fMotherMCParticle->GetPdgCode();}
/*
*Get the MC stack