]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/UserTasks/EmcalTasks/AliEmcalPhysicsSelection.cxx
added psel
[u/mrichter/AliRoot.git] / PWG4 / UserTasks / EmcalTasks / AliEmcalPhysicsSelection.cxx
CommitLineData
be94a07d 1/* $Id$ */
2
3#include "AliEmcalPhysicsSelection.h"
4#include "AliESDEvent.h"
5#include <AliLog.h>
6
7ClassImp(AliEmcalPhysicsSelection)
8
9//__________________________________________________________________________________________________
10UInt_t AliEmcalPhysicsSelection::GetSelectionMask(const TObject* obj)
11{
12 const AliESDEvent *ev = static_cast<const AliESDEvent*>(obj);
13 UInt_t res = IsCollisionCandidate(ev);
14
15 if (fExcludeFastOnly) {
16 if (res & AliVEvent::kFastOnly) {
17 Int_t ncells = ev->GetEMCALCells()->GetNumberOfCells();
18 if (ncells>0) {
19 AliFatal(Form("Number of cells %d, even though EMCAL should not be in fast only partition.",ncells));
20 }
21 return 0;
22 }
23 }
24
25 return res;
26}