FairRoot/PandaRoot
|
#include <PndTrkTrack.h>
Protected Member Functions | |
ClassDef (PndTrkTrack, 1) | |
Protected Attributes | |
PndTrkCluster | fCluster |
PndTrkHit * | fRefHit |
double | fCenterX |
double | fCenterY |
double | fRadius |
double | fTanL |
double | fZ0 |
int | fCharge |
double | fPhiMin |
double | fPhiMax |
Definition at line 17 of file PndTrkTrack.h.
PndTrkTrack::PndTrkTrack | ( | ) |
Definition at line 17 of file PndTrkTrack.cxx.
PndTrkTrack::PndTrkTrack | ( | PndTrkCluster * | cluster | ) |
PndTrkTrack::PndTrkTrack | ( | PndTrkCluster * | cluster, |
double | x, | ||
double | y, | ||
double | radius | ||
) |
PndTrkTrack::PndTrkTrack | ( | PndTrkHit * | hit, |
PndTrkCluster * | cluster, | ||
double | x, | ||
double | y, | ||
double | radius | ||
) |
PndTrkTrack::PndTrkTrack | ( | double | x, |
double | y, | ||
double | radius | ||
) |
PndTrkTrack::PndTrkTrack | ( | PndTrack * | trk | ) |
Definition at line 28 of file PndTrkTrack.cxx.
References ComputePhi(), Double_t, fCenterX, fCenterY, fCharge, fPhiMax, fPhiMin, fRadius, fTanL, fZ0, PndTrack::GetParamFirst(), PndTrack::GetParamLast(), and pt().
PndTrkTrack::PndTrkTrack | ( | const PndTrkTrack & | track | ) |
Definition at line 71 of file PndTrkTrack.cxx.
References track.
PndTrkTrack::~PndTrkTrack | ( | ) |
Definition at line 76 of file PndTrkTrack.cxx.
References fRefHit.
|
protected |
void PndTrkTrack::Clear | ( | Option_t * | opt = "" | ) |
Definition at line 102 of file PndTrkTrack.cxx.
References PndTrkCluster::Clear(), fCluster, and fRefHit.
void PndTrkTrack::ComputeCharge | ( | ) |
consider the centers Int_t nleft, nright = 0;
first PndTrkHit *hit1 = fCluster.GetHit(0); last PndTrkHit *hit2 = fCluster.GetHit(fCluster->GetNofHits() - 1);
vector from 1st to last hit TVector3 firsttolast = hit2->GetPosition() - hit1->GetPosition();
for(int ihit = 1; ihit < fCluster.GetNofHits() - 1; ihit++) { PndTrkHit *hit = fCluster.GetHit(ihit);
vector from 1st to this hit TVector3 position = hit->GetPosition() - hit1->GetPosition();
double crossz = position.Cross(firsttolast).Z();
if crossz > 0 hits stays 'on the right' (counterclockwise) –> negative otherwise it stays 'on the left' (clockwise) –> positive if (crossz > 0.) nright++; else nleft++; }
if(nright > nleft) fCharge = -1; else fCharge = 1;
first PndTrkHit hit1 = (PndTrkHit) fCluster.GetHit(0); TVector3 pos1 = hit1->GetPosition(); last PndTrkHit hit2 = (PndTrkHit) fCluster.GetHit(fCluster.GetNofHits() - 1); TVector3 pos2 = hit2->GetPosition();
double m = (pos2.Y() - pos1.Y())/(pos2.X() - pos1.X()); double q = pos1.Y() - m + pos1.X();
TVector3 posbar(0.5 * (pos1.X() + pos2.X()), 0.5 * (pos1.Y() + pos2.Y()));
double mortho = -1./m; double qortho = posbar.Y() - mortho * posbar.X();
solve the system (x - xc)**2 + (y - yc)**2 = R**2 y = mortho * x + qortho and find xI xII double alpha = 1 + mortho * mortho; double beta = mortho * (qortho - fCenterY) - fCenterX; double gamma = fCenterX * fCenterX + (qortho - fCenterY) * (qortho - fCenterY) - fRadius * fRadius;
double xI = (-beta + TMath::Sqrt(beta * beta - alpha * gamma))/alpha; double yI = xI * mortho + qortho; double xII = (-beta - TMath::Sqrt(beta * beta - alpha * gamma))/alpha; double yII = xII * mortho + qortho;
mean hit int mean = (int) (fCluster.GetNofHits() * 0.5); PndTrkHit hit_mean = (PndTrkHit) fCluster.GetHit(mean); double distI = hit_mean->GetXYDistance(TVector3(xI, yI, 0.)); double distII = hit_mean->GetXYDistance(TVector3(xII, yII, 0.));
double x, y; if(distI < distII) { x = xI; y = yI; } else { x = xII; y = yII; }
translation x -= pos1.X(); y -= pos1.Y();
double delta = (pos2 - pos1).Phi(); double xrot = x * TMath::Cos(delta) + y * TMath::Sin(delta); double yrot = -x * TMath::Sin(delta) + y * TMath::Cos(delta);
cout << "x, y " << xrot << " " << yrot << endl;
Definition at line 171 of file PndTrkTrack.cxx.
References PndTrkTools::ComputePocaToPointOnCircle3(), fCenterX, fCenterY, fCharge, fCluster, fRadius, PndTrkCluster::GetHit(), PndTrkCluster::GetNofHits(), PndTrkHit::GetPosition(), hit, phi, and Pi.
Referenced by ConvertToPndTrack(), PndTrkLegendreSecTask::Exec(), PndTrkLegendreSecTask2::Exec(), PndTrkLegendreTask::Exec(), and PndTrkTrackFinder::Exec().
TVector3 PndTrkTrack::ComputeMomentumAtPosition | ( | TVector3 | position, |
TVector3 & | newposition | ||
) |
Definition at line 293 of file PndTrkTrack.cxx.
References CAMath::Abs(), PndTrkTools::ComputePocaToPointOnCircle3(), Double_t, fCenterX, fCenterY, fCharge, fRadius, fTanL, pos, and pt().
Referenced by ConvertToPndTrack().
Double_t PndTrkTrack::ComputePhi | ( | TVector3 | hit | ) |
TVector3 center(fCenterX, fCenterY, 0.); TVector3 fromcentertohit = hit - center;
I want the positive phi angle from x axis in range [0, 360[. I use TVector3::Phi() [fromcentertohit.Phi()]:
double phi = fromcentertohit.Phi(); if(fromcentertohit.Y() < 0) phi += (2 * TMath::Pi());cout << "final phi in rad " << phi << endl; return phi * TMath::RadToDeg();
Definition at line 349 of file PndTrkTrack.cxx.
References alpha, CAMath::ATan2(), CAMath::Cos(), d, Double_t, fCenterX, fCenterY, fCharge, fRadius, p, phi, Pi, pi, CAMath::Sin(), CAMath::Sqrt(), v, x0, and y0.
Referenced by PndTrkLegendreSecTask::CreateSkewHitList(), PndTrkLegendreTask::CreateSkewHitList(), PndTrkLegendreSecTask2::CreateSkewHitList(), PndTrkTrackFinder::CreateSkewHitList(), Draw(), PndTrkLegendreSecTask2::Exec(), PndTrkLegendreSecTask::Exec(), PndTrkLegendreTask::Exec(), PndTrkTrackFinder::Exec(), and PndTrkTrack().
Double_t PndTrkTrack::ComputePhiFrom | ( | TVector3 | hit, |
TVector3 | from | ||
) |
Definition at line 408 of file PndTrkTrack.cxx.
References alpha, CAMath::ATan2(), CAMath::Cos(), Double_t, fCenterX, fCenterY, fCharge, fRadius, phi, phi0, Pi, pi, CAMath::Sin(), x0, and y0.
Referenced by PndTrkTrackFinder::Exec().
PndTrack PndTrkTrack::ConvertToPndTrack | ( | ) |
Definition at line 119 of file PndTrkTrack.cxx.
References ComputeCharge(), ComputeMomentumAtPosition(), ConvertToPndTrackCand(), fCharge, fCluster, PndTrkCluster::GetHit(), PndTrkCluster::GetNofHits(), PndTrkHit::GetPosition(), PndTrack::SetFlag(), and track.
Referenced by PndTrkTrackFinder::Exec(), PndTrkLegendreSecTask::RegisterTrack(), PndTrkLegendreTask::RegisterTrack(), and PndTrkLegendreSecTask2::RegisterTrack().
PndTrackCand PndTrkTrack::ConvertToPndTrackCand | ( | ) |
Definition at line 108 of file PndTrkTrack.cxx.
References PndTrackCand::AddHit(), fCluster, PndTrkHit::GetDetectorID(), PndTrkCluster::GetHit(), PndTrkHit::GetHitID(), PndTrkCluster::GetNofHits(), and hit.
Referenced by ConvertToPndTrack().
void PndTrkTrack::Draw | ( | Color_t | color = kBlack | ) |
Definition at line 477 of file PndTrkTrack.cxx.
References ComputePhi(), fCenterX, fCenterY, fCharge, fCluster, fPhiMax, fPhiMin, fRadius, PndTrkCluster::GetHit(), PndTrkCluster::GetNofHits(), PndTrkHit::GetPosition(), and track.
Referenced by PndTrkCombiLegendreTask::CleanTrack(), PndTrkLegendreNew::CreateClusterAroundTrack(), PndTrkTrackFinder::CreateClusterAroundTrack(), PndTrkLegendreSecTask2::Exec(), PndTrkLegendreNew::Exec(), PndTrkLegendreTask::Exec(), PndTrkLegendreSecTask::Exec(), PndTrkCombiLegendreTask::Exec(), PndTrkTrackFinder::Exec(), PndTrkCombiLegendreTask::LegendreFit(), LightUp(), PndTrkLegendreTask::RegisterTrack(), PndTrkLegendreSecTask::RegisterTrack(), and PndTrkLegendreSecTask2::RegisterTrack().
|
inline |
Definition at line 44 of file PndTrkTrack.h.
References fCenterX, and fCenterY.
Referenced by PndTrkLegendreNew::CreateClusterAroundTrack(), PndTrkCombiLegendreTask::CreateClusterAroundTrack(), PndTrkTrackFinder::CreateClusterAroundTrack(), PndTrkCombiLegendreTask::CreateClusterAroundTrack2(), PndTrkCombiLegendreTask::CreateClusterAroundTrack3(), PndTrkLegendreTask::CreateSkewHitList(), PndTrkLegendreSecTask::CreateSkewHitList(), PndTrkLegendreSecTask2::CreateSkewHitList(), PndTrkTrackFinder::CreateSkewHitList(), PndTrkLegendreNew::Exec(), PndTrkCombiLegendreTask::Exec(), PndTrkTrackFinder::Exec(), operator==(), PndTrkLegendreTask::RegisterTrack(), PndTrkLegendreSecTask::RegisterTrack(), and PndTrkLegendreSecTask2::RegisterTrack().
|
inline |
Definition at line 57 of file PndTrkTrack.h.
References fCharge.
Referenced by PndTrkLegendreSecTask::Exec(), PndTrkLegendreTask::Exec(), PndTrkLegendreSecTask2::Exec(), PndTrkTrackFinder::Exec(), PndTrkLegendreSecTask::RegisterTrack(), PndTrkLegendreTask::RegisterTrack(), and PndTrkLegendreSecTask2::RegisterTrack().
|
inline |
Definition at line 48 of file PndTrkTrack.h.
References fCluster.
Referenced by PndTrkCombiLegendreTask::CleanTrack(), PndTrkLegendreNew::CreateClusterAroundTrack(), PndTrkCombiLegendreTask::CreateClusterAroundTrack(), PndTrkTrackFinder::CreateClusterAroundTrack(), PndTrkCombiLegendreTask::CreateClusterAroundTrack3(), PndTrkLegendreSecTask2::Exec(), PndTrkLegendreTask::Exec(), PndTrkLegendreNew::Exec(), PndTrkLegendreSecTask::Exec(), PndTrkCombiLegendreTask::Exec(), PndTrkTrackFinder::Exec(), and operator==().
|
inline |
Definition at line 43 of file PndTrkTrack.h.
References fRadius.
Referenced by PndTrkLegendreNew::CreateClusterAroundTrack(), PndTrkCombiLegendreTask::CreateClusterAroundTrack(), PndTrkTrackFinder::CreateClusterAroundTrack(), PndTrkCombiLegendreTask::CreateClusterAroundTrack2(), PndTrkCombiLegendreTask::CreateClusterAroundTrack3(), PndTrkLegendreTask::CreateSkewHitList(), PndTrkLegendreSecTask::CreateSkewHitList(), PndTrkLegendreSecTask2::CreateSkewHitList(), PndTrkTrackFinder::CreateSkewHitList(), PndTrkLegendreNew::Exec(), PndTrkCombiLegendreTask::Exec(), PndTrkTrackFinder::Exec(), operator==(), PndTrkLegendreTask::RegisterTrack(), PndTrkLegendreSecTask::RegisterTrack(), and PndTrkLegendreSecTask2::RegisterTrack().
|
inline |
Definition at line 45 of file PndTrkTrack.h.
References fTanL.
Referenced by PndTrkTrackFinder::Exec(), PndTrkLegendreSecTask::RegisterTrack(), PndTrkLegendreTask::RegisterTrack(), and PndTrkLegendreSecTask2::RegisterTrack().
|
inline |
Definition at line 46 of file PndTrkTrack.h.
References fZ0.
Referenced by PndTrkTrackFinder::Exec(), PndTrkLegendreSecTask::RegisterTrack(), PndTrkLegendreTask::RegisterTrack(), and PndTrkLegendreSecTask2::RegisterTrack().
void PndTrkTrack::LightUp | ( | ) |
Definition at line 507 of file PndTrkTrack.cxx.
References Draw(), fCluster, and PndTrkCluster::LightUp().
PndTrkTrack & PndTrkTrack::operator= | ( | const PndTrkTrack & | track | ) |
Bool_t PndTrkTrack::operator== | ( | PndTrkTrack | track | ) |
Definition at line 97 of file PndTrkTrack.cxx.
References fCenterX, fCenterY, fRadius, GetCenter(), GetCluster(), PndTrkCluster::GetNofHits(), and GetRadius().
|
inline |
Definition at line 37 of file PndTrkTrack.h.
References fCenterX, fCenterY, x, and y.
Referenced by PndTrkLegendreNew::Exec(), PndTrkLegendreSecTask2::Exec(), PndTrkCombiLegendreTask::Exec(), and PndTrkTrackFinder::Exec().
|
inline |
|
inline |
Definition at line 41 of file PndTrkTrack.h.
References fCluster.
Referenced by PndTrkLegendreNew::Exec(), PndTrkCombiLegendreTask::Exec(), and PndTrkTrackFinder::Exec().
|
inline |
Definition at line 36 of file PndTrkTrack.h.
References fRadius.
Referenced by PndTrkLegendreNew::Exec(), PndTrkLegendreSecTask2::Exec(), PndTrkCombiLegendreTask::Exec(), and PndTrkTrackFinder::Exec().
|
inline |
Definition at line 42 of file PndTrkTrack.h.
|
inline |
Definition at line 39 of file PndTrkTrack.h.
Referenced by PndTrkLegendreSecTask::Exec(), PndTrkLegendreSecTask2::Exec(), PndTrkLegendreTask::Exec(), and PndTrkTrackFinder::Exec().
|
inline |
Definition at line 40 of file PndTrkTrack.h.
Referenced by PndTrkLegendreSecTask::Exec(), PndTrkLegendreSecTask2::Exec(), PndTrkLegendreTask::Exec(), and PndTrkTrackFinder::Exec().
|
protected |
Definition at line 68 of file PndTrkTrack.h.
Referenced by ComputeCharge(), ComputeMomentumAtPosition(), ComputePhi(), ComputePhiFrom(), Draw(), GetCenter(), operator=(), operator==(), PndTrkTrack(), and SetCenter().
|
protected |
Definition at line 68 of file PndTrkTrack.h.
Referenced by ComputeCharge(), ComputeMomentumAtPosition(), ComputePhi(), ComputePhiFrom(), Draw(), GetCenter(), operator=(), operator==(), PndTrkTrack(), and SetCenter().
|
protected |
Definition at line 69 of file PndTrkTrack.h.
Referenced by ComputeCharge(), ComputeMomentumAtPosition(), ComputePhi(), ComputePhiFrom(), ConvertToPndTrack(), Draw(), GetCharge(), operator=(), and PndTrkTrack().
|
protected |
Definition at line 66 of file PndTrkTrack.h.
Referenced by Clear(), ComputeCharge(), ConvertToPndTrack(), ConvertToPndTrackCand(), Draw(), GetCluster(), LightUp(), operator=(), and SetCluster().
|
protected |
Definition at line 71 of file PndTrkTrack.h.
Referenced by Draw(), operator=(), and PndTrkTrack().
|
protected |
Definition at line 70 of file PndTrkTrack.h.
Referenced by Draw(), operator=(), and PndTrkTrack().
|
protected |
Definition at line 68 of file PndTrkTrack.h.
Referenced by ComputeCharge(), ComputeMomentumAtPosition(), ComputePhi(), ComputePhiFrom(), Draw(), GetRadius(), operator=(), operator==(), PndTrkTrack(), and SetRadius().
|
protected |
Definition at line 67 of file PndTrkTrack.h.
Referenced by Clear(), operator=(), SetRefHit(), and ~PndTrkTrack().
|
protected |
Definition at line 68 of file PndTrkTrack.h.
Referenced by ComputeMomentumAtPosition(), GetTanL(), operator=(), PndTrkTrack(), and SetTanL().
|
protected |
Definition at line 68 of file PndTrkTrack.h.
Referenced by GetZ0(), operator=(), PndTrkTrack(), and SetZ0().