]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGJE/EMCALJetTasks/Tracks/AliEMCalTriggerEventSelection.cxx
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / Tracks / AliEMCalTriggerEventSelection.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15 /*
16  * Basic event selection component: Selects events according to the pA cut and a vertex-z cut
17  * For more sophisticated event selection the method IsEventSelected has to be overwritten
18  *
19  *   Author: Markus Fasel
20  */
21 #include "AliEMCalTriggerEventSelection.h"
22 #include "AliEMCalTriggerEventData.h"
23 #include <TString.h>
24 #include "AliAnalysisUtils.h"
25 #include "AliVEvent.h"
26
27 ClassImp(EMCalTriggerPtAnalysis::AliEMCalTriggerEventSelection)
28
29 namespace EMCalTriggerPtAnalysis {
30
31 //______________________________________________________________________________
32 AliEMCalTriggerEventSelection::AliEMCalTriggerEventSelection():
33   TObject(),
34   fVertexCut(-10., 10.)
35 {
36   /*
37    * Main Constructor
38    */
39
40 }
41
42 //______________________________________________________________________________
43 bool AliEMCalTriggerEventSelection::IsEventSelected(const AliEMCalTriggerEventData* const ev) const {
44   /*
45    * Apply basic event selection
46    *
47    * Can be overwritten by inheriting classes
48    *
49    * @param ev: Combined event container
50    * @return: event selection decision (true if event is selected)
51    */
52   AliAnalysisUtils evutils;
53   AliVEvent *recEvent = ev->GetRecEvent();
54   if(!evutils.IsVertexSelected2013pA(recEvent)) return kFALSE;
55   if(evutils.IsPileUpEvent(recEvent)) return kFALSE;
56   if(!fVertexCut.IsInRange(recEvent->GetPrimaryVertex()->GetZ())) return kFALSE;
57   return true;
58 }
59
60 } /* namespace EMCalTriggerPtAnalysis */