Fix to apply jet cuts before passing to flow package (Redmer)
authormvl <mvl@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 9 May 2013 11:55:36 +0000 (11:55 +0000)
committermvl <mvl@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 9 May 2013 11:55:36 +0000 (11:55 +0000)
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskRhoVnModulation.cxx

index c5d0fa9..c22108d 100644 (file)
@@ -1109,19 +1109,23 @@ void AliAnalysisTaskRhoVnModulation::FillJetHistograms(Double_t vzero[2][2], Dou
     Int_t iJets(fJets->GetEntriesFast());
     for(Int_t i(0); i < iJets; i++) {
         AliEmcalJet* jet = static_cast<AliEmcalJet*>(fJets->At(i));
-        if(!PassesCuts(jet)) continue;
-        Double_t pt(jet->Pt()), area(jet->Area()), eta(jet->Eta()), phi(jet->Phi());
-        Double_t rho(RhoVal(phi, fJetRadius, fRho->GetVal()));
-        fHistJetPtRaw[fInCentralitySelection]->Fill(pt);
-        fHistJetPt[fInCentralitySelection]->Fill(pt-area*rho);
-        fHistJetEtaPhi[fInCentralitySelection]->Fill(eta, phi);
-        fHistJetPtArea[fInCentralitySelection]->Fill(pt-area*rho, area);
-        fHistJetPsiTPCPt[fInCentralitySelection]->Fill(PhaseShift(phi-tpc[0]), pt-area*rho);
-        fHistJetPsiVZEROAPt[fInCentralitySelection]->Fill(PhaseShift(phi-vzero[0][0]), pt-area*rho);
-        fHistJetPsiVZEROCPt[fInCentralitySelection]->Fill(PhaseShift(phi-vzero[1][0]), pt-area*rho);
-        fHistJetPtConstituents[fInCentralitySelection]->Fill(pt-area*rho, jet->Nch());
-        fHistJetEtaRho[fInCentralitySelection]->Fill(eta, pt/area);
-        if(fSetPtSub) jet->SetPtSub(pt-area*rho);
+        if(PassesCuts(jet)) {
+            Double_t pt(jet->Pt()), area(jet->Area()), eta(jet->Eta()), phi(jet->Phi());
+            Double_t rho(RhoVal(phi, fJetRadius, fRho->GetVal()));
+            fHistJetPtRaw[fInCentralitySelection]->Fill(pt);
+            fHistJetPt[fInCentralitySelection]->Fill(pt-area*rho);
+            fHistJetEtaPhi[fInCentralitySelection]->Fill(eta, phi);
+            fHistJetPtArea[fInCentralitySelection]->Fill(pt-area*rho, area);
+            fHistJetPsiTPCPt[fInCentralitySelection]->Fill(PhaseShift(phi-tpc[0]), pt-area*rho);
+            fHistJetPsiVZEROAPt[fInCentralitySelection]->Fill(PhaseShift(phi-vzero[0][0]), pt-area*rho);
+            fHistJetPsiVZEROCPt[fInCentralitySelection]->Fill(PhaseShift(phi-vzero[1][0]), pt-area*rho);
+            fHistJetPtConstituents[fInCentralitySelection]->Fill(pt-area*rho, jet->Nch());
+            fHistJetEtaRho[fInCentralitySelection]->Fill(eta, pt/area);
+            if(fSetPtSub) jet->SetPtSub(pt-area*rho);
+        }
+        else { // if the jet is rejected, excluded it for the flow analysis
+            if(fSetPtSub) jet->SetPtSub(-999.);
+        }
     }
 }
 //_____________________________________________________________________________