* provided "as is" without express or implied warranty. *
**************************************************************************/
//
+//
// The analysis task:
// Filling an AliCFContainer with the quantities pt, eta and phi
// for tracks which survivied the particle cuts (MC resp. ESD tracks)
if(shared.CountBits() >= 2) sharebit=1;
Double_t itschi2percluster = 0.0;
- if(track->GetNcls(0) > 0) itschi2percluster = track->GetITSchi2()/static_cast<Double_t>(track->GetNcls(0));
+ Double_t itsnbcls = static_cast<Double_t>(track->GetNcls(0));
+ if(itsnbcls > 0) itschi2percluster = track->GetITSchi2()/itsnbcls;
Double_t itsChi2[7] = {track->Pt(),track->Eta(), track->Phi(),
fCentralityF,track->GetTPCsignalN(), sharebit, itschi2percluster};
else{
Double_t itschi2percluster = 0.0;
- if(track->GetNcls(0) > 0) itschi2percluster = track->GetITSchi2()/static_cast<Double_t>(track->GetNcls(0));
+ Double_t itsnbcls = static_cast<Double_t>(track->GetNcls(0));
+ if(itsnbcls > 0) itschi2percluster = track->GetITSchi2()/itsnbcls;
Double_t itsChi2[3] = {track->Pt(), fCentralityF, itschi2percluster};
fQACollection->Fill("fChi2perITScluster", itsChi2);
// Authors:
// Markus Fasel <M.Fasel@gsi.de>
//
+//
#include <TBits.h>
#include <TString.h>
AliError("No Handler");
}
if(!pid){
- AliError("No PID response\n");
+ AliError("No PID response");
+ return;
+ }
+ if(!fInputEvent) {
+ AliError("No Input event");
return;
}
// Get centrality
Float_t centrality = -1.;
- TString beamtype = (dynamic_cast<AliESDEvent *>(fInputEvent))->GetESDRun()->GetBeamType();
+ AliESDEvent *event = (dynamic_cast<AliESDEvent *>(fInputEvent));
+ if(!event) return;
+ TString beamtype = event->GetBeamType();
+ //printf("Beam type %s\n",(const char*)beamtype);
if(!beamtype.CompareTo("Pb-Pb") || !beamtype.CompareTo("A-A")){
// Heavy ion run
AliDebug(1, "Heavy-Ion event\n");