//
#include "AliRsnCutPrimaryVertex.h"
+#include "AliAnalysisUtils.h"
ClassImp(AliRsnCutPrimaryVertex)
//
// Cut checker
//
-
// coherence check
// which also fills data member objects
if (!TargetOK(object)) return kFALSE;
// retrieve ESD event
AliESDEvent *esd = dynamic_cast<AliESDEvent *>(fEvent->GetRef());
AliAODEvent *aod = dynamic_cast<AliAODEvent *>(fEvent->GetRef());
-
+ AliVEvent *vevt = dynamic_cast<AliVEvent *>(fEvent->GetRef());
+ // pile-up check
+ if (fCheckPileUp) {
+ AliAnalysisUtils * utils = new AliAnalysisUtils();
+ if (utils->IsPileUpSPD(vevt)) return kFALSE;
+ }
+
if (esd) {
- // pile-up check
- if (fCheckPileUp) {
- if (esd->IsPileupFromSPD()) return kFALSE;
- }
-
// get the best primary vertex:
// first try the one with tracks
const AliESDVertex *vTrk = esd->GetPrimaryVertexTracks();
AliInfo(Form("Contributors range (outside) : %d - %d", fMinI, fMaxI));
AliInfo(Form("Z-vertex range (inside) : %f - %f", fMinD, fMaxD));
}
+
+//__________________________________________________________________________________________________
+Bool_t AliRsnCutPrimaryVertex::CheckVertex(AliVVertex *vertex)
+{
+//
+// Checks if a candidate primary vertex is good,
+// which is true if it is not null and has at
+// least one contributor
+//
+
+ if (!vertex) return kFALSE;
+ if (vertex->GetNContributors() < 1) return kFALSE;
+ return kTRUE;
+}
#define ALIRSNCUTPRIMARYVERTEX_H
#include "AliRsnCut.h"
-
class AliVVertex;
class AliRsnCutPrimaryVertex : public AliRsnCut {
Bool_t fAcceptTPC; // if kTRUE, the TPC primary vertexes are accepted
Bool_t fCheckPileUp; // check and reject pileupped events (pp)
-
ClassDef(AliRsnCutPrimaryVertex, 1)
};
-//__________________________________________________________________________________________________
-inline Bool_t AliRsnCutPrimaryVertex::CheckVertex(AliVVertex *vertex)
-{
-//
-// Checks if a candidate primary vertex is good,
-// which is true if it is not null and has at
-// least one contributor
-//
-
- if (!vertex) return kFALSE;
- if (vertex->GetNContributors() < 1) return kFALSE;
- return kTRUE;
-}
-
#endif