]>
Commit | Line | Data |
---|---|---|
60875c3c | 1 | /************************************************************************* |
2 | * Copyright(c) 1998-2008, 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 | //////////////////////////////////////////////////// | |
17 | // AliAnalysisTaskFilterFE: | |
18 | // | |
19 | // (re)tag RFP and POI in flowEvent in order to | |
20 | // reuse it in train | |
21 | //////////////////////////////////////////////////// | |
22 | ||
23 | #include "AliAnalysisManager.h" | |
24 | #include "AliAnalysisTaskSE.h" | |
25 | #include "AliFlowEventSimple.h" | |
26 | #include "AliFlowTrackSimpleCuts.h" | |
27 | #include "AliAnalysisTaskFilterFE.h" | |
cea49479 | 28 | #include "AliLog.h" |
60875c3c | 29 | |
30 | ClassImp(AliAnalysisTaskFilterFE) | |
31 | ||
32 | //________________________________________________________________________ | |
33 | AliAnalysisTaskFilterFE::AliAnalysisTaskFilterFE() : | |
34 | AliAnalysisTaskSE(), | |
35 | fCutsRFP(NULL), | |
36 | fCutsPOI(NULL), | |
37 | fMinA(-1.0), | |
38 | fMaxA(-0.01), | |
39 | fMinB(0.01), | |
40 | fMaxB(1.0), | |
41 | fFlowEvent(NULL) | |
42 | { | |
43 | // Constructor | |
cea49479 | 44 | AliDebug(2,"AliAnalysisTaskFilterFE::AliAnalysisTaskFilterFE()"); |
60875c3c | 45 | } |
46 | ||
47 | //________________________________________________________________________ | |
48 | AliAnalysisTaskFilterFE::AliAnalysisTaskFilterFE(const char *name, AliFlowTrackSimpleCuts *cutsRFP, AliFlowTrackSimpleCuts *cutsPOI) : | |
49 | AliAnalysisTaskSE(name), | |
50 | fCutsRFP(cutsRFP), | |
51 | fCutsPOI(cutsPOI), | |
52 | fMinA(-1.0), | |
53 | fMaxA(-0.01), | |
54 | fMinB(0.01), | |
55 | fMaxB(1.0), | |
56 | fFlowEvent(NULL) | |
57 | { | |
58 | // Constructor | |
cea49479 | 59 | AliDebug(2,"AliAnalysisTaskFilterFE::AliAnalysisTaskFilterFE(const char *name, ...)"); |
60875c3c | 60 | DefineInput( 0, AliFlowEventSimple::Class()); |
61 | DefineOutput(1, AliFlowEventSimple::Class()); | |
62 | } | |
63 | ||
64 | //________________________________________________________________________ | |
65 | AliAnalysisTaskFilterFE::~AliAnalysisTaskFilterFE() | |
66 | { | |
67 | // Destructor | |
68 | delete fCutsRFP; | |
69 | delete fCutsPOI; | |
70 | } | |
71 | //________________________________________________________________________ | |
72 | void AliAnalysisTaskFilterFE::UserCreateOutputObjects() | |
73 | { | |
74 | // Called at every worker node to initialize | |
cea49479 | 75 | AliDebug(2,"AliAnalysisTaskFilterFE::CreateOutputObjects()"); |
60875c3c | 76 | PostData(1,fFlowEvent); |
77 | } | |
78 | ||
79 | //________________________________________________________________________ | |
80 | void AliAnalysisTaskFilterFE::UserExec(Option_t *) | |
81 | { | |
82 | // Main loop | |
83 | fFlowEvent = dynamic_cast<AliFlowEventSimple*>(GetInputData(0)); // from TaskSE | |
84 | if (!fFlowEvent) return; | |
85 | if(fCutsRFP) fFlowEvent->TagRP(fCutsRFP); | |
86 | if(fCutsPOI) fFlowEvent->TagPOI(fCutsPOI); | |
87 | fFlowEvent->TagSubeventsInEta(fMinA,fMaxA,fMinB,fMaxB); | |
88 | PostData(1,fFlowEvent); | |
89 | } |