2 // Class AliRsnCutEventUtils
4 // This cut implementation checks the quality of event primary vertex.
5 // It currently works only with ESD events (not AOD).
7 // authors: Martin Vala (martin.vala@cern.ch)
8 // Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
11 #include "AliRsnCutEventUtils.h"
12 #include "AliAnalysisUtils.h"
14 ClassImp(AliRsnCutEventUtils)
16 //_________________________________________________________________________________________________
17 AliRsnCutEventUtils::AliRsnCutEventUtils(const char *name, Bool_t rmFirstEvInChunck, Bool_t checkPileUppA2013) :
18 AliRsnCut(name, AliRsnCut::kEvent),
19 fIsRmFirstEvInChunck(rmFirstEvInChunck),
20 fCheckPileUppA2013(checkPileUppA2013),
21 fUseMVPlpSelection(kFALSE),
24 fUseVertexSelection2013pA(kFALSE),
29 //This class is mainly used for pPb 2013
30 //If the rmFirstEvInChunck flag is kTRUE, it removed the first event in chunk
32 //If the checkPileUp flag is kTRUE, it removes the events from pile-up
33 //- to be used for pA 2013, for other periods the rejection of pileup is implemented
34 //ad an additional cut in the primary vertex
38 //_________________________________________________________________________________________________
39 AliRsnCutEventUtils::AliRsnCutEventUtils(const AliRsnCutEventUtils ©) :
41 fIsRmFirstEvInChunck(copy.fIsRmFirstEvInChunck),
42 fCheckPileUppA2013(copy.fCheckPileUppA2013),
43 fUseMVPlpSelection(copy.fUseMVPlpSelection),
44 fMinPlpContribMV(copy.fMinPlpContribMV),
45 fMinPlpContribSPD(copy.fMinPlpContribSPD),
46 fUseVertexSelection2013pA(copy.fUseVertexSelection2013pA),
54 //-------------------------------------------------------------------------------------------------
55 AliRsnCutEventUtils &AliRsnCutEventUtils::operator=(const AliRsnCutEventUtils ©)
58 // Assignment operator.
59 // Works like copy constructor.
61 AliRsnCut::operator=(copy);
65 fIsRmFirstEvInChunck=copy.fIsRmFirstEvInChunck;
66 fCheckPileUppA2013=copy.fCheckPileUppA2013;
67 fUseMVPlpSelection=copy.fUseMVPlpSelection;
68 fMinPlpContribMV=copy.fMinPlpContribMV;
69 fMinPlpContribSPD=copy.fMinPlpContribSPD;
70 fUseVertexSelection2013pA=copy.fUseVertexSelection2013pA;
76 //_________________________________________________________________________________________________
77 Bool_t AliRsnCutEventUtils::IsSelected(TObject *object)
83 // which also fills data member objects
84 if (!TargetOK(object)) return kFALSE;
87 AliVEvent *vevt = dynamic_cast<AliVEvent *>(fEvent->GetRef());
88 fUtils = new AliAnalysisUtils();
89 fUtils->SetUseMVPlpSelection(fUseMVPlpSelection);
90 fUtils->SetMinPlpContribMV(fMinPlpContribMV);
91 fUtils->SetMinPlpContribSPD(fMinPlpContribSPD);
94 if ((fCheckPileUppA2013) && (fUtils->IsPileUpEvent(vevt)))
97 //remove first event in chunk
98 if ((fIsRmFirstEvInChunck) && (fUtils->IsFirstEventInChunk(vevt)))
101 //apply vertex selection - for 2013 pPb data
102 if((fUseVertexSelection2013pA) && (!fUtils->IsVertexSelected2013pA(vevt)))