23 mPosition.SetMagThetaPhi(-9999., -9999., -9999.);
30 void Nucleon::Set(
const Double_t r,
const Double_t theta,
const Double_t phi,
31 const Double_t impactParameter,
const Double_t Theta,
const Double_t Phi,
32 const Bool_t isThetaFirst)
35 mPosition.SetMagThetaPhi(r, theta, phi);
38 if( Theta != 0.0 && Phi != 0.0 ){
41 mPosition.RotateY(Theta);
42 mPosition.RotateZ(Phi);
46 mPosition.RotateZ(Phi);
47 mPosition.RotateY(Theta);
51 mPosition.SetX( mPosition.X() + impactParameter );
59 Double_t Nucleon::GetX()
const
61 return mPosition.X() ;
67 return mPosition.Y() ;
73 return mPosition.Z() ;
79 return mPosition.Phi() ;
85 return mPosition.Mag() ;
93 const TString type(name);
95 if( type.CompareTo(
"x", TString::kIgnoreCase) == 0 )
return GetX() ;
96 else if( type.CompareTo(
"y", TString::kIgnoreCase) == 0 )
return GetY() ;
97 else if( type.CompareTo(
"z", TString::kIgnoreCase) == 0 )
return GetZ() ;
98 else if( type.CompareTo(
"xx", TString::kIgnoreCase) == 0 )
return GetX() * GetX() ;
99 else if( type.CompareTo(
"yy", TString::kIgnoreCase) == 0 )
return GetY() *
GetY() ;
100 else if( type.CompareTo(
"xy", TString::kIgnoreCase) == 0 )
return GetX() *
GetY() ;
101 else if( type.CompareTo(
"xxx", TString::kIgnoreCase) == 0 )
return GetX() * GetX() * GetX() ;
102 else if( type.CompareTo(
"yyy", TString::kIgnoreCase) == 0 )
return GetY() *
GetY() *
GetY() ;
103 else if( type.CompareTo(
"xxy", TString::kIgnoreCase) == 0 )
return GetX() * GetX() *
GetY() ;
104 else if( type.CompareTo(
"xyy", TString::kIgnoreCase) == 0 )
return GetX() *
GetY() *
GetY() ;
106 Error(
"IcGenerator::GetXYZ",
"Invalid name for sum, name=%s", name);
111 Error(
"Nucleon::GetXYZ",
"Something is wrong");
127 switch ( weightId ) {
132 Warning(
"Nucleon::GetWeight",
"Invalid weightId, id=%3d. Return unit weight", weightId);
137 Error(
"Nucleon::GetWeight",
"Something is wrong");
Double_t GetR() const
Get azimuthal angle of nucleon.
Double_t GetY() const
Get x position.
void Set(const Double_t r, const Double_t theta, const Double_t phi, const Double_t impactParameter, const Double_t Theta, const Double_t Phi, const Bool_t isThetaFirst=kTRUE)
Reset all data members.
void Reset()
Default destructor.
Double_t GetMultiplicity() const
Get Ncoll(x,y)
Double_t GetZ() const
Get y position.
Double_t GetPhi() const
Get x/y/z or their product (see source)
Double_t GetXYZ(const Char_t *name="X") const
Get z position.
UInt_t GetNcoll() const
Get Npart(x,y)
Double_t GetWeight(const UInt_t weightId=0) const
Get Multiplicity(x,y)
const TVector3 & GetVector() const
Set multiplicity.