fix qa histogram inconsistency (qa histo's were filled before all cuts were applied...
authorrbertens <rbertens@cern.ch>
Wed, 4 Jun 2014 12:29:35 +0000 (14:29 +0200)
committerrbertens <rbertens@cern.ch>
Wed, 4 Jun 2014 12:58:28 +0000 (14:58 +0200)
PWG/FLOW/Tasks/AliFlowTrackCuts.cxx
PWG/FLOW/Tasks/AliFlowTrackCuts.h

index 8ff1b49..0da9c8c 100644 (file)
@@ -1178,7 +1178,13 @@ Bool_t AliFlowTrackCuts::PassesAODcuts(const AliAODTrack* track, Bool_t passedFi
   if (dedx < fMinimalTPCdedx) pass=kFALSE;
   Double_t time[9];
   track->GetIntegratedTimes(time);
+  if (fCutPID && (fParticleID!=AliPID::kUnknown)) //if kUnknown don't cut on PID
+    {
+      if (!PassesAODpidCut(track)) pass=kFALSE;
+    }
+
   if (fQA) {
+    // changed 04062014 used to be filled before possible PID cut
     Double_t momTPC = track->GetTPCmomentum();
     QAbefore( 1)->Fill(momTPC,dedx);
     QAbefore( 5)->Fill(track->Pt(),track->DCA());
@@ -1198,11 +1204,7 @@ Bool_t AliFlowTrackCuts::PassesAODcuts(const AliAODTrack* track, Bool_t passedFi
     if (pass) QAafter( 12)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kProton]));
   }
 
-  if (fCutPID && (fParticleID!=AliPID::kUnknown)) //if kUnknown don't cut on PID
-    {
-      if (!PassesAODpidCut(track)) pass=kFALSE;
-    }
-  
+
   return pass;
 }
 
@@ -1435,7 +1437,8 @@ AliFlowTrackCuts* AliFlowTrackCuts::GetStandardVZEROOnlyTrackCuts2011()
   cuts->SetPhiMin( 0 );
   cuts->SetPhiMax( TMath::TwoPi() );
   cuts->SetApplyRecentering(kTRUE);
-  return cuts;
+  cuts->SetVZEROgainEqualizationPerRing(kFALSE);
+ return cuts;
 }
 //-----------------------------------------------------------------------
 AliFlowTrackCuts* AliFlowTrackCuts::GetStandardGlobalTrackCuts2010()
@@ -2581,7 +2584,10 @@ Bool_t AliFlowTrackCuts::PassesESDpidCut(const AliESDtrack* track )
       if (!PassesNucleiSelection(track)) pass=kFALSE;
       break;
       //end part added by Natasha
-
+      
+    case kTPCTOFNsigma:
+      if (!PassesTPCTOFNsigmaCut(track)) pass = kFALSE;
+      break;
     default:
       printf("AliFlowTrackCuts::PassesCuts() this should never be called!\n");
       pass=kFALSE;
@@ -3435,6 +3441,27 @@ Bool_t AliFlowTrackCuts::PassesNucleiSelection(const AliESDtrack* track)
 }
 // end part added by Natasha
 //-----------------------------------------------------------------------
+Bool_t AliFlowTrackCuts::PassesTPCTOFNsigmaCut(const AliAODTrack* track) 
+{
+    // do a simple combined cut on the n sigma from tpc and tof
+    // with information of the pid response object (needs pid response task)
+    // stub, not implemented yet
+    if(!track) return kFALSE;
+    return kFALSE;
+
+}
+//-----------------------------------------------------------------------------
+Bool_t AliFlowTrackCuts::PassesTPCTOFNsigmaCut(const AliESDtrack* track)
+{
+    // do a simple combined cut on the n sigma from tpc and tof
+    // with information of the pid response object (needs pid response task)
+    // stub, not implemented yet
+    if(!track) return kFALSE;
+    return kFALSE;
+
+}
+
+//-----------------------------------------------------------------------
 void AliFlowTrackCuts::SetPriors(Float_t centrCur){
  //set priors for the bayesian pid selection
   fCurrCentr = centrCur;
@@ -4570,6 +4597,8 @@ const char* AliFlowTrackCuts::PIDsourceName(PIDsource s)
       return "TOFbetaSimple";
     case kTPCNuclei:
       return "TPCnuclei";
+    case kTPCTOFNsigma:
+      return "TPCTOFNsigma";
     default:
       return "NOPID";
   }
index bfedc49..d408185 100644 (file)
@@ -84,7 +84,8 @@ class AliFlowTrackCuts : public AliFlowTrackSimpleCuts {
                    kTPCdedx,      // asymmetric cuts of TPC dedx signal
                    kTOFbetaSimple, //simple TOF only cut
                    kTPCbayesian, //bayesian cutTPC
-                              kTPCNuclei    // added by Natasha for Nuclei
+                  kTPCNuclei,   // added by Natasha for Nuclei
+                   kTPCTOFNsigma // simple cut on combined tpc tof nsigma
                    };
 
   //setters (interface to AliESDtrackCuts)
@@ -312,6 +313,8 @@ class AliFlowTrackCuts : public AliFlowTrackSimpleCuts {
   // part added by F. Noferini
   Bool_t PassesTOFbayesianCut(const AliESDtrack* track); 
   Bool_t PassesNucleiSelection(const AliESDtrack* track);   // added by Natasha
+  Bool_t PassesTPCTOFNsigmaCut(const AliAODTrack* track); 
+  Bool_t PassesTPCTOFNsigmaCut(const AliESDtrack* track);
   Bool_t TPCTOFagree(const AliVTrack *track);
   // end part added by F. Noferini