printf("Creating Femto Analysis objects\n");\r
\r
gSystem->SetIncludePath("-I$ROOTSYS/include -I./STEERBase/ -I./ESD/ -I./AOD/ -I./ANALYSIS/ -I./ANALYSISalice/ -I./PWG2AOD/AOD -I./PWG2femtoscopy/FEMTOSCOPY/AliFemto -I./PWG2femtoscopyUser/FEMTOSCOPY/AliFemtoUser");\r
+ char fcm[2000];\r
+// sprintf(fcm, "%s++", fConfigMacro);\r
+// gROOT->LoadMacro(fcm);\r
gROOT->LoadMacro(fConfigMacro);\r
// fJetFinder = (AliJetFinder*) gInterpreter->ProcessLine("ConfigJetAnalysis()");\r
SetFemtoManager((AliFemtoManager *) gInterpreter->ProcessLine("ConfigFemtoAnalysis()"));\r
return false;
}
}
- float tEnergy = ::sqrt(track->P().mag2()+fMass*fMass);
+ float tEnergy = ::sqrt(track->P().Mag2()+fMass*fMass);
float tRapidity = 0.5*::log((tEnergy+track->P().z())/(tEnergy-track->P().z()));
float tPt = ::sqrt((track->P().x())*(track->P().x())+(track->P().y())*(track->P().y()));
if ((tRapidity<fRapidity[0])||(tRapidity>fRapidity[1]))
}
if (fMostProbable) {
- tMost[0] = track->PidProbElectron()*PidFractionElectron(track->P().mag());
+ tMost[0] = track->PidProbElectron()*PidFractionElectron(track->P().Mag());
tMost[1] = 0.0;
- tMost[2] = track->PidProbPion()*PidFractionPion(track->P().mag());
- tMost[3] = track->PidProbKaon()*PidFractionKaon(track->P().mag());
- tMost[4] = track->PidProbProton()*PidFractionProton(track->P().mag());
+ tMost[2] = track->PidProbPion()*PidFractionPion(track->P().Mag());
+ tMost[3] = track->PidProbKaon()*PidFractionKaon(track->P().Mag());
+ tMost[4] = track->PidProbProton()*PidFractionProton(track->P().Mag());
int imost=0;
float ipidmax = 0.0;
for (int ip=0; ip<5; ip++)
//____________________________
AliFemtoBPLCMS3DCorrFctn::AliFemtoBPLCMS3DCorrFctn(char* title, const int& nbins, const float& QLo, const float& QHi)
:
+ AliFemtoCorrFctn(),
fIDNumHisto(0),
fIDDenHisto(0),
fIDRatHisto(0),
fRout2(0),
fRside2(0),
fRlong2(0),
- fPairCut(0),
fQinvNormLo(0),
fQinvNormHi(0),
fNumRealsNorm(0),
fNumMixedNorm = 0;
// fCorrection = 0; // pointer to Coulomb Correction object
- fPairCut = 0; // added Sept2000 - CorrFctn-specific PairCut
-
// fSmearPair = 0; // no resolution correction unless user sets SmearPair
// set up numerator
}
AliFemtoBPLCMS3DCorrFctn::AliFemtoBPLCMS3DCorrFctn(const AliFemtoBPLCMS3DCorrFctn& aCorrFctn) :
- AliFemtoCorrFctn(),
+ AliFemtoCorrFctn(aCorrFctn),
fIDNumHisto(0),
fIDDenHisto(0),
fIDRatHisto(0),
fRout2(0),
fRside2(0),
fRlong2(0),
- fPairCut(0),
fQinvNormLo(0),
fQinvNormHi(0),
fNumRealsNorm(0),
fRout2 = aCorrFctn.fRout2;
fRside2 = aCorrFctn.fRside2;
fRlong2 = aCorrFctn.fRlong2;
- fPairCut = aCorrFctn.fPairCut;
fQinvNormLo = aCorrFctn.fQinvNormLo;
fQinvNormHi = aCorrFctn.fQinvNormHi;
fNumRealsNorm = aCorrFctn.fNumRealsNorm;
fRout2 = aCorrFctn.fRout2;
fRside2 = aCorrFctn.fRside2;
fRlong2 = aCorrFctn.fRlong2;
- fPairCut = aCorrFctn.fPairCut;
fQinvNormLo = aCorrFctn.fQinvNormLo;
fQinvNormHi = aCorrFctn.fQinvNormHi;
fNumRealsNorm = aCorrFctn.fNumRealsNorm;
// void SetCoulombCorrection(AliFemtoCoulomb* Correction);
- void SetSpecificPairCut(AliFemtoPairCut* aCut);
void SetUseRPSelection(unsigned short aRPSel);
// void SetSmearPair(AliFemtoSmearPair*);
double fRside2; // Rside for smearing correction
double fRlong2; // Rlong for smearing correction
- AliFemtoPairCut* fPairCut; //! this is a PairCut specific to THIS CorrFctn, not the Analysis
-
// upper and lower bounds of Qinv region where to do normalization
float fQinvNormLo; // Lower bound of Qinv normalization range
float fQinvNormHi; // Upper bound of Qinv normalization range
inline float AliFemtoBPLCMS3DCorrFctn::GetNormRangeLo() const{return fQinvNormLo;}
inline float AliFemtoBPLCMS3DCorrFctn::GetNormRangeHi() const{return fQinvNormHi;}
//inline void AliFemtoBPLCMS3DCorrFctn::SetCoulombCorrection(AliFemtoCoulomb* Correction){fCorrection = Correction;}
-inline void AliFemtoBPLCMS3DCorrFctn::SetSpecificPairCut(AliFemtoPairCut* pc){fPairCut=pc;}
//inline void AliFemtoBPLCMS3DCorrFctn::SetSmearPair(AliFemtoSmearPair* sp){fSmearPair = sp;}
inline void AliFemtoBPLCMS3DCorrFctn::SetRout(double r){fRout2 = r*r;}
goodPID = (goodPID&&(track->Charge() == fCharge));
}
if (goodPID){
- float tEnergy = ::sqrt(track->P().mag2()+fMass*fMass);
+ float tEnergy = ::sqrt(track->P().Mag2()+fMass*fMass);
float tRapidity = 0.5*::log((tEnergy+track->P().z())/
(tEnergy-track->P().z()));
// Fill in the monitor histograms with the values from the current track
AliFemtoModelGlobalHiddenInfo *hinfo = dynamic_cast<AliFemtoModelGlobalHiddenInfo *>(aTrack->GetHiddenInfo());
if (hinfo) {
- float tEta = -TMath::Log(TMath::Tan(hinfo->GetTrueMomentum()->theta()/2.0));
+ float tEta = -TMath::Log(TMath::Tan(hinfo->GetTrueMomentum()->Theta()/2.0));
fVertPos->Fill(hinfo->GetGlobalEmissionPoint()->x(), hinfo->GetGlobalEmissionPoint()->y());
fEtaZ->Fill(hinfo->GetGlobalEmissionPoint()->z(), tEta);
- fRadPos->Fill(hinfo->GetGlobalEmissionPoint()->perp());
+ fRadPos->Fill(hinfo->GetGlobalEmissionPoint()->Perp());
}
AliFemtoModelHiddenInfo *hminfo = dynamic_cast<AliFemtoModelHiddenInfo *>(aTrack->GetHiddenInfo());
void AliFemtoCutMonitorParticleYPt::Fill(const AliFemtoTrack* aTrack)
{
// Fill in the monitor histograms with the values from the current track
- float tEnergy = ::sqrt(aTrack->P().mag2()+fMass*fMass);
+ float tEnergy = ::sqrt(aTrack->P().Mag2()+fMass*fMass);
float tRapidity = 0.5*::log((tEnergy+aTrack->P().z())/(tEnergy-aTrack->P().z()));
float tPt = ::sqrt((aTrack->P().x())*(aTrack->P().x())+(aTrack->P().y())*(aTrack->P().y()));
- float tEta = -TMath::Log(TMath::Tan(aTrack->P().theta()/2.0));
- float tPhi = aTrack->P().phi();
+ float tEta = -TMath::Log(TMath::Tan(aTrack->P().Theta()/2.0));
+ float tPhi = aTrack->P().Phi();
float chi2w;
float dcar = aTrack->ImpactD();
float dcaz = aTrack->ImpactZ();
if ((*iter)->TPCchi2()/(*iter)->TPCncls() > 60.0) continue;
if ((*iter)->ImpactD() > 6.0) continue;
if ((*iter)->ImpactZ() > 6.0) continue;
- if (fabs((*iter)->P().pseudoRapidity()) > 0.9) continue;
+ if (fabs((*iter)->P().PseudoRapidity()) > 0.9) continue;
tNormTrackCount++;
}
aodtrack->PxPyPz(pxyz);//reading noconstarined momentum
const AliFmThreeVectorD ktP(pxyz[0],pxyz[1],pxyz[2]);
// Check the sanity of the tracks - reject zero momentum tracks
- if (ktP.mag() == 0) {
+ if (ktP.Mag() == 0) {
delete trackCopy;
continue;
}
aodtrack->PxPyPz(pxyz);//reading noconstarined momentum
const AliFmThreeVectorD ktP(pxyz[0],pxyz[1],pxyz[2]);
// Check the sanity of the tracks - reject zero momentum tracks
- if (ktP.mag() == 0) {
+ if (ktP.Mag() == 0) {
delete trackCopy;
continue;
}
trackCopy->SetP(v);//setting momentum
trackCopy->SetPt(sqrt(pxyz[0]*pxyz[0]+pxyz[1]*pxyz[1]));
const AliFmThreeVectorD ktP(pxyz[0],pxyz[1],pxyz[2]);
- if (ktP.mag() == 0) {
+ if (ktP.Mag() == 0) {
delete trackCopy;
continue;
}
}
AliFemtoThreeVector v(pxyz[0],pxyz[1],pxyz[2]);
- if (v.mag() < 0.0001) {
+ if (v.Mag() < 0.0001) {
// cout << "Found 0 momentum ???? " <<endl;
delete trackCopy;
continue;
tGoodMomentum=esdtrack->GetPxPyPz(pxyz);//reading noconstarined momentum
AliFemtoThreeVector v(pxyz[0],pxyz[1],pxyz[2]);
- if (v.mag() < 0.0001) {
+ if (v.Mag() < 0.0001) {
// cout << "Found 0 momentum ???? " <<endl;
delete trackCopy;
continue;
int realnofTracks=0;//number of track which we use ina analysis
Int_t *motherids;
- motherids = new Int_t[fStack->GetNtrack()];
- for (int ip=0; ip<fStack->GetNtrack(); ip++) motherids[ip] = 0;
-
- // Read in mother ids
- TParticle *motherpart;
- for (int ip=0; ip<fStack->GetNtrack(); ip++) {
- motherpart = fStack->Particle(ip);
- if (motherpart->GetDaughter(0) > 0)
- motherids[motherpart->GetDaughter(0)] = ip;
- if (motherpart->GetDaughter(1) > 0)
- motherids[motherpart->GetDaughter(1)] = ip;
-
+ if (fStack) {
+ motherids = new Int_t[fStack->GetNtrack()];
+ for (int ip=0; ip<fStack->GetNtrack(); ip++) motherids[ip] = 0;
+
+ // Read in mother ids
+ TParticle *motherpart;
+ for (int ip=0; ip<fStack->GetNtrack(); ip++) {
+ motherpart = fStack->Particle(ip);
+ if (motherpart->GetDaughter(0) > 0)
+ motherids[motherpart->GetDaughter(0)] = ip;
+ if (motherpart->GetDaughter(1) > 0)
+ motherids[motherpart->GetDaughter(1)] = ip;
+
// if (motherpart->GetPdgCode() == 211) {
// cout << "Mother " << ip << " has daughters "
// << motherpart->GetDaughter(0) << " "
// << endl;
// }
+ }
+ }
+ else {
+ printf ("No Stack ???\n");
+ return 0;
}
for (int i=0;i<nofTracks;i++)
}
AliFemtoThreeVector v(pxyz[0],pxyz[1],pxyz[2]);
- if (v.mag() < 0.0001) {
+ if (v.Mag() < 0.0001) {
// cout << "Found 0 momentum ???? " << pxyz[0] << " " << pxyz[1] << " " << pxyz[2] << endl;
delete trackCopy;
continue;
}
AliFemtoThreeVector v(pxyz[0],pxyz[1],pxyz[2]);
- if (v.mag() < 0.0001) {
+ if (v.Mag() < 0.0001) {
// cout << "Found 0 momentum ???? " << pxyz[0] << " " << pxyz[1] << " " << pxyz[2] << endl;
delete trackCopy;
continue;
fInputType(kUnknown),
fUsePhysicsSel(kFALSE),
fSelect(0),
- fTrackCuts(0x0)
+ fTrackCuts(0x0),
+ fUseTPCOnly(kFALSE)
{
//constructor with 0 parameters , look at default settings
}
fInputType(kUnknown),
fUsePhysicsSel(kFALSE),
fSelect(0),
- fTrackCuts(0x0)
+ fTrackCuts(0x0),
+ fUseTPCOnly(kFALSE)
{
// Copy constructor
fCurEvent = aReader.fCurEvent;
fUsePhysicsSel = aReader.fUsePhysicsSel;
if (fUsePhysicsSel) fSelect = new AliPhysicsSelection();
fTrackCuts = new AliESDtrackCuts(*(aReader.fTrackCuts));
+ fUseTPCOnly = aReader.fUseTPCOnly;
}
//__________________
AliFemtoEventReaderStandard::~AliFemtoEventReaderStandard()
if (fUsePhysicsSel) fSelect = new AliPhysicsSelection();
if (fTrackCuts) delete fTrackCuts;
fTrackCuts = new AliESDtrackCuts(*(aReader.fTrackCuts));
+ fUseTPCOnly = aReader.fUseTPCOnly;
+
return *this;
}
//__________________
hbtEvent->SetTriggerMask(fESDEvent->GetTriggerMask());
hbtEvent->SetTriggerCluster(fESDEvent->GetTriggerCluster());
+ printf("Got event type %i\n", fESDEvent->GetEventType());
+
//Vertex
double fVCov[6];
// if (fUseTPCOnly) {
AliFemtoTrack* trackCopy = new AliFemtoTrack();
if ((fInputType == kESD) || (fInputType == kESDKine)) {
+
+ AliESDtrack *esdtrack = 0x0;
+ if (fUseTPCOnly) {
+ AliESDtrack *mcp = fESDEvent->GetTrack(i);
+ esdtrack = AliESDtrackCuts::GetTPCOnlyTrack(fESDEvent, mcp->GetID());
+ // printf("Got %p for track %i | ", esdtrack, mcp->GetID());
+ }
+ else {
+ esdtrack = fESDEvent->GetTrack(i);//getting next track
+ }
- AliESDtrack *esdtrack=fESDEvent->GetTrack(i);//getting next track
- if (fTrackCuts->AcceptTrack(esdtrack)) {
+ if (esdtrack && (fTrackCuts->AcceptTrack(esdtrack))) {
trackCopy->SetCharge((short)esdtrack->GetSign());
// delete param;
// }
// else {
- tGoodMomentum=esdtrack->GetConstrainedPxPyPz(pxyz); //reading constrained momentum
+ if (fUseTPCOnly)
+ tGoodMomentum=esdtrack->GetPxPyPz(pxyz);
+ else
+ tGoodMomentum=esdtrack->GetConstrainedPxPyPz(pxyz); //reading constrained momentum
+ // printf("Got good momentum %i\n", tGoodMomentum);
AliFemtoThreeVector v(pxyz[0],pxyz[1],pxyz[2]);
- if (v.mag() < 0.0001) {
+ if (v.Mag() < 0.0001) {
delete trackCopy;
continue;
}
else
tGoodMomentum = false;
+
+ if (fUseTPCOnly)
+ if (esdtrack) delete esdtrack;
}
if ((fInputType == kAOD) || (fInputType == kAODKine)) {
aodtrack->PxPyPz(pxyz);//reading noconstarined momentum
const AliFmThreeVectorD ktP(pxyz[0],pxyz[1],pxyz[2]);
// Check the sanity of the tracks - reject zero momentum tracks
- if (ktP.mag() == 0) {
+ if (ktP.Mag() == 0) {
delete trackCopy;
continue;
}
-
+
}
fTrackCuts = esdcuts;
}
+void AliFemtoEventReaderStandard::SetUseTPCOnly(const bool usetpconly)
+{
+ // Set flag to use TPC only tracks
+ fUseTPCOnly = usetpconly;
+}
+
void AliFemtoEventReaderStandard::CopyAODtoFemtoTrack(const AliAODTrack *tAodTrack,
AliFemtoTrack *tFemtoTrack)
{
void SetInputType(AliFemtoInputType aInput);
void SetGenEventHeader(AliGenEventHeader *aGenHeader);
void SetUsePhysicsSelection(const bool usephysics);
+
void SetESDTrackCuts(AliESDtrackCuts *esdcuts);
+ void SetUseTPCOnly(const bool usetpconly);
protected:
bool fUsePhysicsSel; // if true the physics selection class will be used
AliPhysicsSelection *fSelect; // Class to select only physics events
+
AliESDtrackCuts *fTrackCuts; // Link to external ESD track cut
-
+ bool fUseTPCOnly; // if true the TPC only parameters will be used
#ifdef __ROOT__
ClassDef(AliFemtoEventReaderStandard, 1)
Double_t tPz = inf1->GetTrueMomentum()->z() + inf2->GetTrueMomentum()->z();
Double_t tM1 = inf1->GetMass();
Double_t tM2 = inf2->GetMass();
- Double_t tE1 = sqrt(tM1*tM1 + inf1->GetTrueMomentum()->mag2());
- Double_t tE2 = sqrt(tM2*tM2 + inf2->GetTrueMomentum()->mag2());
+ Double_t tE1 = sqrt(tM1*tM1 + inf1->GetTrueMomentum()->Mag2());
+ Double_t tE2 = sqrt(tM2*tM2 + inf2->GetTrueMomentum()->Mag2());
Double_t tEs = tE1 + tE2;
Double_t tPt = sqrt(tPx*tPx + tPy*tPy);
// double tE = inf1->GetTrueMomentum()->e +inf2->GetTrueMomentum()->.e;
Double_t tM1 = inf1->GetMass();
Double_t tM2 = inf2->GetMass();
- Double_t tE1 = sqrt(tM1*tM1 + inf1->GetTrueMomentum()->mag2());
- Double_t tE2 = sqrt(tM2*tM2 + inf2->GetTrueMomentum()->mag2());
+ Double_t tE1 = sqrt(tM1*tM1 + inf1->GetTrueMomentum()->Mag2());
+ Double_t tE2 = sqrt(tM2*tM2 + inf2->GetTrueMomentum()->Mag2());
Double_t tE = tE1 + tE2;
Double_t tPt = tPx*tPx + tPy*tPy;
Double_t tMt = tE*tE - tPz*tPz;//mCVK;
Double_t tPz = inf1->GetTrueMomentum()->z()+inf2->GetTrueMomentum()->z();
Double_t tM1 = inf1->GetMass();
Double_t tM2 = inf2->GetMass();
- Double_t tE1 = sqrt(tM1*tM1 + inf1->GetTrueMomentum()->mag2());
- Double_t tE2 = sqrt(tM2*tM2 + inf2->GetTrueMomentum()->mag2());
+ Double_t tE1 = sqrt(tM1*tM1 + inf1->GetTrueMomentum()->Mag2());
+ Double_t tE2 = sqrt(tM2*tM2 + inf2->GetTrueMomentum()->Mag2());
Double_t tE = tE1 + tE2;
Double_t tPt = tPx*tPx + tPy*tPy;
Double_t tMt = tE*tE - tPz*tPz;//mCVK;
{ l = l2-l1 ; } ;
// fill momentum differences into return variables
qP = l.z() ;
- qT = l.vect().perp() ;
+ qT = l.vect().Perp() ;
q0 = l.e() ;
}
//___________________________________
{ l = l2boosted-l1boosted ;} ;
// fill momentum differences into return variables
qP = l.z() ;
- qT = l.vect().perp() ;
+ qT = l.vect().Perp() ;
q0 = l.e() ;
}
//___________________________________
{ l = l2boosted-l1boosted ;} ;
// fill momentum differences into return variables
qP = l.z();
- qT = l.vect().perp();
+ qT = l.vect().Perp();
q0 = l.e();
}
//_________________
double AliFemtoPair::NominalTpcExitSeparation() const {
// separation at exit from STAR TPC
AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcExitPoint() - fTrack2->Track()->NominalTpcExitPoint();
- return (diff.mag());
+ return (diff.Mag());
}
double AliFemtoPair::NominalTpcEntranceSeparation() const {
// separation at entrance to STAR TPC
AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcEntrancePoint() - fTrack2->Track()->NominalTpcEntrancePoint();
- return (diff.mag());
+ return (diff.Mag());
}
// double AliFemtoPair::NominalTpcAverageSeparation() const {
// // for (int ipt=0; ipt<11; ipt++){
// diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
// ipt++;
-// tAveSep += diff.mag();
+// tAveSep += diff.Mag();
// }
// tAveSep = tAveSep/(ipt+1.);
// return (tAveSep);}
double AliFemtoPair::OpeningAngle() const {
// opening angle
- return 57.296* fTrack1->FourMomentum().vect().angle( fTrack2->FourMomentum().vect() );
+ return 57.296* fTrack1->FourMomentum().vect().Angle( fTrack2->FourMomentum().vect() );
// AliFemtoThreeVector p1 = fTrack1->FourMomentum().vect();
// AliFemtoThreeVector p2 = fTrack2->FourMomentum().vect();
// return 57.296*(p1.phi()-p2.phi());
-// //double dAngInv = 57.296*acos((p1.dot(p2))/(p1.mag()*p2.mag()));
+// //double dAngInv = 57.296*acos((p1.dot(p2))/(p1.Mag()*p2.Mag()));
// //return (dAngInv);
}
//_________________
AliFmLorentzVectorD tK(tGamma*tP1.e() - tP1.vect()*tGammaBeta,
tP1.vect() + (tGamma-1.)*tLongMom - tP1.e()*tGammaBeta);
//VP tP1.vect() *= -1.; // unflip it
- return tK.vect().mag();
+ return tK.vect().Mag();
}
//double AliFemtoPair::CVK() const{
// (tGammaBeta*tGammaBeta))*tGammaBeta;
//AliFmLorentzVectorD tK(tGamma*tP1.e() - tP1.vect()*tGammaBeta,
// tP1.vect() + (tGamma-1.)*tLongMom - tP1.e()*tGammaBeta);
-//return (tK.vect())*tGammaBeta/tK.vect().magnitude()/tGammaBeta.magnitude();
+//return (tK.vect())*tGammaBeta/tK.vect().Magnitude()/tGammaBeta.Magnitude();
//}
double AliFemtoPair::CVKFlipped() const{
// //_______1st part is a track 2nd is a V0 considering Pos daughter
// AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcExitPoint() - fTrack2->TpcV0PosExitPoint();
-// return (diff.mag());
+// return (diff.Mag());
// }
// double AliFemtoPair::TpcEntranceSeparationTrackV0Pos() const {
// //________________V0 daughters exit/entrance/average separation calc.
// //_______1st part is a track 2nd is a V0 considering Pos daughter
// AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcEntrancePoint() - fTrack2->TpcV0PosEntrancePoint();
-// return (diff.mag());
+// return (diff.Mag());
// }
// double AliFemtoPair::TpcAverageSeparationTrackV0Pos() const {
// ){
// diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
// ipt++;
-// tAveSep += diff.mag();
+// tAveSep += diff.Mag();
// }
// tAveSep = tAveSep/(ipt+1.);
// return (tAveSep);}
// double AliFemtoPair::TpcExitSeparationTrackV0Neg() const {
// //_______1st part is a track 2nd is a V0 considering Neg daughter
// AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcExitPoint() - fTrack2->TpcV0NegExitPoint();
-// return (diff.mag());
+// return (diff.Mag());
// }
// double AliFemtoPair::TpcEntranceSeparationTrackV0Neg() const {
// //_______1st part is a track 2nd is a V0 considering Neg daughter
// AliFemtoThreeVector diff = fTrack1->Track()->NominalTpcEntrancePoint() - fTrack2->TpcV0NegEntrancePoint();
-// return (diff.mag());
+// return (diff.Mag());
// }
// double AliFemtoPair::TpcAverageSeparationTrackV0Neg() const {
// ){
// diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt];
// ipt++;
-// tAveSep += diff.mag();
+// tAveSep += diff.Mag();
// }
// tAveSep = tAveSep/(ipt+1.);
// return (tAveSep);}
// double AliFemtoPair::TpcExitSeparationV0PosV0Pos() const {
// //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter
// AliFemtoThreeVector diff = fTrack1->TpcV0PosExitPoint() - fTrack2->TpcV0PosExitPoint();
-// return (diff.mag());
+// return (diff.Mag());
// }
// double AliFemtoPair::TpcEntranceSeparationV0PosV0Pos() const {
// //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter
// AliFemtoThreeVector diff = fTrack1->TpcV0PosEntrancePoint() - fTrack2->TpcV0PosEntrancePoint();
-// return (diff.mag());
+// return (diff.Mag());
// }
// double AliFemtoPair::TpcAverageSeparationV0PosV0Pos() const {
// //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Pos daughter
// ){
// diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
// ipt++;
-// tAveSep += diff.mag();
+// tAveSep += diff.Mag();
// }
// tAveSep = tAveSep/(ipt+1);
// return (tAveSep);}
// double AliFemtoPair::TpcExitSeparationV0PosV0Neg() const {
// //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter
// AliFemtoThreeVector diff = fTrack1->TpcV0PosExitPoint() - fTrack2->TpcV0NegExitPoint();
-// return (diff.mag());
+// return (diff.Mag());
// }
// double AliFemtoPair::TpcEntranceSeparationV0PosV0Neg() const {
// //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter
// AliFemtoThreeVector diff = fTrack1->TpcV0PosEntrancePoint() - fTrack2->TpcV0NegEntrancePoint();
-// return (diff.mag());
+// return (diff.Mag());
// }
// double AliFemtoPair::TpcAverageSeparationV0PosV0Neg() const {
// //_______1st part is a V0 considering Pos daughter 2nd is a V0 considering Neg daughter
// ){
// diff = fTrack1->fNominalPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt];
// ipt++;
-// tAveSep += diff.mag();
+// tAveSep += diff.Mag();
// }
// tAveSep = tAveSep/(ipt+1.);
// return (tAveSep);}
// //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter
// // this is to check the upper case
// AliFemtoThreeVector diff = fTrack1->TpcV0NegExitPoint() - fTrack2->TpcV0PosExitPoint();
-// return (diff.mag());
+// return (diff.Mag());
// }
// double AliFemtoPair::TpcEntranceSeparationV0NegV0Pos() const {
// //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter
// // this is to check the upper case
// AliFemtoThreeVector diff = fTrack1->TpcV0NegEntrancePoint() - fTrack2->TpcV0PosEntrancePoint();
-// return (diff.mag());
+// return (diff.Mag());
// }
// double AliFemtoPair::TpcAverageSeparationV0NegV0Pos() const {
// //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Pos daughter
// ){
// diff = fTrack1->fTpcV0NegPosSample[ipt] - fTrack2->fNominalPosSample[ipt];
// ipt++;
-// tAveSep += diff.mag();
+// tAveSep += diff.Mag();
// }
// tAveSep = tAveSep/(ipt+1);
// return (tAveSep);}
// double AliFemtoPair::TpcExitSeparationV0NegV0Neg() const {
// //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter
// AliFemtoThreeVector diff = fTrack1->TpcV0NegExitPoint() - fTrack2->TpcV0NegExitPoint();
-// return (diff.mag());
+// return (diff.Mag());
// }
// double AliFemtoPair::TpcEntranceSeparationV0NegV0Neg() const {
// //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter
// AliFemtoThreeVector diff = fTrack1->TpcV0NegEntrancePoint() - fTrack2->TpcV0NegEntrancePoint();
-// return (diff.mag());
+// return (diff.Mag());
// }
// double AliFemtoPair::TpcAverageSeparationV0NegV0Neg() const {
// //_______1st part is a V0 considering Neg daughter 2nd is a V0 considering Neg daughter
// ){
// diff = fTrack1->fTpcV0NegPosSample[ipt] - fTrack2->fTpcV0NegPosSample[ipt];
// ipt++;
-// tAveSep += diff.mag();
+// tAveSep += diff.Mag();
// }
// tAveSep = tAveSep/(ipt+1);
// return (tAveSep);}
fTrack = new AliFemtoTrack(*hbtTrack);
AliFemtoThreeVector temp = hbtTrack->P();
fFourMomentum.SetVect(temp);
- double ener = ::sqrt(temp.mag2()+mass*mass);
+ double ener = ::sqrt(temp.Mag2()+mass*mass);
fFourMomentum.SetE(ener);
// fMap[0] = hbtTrack->TopologyMap(0);
// fMap[1] = hbtTrack->TopologyMap(1);
// I know there is a better way to do this...
AliFemtoThreeVector temp = hbtV0->MomV0();
fFourMomentum.SetVect(temp);
- double ener = ::sqrt(temp.mag2()+mass*mass);
+ double ener = ::sqrt(temp.Mag2()+mass*mass);
fFourMomentum.SetE(ener);
// Calculating TpcEntrancePoint for Positive V0 daugther
fPrimaryVertex = hbtV0->PrimaryVertex();
// I know there is a better way to do this...
AliFemtoThreeVector temp = hbtKink->Parent().P();
fFourMomentum.SetVect(temp);
- double ener = ::sqrt(temp.mag2()+mass*mass);
+ double ener = ::sqrt(temp.Mag2()+mass*mass);
fFourMomentum.SetE(ener);
}
//fMap[1]= 0;
AliFemtoThreeVector temp;// = hbtXi->mMofXi;
fFourMomentum.SetVect(temp);
- double ener = ::sqrt(temp.mag2()+mass*mass);
+ double ener = ::sqrt(temp.Mag2()+mass*mass);
fFourMomentum.SetE(ener);
fHiddenInfo = 0;
}
AliFemtoQinvCorrFctn::AliFemtoQinvCorrFctn(char* title, const int& nbins, const float& QinvLo, const float& QinvHi):
fNumerator(0),
fDenominator(0),
- fRatio(0)
+ fRatio(0),
+ fkTMonitor(0)
{
// set up numerator
// title = "Num Qinv (MeV/c)";
char tTitRat[100] = "Rat";
strcat(tTitRat,title);
fRatio = new TH1D(tTitRat,title,nbins,QinvLo,QinvHi);
+ char tTitkT[100] = "kTDep";
+ strcat(tTitkT,title);
+ fkTMonitor = new TH1D(tTitkT,title,200,0.0,2.0);
// this next bit is unfortunately needed so that we can have many histos of same "title"
// it is neccessary if we typedef TH1D to TH1d (which we do)
//fNumerator->SetDirectory(0);
fNumerator->Sumw2();
fDenominator->Sumw2();
fRatio->Sumw2();
-
+ fkTMonitor->Sumw2();
}
//____________________________
AliFemtoCorrFctn(),
fNumerator(0),
fDenominator(0),
- fRatio(0)
+ fRatio(0),
+ fkTMonitor(0)
{
// copy constructor
fNumerator = new TH1D(*aCorrFctn.fNumerator);
fDenominator = new TH1D(*aCorrFctn.fDenominator);
fRatio = new TH1D(*aCorrFctn.fRatio);
+ fkTMonitor = new TH1D(*aCorrFctn.fkTMonitor);
}
//____________________________
AliFemtoQinvCorrFctn::~AliFemtoQinvCorrFctn(){
delete fNumerator;
delete fDenominator;
delete fRatio;
+ delete fkTMonitor;
}
//_________________________
AliFemtoQinvCorrFctn& AliFemtoQinvCorrFctn::operator=(const AliFemtoQinvCorrFctn& aCorrFctn)
fDenominator = new TH1D(*aCorrFctn.fDenominator);
if (fRatio) delete fRatio;
fRatio = new TH1D(*aCorrFctn.fRatio);
+ if (fkTMonitor) delete fkTMonitor;
+ fkTMonitor = new TH1D(*aCorrFctn.fkTMonitor);
return *this;
}
double tQinv = fabs(pair->QInv()); // note - qInv() will be negative for identical pairs...
fNumerator->Fill(tQinv);
+ fkTMonitor->Fill(pair->KT());
// cout << "AliFemtoQinvCorrFctn::AddRealPair : " << pair->qInv() << " " << tQinv <<
//" " << pair->track1().FourMomentum() << " " << pair->track2().FourMomentum() << endl;
}
// Write out neccessary objects
fNumerator->Write();
fDenominator->Write();
+ fkTMonitor->Write();
}
//______________________________
TList* AliFemtoQinvCorrFctn::GetOutputList()
tOutputList->Add(fNumerator);
tOutputList->Add(fDenominator);
+ tOutputList->Add(fkTMonitor);
return tOutputList;
}
TH1D* fNumerator; // numerator - real pairs
TH1D* fDenominator; // denominator - mixed pairs
TH1D* fRatio; // ratio - correlation function
+ TH1D* fkTMonitor; // Monitor the kT of pairs in the function
#ifdef __ROOT__
ClassDef(AliFemtoQinvCorrFctn, 1)
float tMomNegAlongV0, tMomPosAlongV0;
fMomV0 = fMomPos + fMomNeg;
- fPtV0 = fMomV0.perp();
- fPtotV0 = fMomV0.mag();
- fPtPos = fMomPos.perp();
- fPtotPos= fMomPos.mag();
- fPtNeg = fMomNeg.perp();
- fPtotNeg= fMomNeg.mag();
+ fPtV0 = fMomV0.Perp();
+ fPtotV0 = fMomV0.Mag();
+ fPtPos = fMomPos.Perp();
+ fPtotPos= fMomPos.Mag();
+ fPtNeg = fMomNeg.Perp();
+ fPtotNeg= fMomNeg.Mag();
fELambda= ::sqrt(fPtotV0*fPtotV0+M_LAMBDA*M_LAMBDA);
fEK0Short= ::sqrt(fPtotV0*fPtotV0+M_KAON_0_SHORT*M_KAON_0_SHORT);
fEPosProton = ::sqrt(fPtotPos*fPtotPos+M_PROTON*M_PROTON);
fMassK0Short = ::sqrt(::pow(fENegPion+fEPosPion,2)-::pow(fPtotV0,2));
fRapLambda = 0.5*::log( (fELambda+fMomV0.z()) / (fELambda-fMomV0.z()) );
- fCTauLambda = M_LAMBDA*(fDecayLengthV0) / ::sqrt( ::pow((double)fMomV0.mag(),2.) );
+ fCTauLambda = M_LAMBDA*(fDecayLengthV0) / ::sqrt( ::pow((double)fMomV0.Mag(),2.) );
fRapK0Short = 0.5*::log( (fEK0Short+fMomV0.z()) / (fEK0Short-fMomV0.z()) );
- fCTauK0Short = M_KAON_0_SHORT*(fDecayLengthV0) / ::sqrt( ::pow((double)fMomV0.mag(),2.) );
+ fCTauK0Short = M_KAON_0_SHORT*(fDecayLengthV0) / ::sqrt( ::pow((double)fMomV0.Mag(),2.) );
}
// -----------------------------------------------------------------------
inline float AliFemtoV0::NumdedxNeg() const {return fNufDedxNeg;} //Gael 04Fev2002
inline float AliFemtoV0::ErrdedxNeg() const {return fErrDedxNeg;} //Gael 04Fev2002
inline float AliFemtoV0::LendedxNeg() const {return fLenDedxNeg;} //Gael 04Fev2002
-inline float AliFemtoV0::PseudoRapNeg() const {return fMomNeg.pseudoRapidity();} //Gael 04Fev2002
+inline float AliFemtoV0::PseudoRapNeg() const {return fMomNeg.PseudoRapidity();} //Gael 04Fev2002
inline float AliFemtoV0::DedxPos() const {return fDedxPos;}
inline float AliFemtoV0::NumdedxPos() const {return fNufDedxPos;} //Gael 04Fev2002
inline float AliFemtoV0::ErrdedxPos() const {return fErrDedxPos;} //Gael 04Fev2002
inline float AliFemtoV0::LendedxPos() const {return fLenDedxPos;} //Gael 04Fev2002
-inline float AliFemtoV0::PseudoRapPos() const {return fMomPos.pseudoRapidity();} //Gael 04Fev2002
+inline float AliFemtoV0::PseudoRapPos() const {return fMomPos.PseudoRapidity();} //Gael 04Fev2002
inline unsigned long AliFemtoV0::TrackTopologyMapPos(unsigned int word) const { return fTrackTopologyMapPos[word]; }
float tMomV0AlongXi, tMomBacAlongXi;
fMomXi = MomV0() + MomBac();
- fPtXi = fMomXi.perp();
- fPtotXi = fMomXi.mag();
- fPtBac = MomBac().perp();
- fPtotBac= MomBac().mag();
+ fPtXi = fMomXi.Perp();
+ fPtotXi = fMomXi.Mag();
+ fPtBac = MomBac().Perp();
+ fPtotBac= MomBac().Mag();
fEXi= ::sqrt(fPtotXi*fPtotXi+M_XI_MINUS*M_XI_MINUS);
fEOmega= ::sqrt(fPtotXi*fPtotXi+M_OMEGA_MINUS*M_OMEGA_MINUS);
fEBacPion = ::sqrt(PtotBac()*PtotBac()+M_PION_MINUS*M_PION_MINUS);
fMassOmega = ::sqrt(::pow(EBacKaon()+ELambda(),2)-::pow(fPtotXi,2));
fRapXi = 0.5*::log( (EXi()+fMomXi.z()) / (EXi()-fMomXi.z()) );
- fCTauXi = M_XI_MINUS*(fDecayLengthXi) / ::sqrt( ::pow((double)fMomXi.mag(),2.) );
+ fCTauXi = M_XI_MINUS*(fDecayLengthXi) / ::sqrt( ::pow((double)fMomXi.Mag(),2.) );
fRapOmega = 0.5*::log( (EOmega()+fMomXi.z()) / (EOmega()-fMomXi.z()) );// eO,
- fCTauOmega = M_OMEGA_MINUS*(fDecayLengthXi) / ::sqrt( ::pow((double)fMomXi.mag(),2.) );
+ fCTauOmega = M_OMEGA_MINUS*(fDecayLengthXi) / ::sqrt( ::pow((double)fMomXi.Mag(),2.) );
}
// -----------------------------------------------------------------------
#ifdef __ROOT__
T AliFmLorentzVector<T>::t() const {return mX4;}
template<class T>
-T AliFmLorentzVector<T>::perp() const {return mThreeVector.perp();}
+T AliFmLorentzVector<T>::perp() const {return mThreeVector.Perp();}
template<class T>
-T AliFmLorentzVector<T>::perp2() const {return mThreeVector.perp2();}
+T AliFmLorentzVector<T>::perp2() const {return mThreeVector.Perp2();}
template<class T>
-T AliFmLorentzVector<T>::pseudoRapidity() const {return mThreeVector.pseudoRapidity();}
+T AliFmLorentzVector<T>::pseudoRapidity() const {return mThreeVector.PseudoRapidity();}
template<class T>
-T AliFmLorentzVector<T>::phi() const {return mThreeVector.phi();}
+T AliFmLorentzVector<T>::phi() const {return mThreeVector.Phi();}
template<class T>
-T AliFmLorentzVector<T>::theta() const {return mThreeVector.theta();}
+T AliFmLorentzVector<T>::theta() const {return mThreeVector.Theta();}
template<class T>
-T AliFmLorentzVector<T>::cosTheta() const {return mThreeVector.cosTheta();}
+T AliFmLorentzVector<T>::cosTheta() const {return mThreeVector.CosTheta();}
template<class T>
T AliFmLorentzVector<T>::operator() (size_t i) const
SetPhase((M_PI/4)*(1-2.*fH));
else
SetPhase(atan2(p.y(),p.x())-fH*M_PI/2);
- SetDipAngle(atan2(p.z(),p.perp()));
+ SetDipAngle(atan2(p.z(),p.Perp()));
fOrigin = o;
#ifndef ST_NO_NAMESPACES
using namespace units;
#endif
SetCurvature(fabs((c_light*nanosecond/meter*q*B/tesla)/
- (abs(p.mag())/GeV*fCosDipAngle)/meter));
+ (abs(p.Mag())/GeV*fCosDipAngle)/meter));
#ifndef ST_NO_NAMESPACES
}
#endif
double yc = this->YCenter();
double rx = (Y(S)-yc)/(fOrigin.y()-yc);
double ry = (X(S)-xc)/(fOrigin.x()-xc);
- return (this->Momentum(B)).pseudoProduct(rx,ry,1.0);
+ return (this->Momentum(B)).PseudoProduct(rx,ry,1.0);
}
int AliFmPhysicalHelix::Charge(double B) const
double cross = tDCAVec.x()*momVec.y() - tDCAVec.y()*momVec.x();
double theSign = (cross>=0) ? 1. : -1.;
- return theSign*tDCAVec.perp();
+ return theSign*tDCAVec.Perp();
}
double AliFmPhysicalHelix::CurvatureSignedDistance(double x, double y)
T x() const;
T y() const;
T z() const;
- T theta() const;
- T cosTheta() const;
- T phi() const;
- T perp() const;
- T perp2() const;
- T magnitude() const;
- T mag() const;
- T mag2() const;
- T pseudoRapidity() const;
+ T Theta() const;
+ T CosTheta() const;
+ T Phi() const;
+ T Perp() const;
+ T Perp2() const;
+ T Magnitude() const;
+ T Mag() const;
+ T Mag2() const;
+ T PseudoRapidity() const;
T operator() (size_t) const;
T operator[] (size_t) const;
AliFmThreeVector<T> unit() const;
AliFmThreeVector<T> orthogonal() const;
- void rotateX(T);
- void rotateY(T);
- void rotateZ(T);
+ void RotateX(T);
+ void RotateY(T);
+ void RotateZ(T);
AliFmThreeVector<T> operator- ();
AliFmThreeVector<T> operator+ ();
AliFmThreeVector<T>& operator*= (double);
AliFmThreeVector<T>& operator/= (double);
- AliFmThreeVector<T> pseudoProduct(double,double,double) const;
+ AliFmThreeVector<T> PseudoProduct(double,double,double) const;
#ifndef ST_NO_MEMBER_TEMPLATES
- template<class X> T angle(const AliFmThreeVector<X>&) const;
- template<class X> AliFmThreeVector<T> cross(const AliFmThreeVector<X>&) const;
- template<class X> T dot (const AliFmThreeVector<X>&) const;
- template<class X> AliFmThreeVector<T> pseudoProduct(const AliFmThreeVector<X>&) const;
+ template<class X> T Angle(const AliFmThreeVector<X>&) const;
+ template<class X> AliFmThreeVector<T> Cross(const AliFmThreeVector<X>&) const;
+ template<class X> T Dot (const AliFmThreeVector<X>&) const;
+ template<class X> AliFmThreeVector<T> PseudoProduct(const AliFmThreeVector<X>&) const;
template<class X> bool operator == (const AliFmThreeVector<X>& v) const;
template<class X> bool operator != (const AliFmThreeVector<X>& v) const;
template<class X> AliFmThreeVector<T>& operator+= (const AliFmThreeVector<X>&);
template<class X> AliFmThreeVector<T>& operator-= (const AliFmThreeVector<X>&);
#else
- T angle(const AliFmThreeVector<float>&) const;
- AliFmThreeVector<T> cross(const AliFmThreeVector<float>&) const;
- T dot (const AliFmThreeVector<float>&) const;
- AliFmThreeVector<T> pseudoProduct(const AliFmThreeVector<float>&) const;
+ T Angle(const AliFmThreeVector<float>&) const;
+ AliFmThreeVector<T> Cross(const AliFmThreeVector<float>&) const;
+ T Dot (const AliFmThreeVector<float>&) const;
+ AliFmThreeVector<T> PseudoProduct(const AliFmThreeVector<float>&) const;
- T angle(const AliFmThreeVector<double>&) const;
- T dot (const AliFmThreeVector<double>&) const;
- AliFmThreeVector<T> cross(const AliFmThreeVector<double>&) const;
- AliFmThreeVector<T> pseudoProduct(const AliFmThreeVector<double>&) const;
+ T Angle(const AliFmThreeVector<double>&) const;
+ T Dot (const AliFmThreeVector<double>&) const;
+ AliFmThreeVector<T> Cross(const AliFmThreeVector<double>&) const;
+ AliFmThreeVector<T> PseudoProduct(const AliFmThreeVector<double>&) const;
bool operator == (const AliFmThreeVector<float>& v) const;
bool operator != (const AliFmThreeVector<float>& v) const;
int Valid(double world = 1.e+5) const;
int Bad(double world = 1.e+5) const;
protected:
- T mX1, mX2, mX3;
+ T mX1, mX2, mX3; // Vector components
#ifdef __ROOT__
ClassDef(AliFmThreeVector,3)
#endif /* __ROOT__ */
inline void AliFmThreeVector<T>::SetZ(T az) {mX3 = az;}
template<class T>
-void AliFmThreeVector<T>::SetPhi(T aangle)
+void AliFmThreeVector<T>::SetPhi(T aAngle)
{
- double r = magnitude();
- double th = theta();
+ double r = Magnitude();
+ double th = Theta();
- mX1 = r*sin(th)*cos(aangle);
- mX2 = r*sin(th)*sin(aangle);
+ mX1 = r*sin(th)*cos(aAngle);
+ mX2 = r*sin(th)*sin(aAngle);
}
template <class T>
-void AliFmThreeVector<T>::SetTheta(T aangle)
+void AliFmThreeVector<T>::SetTheta(T aAngle)
{
- double r = magnitude();
- double ph = phi();
+ double r = Magnitude();
+ double ph = Phi();
- mX1 = r*sin(aangle)*cos(ph);
- mX2 = r*sin(aangle)*sin(ph);
- mX3 = r*cos(aangle);
+ mX1 = r*sin(aAngle)*cos(ph);
+ mX2 = r*sin(aAngle)*sin(ph);
+ mX3 = r*cos(aAngle);
}
template <class T>
void AliFmThreeVector<T>::SetMagnitude(T r)
{
- double th = theta();
- double ph = phi();
+ double th = Theta();
+ double ph = Phi();
mX1 = r*sin(th)*cos(ph);
mX2 = r*sin(th)*sin(ph);
inline T AliFmThreeVector<T>::z() const {return mX3;}
template<class T>
-inline T AliFmThreeVector<T>::theta() const
+inline T AliFmThreeVector<T>::Theta() const
{
- return acos(cosTheta());
+ return acos(CosTheta());
}
template<class T>
-inline T AliFmThreeVector<T>::cosTheta() const
+inline T AliFmThreeVector<T>::CosTheta() const
{
- return mX3/(mag()+1e-20);
+ return mX3/(Mag()+1e-20);
}
template<class T>
-inline T AliFmThreeVector<T>::phi() const
+inline T AliFmThreeVector<T>::Phi() const
{
return atan2(mX2,mX1);
}
template<class T>
-inline T AliFmThreeVector<T>::pseudoRapidity() const
+inline T AliFmThreeVector<T>::PseudoRapidity() const
{
//
// change code to more optimal:
- // double m = mag();
+ // double m = Mag();
// return 0.5*::log( (m+z())/(m-z()) );
- double tmp = tan(theta()/2.); if (tmp <=0.) return 1e20;
+ double tmp = tan(Theta()/2.); if (tmp <=0.) return 1e20;
return -::log(tmp);
}
template<class T>
inline AliFmThreeVector<T> AliFmThreeVector<T>::unit() const
{
- double tmp = mag(); if (tmp<=0.) tmp = 1e-20;
+ double tmp = Mag(); if (tmp<=0.) tmp = 1e-20;
return *this/tmp;
}
}
template <class T>
-void AliFmThreeVector<T>::rotateX(T aangle)
+void AliFmThreeVector<T>::RotateX(T aAngle)
{
// may in the future make use of the AliFmRotation class!
- double yPrime = cos(aangle)*mX2 - sin(aangle)*mX3;
- double zPrime = sin(aangle)*mX2 + cos(aangle)*mX3;
+ double yPrime = cos(aAngle)*mX2 - sin(aAngle)*mX3;
+ double zPrime = sin(aAngle)*mX2 + cos(aAngle)*mX3;
mX2 = yPrime;
mX3 = zPrime;
}
template <class T>
-void AliFmThreeVector<T>::rotateY(T aangle)
+void AliFmThreeVector<T>::RotateY(T aAngle)
{
// may in the future make use of the AliFmRotation class!
- double zPrime = cos(aangle)*mX3 - sin(aangle)*mX1;
- double xPrime = sin(aangle)*mX3 + cos(aangle)*mX1;
+ double zPrime = cos(aAngle)*mX3 - sin(aAngle)*mX1;
+ double xPrime = sin(aAngle)*mX3 + cos(aAngle)*mX1;
mX1 = xPrime;
mX3 = zPrime;
}
template <class T>
-void AliFmThreeVector<T>::rotateZ(T aangle)
+void AliFmThreeVector<T>::RotateZ(T aAngle)
{
// may in the future make use of the AliFmRotation class!
- double xPrime = cos(aangle)*mX1 - sin(aangle)*mX2;
- double yPrime = sin(aangle)*mX1 + cos(aangle)*mX2;
+ double xPrime = cos(aAngle)*mX1 - sin(aAngle)*mX2;
+ double yPrime = sin(aAngle)*mX1 + cos(aAngle)*mX2;
mX1 = xPrime;
mX2 = yPrime;
}
template<class T>
-inline T AliFmThreeVector<T>::perp() const
+inline T AliFmThreeVector<T>::Perp() const
{
return ::sqrt(mX1*mX1+mX2*mX2);
}
template<class T>
-inline T AliFmThreeVector<T>::perp2() const
+inline T AliFmThreeVector<T>::Perp2() const
{
return mX1*mX1+mX2*mX2;
}
template<class T>
-inline T AliFmThreeVector<T>::magnitude() const
+inline T AliFmThreeVector<T>::Magnitude() const
{
- return mag();
+ return Mag();
}
template<class T>
-inline T AliFmThreeVector<T>::mag() const
+inline T AliFmThreeVector<T>::Mag() const
{
return ::sqrt(mX1*mX1+mX2*mX2+mX3*mX3);
}
template<class T>
-inline T AliFmThreeVector<T>::mag2() const
+inline T AliFmThreeVector<T>::Mag2() const
{
return mX1*mX1+mX2*mX2+mX3*mX3;
}
template<class T>
inline AliFmThreeVector<T>
-AliFmThreeVector<T>::pseudoProduct(double ax,double ay,double az) const
+AliFmThreeVector<T>::PseudoProduct(double ax,double ay,double az) const
{
return AliFmThreeVector<T>(mX1*ax,mX2*ay,mX3*az);
}
template<class T>
template<class X>
-inline T AliFmThreeVector<T>::dot(const AliFmThreeVector<X>& v) const
+inline T AliFmThreeVector<T>::Dot(const AliFmThreeVector<X>& v) const
{
return mX1*v.x() + mX2*v.y() + mX3*v.z();
}
template<class T>
template<class X>
inline AliFmThreeVector<T>
-AliFmThreeVector<T>::cross(const AliFmThreeVector<X>& v) const
+AliFmThreeVector<T>::Cross(const AliFmThreeVector<X>& v) const
{
return AliFmThreeVector<T>(mX2*v.z() - mX3*v.y(),
mX3*v.x() - mX1*v.z(),
template<class T>
template<class X>
-inline T AliFmThreeVector<T>::angle(const AliFmThreeVector<X>& vec) const
+inline T AliFmThreeVector<T>::Angle(const AliFmThreeVector<X>& vec) const
{
- double norm = this->mag2()*vec.mag2();
+ double norm = this->Mag2()*vec.Mag2();
- return norm > 0 ? acos(this->dot(vec)/(::sqrt(norm))) : 0;
+ return norm > 0 ? acos(this->Dot(vec)/(::sqrt(norm))) : 0;
}
template<class T>
template<class X>
inline AliFmThreeVector<T>
-AliFmThreeVector<T>::pseudoProduct(const AliFmThreeVector<X>& v) const
+AliFmThreeVector<T>::PseudoProduct(const AliFmThreeVector<X>& v) const
{
- return this->pseudoProduct(v.x(),v.y(),v.z());
+ return this->PseudoProduct(v.x(),v.y(),v.z());
}
#endif
}
template<class T>
-inline T AliFmThreeVector<T>::dot(const AliFmThreeVector<float>& v) const
+inline T AliFmThreeVector<T>::Dot(const AliFmThreeVector<float>& v) const
{
return mX1*v.x() + mX2*v.y() + mX3*v.z();
}
template<class T>
-inline T AliFmThreeVector<T>::dot(const AliFmThreeVector<double>& v) const
+inline T AliFmThreeVector<T>::Dot(const AliFmThreeVector<double>& v) const
{
return mX1*v.x() + mX2*v.y() + mX3*v.z();
}
template<class T>
inline AliFmThreeVector<T>
-AliFmThreeVector<T>::cross(const AliFmThreeVector<float>& v) const
+AliFmThreeVector<T>::Cross(const AliFmThreeVector<float>& v) const
{
return AliFmThreeVector<T>(mX2*v.z() - mX3*v.y(),
mX3*v.x() - mX1*v.z(),
template<class T>
inline AliFmThreeVector<T>
-AliFmThreeVector<T>::cross(const AliFmThreeVector<double>& v) const
+AliFmThreeVector<T>::Cross(const AliFmThreeVector<double>& v) const
{
return AliFmThreeVector<T>(mX2*v.z() - mX3*v.y(),
mX3*v.x() - mX1*v.z(),
}
template<class T>
-inline T AliFmThreeVector<T>::angle(const AliFmThreeVector<float>& v) const
+inline T AliFmThreeVector<T>::Angle(const AliFmThreeVector<float>& v) const
{
- double tmp = mag()*v.mag(); if (tmp <=0) tmp = 1e-20;
- return acos(this->dot(v)/tmp);
+ double tmp = Mag()*v.Mag(); if (tmp <=0) tmp = 1e-20;
+ return acos(this->Dot(v)/tmp);
}
template<class T>
-inline T AliFmThreeVector<T>::angle(const AliFmThreeVector<double>& v) const
+inline T AliFmThreeVector<T>::Angle(const AliFmThreeVector<double>& v) const
{
- double tmp = mag()*v.mag(); if (tmp <=0) tmp = 1e-20;
- return acos(this->dot(v)/tmp);
+ double tmp = Mag()*v.Mag(); if (tmp <=0) tmp = 1e-20;
+ return acos(this->Dot(v)/tmp);
}
template<class T>
inline AliFmThreeVector<T>
-AliFmThreeVector<T>::pseudoProduct(const AliFmThreeVector<float>& v) const
+AliFmThreeVector<T>::PseudoProduct(const AliFmThreeVector<float>& v) const
{
- return this->pseudoProduct(v.x(),v.y(),v.z());
+ return this->PseudoProduct(v.x(),v.y(),v.z());
}
template<class T>
inline AliFmThreeVector<T>
-AliFmThreeVector<T>::pseudoProduct(const AliFmThreeVector<double>& v) const
+AliFmThreeVector<T>::PseudoProduct(const AliFmThreeVector<double>& v) const
{
- return this->pseudoProduct(v.x(),v.y(),v.z());
+ return this->PseudoProduct(v.x(),v.y(),v.z());
}
#endif // ST_NO_MEMBER_TEMPLATES
template<class T>
// Non-member functions
//
template<class T>
-inline T abs(const AliFmThreeVector<T>& v) {return v.mag();}
+inline T abs(const AliFmThreeVector<T>& v) {return v.Mag();}
template<class T, class X>
inline AliFmThreeVector<T>
cross_product(const AliFmThreeVector<T>& v1, const AliFmThreeVector<X>& v2)
{
- return v1.cross(v2);
+ return v1.Cross(v2);
}
template<class T, class X>
inline T operator* (const AliFmThreeVector<T>& v1, const AliFmThreeVector<X>& v2)
{
- return AliFmThreeVector<T>(v1).dot(v2);
+ return AliFmThreeVector<T>(v1).Dot(v2);
}
template<class T>
static double tPi = TMath::Pi();
// --- find sector number
- aPhi = aPoint.phi();
+ aPhi = aPoint.Phi();
if(aPhi<0.) aPhi+=(2*tPi);
aPhi += tPi/12.;
if(aPhi>2*tPi) aPhi-=2*tPi;