AliPhysics  7c37cfa (7c37cfa)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliFlowEventStar.cxx
Go to the documentation of this file.
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"
26 #include "AliStarTrackCuts.h"
27 #include "AliStarEvent.h"
28 #include "AliFlowEventStar.h"
29 
30 using std::cout;
31 using std::endl;
33 
34 //-----------------------------------------------------------------------
35 
38 {
39  //ctor
40  cout << "AliFlowEventStar: Default constructor to be used only by root for io" << endl;
41 }
42 
43 //-----------------------------------------------------------------------
45  AliFlowEventSimple(event)
46 {
47  //cpy ctor
48 }
49 
50 //-----------------------------------------------------------------------
52 {
53  //assignment operator
55  return *this;
56 }
57 
58 //-----------------------------------------------------------------------
60  const AliStarTrackCuts* rpCuts,
61  const AliStarTrackCuts* poiCuts ):
62  AliFlowEventSimple(starevent->GetNumberOfTracks())
63 {
64  //construct from a star event
66  for (Int_t i=0; i<starevent->GetNumberOfTracks(); i++)
67  {
68  const AliStarTrack* startrack = starevent->GetTrack(i);
69  if (!startrack) continue;
70  AliFlowTrackSimple* flowtrack = new AliFlowTrackSimple();
71  flowtrack->SetPhi(startrack->GetPhi());
72  flowtrack->SetEta(startrack->GetEta());
73  flowtrack->SetPt(startrack->GetPt());
74  flowtrack->SetCharge(startrack->GetCharge());
75  if (rpCuts)
76  {
77  Bool_t pass = rpCuts->PassesCuts(startrack);
78  flowtrack->TagRP(pass); //tag RPs
79  if (pass) IncrementNumberOfPOIs(0);
80  }
81  if (poiCuts)
82  {
83  flowtrack->TagPOI(poiCuts->PassesCuts(startrack)); //tag POIs
84  }
85  AddTrack(flowtrack);
86  }
87 }
void SetCharge(Int_t charge)
Float_t GetPt() const
Definition: AliStarTrack.h:31
void SetEta(Double_t eta)
Int_t GetCharge() const
Definition: AliStarTrack.h:28
Int_t GetRefMult() const
Definition: AliStarEvent.h:33
AliFlowEventStar & operator=(const AliFlowEventStar &event)
Int_t GetNumberOfTracks() const
Definition: AliStarEvent.h:36
AliFlowEventSimple & operator=(const AliFlowEventSimple &anEvent)
void AddTrack(AliFlowTrackSimple *track)
Float_t GetPhi() const
Definition: AliStarTrack.h:30
void SetReferenceMultiplicity(Int_t m)
void TagRP(Bool_t b=kTRUE)
void IncrementNumberOfPOIs(Int_t poiType=1)
int Int_t
Definition: External.C:63
const AliStarTrack * GetTrack(const Int_t i) const
void TagPOI(Bool_t b=kTRUE)
ClassImp(AliFlowEventStar) AliFlowEventStar
void SetPhi(Double_t phi)
void SetPt(Double_t pt)
Bool_t PassesCuts(const AliStarTrack *track) const
Float_t GetEta() const
Definition: AliStarTrack.h:29
bool Bool_t
Definition: External.C:53