Added PID task, some fixes for coding conventions
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliAnaESDSpectraQA.cxx
index ee75e49702ccee39e20ff2bf9d3d359c08884c32..ffafff5c6e5f799064f50cc5a318c4da6004a2ae 100644 (file)
@@ -176,14 +176,14 @@ void AliAnaESDSpectraQA::Exec(Option_t *) {
   Int_t nTracks = fESD->GetNumberOfTracks();
   AliDebug(2,Form("nTracks %d", nTracks));
   printf("nTracks %d\n", nTracks);
-  static Int_t Mult = 0;
-  Mult = 0;   // Need extra init bc of static
+  static Int_t fMult = 0;
+  fMult = 0;   // Need extra init bc of static
   for (Int_t iTrack = 0; iTrack < nTracks; iTrack++) {
     AliESDtrack *track = fESD->GetTrack(iTrack);
     hists *curTypeHists = 0;
 
     if (fTrackCuts->AcceptTrack(track)) {
-      Mult++;
+      fMult++;
 
       Float_t dca2D, dcaZ;
       track->GetImpactParameters(dca2D,dcaZ);
@@ -220,7 +220,9 @@ void AliAnaESDSpectraQA::Exec(Option_t *) {
       curTypeHists->PhiPtNPointTPC->Fill(phi,pt,track->GetTPCNcls());
       curTypeHists->PhiPtNPointITS->Fill(phi,pt,nPointITS);
       curTypeHists->PhiPtChisqC->Fill(phi,pt,chisqC);
-      curTypeHists->PhiPtChisqTPC->Fill(phi,pt,track->GetTPCchi2()/(track->GetTPCNclsF()-5));
+      if(track->GetTPCNclsF()>5){
+       curTypeHists->PhiPtChisqTPC->Fill(phi,pt,track->GetTPCchi2()/(track->GetTPCNclsF()-5));
+      }      
       curTypeHists->PhiPtDCAR->Fill(phi,pt,dca2D);
       curTypeHists->PhiPtDCAZ->Fill(phi,pt,dcaZ);
       curTypeHists->PhiPtSigmaToVertex->Fill(phi,pt,sigToVertex);