AliPhysics  63e47e1 (63e47e1)
AliFlowTrack.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 /* $Id$ */
17 
18 // AliFlowTrack:
19 // A track class for use in AliFlowEvent for flow analysis
20 // origin: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
21 
22 #include "AliVParticle.h"
23 #include "AliFlowTrack.h"
24 #include "AliFlowTrackSimple.h"
25 
26 ClassImp(AliFlowTrack)
27 
28 //-----------------------------------------------------------------------
31  fTrackSourceBits()
32 {
33  //constructor
34 }
35 
36 //-----------------------------------------------------------------------
37 AliFlowTrack::AliFlowTrack(const AliVParticle* p):
39  fTrackSourceBits()
40 {
41  //constructor
42  Set(p);
43 }
44 
45 //-----------------------------------------------------------------------
46 void AliFlowTrack::Set(const AliVParticle* p)
47 {
48  //set from an AliVParticle
49  SetPhi(p->Phi());
50  SetEta(p->Eta());
51  SetPt(p->Pt());
52  SetCharge(p->Charge());
53 }
54 
55 //-----------------------------------------------------------------------
57  AliFlowTrackSimple(aTrack),
59 {
60  //copy constructor
61 }
62 
63 //-----------------------------------------------------------------------
64 AliFlowTrack* AliFlowTrack::Clone(const char* /*option*/) const
65 {
66  //clone "constructor"
67  return new AliFlowTrack(*this);
68 }
69 
70 //-----------------------------------------------------------------------
72 {
73  //assignment
76  return *this;
77 }
78 
80 //AliFlowTrackSimple& AliFlowTrack::operator=(const AliFlowTrackSimple& aTrack)
81 //{
82 // //polymorphic assignment
83 // AliFlowTrackSimple::operator=(aTrack);
84 // const AliFlowTrack* pft = dynamic_cast<const AliFlowTrack*>(&aTrack);
85 // if (pft)
86 // {
87 // fTrackSourceBits = pft->fTrackSourceBits;
88 // }
89 // else
90 // {
91 // fTrackSourceBits.ResetAllBits();
92 // }
93 // return *this;
94 //}
95 
96 //-----------------------------------------------------------------------
98 {
99  //destructor
100 }
101 
void SetCharge(Int_t charge)
void SetEta(Double_t eta)
TBits fTrackSourceBits
Definition: AliFlowTrack.h:45
void Set(const AliVParticle *p)
AliFlowTrackSimple & operator=(const AliFlowTrackSimple &aTrack)
void SetPhi(Double_t phi)
void SetPt(Double_t pt)
virtual ~AliFlowTrack()
virtual AliFlowTrack * Clone(const char *option="") const
AliFlowTrack & operator=(const AliFlowTrack &aTrack)