]>
Commit | Line | Data |
---|---|---|
f553869e | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, 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 | AliFlowEventStar: Event container for flow analysis | |
18 | ||
19 | origin: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch) | |
20 | *****************************************************************/ | |
21 | ||
22 | #include "Riostream.h" | |
23 | #include "AliFlowEventSimple.h" | |
24 | #include "AliFlowTrackSimple.h" | |
25 | #include "AliStarTrack.h" | |
b4dba88d | 26 | #include "AliStarTrackCuts.h" |
f553869e | 27 | #include "AliStarEvent.h" |
28 | #include "AliFlowEventStar.h" | |
29 | ||
30 | ClassImp(AliFlowEventStar) | |
31 | ||
32 | //----------------------------------------------------------------------- | |
33 | ||
34 | AliFlowEventStar::AliFlowEventStar(): | |
35 | AliFlowEventSimple() | |
36 | { | |
37 | //ctor | |
38 | cout << "AliFlowEventStar: Default constructor to be used only by root for io" << endl; | |
39 | } | |
40 | ||
41 | //----------------------------------------------------------------------- | |
42 | AliFlowEventStar::AliFlowEventStar(const AliFlowEventStar& event): | |
43 | AliFlowEventSimple(event) | |
44 | { | |
45 | //cpy ctor | |
46 | } | |
47 | ||
48 | //----------------------------------------------------------------------- | |
b4dba88d | 49 | AliFlowEventStar& AliFlowEventStar::operator=( const AliFlowEventStar& event ) |
f553869e | 50 | { |
51 | //assignment operator | |
52 | AliFlowEventSimple::operator=(event); | |
53 | return *this; | |
54 | } | |
55 | ||
b4dba88d | 56 | //----------------------------------------------------------------------- |
57 | AliFlowEventStar::AliFlowEventStar( const AliStarEvent* starevent, | |
58 | const AliStarTrackCuts* rpCuts, | |
59 | const AliStarTrackCuts* poiCuts ): | |
f553869e | 60 | AliFlowEventSimple(starevent->GetNumberOfTracks()) |
61 | { | |
62 | //construct from a star event | |
63 | SetReferenceMultiplicity(starevent->GetRefMult()); | |
64 | for (Int_t i=0; i<starevent->GetNumberOfTracks(); i++) | |
65 | { | |
66 | const AliStarTrack* startrack = starevent->GetTrack(i); | |
67 | if (!startrack) continue; | |
68 | AliFlowTrackSimple* flowtrack = new AliFlowTrackSimple(); | |
69 | flowtrack->SetPhi(startrack->GetPhi()); | |
70 | flowtrack->SetEta(startrack->GetEta()); | |
71 | flowtrack->SetPt(startrack->GetPt()); | |
72 | flowtrack->SetCharge(startrack->GetCharge()); | |
b4dba88d | 73 | if (rpCuts) |
74 | { | |
75 | Bool_t pass = rpCuts->PassesCuts(startrack); | |
76 | flowtrack->TagRP(pass); //tag RPs | |
77 | if (pass) fNumberOfRPs++; | |
78 | } | |
79 | if (poiCuts) | |
80 | { | |
81 | flowtrack->TagPOI(poiCuts->PassesCuts(startrack)); //tag POIs | |
82 | } | |
f553869e | 83 | AddTrack(flowtrack); |
84 | } | |
85 | } |