FairRoot/PandaRoot
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PndTrkLegendreNew Class Reference

#include <PndTrkLegendreNew.h>

Inheritance diagram for PndTrkLegendreNew:

Public Member Functions

 PndTrkLegendreNew ()
 
 PndTrkLegendreNew (int verbose)
 
 ~PndTrkLegendreNew ()
 
virtual InitStatus Init ()
 
virtual void Exec (Option_t *opt)
 
void SetParContainers ()
 
void Initialize ()
 
void Reset ()
 
void SwitchOnDisplay ()
 
void DrawGeometry ()
 
void DrawHits (PndTrkHitList *hitlist)
 
void DrawLists ()
 
void DrawNeighborings ()
 
void DrawNeighboringsToHit (PndTrkHit *hit)
 
void Refresh ()
 
void RefreshConf ()
 
void DrawGeometryConf (double x1, double x2, double y1, double y2)
 
void DrawConfHit (double x, double y, double r, int marker=2)
 
void LightCluster (PndTrkCluster *cluster)
 
void DrawLegendreHisto ()
 
void ComputePlaneExtremities (PndTrkCluster *cluster)
 
Int_t FillConformalHitList (PndTrkCluster *cluster)
 
void FillLegendreHisto (PndTrkCluster *cluster)
 
void ComputeTraAndRot (PndTrkHit *hit, Double_t &delta, Double_t trasl[2])
 
PndTrkHitFindSttReferenceHit (int isec=-1)
 
PndTrkHitFindMvdPixelReferenceHit ()
 
PndTrkHitFindMvdStripReferenceHit ()
 
PndTrkHitFindMvdReferenceHit ()
 
PndTrkHitFindReferenceHit ()
 
PndTrkHitFindReferenceHit (PndTrkCluster *cluster)
 
void RePrepareLegendre (PndTrkCluster *cluster)
 
Int_t ApplyLegendre (PndTrkCluster *cluster, double &theta_max, double &r_max)
 
Int_t ExtractLegendre (Int_t mode, double &theta_max, double &r_max)
 
void FromConformalToRealTrack (double fitm, double fitp, double &x0, double &y0, double &R)
 
void FromRealToConformalTrack (double x0, double y0, double R, double &fitm, double &fitp)
 
void SearchSecondaryTracks ()
 
PndTrkClusterList CreateFullClusterization ()
 
PndTrkClusterList CreateFullClusterization2 ()
 
Int_t CountTracksInCluster (PndTrkCluster *cluster)
 
Int_t CountTracksInSkewSector (PndTrkCluster *cluster)
 
Int_t CountTracksInCluster (PndTrkCluster *cluster, Int_t where)
 
Int_t ClusterToConformal (PndTrkCluster *cluster)
 
PndTrkTrackLegendreFit (PndTrkCluster *cluster)
 
PndTrkClusterCreateClusterAroundTrack (PndTrkTrack *track)
 
void AnalyticalFit (PndTrkCluster *cluster, double xc, double yc, double R, double &fitm, double &fitq)
 
void AnalyticalFit2 (PndTrkCluster *cluster, double fitm, double fitp, double &fitm2, double &fip2)
 
void IntersectionFinder (PndTrkHit *hit, double xc, double yc, double R)
 
void IntersectionFinder (PndTrkConformalHit *chit, double fitm, double fitp)
 
void FillHitMap ()
 

Private Member Functions

 ClassDef (PndTrkLegendreNew, 1)
 

Private Attributes

Int_t fNofMvdPixHits
 
Int_t fNofMvdStrHits
 
Int_t fNofSttHits
 
Int_t fNofTriplets
 
Int_t fNofHits
 
TClonesArray * fSttPointArray
 
TClonesArray * fSttHitArray
 
TClonesArray * fMvdPixelHitArray
 
TClonesArray * fMvdStripHitArray
 
TClonesArray * fTrackArray
 
TClonesArray * fTrackCandArray
 
TClonesArray * fTubeArray
 
PndGeoSttParfSttParameters
 
char fSttBranch [200]
 
char fMvdPixelBranch [200]
 
char fMvdStripBranch [200]
 
PndSttMapCreatorfMapper
 
Int_t fEventCounter
 
PndTrkSttHitListstthitlist
 
PndTrkSdsHitListmvdpixhitlist
 
PndTrkSdsHitListmvdstrhitlist
 
Double_t fSttParalDistance
 
Double_t fSttToMvdStripDistance
 
double fDeltaThetaRad
 
PndTrkLegendreTransformlegendre
 
Bool_t fPersistence
 
Bool_t fUseMVDPix
 
Bool_t fUseMVDStr
 
Bool_t fUseSTT
 
Bool_t fSecondary
 
Bool_t fInitDone
 
PndTrkConformalTransformconform
 
PndTrkConformalHitListconformalhitlist
 
PndTrkToolstools
 
PndTrkHitfRefHit
 
Double_t fMvdPix_RealDistLimit
 
Double_t fMvdStr_RealDistLimit
 
Double_t fStt_RealDistLimit
 
Double_t fMvdPix_ConfDistLimit
 
Double_t fMvdStr_ConfDistLimit
 
Double_t fStt_ConfDistLimit
 
std::vector< std::pair< double,
double > > 
fFoundPeaks
 
double fTime
 
TStopwatch * fTimer
 
PndTrkFitterfFitter
 
PndTrkNeighboringMapfHitMap
 
double fUmin
 
double fUmax
 
double fVmin
 
double fVmax
 
double fRmin
 
double fRmax
 
double fThetamin
 
double fThetamax
 
Bool_t fDisplayOn
 
TH2F * hxy
 
TH2F * hxz
 
TH2F * hzphi
 
TCanvas * display
 
TH2F * huv
 

Detailed Description

Definition at line 35 of file PndTrkLegendreNew.h.

Constructor & Destructor Documentation

PndTrkLegendreNew::PndTrkLegendreNew ( )

Default constructor

Definition at line 56 of file PndTrkLegendreNew.cxx.

References fMvdPixelBranch, fMvdStripBranch, fSttBranch, and PndGeoHandling::Instance().

56  : FairTask("secondary track finder", 0), fDisplayOn(kFALSE), fPersistence(kTRUE), fUseMVDPix(kTRUE), fUseMVDStr(kTRUE), fUseSTT(kTRUE), fSecondary(kFALSE), fMvdPix_RealDistLimit(1000), fMvdStr_RealDistLimit(1000), fStt_RealDistLimit(1000), fMvdPix_ConfDistLimit(1000), fMvdStr_ConfDistLimit(1000), fStt_ConfDistLimit(1000), fInitDone(kFALSE), fUmin(-0.07), fUmax(0.07), fVmin(-0.07), fVmax(0.07), fRmin(-1.5), fRmax(1.5), fThetamin(0), fThetamax(180) {
57  sprintf(fSttBranch,"STTHit");
58  sprintf(fMvdPixelBranch,"MVDHitsPixel");
59  sprintf(fMvdStripBranch,"MVDHitsStrip");
61 }
Double_t fMvdStr_RealDistLimit
Double_t fMvdStr_ConfDistLimit
Double_t fMvdPix_RealDistLimit
static PndGeoHandling * Instance()
Double_t fMvdPix_ConfDistLimit
PndTrkLegendreNew::PndTrkLegendreNew ( int  verbose)

Definition at line 63 of file PndTrkLegendreNew.cxx.

References fMvdPixelBranch, fMvdStripBranch, fSttBranch, and PndGeoHandling::Instance().

63  : FairTask("secondary track finder", verbose), fDisplayOn(kFALSE), fPersistence(kTRUE), fUseMVDPix(kTRUE), fUseMVDStr(kTRUE), fUseSTT(kTRUE), fSecondary(kFALSE), fMvdPix_RealDistLimit(1000), fMvdStr_RealDistLimit(1000), fStt_RealDistLimit(1000), fMvdPix_ConfDistLimit(1000), fMvdStr_ConfDistLimit(1000), fStt_ConfDistLimit(1000), fInitDone(kFALSE), fUmin(-0.07), fUmax(0.07), fVmin(-0.07), fVmax(0.07), fRmin(-1.5), fRmax(1.5), fThetamin(0), fThetamax(180) {
64  sprintf(fSttBranch,"STTHit");
65  sprintf(fMvdPixelBranch,"MVDHitsPixel");
66  sprintf(fMvdStripBranch,"MVDHitsStrip");
68 }
#define verbose
Double_t fMvdStr_RealDistLimit
Double_t fMvdStr_ConfDistLimit
Double_t fMvdPix_RealDistLimit
static PndGeoHandling * Instance()
Double_t fMvdPix_ConfDistLimit
PndTrkLegendreNew::~PndTrkLegendreNew ( )

Destructor

Definition at line 73 of file PndTrkLegendreNew.cxx.

73  {
74 
75 }

Member Function Documentation

void PndTrkLegendreNew::AnalyticalFit ( PndTrkCluster cluster,
double  xc,
double  yc,
double  R,
double &  fitm,
double &  fitq 
)

Definition at line 1687 of file PndTrkLegendreNew.cxx.

References conform, display, fDisplayOn, fFitter, FromConformalToRealTrack(), PndTrkConformalTransform::GetConformalHit(), PndTrkCluster::GetHit(), PndTrkCluster::GetNofHits(), PndTrkConformalHit::GetPosition(), hit, IntersectionFinder(), PndTrkHit::IsSttParallel(), PndTrkHit::IsSttSkew(), Refresh(), PndTrkFitter::Reset(), PndTrkFitter::SetPointToFit(), sigma, and PndTrkFitter::StraightLineFit().

1687  {
1688 
1689 
1690  // fit with analytical chi2 -----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~--
1691  fFitter->Reset();
1692  if(fDisplayOn) {
1693  display->cd(1);
1694  Refresh();
1695  }
1696  for(int ihit = 0; ihit < cluster->GetNofHits(); ihit++)
1697  {
1698  PndTrkHit *hit = cluster->GetHit(ihit);
1699  if(hit->IsSttSkew()) continue;
1700  if(hit->IsSttParallel()) IntersectionFinder(hit, xc, yc, R);
1702  double sigma = 0.1; // CHECK
1703  fFitter->SetPointToFit(chit->GetPosition().X(), chit->GetPosition().Y(), sigma);
1704  // cout << "set point to fit " << chit->GetPosition().X() << " " << chit->GetPosition().Y() << endl;
1705  // if(fDisplayOn) {
1706  // display->cd(1);
1707  // TMarker *mrk = new TMarker(hit->GetPosition().X(), hit->GetPosition().Y(), 6);
1708  // mrk->SetMarkerColor(kRed);
1709  // mrk->Draw("SAME");
1710 
1711  // display->cd(2);
1712  // TMarker *mrk2 = new TMarker(chit->GetPosition().X(), chit->GetPosition().Y(), 6);
1713  // mrk2->SetMarkerColor(kRed);
1714  // mrk2->Draw("SAME");
1715 
1716 
1717  // display->Update();
1718  // display->Modified();
1719  // }
1720  }
1721 
1722 
1723  fFitter->StraightLineFit(fitm, fitq);
1724  cout << "previous " << xc << " " << yc << " " << R << endl;
1725  FromConformalToRealTrack(fitm, fitq, xc, yc, R);
1726  cout << "now " << xc << " " << yc << " " << R << endl;
1727 
1728  if(fDisplayOn) {
1729  display->cd(2);
1730  cout << "wanna see the line?" << endl;
1731  TLine *line = new TLine(-10.07, fitq + fitm * (-10.07), 10.07, fitq + fitm * (10.07));
1732  line->SetLineColor(2);
1733  line->Draw("SAME");
1734  char goOnChar;
1735  display->Update();
1736  display->Modified();
1737  cin >> goOnChar;
1738  }
1739 
1740 
1741 
1742 
1743 }
PndTrkFitter * fFitter
void FromConformalToRealTrack(double fitm, double fitp, double &x0, double &y0, double &R)
void IntersectionFinder(PndTrkHit *hit, double xc, double yc, double R)
Double_t sigma[nsteps]
Definition: dedx_bands.C:65
PndTrkHit * GetHit(int index)
Bool_t IsSttParallel()
Definition: PndTrkHit.h:70
PndTrkConformalTransform * conform
PndTrkConformalHit GetConformalHit(PndTrkHit *hit)
Bool_t StraightLineFit(Double_t &fitm, Double_t &fitp)
PndSdsMCPoint * hit
Definition: anasim.C:70
Int_t GetNofHits()
Definition: PndTrkCluster.h:52
Double_t R
Definition: checkhelixhit.C:61
Bool_t IsSttSkew()
Definition: PndTrkHit.h:71
void SetPointToFit(double x, double y, double sigma)
void PndTrkLegendreNew::AnalyticalFit2 ( PndTrkCluster cluster,
double  fitm,
double  fitp,
double &  fitm2,
double &  fip2 
)

Definition at line 1746 of file PndTrkLegendreNew.cxx.

References conform, display, PndTrkConformalHit::Draw(), fDisplayOn, fFitter, FromConformalToRealTrack(), PndTrkConformalTransform::GetConformalSttHit(), PndTrkCluster::GetHit(), PndTrkConformalHit::GetIsochrone(), PndTrkCluster::GetNofHits(), PndTrkConformalHit::GetPosition(), PndTrkHit::GetPosition(), hit, IntersectionFinder(), PndTrkHit::IsSttSkew(), R, Refresh(), PndTrkFitter::Reset(), PndTrkFitter::SetPointToFit(), sigma, and PndTrkFitter::StraightLineFit().

Referenced by Exec().

1746  {
1747 
1748 
1749  // fit with analytical chi2 -----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~--
1750  fFitter->Reset();
1751  if(fDisplayOn) {
1752  display->cd(1);
1753  Refresh();
1754  }
1755  for(int ihit = 0; ihit < cluster->GetNofHits(); ihit++)
1756  {
1757  PndTrkHit *hit = cluster->GetHit(ihit);
1758  if(hit->IsSttSkew()) continue;
1759 
1761  IntersectionFinder(chit, fitm, fitp);
1762 
1763  double sigma = chit->GetIsochrone();
1764  fFitter->SetPointToFit(chit->GetPosition().X(), chit->GetPosition().Y(), sigma);
1765  // cout << "set point to fit " << chit->GetPosition().X() << " " << chit->GetPosition().Y() << endl;
1766  if(fDisplayOn) {
1767  display->cd(1);
1768  TMarker *mrk = new TMarker(hit->GetPosition().X(), hit->GetPosition().Y(), 6);
1769  mrk->SetMarkerColor(kRed);
1770  mrk->Draw("SAME");
1771 
1772  display->cd(2);
1773  chit->Draw(1);
1774 
1775  display->cd(2);
1776  TMarker *mrk2 = new TMarker(chit->GetPosition().X(), chit->GetPosition().Y(), 6);
1777  mrk2->SetMarkerColor(kRed);
1778  mrk2->Draw("SAME");
1779 
1780 
1781  display->Update();
1782  display->Modified();
1783  }
1784  }
1785 
1786 
1787  fFitter->StraightLineFit(fitm2, fitp2);
1788 
1789  double xc, yc, R;
1790  FromConformalToRealTrack(fitm, fitp, xc, yc, R);
1791  cout << "previous " << xc << " " << yc << " " << R << endl;
1792  FromConformalToRealTrack(fitm2, fitp2, xc, yc, R);
1793  cout << "now " << xc << " " << yc << " " << R << endl;
1794 
1795  if(fDisplayOn) {
1796  display->cd(2);
1797  cout << "wanna see the line?" << endl;
1798  TLine *line = new TLine(-10.07, fitp2 + fitm2 * (-10.07), 10.07, fitp2 + fitm2 * (10.07));
1799  line->SetLineColor(2);
1800  line->Draw("SAME");
1801 
1802  display->cd(1);
1803  TArc *aline = new TArc(xc, yc, R);
1804  aline->SetFillStyle(0);
1805  aline->SetLineColor(2);
1806  aline->Draw("SAME");
1807 
1808 
1809  char goOnChar;
1810  display->Update();
1811  display->Modified();
1812  cin >> goOnChar;
1813  }
1814 
1815 
1816 
1817 
1818 }
PndTrkFitter * fFitter
void FromConformalToRealTrack(double fitm, double fitp, double &x0, double &y0, double &R)
void IntersectionFinder(PndTrkHit *hit, double xc, double yc, double R)
Double_t sigma[nsteps]
Definition: dedx_bands.C:65
PndTrkHit * GetHit(int index)
PndTrkConformalTransform * conform
void Draw(Color_t color)
TVector3 GetPosition()
Definition: PndTrkHit.h:62
Bool_t StraightLineFit(Double_t &fitm, Double_t &fitp)
PndTrkConformalHit GetConformalSttHit(PndTrkHit *hit)
PndSdsMCPoint * hit
Definition: anasim.C:70
Int_t GetNofHits()
Definition: PndTrkCluster.h:52
Double_t R
Definition: checkhelixhit.C:61
Bool_t IsSttSkew()
Definition: PndTrkHit.h:71
void SetPointToFit(double x, double y, double sigma)
Int_t PndTrkLegendreNew::ApplyLegendre ( PndTrkCluster cluster,
double &  theta_max,
double &  r_max 
)

Definition at line 905 of file PndTrkLegendreNew.cxx.

References ExtractLegendre(), and RePrepareLegendre().

905  {
906  RePrepareLegendre(cluster);
907  return ExtractLegendre(1, theta_max, r_max);
908 }
Int_t ExtractLegendre(Int_t mode, double &theta_max, double &r_max)
void RePrepareLegendre(PndTrkCluster *cluster)
PndTrkLegendreNew::ClassDef ( PndTrkLegendreNew  ,
 
)
private
Int_t PndTrkLegendreNew::ClusterToConformal ( PndTrkCluster cluster)

Definition at line 1466 of file PndTrkLegendreNew.cxx.

References ComputeTraAndRot(), conform, conformalhitlist, Double_t, FillConformalHitList(), FindReferenceHit(), fRefHit, fSecondary, and PndTrkConformalTransform::SetOrigin().

Referenced by Exec().

1466  {
1467  // ================ --> TO CONFORMAL PLANE
1468  conformalhitlist = new PndTrkConformalHitList(); // CHECK
1469  // translation and rotation
1470  Int_t nchits = 0;
1471  Double_t delta = 0, trasl[2] = {0., 0.};
1472  if(fSecondary) {
1473  // translation and rotation - CHECK
1474  // cout << " REFERENCE HIT " << cluster->GetNofHits() << endl;
1475  fRefHit = FindReferenceHit(cluster);
1476  if(fRefHit == NULL) {
1477  // cout << "REFHIT " << fRefHit << endl;
1478  // Reset();
1479  return 0;
1480  }
1481  ComputeTraAndRot(fRefHit, delta, trasl);
1482  }
1483  //
1484  cout << "DELTA " << delta << " TRASL " << trasl[0] << " " << trasl[1] << endl;
1485  conform->SetOrigin(trasl[0], trasl[1], delta);
1486  nchits = FillConformalHitList(cluster);
1487 
1488  return nchits;
1489 }
Int_t FillConformalHitList(PndTrkCluster *cluster)
PndTrkConformalHitList * conformalhitlist
void ComputeTraAndRot(PndTrkHit *hit, Double_t &delta, Double_t trasl[2])
PndTrkConformalTransform * conform
Double_t
void SetOrigin(double x, double y, double delta)
PndTrkHit * FindReferenceHit()
void PndTrkLegendreNew::ComputePlaneExtremities ( PndTrkCluster cluster)

Definition at line 829 of file PndTrkLegendreNew.cxx.

References CAMath::ATan2(), conformalhitlist, CAMath::Cos(), fabs(), fRmax, fRmin, fUmax, fUmin, fVmax, fVmin, PndTrkConformalHitList::GetHit(), PndTrkConformalHit::GetIsochrone(), PndTrkConformalHitList::GetNofHits(), PndTrkConformalHit::GetU(), PndTrkConformalHit::GetV(), Pi, r1, r2, CAMath::Sin(), and v.

Referenced by Exec().

829  {
830  fUmin = 1000, fVmin = 1000, fRmin = 1000;
831  fUmax = -1000, fVmax = -1000, fRmax = -1000;
832  double rc_of_min, rc_of_max;
833 
834 
835  for(int ihit = 0; ihit < conformalhitlist->GetNofHits(); ihit++) {
837  double u = chit->GetU();
838  double v = chit->GetV();
839  double rc = chit->GetIsochrone();
840  u - rc < fUmin ? fUmin = u - rc : fUmin;
841  v - rc < fVmin ? fVmin = v - rc : fVmin;
842  u + rc > fUmax ? fUmax = u + rc : fUmax;
843  v + rc > fVmax ? fVmax = v + rc : fVmax;
844 
845  double theta1 = TMath::ATan2(v, u);
846  double theta2 = theta1 + TMath::Pi();
847 
848  double r1 = u * TMath::Cos(theta1) + v * TMath::Sin(theta1);
849  double r2 = u * TMath::Cos(theta2) + v * TMath::Sin(theta2);
850 
851  double rimin, rimax;
852  r1 < r2 ? (rimin = r1, rimax = r2) : (rimin = r2, rimax = r1);
853 
854  rimin < fRmin ? (rc_of_min = rc, fRmin = rimin) : fRmin;
855  rimax > fRmax ? (rc_of_max = rc, fRmax = rimax) : fRmax;
856  }
857 
858  fRmin -= rc_of_min;
859  fRmax += rc_of_max;
860 
861  // to square the conformal plane
862  double du = fUmax - fUmin;
863  double dv = fVmax - fVmin;
864  double delta = fabs(dv - du)/2.;
865  du < dv ? (fUmin -= delta, fUmax += delta) : (fVmin -= delta, fVmax += delta);
866 
867  cout << "u_min " << fUmin << " u_max " << fUmax << endl;
868  cout << "v_min " << fVmin << " v_max " << fVmax << endl;
869  cout << "r_min " << fRmin << " r_max " << fRmax << endl;
870  cout << "theta_min 0 theta_max 180" << endl;
871 
872 
873 }
static T Sin(const T &x)
Definition: PndCAMath.h:42
double r1
PndTrkConformalHitList * conformalhitlist
static T Cos(const T &x)
Definition: PndCAMath.h:43
__m128 v
Definition: P4_F32vec4.h:4
PndTrkConformalHit * GetHit(int index)
static T ATan2(const T &y, const T &x)
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
Double_t Pi
double r2
void PndTrkLegendreNew::ComputeTraAndRot ( PndTrkHit hit,
Double_t delta,
Double_t  trasl[2] 
)

Definition at line 820 of file PndTrkLegendreNew.cxx.

References PndTrkHit::GetPosition().

Referenced by ClusterToConformal().

820  {
821 
822  trasl[0] = hit->GetPosition().X();
823  trasl[1] = hit->GetPosition().Y();
824 
825  delta = 0.; // TMath::ATan2(hit->GetPosition().Y() - 0., hit->GetPosition().X() - 0.); // CHECK
826 
827 }
TVector3 GetPosition()
Definition: PndTrkHit.h:62
Int_t PndTrkLegendreNew::CountTracksInCluster ( PndTrkCluster cluster)

Definition at line 1347 of file PndTrkLegendreNew.cxx.

Referenced by CountTracksInSkewSector().

1347  {
1348  return CountTracksInCluster(cluster, 0);
1349 }
Int_t CountTracksInCluster(PndTrkCluster *cluster)
Int_t PndTrkLegendreNew::CountTracksInCluster ( PndTrkCluster cluster,
Int_t  where 
)

int noftracks = nofhitsinlay[tmplayid] - isneigh; if(tmplayid != -1) cout << "CLUSTER CONTAINS @ LAYER " << tmplayid << " ACTUALLY " << nofhitsinlay[tmplayid] << " - " << isneigh << " = " << noftracks << " TRACKS" << endl; if(noftracks > maxnoftracks) maxnoftracks = noftracks;

Definition at line 1356 of file PndTrkLegendreNew.cxx.

References counter, counter1, fTubeArray, PndTrkCluster::GetHit(), PndSttTube::GetLayerID(), PndTrkCluster::GetNofHits(), PndTrkHit::GetTubeID(), hit, PndSttTube::IsNeighboring(), PndTrkHit::IsSttParallel(), PndTrkHit::SetSortVariable(), and PndTrkCluster::Sort().

1356  {
1357  // where means:
1358  // 0 all: parallel & skewed sectors
1359  // 1: only skewed
1360 
1361  // check how many neighboring tubes each skew
1362  // tube on a layer has on that same layer
1363  // the total number of tubes on a layer minus the number
1364  // of neighboring couples gives the number of tracks:
1365  // example 1 with 3 tracks:
1366  // OOO OO OOO are tube no.: 0 1 2 3 4 5 6 7
1367  // nof tubes on the layer = 8
1368  // calculation of neighborings:
1369  // 0 <--> 1
1370  // 1 <--> 2
1371  // 3 <--> 4
1372  // 5 <--> 6
1373  // 6 <--> 7
1374  // so, nof neigboging couples = 5
1375  // Then: noftubes (8) - nofcouples (5) = 3 tracks !!OK!!
1376  cout << "COUNT TRACKS IN SKEW SECTOR" << endl;
1377  int nofhitsinlay[30]; // CHECK initialize this
1378  for(int ilay = 0; ilay < 30; ilay++) nofhitsinlay[ilay] = 0;
1379 
1380  for(int ihit = 0; ihit < cluster->GetNofHits(); ihit++) {
1381  PndTrkHit *hit = cluster->GetHit(ihit);
1382  PndSttTube *tube = (PndSttTube*) fTubeArray->At(hit->GetTubeID());
1383  hit->SetSortVariable(tube->GetLayerID());
1384  nofhitsinlay[tube->GetLayerID()]++;
1385  // cout << "hit " << ihit << " " << tube->GetLayerID() << " " << nofhitsinlay[tube->GetLayerID()] << endl;
1386 
1387  }
1388  cluster->Sort();
1389 
1390  for(int ihit = 0; ihit < cluster->GetNofHits(); ihit++) {
1391  PndTrkHit *hit = cluster->GetHit(ihit);
1392  PndSttTube *tube = (PndSttTube*) fTubeArray->At(hit->GetTubeID());
1393  // cout << "SORTED " << ihit << " " << hit->GetHitID() << " " << tube->GetLayerID() << endl;
1394  }
1395 
1396  int maxnoftracks = 1;
1397  int tmplayid = -1;
1398  int counter = 0, counter1 = 0;;
1399  int isneigh = 0;
1400  // loop over cluster hits
1401  for(int ihit = 0; ihit < cluster->GetNofHits(); ihit++) {
1402  PndTrkHit *hit = cluster->GetHit(ihit);
1403  counter++;
1404 
1405  // which sector?
1406  if(where == 1 && hit->IsSttParallel() == kTRUE) continue;
1407  PndSttTube *tube = (PndSttTube*) fTubeArray->At(hit->GetTubeID());
1408 
1409  int layid = tube->GetLayerID();
1410  if(nofhitsinlay[layid] <= 1) continue;
1411 
1412  // new layer?
1413  if(layid != tmplayid) {
1419  isneigh = 0;
1420  tmplayid = layid;
1421  counter1 = 0;
1422  // continue; // break;
1423  }
1424  // cout << "hit " << ihit << " on layid " << layid << "/ " << nofhitsinlay[layid] << endl;
1425 
1426  // count processed hits
1427  // in this same layer
1428  counter1++;
1429 
1430  // if it is the last hit ==> all its
1431  // neighborings have already been taken
1432  // into account
1433  if(counter1 == nofhitsinlay[layid]) continue;
1434 
1435  for(int jhit = counter; jhit < counter + nofhitsinlay[layid] - counter1; jhit++) {
1436  PndTrkHit *hit2 = cluster->GetHit(jhit);
1437  int tubeid2 = hit2->GetTubeID();
1438  PndSttTube *tube2 = (PndSttTube*) fTubeArray->At(tubeid2);
1439 
1440 
1441 
1442  if(tube->GetLayerID() != tube2->GetLayerID()) cout << "ERROR" << tube->GetLayerID() << " " << tube2->GetLayerID() << endl;
1443  // cout << "compare " << ihit << "(" << hit->GetHitID() << "- " << hit->GetTubeID() << ") with " << jhit << " (" << hit2->GetHitID() << "- " << tubeid2 << ") from " << counter << " to " << counter + nofhitsinlay[layid] - 1 << endl;
1444  if(tube->IsNeighboring(tubeid2) == kTRUE) {
1445  isneigh++;
1446  // cout << "isneigh " << isneigh << endl;
1447  // // break;
1448  }
1449  }
1450 
1451  // if all the hits in the layer have been processed
1452  if(counter1 == nofhitsinlay[layid] - 1) {
1453  int noftracks = nofhitsinlay[layid] - isneigh;
1454  cout << "CLUSTER CONTAINS @ LAYER " << layid << " ACTUALLY " << nofhitsinlay[layid] << " - " << isneigh << " = " << noftracks << " TRACKS" << endl;
1455  if(noftracks > maxnoftracks) maxnoftracks = noftracks;
1456  }
1457 
1458  }
1459 
1460 
1461  cout << "THIS CLUSTER HAS A TOTAL OF " << maxnoftracks << " TRACKS" << endl;
1462  return maxnoftracks;
1463 }
void SetSortVariable(Double_t sortvar)
Definition: PndTrkHit.h:44
PndTrkHit * GetHit(int index)
Bool_t IsSttParallel()
Definition: PndTrkHit.h:70
int GetLayerID()
Definition: PndSttTube.cxx:128
Bool_t IsNeighboring(int tubeID)
Definition: PndSttTube.cxx:145
int counter
Definition: ZeeAnalysis.C:59
TClonesArray * fTubeArray
PndSdsMCPoint * hit
Definition: anasim.C:70
Int_t GetNofHits()
Definition: PndTrkCluster.h:52
Int_t GetTubeID()
Definition: PndTrkHit.h:61
static int counter1
Definition: createSTT.C:27
Int_t PndTrkLegendreNew::CountTracksInSkewSector ( PndTrkCluster cluster)

Definition at line 1352 of file PndTrkLegendreNew.cxx.

References CountTracksInCluster().

Referenced by Exec().

1352  {
1353  return CountTracksInCluster(cluster, 1);
1354 }
Int_t CountTracksInCluster(PndTrkCluster *cluster)
PndTrkCluster * PndTrkLegendreNew::CreateClusterAroundTrack ( PndTrkTrack track)

Definition at line 1533 of file PndTrkLegendreNew.cxx.

References PndTrkCluster::AddHit(), conform, display, PndTrkCluster::DoesContain(), PndTrkTrack::Draw(), PndTrkCluster::Draw(), PndTrkHit::DrawTube(), fabs(), fDisplayOn, FromRealToConformalTrack(), fTubeArray, PndTrkTrack::GetCenter(), PndTrkTrack::GetCluster(), PndTrkConformalTransform::GetConformalHit(), PndTrkConformalTransform::GetConformalSttHit(), PndTrkHitList::GetHit(), PndTrkCluster::GetHit(), PndSttTube::GetLayerID(), PndTrkHitList::GetNofHits(), PndTrkCluster::GetNofHits(), PndTrkTrack::GetRadius(), PndSttTube::GetSectorID(), PndTrkHit::GetTubeID(), PndTrkConformalHit::GetU(), PndTrkConformalHit::GetV(), PndTrkHit::GetXYDistance(), hit, PndTrkHit::IsSttParallel(), R, CAMath::Sqrt(), and stthitlist.

Referenced by Exec().

1533  {
1534 
1535  double R = track->GetRadius();
1536  double xc = track->GetCenter().X();
1537  double yc = track->GetCenter().Y();
1538  double fitm, fitp;
1539  FromRealToConformalTrack(xc, yc, R, fitm, fitp);
1540 
1541 
1542  PndTrkCluster *cluster = track->GetCluster();
1543 
1544  // create cluster depending on fitting
1545  double rmin = R - R * 0.05; // CHECK 5%?
1546  double rmax = R + R * 0.05; // " "
1547 
1548 
1549  if(fDisplayOn) {
1550  display->cd(1);
1551  track->Draw(kBlue);
1552 
1553  TArc *arcmin = new TArc(xc, yc, rmin);
1554  TArc *arcmax = new TArc(xc, yc, rmax);
1555 
1556  arcmin->SetFillStyle(0);
1557  arcmax->SetFillStyle(0);
1558  arcmin->SetLineColor(kGreen);
1559  arcmax->SetLineColor(kBlue);
1560 
1561  // arcmin->Draw("SAME");
1562 // arcmax->Draw("SAME");
1563 
1564  display->Update();
1565  display->Modified();
1566  char goOnChar;
1567  cout << "want to go to new cluster?" << endl;
1568  cin >> goOnChar;
1569  }
1570 
1571  // create cluster depending on fitting
1572  PndTrkCluster *thiscluster = new PndTrkCluster();
1573  int startsecid = 1000, endsecid = -1, startlayid = 1000, endlayid = -1;
1574  double totaldistanceconf = 0, chi2 = 0;
1575  // clean existing cluster
1576  for(int ihit = 0; ihit < cluster->GetNofHits(); ihit++) {
1577  PndTrkHit *hit = cluster->GetHit(ihit);
1578  PndTrkConformalHit *chit = NULL;
1579  if(hit->IsSttParallel()) chit = conform->GetConformalSttHit(hit);
1580  else chit = conform->GetConformalHit(hit); // CHECK if skew?
1581  double distanceconf = fabs((chit->GetV() - fitm * chit->GetU() - fitp)/ TMath::Sqrt(fitm * fitm + 1));
1582 
1583 
1584  double distance = hit->GetXYDistance(TVector3(xc, yc, 0.));
1585  // cout << "distance " << distance << " " << rmin << " " << rmax << " " << distanceconf << endl;
1586  if(distance <= rmax && distance >= rmin) {
1587  thiscluster->AddHit(hit);
1588  if(fDisplayOn) {
1589  display->cd(1);
1590  hit->DrawTube(kGreen);
1591  display->Update();
1592  display->Modified();
1593  // char goOnChar;
1594  // cout << "want to go to next hitcluster2?" << endl;
1595  // cin >> goOnChar;
1596  }
1597 
1598  PndSttTube *tube = (PndSttTube*) fTubeArray->At(hit->GetTubeID());
1599 
1600  if(tube->GetLayerID() < startlayid) startlayid = tube->GetLayerID();
1601  if(tube->GetSectorID() < startsecid) startsecid = tube->GetSectorID();
1602  if(tube->GetLayerID() > endlayid) endlayid = tube->GetLayerID();
1603  if(tube->GetSectorID() > endsecid) endsecid = tube->GetSectorID();
1604 
1605  // cout << "hit " << ihit << " " << hit->GetHitID() << " " << endsecid << " " << endlayid << endl;
1606  totaldistanceconf += distanceconf;
1607 
1608  }
1609  }
1610 
1611  double meandistanceconf = totaldistanceconf/thiscluster->GetNofHits();
1612 
1613  cout << "START SECTOR " << startsecid << " END SECTOR " << endsecid << endl;
1614  cout << "START LAYER " << startlayid << " END LAYER " << endlayid << endl;
1615 
1616  if(fDisplayOn) {
1617  display->cd(1);
1618  thiscluster->Draw(kRed);
1619  display->Update();
1620  display->Modified();
1621  char goOnChar;
1622  cout << "want to go to next cluster1?" << endl;
1623  cin >> goOnChar;
1624  }
1625 
1626 
1627  if(startlayid != 0 || endlayid != 23) {
1628  for(int ihit = 0; ihit < stthitlist->GetNofHits(); ihit++) {
1629  PndTrkHit *hit = stthitlist->GetHit(ihit);
1630  if(cluster->DoesContain(hit)) continue;
1631  PndSttTube *tube = (PndSttTube*) fTubeArray->At(hit->GetTubeID());
1632 
1633  double distance = hit->GetXYDistance(TVector3(xc, yc, 0.));
1634  if(distance <= rmax && distance >= rmin) {
1635  // cout << endl;
1636  // cout << "other sector " << tube->GetSectorID() << " " << tube->GetLayerID();
1637 
1638  if(tube->GetSectorID() == 0 || tube->GetSectorID() == 5) {
1639  if(startsecid != 5 && endsecid != 5 && startsecid != 0 && endsecid != 0) continue;
1640  }
1641  else if(fabs(tube->GetSectorID() - startsecid) > 1 && fabs(tube->GetSectorID() - endsecid) > 1) continue;
1642 
1643  if(tube->GetLayerID() > startlayid && tube->GetLayerID() < endlayid) continue;
1644  PndTrkConformalHit *chit = NULL;
1645  if(hit->IsSttParallel()) chit = conform->GetConformalSttHit(hit);
1646  else chit = conform->GetConformalHit(hit); // CHECK if skew?
1647  double distanceconf = fabs((chit->GetV() - fitm * chit->GetU() - fitp)/ TMath::Sqrt(fitm * fitm + 1));
1648 
1649  // cout << "->distance " << distance << " (" << meandistanceconf << ") " << rmin << " " << rmax << " " << distanceconf << endl;
1650 
1651 
1652 
1653  if(fDisplayOn) {
1654  display->cd(1);
1655  hit->DrawTube(kBlue);
1656  display->Update();
1657  display->Modified();
1658  char goOnChar;
1659  cout << "want to go to next?" << endl;
1660  // cin >> goOnChar;
1661  }
1662 
1663  // cout << "tubeid " << hit->GetTubeID() << " " << tube->GetLayerID() << endl;
1664  thiscluster->AddHit(hit);
1665  // cout << " ***";
1666 
1667 
1668  }
1669  }
1670  }
1671  cout << endl;
1672 
1673  if(fDisplayOn) {
1674  display->cd(1);
1675  thiscluster->Draw(kRed);
1676  display->Update();
1677  display->Modified();
1678  char goOnChar;
1679  cout << "want to go to next cluster2?" << endl;
1680  cin >> goOnChar;
1681  }
1682  // ---------------------------
1683 
1684  return thiscluster;
1685 }
Double_t GetRadius()
Definition: PndTrkTrack.h:43
PndTrkSttHitList * stthitlist
void Draw(Color_t color=kBlack)
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
PndTrkCluster GetCluster()
Definition: PndTrkTrack.h:48
void AddHit(PndTrkHit *hit)
PndTrkHit * GetHit(int index)
TVector2 GetCenter()
Definition: PndTrkTrack.h:44
PndTrkHit * GetHit(int index)
void FromRealToConformalTrack(double x0, double y0, double R, double &fitm, double &fitp)
Bool_t IsSttParallel()
Definition: PndTrkHit.h:70
int GetLayerID()
Definition: PndSttTube.cxx:128
PndTrkConformalTransform * conform
PndTrkConformalHit GetConformalHit(PndTrkHit *hit)
TClonesArray * fTubeArray
void Draw(Color_t color=kBlack)
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
void DrawTube(Color_t color)
Definition: PndTrkHit.cxx:178
Int_t GetNofHits()
Definition: PndTrkHitList.h:43
Bool_t DoesContain(PndTrkHit *hit)
Double_t GetXYDistance(PndTrkHit *fromhit)
Definition: PndTrkHit.cxx:94
PndTrkConformalHit GetConformalSttHit(PndTrkHit *hit)
PndSdsMCPoint * hit
Definition: anasim.C:70
Int_t GetNofHits()
Definition: PndTrkCluster.h:52
int GetSectorID()
Definition: PndSttTube.cxx:124
Int_t GetTubeID()
Definition: PndTrkHit.h:61
Double_t R
Definition: checkhelixhit.C:61
PndTrkClusterList PndTrkLegendreNew::CreateFullClusterization ( )

Definition at line 1113 of file PndTrkLegendreNew.cxx.

References PndTrkClusterList::AddCluster(), PndTrkCluster::AddHit(), display, PndTrkCluster::DoesContain(), PndTrkHit::Draw(), fDisplayOn, fHitMap, fTubeArray, PndTrkNeighboringMap::GetCandseeds(), PndTrkCluster::GetHit(), PndSttTube::GetLayerID(), PndTrkNeighboringMap::GetNeighboringsToHit(), PndTrkHitList::GetNofHits(), PndTrkCluster::GetNofHits(), PndTrkNeighboringMap::GetSeeds(), PndTrkHit::GetTubeID(), PndTrkHit::IsUsed(), and stthitlist.

Referenced by Exec().

1113  {
1114  PndTrkClusterList clusterlist;
1115 
1116  cout << "CLUSTERIZATION <---------------" << endl;
1117 
1118  // get seeds *********************************************8
1119  TObjArray seeds = fHitMap->GetSeeds();
1120  TObjArray *neighborings = NULL;
1121  int clusterizedhits = 0;
1122  // ----------------- loop over seeds
1123  for(int iseed = 0; iseed < seeds.GetEntriesFast(); iseed++) {
1124  PndTrkCluster *cluster = new PndTrkCluster();
1125  PndTrkHit *seedhit = (PndTrkHit*) seeds.At(iseed);
1126 
1127  // is it already used
1128  if(seedhit->IsUsed() == kTRUE) continue;
1129 
1130  int seedtubeID = seedhit->GetTubeID();
1131  PndSttTube *seedtube = (PndSttTube*) fTubeArray->At(seedtubeID);
1132  int seedlayerID = seedtube->GetLayerID();
1133 
1134  // add hit to cluster
1135  cluster->AddHit(seedhit);
1136 
1137  if(fDisplayOn) {
1138  display->cd(1);
1139  char goOnChar;
1140  cin >> goOnChar;
1141  cout << "SEED " << seedtubeID << endl;
1142  seedhit->Draw(kRed);
1143  display->Update();
1144  display->Modified();
1145  }
1146 
1147  // // add cluster to clusterlist
1148  // clusterlist.AddCluster(cluster);
1149 
1150  int nlastadded = 1, addedcounter = 0;
1151  // cout << "nlastadded to " << seedhit->GetHitID() << "(" << seedtubeID << ")" << " " << nlastadded << endl;
1152  // if(nlastadded == 0) continue;
1153  while(nlastadded > 0) {
1154  // loop on the last nlastadded hits to this cluster
1155  // example: add to a 5 hits cluster: 0 1 2 3 4
1156  // the hits no. 5, 6, 7
1157  // --> nlastadded = 3 & nof hits in cluster = 5 + 3 = 8
1158  // 7 6 5 = 8 - 3
1159  // here loop from hit 8 - 1 = 7 to hit 8 - 3 = 5
1160 
1161  addedcounter = 0;
1162 
1163  // cout << "@@@@@@@@@@@@@@@@@ loop on the last " << nlastadded << " hits of cluster" << endl;
1164  // for(int ihit = 0; ihit < cluster->GetNofHits(); ihit++) {
1165  // PndTrkHit *hit = cluster->GetHit(ihit);
1166  // cout << " " << hit->GetHitID() ;
1167  // }
1168  // cout << endl;
1169 
1170 
1171  int nclusterhits = cluster->GetNofHits();
1172  for(int iadded = nclusterhits - 1; iadded >= (nclusterhits - nlastadded); iadded--) {
1173  PndTrkHit *addedhit = cluster->GetHit(iadded);
1174  neighborings = fHitMap->GetNeighboringsToHit(addedhit);
1175  if(neighborings->GetEntriesFast() == 0) continue;
1176  // cout << "hit " << addedhit->GetHitID() << "(" << addedhit->GetTubeID() << ")" << " has " << neighborings->GetEntriesFast() << " neighborigns: " << endl;
1177 
1178  // loop over the neighborings and add them all
1179  for(int ineigh = 0; ineigh < neighborings->GetEntriesFast(); ineigh++)
1180  {
1181  PndTrkHit *neighhit = (PndTrkHit*) neighborings->At(ineigh);
1182  // cout << " " << neighhit->GetHitID() << "(" << neighhit->GetTubeID() << ")";
1183  if(cluster->DoesContain(neighhit) == kTRUE) {
1184  // cout << "UN-ADDED, in cluster already" << endl;
1185  continue;
1186  }
1187  cluster->AddHit(neighhit);
1188  addedcounter++;
1189  // cout << " - ADDED; ";
1190 
1191  if(fDisplayOn) {
1192  display->cd(1);
1193  char goOnChar;
1194  cin >> goOnChar;
1195  neighhit->Draw(kGreen);
1196  cout << "nof hits " << cluster->GetNofHits() << endl;
1197  // cluster->LightUp();
1198  display->Update();
1199  display->Modified();
1200  cin >> goOnChar;
1201  }
1202 
1203  }
1204 
1205 
1206  }
1207  // cout << endl;
1208  nlastadded = addedcounter;
1209  }
1210  // cout << "NEXT seed " << endl;
1211  // add cluster to clusterlist
1212  if(cluster->GetNofHits() > 3) {
1213  clusterlist.AddCluster(cluster); // CHECK
1214  clusterizedhits += cluster->GetNofHits();
1215  }
1216 
1217  }
1218 
1219  // -----------------------------------------
1220  cout << "NOF TOTAL HITS " << stthitlist->GetNofHits() << " NOF CLUSTERIZED HITS " << clusterizedhits << endl;
1221  if(stthitlist->GetNofHits() - clusterizedhits > 6) {
1222  // get candseeds *********************************************8
1223  TObjArray candseeds = fHitMap->GetCandseeds();
1224  // ----------------- loop over cand seeds
1225 
1226  cout << "we have " << candseeds.GetEntriesFast() << " canduidate seeds" << endl;
1227  for(int jseed = 0; jseed < candseeds.GetEntriesFast(); jseed++) {
1228  PndTrkCluster *cluster = new PndTrkCluster();
1229  PndTrkHit *cseedhit = (PndTrkHit*) candseeds.At(jseed);
1230 
1231  // is it already used
1232 
1233  if(fDisplayOn) {
1234  display->cd(1);
1235  char goOnChar;
1236  cin >> goOnChar;
1237  cout << "CSEED " << endl;
1238  cseedhit->Draw(kBlue);
1239  display->Update();
1240  display->Modified();
1241  }
1242 
1243 
1244  if(cseedhit->IsUsed() == kTRUE) { cout << "already" << endl ; continue; }
1245 
1246  int cseedtubeID = cseedhit->GetTubeID();
1247  PndSttTube *cseedtube = (PndSttTube*) fTubeArray->At(cseedtubeID);
1248  int cseedlayerID = cseedtube->GetLayerID();
1249 
1250  // add hit to cluster
1251  cluster->AddHit(cseedhit);
1252 
1253  if(fDisplayOn) {
1254  display->cd(1);
1255  char goOnChar;
1256  cin >> goOnChar;
1257  cout << "SEED " << cseedtubeID << endl;
1258  cseedhit->Draw(kRed);
1259  display->Update();
1260  display->Modified();
1261  }
1262 
1263  // // add cluster to clusterlist
1264  // clusterlist.AddCluster(cluster);
1265 
1266  int nlastadded = 1, addedcounter = 0;
1267  // cout << "nlastadded to " << seedhit->GetHitID() << "(" << seedtubeID << ")" << " " << nlastadded << endl;
1268  // if(nlastadded == 0) continue;
1269  while(nlastadded > 0) {
1270  // loop on the last nlastadded hits to this cluster
1271  // example: add to a 5 hits cluster: 0 1 2 3 4
1272  // the hits no. 5, 6, 7
1273  // --> nlastadded = 3 & nof hits in cluster = 5 + 3 = 8
1274  // 7 6 5 = 8 - 3
1275  // here loop from hit 8 - 1 = 7 to hit 8 - 3 = 5
1276 
1277  addedcounter = 0;
1278 
1279  // cout << "@@@@@@@@@@@@@@@@@ loop on the last " << nlastadded << " hits of cluster" << endl;
1280  // for(int ihit = 0; ihit < cluster->GetNofHits(); ihit++) {
1281  // PndTrkHit *hit = cluster->GetHit(ihit);
1282  // cout << " " << hit->GetHitID() ;
1283  // }
1284  // cout << endl;
1285 
1286 
1287  int nclusterhits = cluster->GetNofHits();
1288  for(int iadded = nclusterhits - 1; iadded >= (nclusterhits - nlastadded); iadded--) {
1289  PndTrkHit *addedhit = cluster->GetHit(iadded);
1290  neighborings = fHitMap->GetNeighboringsToHit(addedhit);
1291  if(neighborings->GetEntriesFast() == 0) continue;
1292  // cout << "hit " << addedhit->GetHitID() << "(" << addedhit->GetTubeID() << ")" << " has " << neighborings->GetEntriesFast() << " neighborigns: " << endl;
1293 
1294  // loop over the neighborings and add them all
1295  for(int ineigh = 0; ineigh < neighborings->GetEntriesFast(); ineigh++)
1296  {
1297  PndTrkHit *neighhit = (PndTrkHit*) neighborings->At(ineigh);
1298  // cout << " " << neighhit->GetHitID() << "(" << neighhit->GetTubeID() << ")";
1299  if(cluster->DoesContain(neighhit) == kTRUE) {
1300  // cout << "UN-ADDED, in cluster already" << endl;
1301  continue;
1302  }
1303  cluster->AddHit(neighhit);
1304  addedcounter++;
1305  // cout << " - ADDED; ";
1306 
1307  if(fDisplayOn) {
1308  display->cd(1);
1309  char goOnChar;
1310  cin >> goOnChar;
1311  neighhit->Draw(kGreen);
1312  cout << "nof hits " << cluster->GetNofHits() << endl;
1313  // cluster->LightUp();
1314  display->Update();
1315  display->Modified();
1316  cin >> goOnChar;
1317  }
1318 
1319  }
1320 
1321 
1322  }
1323  // cout << endl;
1324  nlastadded = addedcounter;
1325  }
1326 
1327  if(cluster->GetNofHits() > 3) {
1328  clusterlist.AddCluster(cluster); // CHECK
1329  }
1330 
1331  }
1332  }
1333  // -----------------------------------------
1334  return clusterlist;
1335 }
PndTrkSttHitList * stthitlist
PndTrkNeighboringMap * fHitMap
TObjArray GetNeighboringsToHit(PndTrkHit *hit)
void AddHit(PndTrkHit *hit)
PndTrkHit * GetHit(int index)
void AddCluster(PndTrkCluster *cluster)
int GetLayerID()
Definition: PndSttTube.cxx:128
TClonesArray * fTubeArray
Bool_t IsUsed()
Definition: PndTrkHit.h:58
void Draw(Color_t color)
Definition: PndTrkHit.cxx:109
Int_t GetNofHits()
Definition: PndTrkHitList.h:43
Bool_t DoesContain(PndTrkHit *hit)
Int_t GetNofHits()
Definition: PndTrkCluster.h:52
Int_t GetTubeID()
Definition: PndTrkHit.h:61
PndTrkClusterList PndTrkLegendreNew::CreateFullClusterization2 ( )
 PndTrkClusterList clusterlist;

get seeds *********************************************8 TObjArray seeds = fHitMap->GetSeeds(); neighborings = NULL;

Definition at line 1337 of file PndTrkLegendreNew.cxx.

1337  {
1345 }
void PndTrkLegendreNew::DrawConfHit ( double  x,
double  y,
double  r,
int  marker = 2 
)

Definition at line 642 of file PndTrkLegendreNew.cxx.

References display.

Referenced by FillLegendreHisto().

642  {
643  display->cd(2);
644  if(r >= 0) {
645  TArc *arc = new TArc(u, v, r);
646  arc->SetFillStyle(0);
647  arc->Draw("SAME");
648  }
649  else {
650  TMarker *mrk = new TMarker(u, v, marker);
651  mrk->Draw("SAME");
652  }
653  // display->Update();
654  // display->Modified();
655 }
double r
Definition: RiemannTest.C:14
__m128 v
Definition: P4_F32vec4.h:4
void PndTrkLegendreNew::DrawGeometry ( )

Definition at line 498 of file PndTrkLegendreNew.cxx.

References display, fTubeArray, PndSttTube::GetPosition(), hxy, and PndSttTube::IsParallel().

Referenced by Refresh().

498  {
499  if(hxy == NULL) hxy = new TH2F("hxy", "xy plane", 100, -43, 43, 100, -43, 43);
500  else hxy->Reset();
501  display->cd(1);
502  hxy->SetStats(kFALSE);
503  hxy->Draw();
504 
505  // draw all the tubes
506  for(int itube = 1; itube < fTubeArray->GetEntriesFast(); itube++) {
507  PndSttTube *tube = (PndSttTube*) fTubeArray->At(itube);
508  if(tube->IsParallel()) {
509  TArc * arc = new TArc(tube->GetPosition().X(), tube->GetPosition().Y(), 0.5);
510  arc->SetFillStyle(0);
511  arc->SetLineColor(kCyan - 10);
512  arc->Draw("SAME");
513  }
514  else {
515  TMarker *mrk = new TMarker(tube->GetPosition().X(), tube->GetPosition().Y(), 6);
516 
517  mrk->SetMarkerColor(kCyan - 10);
518  mrk->Draw("SAME");
519  }
520  }
521  // ............................
522 
523  display->Update();
524  display->Modified();
525 
526 }
TVector3 GetPosition()
Definition: PndSttTube.cxx:87
TClonesArray * fTubeArray
bool IsParallel()
Definition: PndSttTube.h:66
void PndTrkLegendreNew::DrawGeometryConf ( double  x1,
double  x2,
double  y1,
double  y2 
)

Definition at line 528 of file PndTrkLegendreNew.cxx.

References display, and huv.

Referenced by Exec(), LegendreFit(), and RePrepareLegendre().

528  {
529  // CHECK
530  char goOnChar;
531  // cout << "DRAWING GEOMETRY CONF" << endl;
532  // cin >> goOnChar;
533 
534  // CHECK previous calculations, now not used;
535  if(huv == NULL) huv = new TH2F("huv", "uv plane", 100, x1, x2, 100, y1, y2);
536  else {
537  huv->Reset();
538  huv->GetXaxis()->SetLimits(x1, x2);
539  huv->GetYaxis()->SetLimits(y1, y2);
540  }
541  display->cd(2);
542  huv->Draw();
543  display->Update();
544  display->Modified();
545 
546 }
void PndTrkLegendreNew::DrawHits ( PndTrkHitList hitlist)

Definition at line 491 of file PndTrkLegendreNew.cxx.

References display, and PndTrkHitList::Draw().

Referenced by Refresh().

491  {
492  display->cd(1);
493  hitlist->Draw();
494  display->Update();
495  display->Modified();
496 }
void Draw(Color_t color=kBlack)
void PndTrkLegendreNew::DrawLegendreHisto ( )

Definition at line 476 of file PndTrkLegendreNew.cxx.

References display, PndTrkLegendreTransform::Draw(), and legendre.

Referenced by ExtractLegendre().

476  {
477  display->cd(3);
478  legendre->Draw();
479  display->Update();
480  display->Modified();
481 }
PndTrkLegendreTransform * legendre
void PndTrkLegendreNew::DrawLists ( )

Definition at line 549 of file PndTrkLegendreNew.cxx.

References counter, display, PndTrkHit::DrawTube(), fHitMap, fTubeArray, PndTrkNeighboringMap::GetCandseeds(), PndTrkNeighboringMap::GetIndivisibles(), PndSttTube::GetLayerID(), PndTrkNeighboringMap::GetNeighboringsToHit(), PndTrkNeighboringMap::GetSeeds(), PndTrkNeighboringMap::GetStandalone(), PndTrkHit::GetTubeID(), i, and Refresh().

Referenced by FillHitMap().

549  {
550  char goOnChar;
551  cout << "new hit?" << endl;
552  cin >> goOnChar;
553  Refresh();
554 
555 
556  for(int i = 0; i < fHitMap->GetStandalone().GetEntriesFast(); i++) {
557  PndTrkHit *hitA = (PndTrkHit*) fHitMap->GetStandalone().At(i);
558  hitA->DrawTube(kGreen);
559  }
560  for(int i = 0; i < fHitMap->GetSeeds().GetEntriesFast(); i++) {
561  PndTrkHit *hitA = (PndTrkHit*) fHitMap->GetSeeds().At(i);
562  hitA->DrawTube(kRed);
563  }
564  for(int i = 0; i < fHitMap->GetCandseeds().GetEntriesFast(); i++) {
565  PndTrkHit *hitA = (PndTrkHit*) fHitMap->GetCandseeds().At(i);
566  hitA->DrawTube(kBlue);
567  }
568  for(int i = 0; i < fHitMap->GetIndivisibles().GetEntriesFast(); i++) {
569  PndTrkHit *hitA = (PndTrkHit*) fHitMap->GetIndivisibles().At(i);
570  hitA->DrawTube(kOrange);
571  TObjArray *neighs = fHitMap->GetNeighboringsToHit(hitA);
572  for(int j = 0; j < neighs->GetEntriesFast(); j++) {
573  PndTrkHit *hitB = (PndTrkHit*) neighs->At(j);
574  TObjArray *neighs2 = fHitMap->GetNeighboringsToHit(hitA);
575  if(neighs2->GetEntriesFast() > 2) {
576  int counter = 0;
577  PndSttTube *tubeB = (PndSttTube* ) fTubeArray->At(hitB->GetTubeID());
578  for(int k = 0; k < neighs2->GetEntriesFast(); k++) {
579  PndTrkHit *hitC = (PndTrkHit*) neighs2->At(k);
580  PndSttTube *tubeC = (PndSttTube* ) fTubeArray->At(hitC->GetTubeID());
581  cout << "tubes " << tubeB << " "<< tubeC << endl;
582  if(tubeB->GetLayerID() == tubeC->GetLayerID()) continue;
583  counter++;
584  }
585  if(counter > 2) continue;
586  }
587  hitB->DrawTube(kYellow);
588  }
589  display->Update();
590  display->Modified();
591  cin >> goOnChar;
592 
593  }
594 
595  // for(int i = 0; i < limits.GetEntriesFast(); i++) {
596  // PndTrkHit *hitA = (PndTrkHit*) limits.At(i);
597  // hitA->DrawTube(kYellow);
598  // }
599 
600  display->Update();
601  display->Modified();
602  cin >> goOnChar;
603 }
Int_t i
Definition: run_full.C:25
PndTrkNeighboringMap * fHitMap
TObjArray GetNeighboringsToHit(PndTrkHit *hit)
int GetLayerID()
Definition: PndSttTube.cxx:128
int counter
Definition: ZeeAnalysis.C:59
TClonesArray * fTubeArray
void DrawTube(Color_t color)
Definition: PndTrkHit.cxx:178
Int_t GetTubeID()
Definition: PndTrkHit.h:61
void PndTrkLegendreNew::DrawNeighborings ( )

Definition at line 607 of file PndTrkLegendreNew.cxx.

References DrawNeighboringsToHit(), PndTrkHitList::GetHit(), PndTrkHitList::GetNofHits(), hit, and stthitlist.

Referenced by FillHitMap().

607  {
608  char goOnChar;
609 
610  for(int ihit = 0; ihit < stthitlist->GetNofHits(); ihit++) {
611  cout << "new neigh hit?" << endl;
612  cin >> goOnChar;
613  PndTrkHit *hit = stthitlist->GetHit(ihit);
615  cin >> goOnChar;
616  }
617 
618 }
void DrawNeighboringsToHit(PndTrkHit *hit)
PndTrkSttHitList * stthitlist
PndTrkHit * GetHit(int index)
Int_t GetNofHits()
Definition: PndTrkHitList.h:43
PndSdsMCPoint * hit
Definition: anasim.C:70
void PndTrkLegendreNew::DrawNeighboringsToHit ( PndTrkHit hit)

Definition at line 620 of file PndTrkLegendreNew.cxx.

References display, PndTrkHit::DrawTube(), fHitMap, fTubeArray, PndTrkHit::GetHitID(), PndSttTube::GetLayerID(), PndTrkNeighboringMap::GetNeighboringsToHit(), PndTrkHit::GetTubeID(), i, and Refresh().

Referenced by DrawNeighborings().

620  {
621 
622 
623  Refresh();
624  hit->DrawTube(kYellow);
625  PndSttTube *tube = (PndSttTube*) fTubeArray->At(hit->GetTubeID());
626  TObjArray *neighs = fHitMap->GetNeighboringsToHit(hit);
627 
628 
629  cout << "HIT " << hit->GetHitID() << "(" << hit->GetTubeID() << "/" << tube->GetLayerID() << ")" << " has " << neighs->GetEntriesFast() << " neighborings: ";
630  for(int i = 0; i < neighs->GetEntriesFast(); i++) {
631  PndTrkHit *hitA = (PndTrkHit*) neighs->At(i);
632  hitA->DrawTube(kCyan);
633  PndSttTube *tubeA = (PndSttTube*) fTubeArray->At(hitA->GetTubeID());
634  cout << " " << hitA->GetHitID() << "(" << hitA->GetTubeID() << "/" << tubeA->GetLayerID() << ")";
635  }
636  cout << endl;
637  display->Update();
638  display->Modified();
639 
640 }
Int_t i
Definition: run_full.C:25
PndTrkNeighboringMap * fHitMap
TObjArray GetNeighboringsToHit(PndTrkHit *hit)
Int_t GetHitID()
Definition: PndTrkHit.h:56
int GetLayerID()
Definition: PndSttTube.cxx:128
TClonesArray * fTubeArray
void DrawTube(Color_t color)
Definition: PndTrkHit.cxx:178
Int_t GetTubeID()
Definition: PndTrkHit.h:61
void PndTrkLegendreNew::Exec ( Option_t *  opt)
virtual

Virtual method Exec

Definition at line 203 of file PndTrkLegendreNew.cxx.

References PndTrkCluster::AddHit(), PndTrkTrackList::AddTrack(), AnalyticalFit2(), PndTrkNeighboringMap::Clear(), ClusterToConformal(), ComputePlaneExtremities(), CountTracksInSkewSector(), CreateClusterAroundTrack(), CreateFullClusterization(), display, PndTrkCluster::DoesContain(), PndTrkTrack::Draw(), DrawGeometryConf(), fDisplayOn, fEventCounter, fHitMap, FillHitMap(), fMvdPixelHitArray, fMvdStripHitArray, fRmax, fRmin, FromConformalToRealTrack(), FromRealToConformalTrack(), fSecondary, fSttHitArray, fThetamax, fThetamin, fTrackArray, fTrackCandArray, fUmax, fUmin, fVerbose, fVmax, fVmin, PndTrkTrack::GetCenter(), PndTrkClusterList::GetCluster(), PndTrkTrack::GetCluster(), PndTrkCluster::GetHit(), PndTrkHit::GetHitID(), PndTrkClusterList::GetNofClusters(), PndTrkCluster::GetNofHits(), PndTrkTrackList::GetNofTracks(), PndTrkTrack::GetRadius(), PndTrkTrackList::GetTrack(), hit, Initialize(), legendre, LegendreFit(), PndTrkCluster::LightUp(), nhits, R, Refresh(), RefreshConf(), Reset(), PndTrkTrack::SetCenter(), PndTrkTrack::SetCluster(), PndTrkTrack::SetRadius(), PndTrkLegendreTransform::SetUpLegendreHisto(), and track.

203  {
204  // ############## I N I T I A L I Z A T I O N S ##############
205  fTrackArray->Delete();
206  fTrackCandArray->Delete();
207  if(fVerbose > 0) cout << "*********************** " << fEventCounter << " ***********************" << endl;
208 
209  // initialize -----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~
210  Initialize();
211  if(fVerbose > 1) {
212  cout << "number of stt hits " << fSttHitArray->GetEntriesFast() << endl;
213  cout << "number of mvdpix hits " << fMvdPixelHitArray->GetEntriesFast() << endl;
214  cout << "number of mvdstr hits " << fMvdStripHitArray->GetEntriesFast() << endl;
215  }
216  // initialize display -----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~-
217  if(fDisplayOn) {
218  Refresh();
219  char goOnChar;
220  display->Update();
221  display->Modified();
222  cout << " STARTING" << endl;
223  cin >> goOnChar;
224  display->Update();
225  display->Modified();
226  }
227 
228  // initialize hit map -----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~-
229  fHitMap->Clear();
230  FillHitMap();
231  // ##########################################################
232 
233  // fDisplayOn = kFALSE;
234  // clusterization -----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~-----
236  int nofclusters = clusterlist.GetNofClusters();
237  cout << "CLUSTERLIST " << nofclusters << endl;
238 
239  if(fDisplayOn) {
240  for(int iclus = 0; iclus < nofclusters; iclus++) {
241  PndTrkCluster *cluster = clusterlist.GetCluster(iclus);
242  cout << "CLUSTER " << iclus << ":";
243  char goOnChar;
244  cin >> goOnChar;
245  Refresh();
246  cluster->LightUp();
247  display->Update();
248  display->Modified();
249  }
250  }
251 
252 
253 
254 
255  PndTrkTrackList tracklist;
256 
257  // loop on clusterlist -----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~
258  for(int iclus = 0; iclus < nofclusters; iclus++) {
259  PndTrkCluster *cluster = clusterlist.GetCluster(iclus);
260  // if(cluster->GetNofHits() < 3) continue;
261 
262  // print and display cluster -----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~--
263  cout << "CLUSTER " << iclus << ":";
264  if(fDisplayOn) {
265  char goOnChar;
266  cin >> goOnChar;
267  Refresh();
268  cluster->LightUp();
269  display->Update();
270  display->Modified();
271  }
272 
273  for(int ihit = 0; ihit < cluster->GetNofHits(); ihit++) {
274  PndTrkHit *hit = cluster->GetHit(ihit);
275  cout << " " << hit->GetHitID();
276  }
277 
278  cout << endl;
279 
280  // count tracks in skew sector -----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~
281  Int_t maxnoftracks = CountTracksInSkewSector(cluster);
282 
283  // if(maxnoftracks > 1) continue; // CHECK
284 
285  PndTrkClusterList partialcluslist;
286  cout << "\033[1;36m ITERATIONS -----------------------> " << maxnoftracks << "\033[0m" << endl;
287  for(int iter = 0; iter < maxnoftracks; iter++) {
288  cout << "\033[1;36m ############### ITER " << iter << "\033[0m" << endl;
289  if(fDisplayOn) {
290  char goOnChar;
291  cin >> goOnChar;
292  Refresh();
293  cluster->LightUp();
294  display->Update();
295  display->Modified();
296  }
297 
298  // fitting procedure -----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~
299  Int_t nhits = ClusterToConformal(cluster);
300  if(fSecondary) {
301  cout << ">>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<" << endl;
302  ComputePlaneExtremities(cluster);
303 
304  int nofsteps = (int) ((fRmax - fRmin)/0.04);
305  cout << "nofsteps " << nofsteps << endl;
307  }
308  PndTrkTrack *track = LegendreFit(cluster);
309  if(track == NULL) continue;
310  PndTrkCluster *thiscluster = CreateClusterAroundTrack(track);
311  cout << "nof hits " << thiscluster->GetNofHits() << endl;
312  track->SetCluster(thiscluster);
313  tracklist.AddTrack(track);
314  cout << "ADD CLUSTER TO TRACKLIST " << thiscluster->GetNofHits() << endl;
315 
316  PndTrkCluster *remainingcluster = new PndTrkCluster();
317  for(int ihit = 0; ihit < cluster->GetNofHits(); ihit++) {
318  PndTrkHit *hit = cluster->GetHit(ihit);
319  if(thiscluster->DoesContain(hit)) continue;
320  remainingcluster->AddHit(hit);
321  }
322  cluster = remainingcluster;
323  cout << "partialclusterlist " << partialcluslist.GetNofClusters() << endl;
324  cout << "remainning hits " << remainingcluster->GetNofHits() << endl;
325 
326  // if there are still a lot of hits not assigned, maybe
327  // there is another track...
328  if(remainingcluster->GetNofHits() > 15 && iter == maxnoftracks - 1) {
329  cout << "\033[1;31m LETS TRY ANOTHER ONE -------- BONUS ------------ \033[0m" << endl;
330 
331  maxnoftracks++;
332  }
333  }
334 
335 
336  cout << "tracklist is " << tracklist.GetNofTracks() << endl;
337 
338  }
339  // ---------------------------------------
340 
341  // loop over the tracklist -----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~
342  int noftrack = tracklist.GetNofTracks();
343  cout << "\033[1;35m (AFTER LEGENDRE AND RECLUSTERING) NEW CLUSTERLIST " << noftrack << " \033[0m" << endl;
344 
345  // fDisplayOn = kTRUE;
346 
347  PndTrkTrackList tracklist2;
348  // loop on clusterlist -----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~
349  for(int itrk = 0; itrk < noftrack; itrk++) {
350  PndTrkTrack *track = tracklist.GetTrack(itrk);
351  PndTrkCluster *cluster = track->GetCluster();
352  // if(cluster->GetNofHits() < 3) continue;
353 
354  // print and display cluster -----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~--
355  cout << "CLUSTER " << itrk << ":";
356  if(fDisplayOn) {
357  char goOnChar;
358  cin >> goOnChar;
359  Refresh();
360  cluster->LightUp();
361  display->Update();
362  display->Modified();
363  }
364 
365  // fit with legendre the new cluster -----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~--
366  Int_t nhits = ClusterToConformal(cluster);
367 
368  track = LegendreFit(cluster);
369  if(track == NULL) continue;
370 
371  // create cluster around new fit
372  PndTrkCluster *cluster2 = CreateClusterAroundTrack(track);
373 
374  double fitm, fitp;
375  FromRealToConformalTrack(track->GetCenter().X(), track->GetCenter().Y(), track->GetRadius(), fitm, fitp);
376  if(fDisplayOn) {
377  // draw old conformal line
378  RefreshConf();
380  display->cd(2);
381  TLine *line = new TLine(-10.07, fitp + fitm * (-10.07), 10.07, fitp + fitm * (10.07));
382  line->Draw("SAME");
383 
384  }
385 
386  // fit with analytical chi2 -----~~~~~-----~~~~~-----~~~~~-----~~~~~-----~~~~~--
387  // analytical LS fit
388  double fitm2, fitp2;
389  AnalyticalFit2(cluster2, fitm, fitp, fitm2, fitp2);
390 
391  double xc, yc, R;
392  FromConformalToRealTrack(fitm2, fitp2, xc, yc, R);
393  track->SetCenter(xc, yc);
394  track->SetRadius(R);
395 
396  // create final cluster on the refitted track
397  PndTrkCluster *thiscluster = CreateClusterAroundTrack(track);
398  track->SetCluster(thiscluster);
399 
400  tracklist2.AddTrack(track);
401  }
402  // fDisplayOn = kTRUE;
403 
404  if(fDisplayOn) {
405 
406  Refresh();
407  for(int itrk = 0; itrk < tracklist2.GetNofTracks(); itrk++) {
408  PndTrkTrack *track = tracklist2.GetTrack(itrk);
409  track->Draw(kGreen);
410  display->Update();
411  display->Modified();
412  }
413  }
414 
415 
416  if(fDisplayOn) {
417  char goOnChar;
418  display->Update();
419  display->Modified();
420  cout << "Finish? ";
421  cin >> goOnChar;
422  }
423  Reset();
424 
425 }
int fVerbose
Definition: poormantracks.C:24
Double_t GetRadius()
Definition: PndTrkTrack.h:43
PndTrkTrack * LegendreFit(PndTrkCluster *cluster)
PndTrkNeighboringMap * fHitMap
void FromConformalToRealTrack(double fitm, double fitp, double &x0, double &y0, double &R)
PndTrkCluster GetCluster()
Definition: PndTrkTrack.h:48
void AddHit(PndTrkHit *hit)
Int_t ClusterToConformal(PndTrkCluster *cluster)
void SetCluster(PndTrkCluster *cluster)
Definition: PndTrkTrack.h:41
TVector2 GetCenter()
Definition: PndTrkTrack.h:44
PndTrkLegendreTransform * legendre
TClonesArray * fTrackArray
PndTrkHit * GetHit(int index)
void FromRealToConformalTrack(double x0, double y0, double R, double &fitm, double &fitp)
Int_t GetHitID()
Definition: PndTrkHit.h:56
TClonesArray * fSttHitArray
PndTrkClusterList CreateFullClusterization()
void SetCenter(double x, double y)
Definition: PndTrkTrack.h:37
TClonesArray * fMvdPixelHitArray
PndTrkTrack * GetTrack(Int_t index)
Int_t CountTracksInSkewSector(PndTrkCluster *cluster)
void AddTrack(PndTrkTrack *track)
void SetRadius(double radius)
Definition: PndTrkTrack.h:36
PndMCTrack * track
Definition: anaLmdCluster.C:89
TClonesArray * fTrackCandArray
void Draw(Color_t color=kBlack)
TClonesArray * fMvdStripHitArray
void DrawGeometryConf(double x1, double x2, double y1, double y2)
Bool_t DoesContain(PndTrkHit *hit)
void AnalyticalFit2(PndTrkCluster *cluster, double fitm, double fitp, double &fitm2, double &fip2)
PndSdsMCPoint * hit
Definition: anasim.C:70
PndTrkCluster * GetCluster(Int_t index)
Int_t GetNofHits()
Definition: PndTrkCluster.h:52
void ComputePlaneExtremities(PndTrkCluster *cluster)
Double_t R
Definition: checkhelixhit.C:61
PndTrkCluster * CreateClusterAroundTrack(PndTrkTrack *track)
Int_t PndTrkLegendreNew::ExtractLegendre ( Int_t  mode,
double &  theta_max,
double &  r_max 
)

Definition at line 912 of file PndTrkLegendreNew.cxx.

References conformalhitlist, PndTrkLegendreTransform::DeleteZoneAroundXYLegendre(), PndTrkLegendreTransform::DeleteZoneAroundXYZoom(), display, DrawLegendreHisto(), PndTrkLegendreTransform::DrawZoom(), PndTrkLegendreTransform::ExtractLegendreMaximum(), PndTrkLegendreTransform::ExtractZoomMaximum(), fDisplayOn, fFoundPeaks, PndTrkLegendreTransform::FillZoomHisto(), fVerbose, PndTrkConformalHitList::GetHit(), PndTrkConformalHit::GetIsochrone(), PndTrkConformalHitList::GetNofHits(), PndTrkConformalHit::GetU(), PndTrkConformalHit::GetV(), legendre, PndTrkLegendreTransform::SetUpZoomHisto(), and tr.

Referenced by ApplyLegendre(), and LegendreFit().

912  {
913  if(fDisplayOn) {
914  char goOnChar;
915  // cin >> goOnChar;
917  // cout << "LEGENDRE (nof conf hits = " << conformalhitlist->GetNofHits() << ")" << endl;
918  display->cd();
919  // cin >> goOnChar;
920  display->Update();
921  display->Modified();
922  }
923 
924  // FIND MAXIMUM IN LEGENDRE HISTO
925 
926  // legendre->ApplyThresholdLegendreHisto(0.3);
927  int maxpeak = legendre->ExtractLegendreMaximum(theta_max, r_max);
928 
929  bool alreadythere = false;
930  // if(mode == 0)
931  {
932 
933  if(maxpeak <= 3) {
934  // if(fVerbose > 1)
935  cout << "\033[1;31m MAXPEAK " << maxpeak << ", BREAK NOW! \033[0m" << endl;
936  return maxpeak;
937  }
938 
939  for(int ialready = 0; ialready < fFoundPeaks.size(); ialready++) {
940  std::pair<double, double> foundthetar = fFoundPeaks.at(ialready);
941  double foundtheta = foundthetar.first;
942  double foundr = foundthetar.second;
943  // IF THIS PEAK WAS ALREADY FOUND, DELETE THE PEAK AND GO ON (TO AVOID INFINITE LOOPS)
944  if(theta_max == foundtheta && r_max == foundr) {
945  legendre->DeleteZoneAroundXYLegendre(theta_max, r_max);
946  maxpeak = legendre->ExtractLegendreMaximum(theta_max, r_max);
947  alreadythere = true;
948  if(fVerbose > 0) cout << "OH NO! THIS PEAK IS ALREADY THERE" << endl;
949  return -1;
950  }
951  }
952 
953  if(alreadythere == false) {
954  std::pair<double, double> tr(theta_max, r_max);
955  fFoundPeaks.push_back(tr);
956  }
957  }
958  // ZOOM LEGENDRE HISTO
959  legendre->SetUpZoomHisto(theta_max, r_max, 3, 0.005);
960  // cout << "THETA/R " << theta_max << " " << r_max << " maxpeak " << maxpeak << endl;
961 
962  for(int ihit = 0; ihit < conformalhitlist->GetNofHits(); ihit++) {
964  legendre->FillZoomHisto(chit->GetU(), chit->GetV(), chit->GetIsochrone());
965  }
966 
967  if(mode == 0 && alreadythere == true) {
968  cout << "THIS PEAK IS ALREADY THERE" << endl;
969  legendre->DeleteZoneAroundXYZoom(theta_max, r_max);
970  }
971 
972  int maxpeakzoom = legendre->ExtractZoomMaximum(theta_max, r_max);
973  // cout << "THETA/R ZOOM " << theta_max << " " << r_max << " maxpeakzoom " << maxpeakzoom << endl;
974 
975  if(fDisplayOn) {
976  char goOnChar;
977  display->cd(3);
978  TMarker *mrk = new TMarker(theta_max, r_max, 29);
979  mrk->Draw("SAME");
980  display->cd(4);
981  legendre->DrawZoom();
982  mrk->Draw("SAME");
983  display->Update();
984  display->Modified();
985  // cin >> goOnChar;
986  }
987 
988  return maxpeak;
989 }
std::vector< std::pair< double, double > > fFoundPeaks
int fVerbose
Definition: poormantracks.C:24
void SetUpZoomHisto(double theta, double r, double deltatheta, double deltar)
PndTrkConformalHitList * conformalhitlist
void DeleteZoneAroundXYLegendre(double x, double y)
PndTrkLegendreTransform * legendre
int ExtractLegendreMaximum(double &theta_max, double &r_max)
Int_t mode
Definition: autocutx.C:47
PndTrkConformalHit * GetHit(int index)
int ExtractZoomMaximum(double &theta_max, double &r_max)
void FillZoomHisto(double x, double y, double radius)
void DeleteZoneAroundXYZoom(double x, double y)
Int_t PndTrkLegendreNew::FillConformalHitList ( PndTrkCluster cluster)

Definition at line 657 of file PndTrkLegendreNew.cxx.

References PndTrkConformalHitList::AddHit(), conform, conformalhitlist, fRefHit, PndTrkConformalTransform::GetConformalSttHit(), PndTrkCluster::GetHit(), PndTrkConformalHitList::GetNofHits(), PndTrkCluster::GetNofHits(), hit, PndTrkHit::IsSttParallel(), and PndTrkConformalHitList::SetConformalTransform().

Referenced by ClusterToConformal().

657  {
658 
659  // set the conformal transformation, where the
660  // translation and rotation must be already set
662 
663  // loop over the cluster hits
664  // and port them to conf plane
665  for(int jhit = 0; jhit < cluster->GetNofHits(); jhit++) {
666  PndTrkHit *hit = cluster->GetHit(jhit);
667  if(hit == fRefHit) continue;
668  PndTrkConformalHit * chit = NULL;
669  // cout << "HIT " << hit->GetHitID() << " " << hit->IsSttParallel() << " " << hit->IsSttSkew() << endl;
670  if(hit->IsSttParallel() == kTRUE) chit = conform->GetConformalSttHit(hit);
671  else continue; // CHECK chit = conform->GetConformalHit(hit); // CHECK
672  conformalhitlist->AddHit(chit);
673  // cout << hit->GetPosition().X() << " " << hit->GetPosition().Y() << " " << hit->GetIsochrone() << " " << hit->IsSttParallel() << " " << " to CONFORMAL " << chit->GetU() << " " << chit->GetV() << " " << chit->GetIsochrone() << endl;
674 
675  }
676  return conformalhitlist->GetNofHits();
677 }
PndTrkConformalHitList * conformalhitlist
PndTrkHit * GetHit(int index)
Bool_t IsSttParallel()
Definition: PndTrkHit.h:70
void AddHit(PndTrkConformalHit *chit)
PndTrkConformalTransform * conform
PndTrkConformalHit GetConformalSttHit(PndTrkHit *hit)
void SetConformalTransform(PndTrkConformalTransform *conformal)
PndSdsMCPoint * hit
Definition: anasim.C:70
Int_t GetNofHits()
Definition: PndTrkCluster.h:52
void PndTrkLegendreNew::FillHitMap ( )

Definition at line 1030 of file PndTrkLegendreNew.cxx.

References PndTrkNeighboringMap::AddNeighboringsToHit(), display, PndTrkHit::Draw(), DrawLists(), DrawNeighborings(), fDisplayOn, fHitMap, fTubeArray, PndTrkHitList::GetHit(), PndTrkNeighboringMap::GetIndivisiblesToHit(), PndTrkHitList::GetNofHits(), PndTrkHit::GetTubeID(), hit, PndSttTube::IsNeighboring(), PndSttTube::IsSectorLimit(), PndTrkNeighboringMap::PrintIndivisibleMap(), Refresh(), PndTrkNeighboringMap::SetOwnerValue(), and stthitlist.

Referenced by Exec().

1030  {
1031  TObjArray limits;
1032  TObjArray sector[6];
1033  TObjArray *neighborings = NULL;
1034 
1035 
1036  // PndTrkHit *hit, hit2;
1037  // Loop over all hits and look for:
1038  // 1 - tubes limiting sectors std::vector< int > limithit
1039  // 2 - tubes with no neighborings (will not use them) std::vector< int > standalone
1040  // 3 - tubes with only 1 neighboring (will serve as seed) std::vector< int > seeds
1041  // 4 - tubes with only 2 neighborings, one of which is on std::vector< int > candseeds
1042  // the same layer and has neighboring (will be candidate
1043  // to serve as seed, if needed)
1044  // 5 - Fill the sector std::vector according to sectors std::vector< int > sector*
1045 
1046  fHitMap->SetOwnerValue(kTRUE); // CHECK
1047  for(int ihit = 0; ihit < stthitlist->GetNofHits(); ihit++) {
1048 
1049  PndTrkHit *hit = stthitlist->GetHit(ihit);
1050  int tubeID = hit->GetTubeID();
1051  PndSttTube *tube = (PndSttTube*) fTubeArray->At(tubeID);
1052  if(tube->IsSectorLimit() == kTRUE) limits.Add(hit);
1053 
1054  neighborings = new TObjArray();
1055 
1056  for(int jhit = 0; jhit < stthitlist->GetNofHits(); jhit++) {
1057  if(ihit == jhit) continue;
1058 
1059  PndTrkHit *hit2 = stthitlist->GetHit(jhit);
1060  int tubeID2 = hit2->GetTubeID();
1061 
1062  if(tube->IsNeighboring(tubeID2) == kTRUE) neighborings->Add(hit2);
1063 
1064  }
1065 
1066  // cout << "HIT: " << hit->GetHitID() << " has " << neighborings->GetEntriesFast() << " hits" << endl;
1067 // if(fDisplayOn) {
1068 // Refresh();
1069 // }
1070 
1071  fHitMap->AddNeighboringsToHit(hit, neighborings);
1072 
1073 // if(fDisplayOn) {
1074 // char goOnChar;
1075 // display->Update();
1076 // display->Modified();
1077 // cout << " go on?" << endl;
1078 // cin >> goOnChar;
1079 // }
1080  }
1081  // neighborings = NULL;
1082  // delete neighborings;
1083 
1084  if(fDisplayOn) {
1085  if(1 == 1) DrawLists();
1086  if(1 == 2) DrawNeighborings();
1087  // ================================================
1088  Refresh();
1089  char goOnChar;
1090  for(int ihit = 0; ihit < stthitlist->GetNofHits(); ihit++) {
1091  PndTrkHit *stthit = stthitlist->GetHit(ihit);
1092  TObjArray *indiv = fHitMap->GetIndivisiblesToHit(stthit);
1093  for(int jhit = 0; jhit < indiv->GetEntriesFast(); jhit++) {
1094  PndTrkHit *stthit2 = (PndTrkHit*) indiv->At(jhit);
1095  stthit2->Draw(kOrange);
1096  stthit->Draw(kOrange);
1097  }
1098  }
1099 
1100  display->Update();
1101  display->Modified();
1102  cout << " FILLHITM AP STARTING" << endl;
1103  cin >> goOnChar;
1104  display->Update();
1105  display->Modified();
1106  // ================================================
1107  }
1108  cout << "PRINT INDIVISIBILE MAP" << endl;
1110 }
void AddNeighboringsToHit(PndTrkHit *hit, TObjArray *hits)
PndTrkSttHitList * stthitlist
PndTrkNeighboringMap * fHitMap
PndTrkHit * GetHit(int index)
void SetOwnerValue(Bool_t enable=kTRUE)
Bool_t IsNeighboring(int tubeID)
Definition: PndSttTube.cxx:145
TClonesArray * fTubeArray
void Draw(Color_t color)
Definition: PndTrkHit.cxx:109
Int_t GetNofHits()
Definition: PndTrkHitList.h:43
TObjArray GetIndivisiblesToHit(PndTrkHit *hit)
PndSdsMCPoint * hit
Definition: anasim.C:70
int IsSectorLimit()
Definition: PndSttTube.h:64
Int_t GetTubeID()
Definition: PndTrkHit.h:61
void PndTrkLegendreNew::FillLegendreHisto ( PndTrkCluster cluster)

Definition at line 875 of file PndTrkLegendreNew.cxx.

References conformalhitlist, PndTrkCluster::DoesContain(), DrawConfHit(), fDisplayOn, PndTrkLegendreTransform::FillLegendreHisto(), PndTrkConformalHit::GetHit(), PndTrkConformalHitList::GetHit(), PndTrkConformalHit::GetIsochrone(), PndTrkConformalHitList::GetNofHits(), PndTrkConformalHit::GetU(), PndTrkConformalHit::GetV(), hit, and legendre.

Referenced by LegendreFit(), and RePrepareLegendre().

876 {
877  // ---------------------------------------------------------------
878  // cout << "FILL LEGENDRE HISTO " << cluster->GetNofHits() << endl;
879 
880  for(int ihit = 0; ihit < conformalhitlist->GetNofHits(); ihit++) {
882  PndTrkHit *hit = chit->GetHit();
883  if(cluster->DoesContain(hit) == kFALSE) continue;
884  legendre->FillLegendreHisto(chit->GetU(), chit->GetV(), chit->GetIsochrone());
885  if(fDisplayOn) {
886  DrawConfHit(chit->GetU(), chit->GetV(), chit->GetIsochrone());
887  // cout << "conformal2: " << chit->GetU() << " " << chit->GetV() << " " << chit->GetIsochrone() << endl;
888  }
889  }
890 }
void DrawConfHit(double x, double y, double r, int marker=2)
void FillLegendreHisto(double x, double y, double radius)
PndTrkConformalHitList * conformalhitlist
PndTrkLegendreTransform * legendre
PndTrkConformalHit * GetHit(int index)
Bool_t DoesContain(PndTrkHit *hit)
PndSdsMCPoint * hit
Definition: anasim.C:70
PndTrkHit * PndTrkLegendreNew::FindMvdPixelReferenceHit ( )

Definition at line 714 of file PndTrkLegendreNew.cxx.

References fVerbose, PndTrkHitList::GetHit(), PndTrkHit::GetHitID(), PndTrkHitList::GetNofHits(), hit, PndTrkHit::IsUsed(), and mvdpixhitlist.

Referenced by FindMvdReferenceHit().

715  {
716  if(mvdpixhitlist->GetNofHits() == 0) return NULL;
717  // loop on mvd pix hits
718  int tmphitid = -1;
719  PndTrkHit *refhit = NULL;
720  for(int jhit = 0; jhit < mvdpixhitlist->GetNofHits(); jhit++) {
721  PndTrkHit *hit = mvdpixhitlist->GetHit(jhit);
722  if(hit->IsUsed()) {
723  if(fVerbose > 1) cout << "already used V" << endl;
724  continue;
725  }
726  tmphitid = jhit;
727  break;
728  }
729  if(tmphitid == -1) return NULL;
730  refhit = mvdpixhitlist->GetHit(tmphitid);
731  if(fVerbose > 1) cout << "MVD PIXEL REFERENCE HIT " << refhit->GetHitID() << endl;
732  return refhit;
733 }
int fVerbose
Definition: poormantracks.C:24
PndTrkSdsHitList * mvdpixhitlist
PndTrkHit * GetHit(int index)
Int_t GetHitID()
Definition: PndTrkHit.h:56
Bool_t IsUsed()
Definition: PndTrkHit.h:58
Int_t GetNofHits()
Definition: PndTrkHitList.h:43
PndSdsMCPoint * hit
Definition: anasim.C:70
PndTrkHit * PndTrkLegendreNew::FindMvdReferenceHit ( )

Definition at line 756 of file PndTrkLegendreNew.cxx.

References FindMvdPixelReferenceHit(), and FindMvdStripReferenceHit().

Referenced by FindReferenceHit().

757 {
758  PndTrkHit *refhit = NULL;
759  refhit = FindMvdStripReferenceHit();
760  // refhit = FindMvdPixelReferenceHit();
761  if(refhit != NULL) return refhit;
762  // refhit = FindMvdStripReferenceHit();
764  return refhit;
765 }
PndTrkHit * FindMvdPixelReferenceHit()
PndTrkHit * FindMvdStripReferenceHit()
PndTrkHit * PndTrkLegendreNew::FindMvdStripReferenceHit ( )

Definition at line 735 of file PndTrkLegendreNew.cxx.

References fVerbose, PndTrkHitList::GetHit(), PndTrkHit::GetHitID(), PndTrkHitList::GetNofHits(), hit, PndTrkHit::IsUsed(), and mvdstrhitlist.

Referenced by FindMvdReferenceHit().

736 {
737  if(mvdstrhitlist->GetNofHits() == 0) return NULL;
738  // loop on mvd str hits
739  int tmphitid = -1;
740  PndTrkHit *refhit = NULL;
741  for(int jhit = 0; jhit < mvdstrhitlist->GetNofHits(); jhit++) {
742  PndTrkHit *hit = mvdstrhitlist->GetHit(jhit);
743  if(hit->IsUsed()) {
744  if(fVerbose > 1) cout << "already used V" << endl;
745  continue;
746  }
747  tmphitid = jhit;
748  break;
749  }
750  if(tmphitid == -1) return NULL;
751  refhit = mvdstrhitlist->GetHit(tmphitid);
752  if(fVerbose > 1) cout << "MVD STRIP REFERENCE HIT " << refhit->GetHitID() << endl;
753  return refhit;
754 }
PndTrkSdsHitList * mvdstrhitlist
int fVerbose
Definition: poormantracks.C:24
PndTrkHit * GetHit(int index)
Int_t GetHitID()
Definition: PndTrkHit.h:56
Bool_t IsUsed()
Definition: PndTrkHit.h:58
Int_t GetNofHits()
Definition: PndTrkHitList.h:43
PndSdsMCPoint * hit
Definition: anasim.C:70
PndTrkHit * PndTrkLegendreNew::FindReferenceHit ( )

Definition at line 767 of file PndTrkLegendreNew.cxx.

References FindMvdReferenceHit(), and FindSttReferenceHit().

Referenced by ClusterToConformal().

768 {
769  PndTrkHit *refhit = NULL;
770  // refhit = FindMvdReferenceHit();
771  refhit = FindSttReferenceHit();
772  if(refhit != NULL) return refhit;
773  // refhit = FindSttReferenceHit();
775 
776  return refhit;
777 }
PndTrkHit * FindMvdReferenceHit()
PndTrkHit * FindSttReferenceHit(int isec=-1)
PndTrkHit * PndTrkLegendreNew::FindReferenceHit ( PndTrkCluster cluster)

Definition at line 779 of file PndTrkLegendreNew.cxx.

References Double_t, fVerbose, PndTrkHit::GetDetectorID(), PndTrkCluster::GetHit(), PndTrkHit::GetHitID(), PndTrkHit::GetIsochrone(), PndTrkCluster::GetNofHits(), hit, PndTrkHit::IsStt(), and PndTrkHit::IsSttParallel().

779  {
780  int ntot = cluster->GetNofHits();
781  // cout << "FIND REFERENCE HIT " << ntot << endl;
782 
783  if(ntot == 0) return NULL;
784 
785 
786  int tmphitid = -1;
787  Double_t tmpiso = 1.;
788  PndTrkHit *refhit = NULL;
789  for(int jhit = 0; jhit < ntot; jhit++) {
790  PndTrkHit *hit = cluster->GetHit(jhit);
791 
792  // if(hit->IsUsed()) {
793  // if(fVerbose > 1) cout << "STT hit " << jhit << "already used " << endl;
794  // continue; }
795 
796  if(hit->IsStt()) {
797  if(hit->IsSttParallel()) {
798  if(hit->GetIsochrone() < tmpiso) {
799  tmphitid = jhit;
800  tmpiso = hit->GetIsochrone();
801  refhit = hit;
802  }
803  }
804  }
805  else {
806  tmphitid = jhit;
807  break;
808  }
809  }
810 
811  if(tmphitid == -1) return NULL;
812  refhit = cluster->GetHit(tmphitid);
813  if(fVerbose > 1) cout << "REFERENCE HIT " << refhit->GetHitID() << " " << refhit->GetDetectorID() << endl;
814  return refhit;
815 
816 
817 }
int fVerbose
Definition: poormantracks.C:24
PndTrkHit * GetHit(int index)
Int_t GetHitID()
Definition: PndTrkHit.h:56
Bool_t IsSttParallel()
Definition: PndTrkHit.h:70
Int_t GetDetectorID()
Definition: PndTrkHit.h:57
Double_t
Bool_t IsStt()
Definition: PndTrkHit.h:72
PndSdsMCPoint * hit
Definition: anasim.C:70
Double_t GetIsochrone()
Definition: PndTrkHit.h:63
Int_t GetNofHits()
Definition: PndTrkCluster.h:52
PndTrkHit * PndTrkLegendreNew::FindSttReferenceHit ( int  isec = -1)

Definition at line 680 of file PndTrkLegendreNew.cxx.

References Double_t, fVerbose, PndTrkHitList::GetHit(), PndTrkSttHitList::GetHitFromSector(), PndTrkHit::GetIsochrone(), PndTrkHitList::GetNofHits(), PndTrkSttHitList::GetNofHitsInSector(), hit, PndTrkHit::IsSttSkew(), PndTrkHit::IsUsed(), and stthitlist.

Referenced by FindReferenceHit().

680  {
681  int ntot = 0;
682  if(isec == -1) ntot = stthitlist->GetNofHits();
683  else ntot = stthitlist->GetNofHitsInSector(isec);
684 
685  if(ntot == 0) return NULL;
686 
687 
688  int tmphitid = -1;
689  Double_t tmpiso = 1.;
690  PndTrkHit *refhit = NULL;
691  for(int jhit = 0; jhit < ntot; jhit++) {
692  PndTrkHit *hit = NULL;
693  if(isec == -1) hit = stthitlist->GetHit(jhit);
694  else hit = stthitlist->GetHitFromSector(jhit, isec);
695 
696  if(hit->IsUsed()) {
697  if(fVerbose > 1) cout << "STT hit " << jhit << "already used " << endl;
698  continue; }
699  if(hit->IsSttSkew()) continue;
700  if(hit->GetIsochrone() < tmpiso) {
701  tmphitid = jhit;
702  tmpiso = hit->GetIsochrone();
703  refhit = hit;
704  }
705  }
706  if(tmphitid == -1) return NULL;
707 
708  // PndTrkHit *refhit = &thishitlist[tmphitid];
709  if(fVerbose > 1) cout << "STT REFERENCE HIT " << tmphitid << " " << refhit->GetIsochrone() << endl;
710  return refhit;
711 
712 }
int fVerbose
Definition: poormantracks.C:24
PndTrkSttHitList * stthitlist
int GetNofHitsInSector(int isec)
PndTrkHit * GetHitFromSector(int ihit, int isec)
PndTrkHit * GetHit(int index)
int isec
Definition: f_Init.h:19
Double_t
Bool_t IsUsed()
Definition: PndTrkHit.h:58
Int_t GetNofHits()
Definition: PndTrkHitList.h:43
PndSdsMCPoint * hit
Definition: anasim.C:70
Double_t GetIsochrone()
Definition: PndTrkHit.h:63
Bool_t IsSttSkew()
Definition: PndTrkHit.h:71
void PndTrkLegendreNew::FromConformalToRealTrack ( double  fitm,
double  fitp,
double &  x0,
double &  y0,
double &  R 
)

Definition at line 991 of file PndTrkLegendreNew.cxx.

References conformalhitlist, CAMath::Cos(), Double_t, PndTrkConformalHitList::GetConformalTransform(), PndTrkConformalTransform::GetRotation(), PndTrkConformalTransform::GetTranslation(), CAMath::Sin(), and sqrt().

Referenced by AnalyticalFit(), AnalyticalFit2(), Exec(), and LegendreFit().

991  {
992  // CHECK if this needs to be kept --> change xc0 to xc etc
993  // center and radius
994  Double_t xcrot0, ycrot0;
995  ycrot0 = 1 / (2 * fitp);
996  xcrot0 = - fitm * ycrot0;
997  R = sqrt(xcrot0 * xcrot0 + ycrot0 * ycrot0);
998  // re-rotation and re-traslation of xc and yc
999  // rotation
1002  // traslation
1005 }
Double_t x0
Definition: checkhelixhit.C:70
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
static T Sin(const T &x)
Definition: PndCAMath.h:42
PndTrkConformalHitList * conformalhitlist
static T Cos(const T &x)
Definition: PndCAMath.h:43
Double_t
Double_t y0
Definition: checkhelixhit.C:71
PndTrkConformalTransform * GetConformalTransform()
Double_t R
Definition: checkhelixhit.C:61
void PndTrkLegendreNew::FromRealToConformalTrack ( double  x0,
double  y0,
double  R,
double &  fitm,
double &  fitp 
)

|x| |c -s||xr| —> |xr| | c s||x| |y| |s c||yr| |yr| |-s c||y|

Definition at line 1007 of file PndTrkLegendreNew.cxx.

References conformalhitlist, CAMath::Cos(), Double_t, PndTrkConformalHitList::GetConformalTransform(), PndTrkConformalTransform::GetRotation(), PndTrkConformalTransform::GetTranslation(), and CAMath::Sin().

Referenced by CreateClusterAroundTrack(), and Exec().

1007  {
1008  // CHECK if this needs to be kept --> change xc0 to xc etc
1009  Double_t xcrot0, ycrot0;
1010 
1011  // traslation
1014 
1020  // rotation
1023 
1024  // yr = 1/ (2 p) --> p = 1 / (2 yr)
1025  // xr = - m / (2 p) --> m = - 2 p xr
1026  fitp = 1 / (2 * ycrot0);
1027  fitm = - 2 * fitp * xcrot0;
1028 }
Double_t x0
Definition: checkhelixhit.C:70
static T Sin(const T &x)
Definition: PndCAMath.h:42
PndTrkConformalHitList * conformalhitlist
static T Cos(const T &x)
Definition: PndCAMath.h:43
Double_t
Double_t y0
Definition: checkhelixhit.C:71
PndTrkConformalTransform * GetConformalTransform()
InitStatus PndTrkLegendreNew::Init ( )
virtual

Virtual method Init

Definition at line 81 of file PndTrkLegendreNew.cxx.

References conform, display, fDisplayOn, fEventCounter, fFitter, fHitMap, PndSttMapCreator::FillTubeArray(), fMapper, fMvdPix_ConfDistLimit, fMvdPix_RealDistLimit, fMvdPixelBranch, fMvdPixelHitArray, fMvdStr_ConfDistLimit, fMvdStr_RealDistLimit, fMvdStripBranch, fMvdStripHitArray, fPersistence, fSecondary, fStt_ConfDistLimit, fStt_RealDistLimit, fSttBranch, fSttHitArray, fSttParameters, fTimer, fTrackArray, fTrackCandArray, fTubeArray, fVerbose, legendre, PndTrkLegendreTransform::SetUpLegendreHisto(), PndTrkLegendreTransform::SetUpZoomHisto(), and tools.

81  {
82 
83  fEventCounter = 0;
84 
85  fMvdPix_RealDistLimit = 0.5; // CHECK limits
86  fMvdStr_RealDistLimit = 0.5; // CHECK limits
87  fStt_RealDistLimit = 1.5 * 0.5; // CHECK limits
88  fMvdPix_ConfDistLimit = 0.003; // CHECK limits
89  fMvdStr_ConfDistLimit = 0.003; // CHECK limits
90  fStt_ConfDistLimit = 0.001; // CHECK limits
91  if(fSecondary) {
92  fMvdPix_RealDistLimit = 1.; // CHECK limits
93  fMvdStr_RealDistLimit = 1.; // CHECK limits
94  fMvdPix_ConfDistLimit = 0.007; // CHECK limits
95  fMvdStr_ConfDistLimit = 0.007; // CHECK limits
96  }
97 
98 
99  // Get RootManager
100  FairRootManager* ioman = FairRootManager::Instance();
101  if ( ! ioman ) {
102  cout << "-E- PndTrkLegendreNew::Init: "
103  << "RootManager not instantiated, return!" << endl;
104  return kFATAL;
105  }
106 
107  // -- HITS -------------------------------------------------
108  //
109  // STT
110  fSttHitArray = (TClonesArray*) ioman->GetObject(fSttBranch);
111  if ( ! fSttHitArray ) {
112  cout << "-W- PndTrkLegendreNew::Init: "
113  << "No STTHit array, return!" << endl;
114  return kERROR;
115  }
116  //
117  // MVD PIXEL
118  fMvdPixelHitArray = (TClonesArray*) ioman->GetObject(fMvdPixelBranch);
119  if ( !fMvdPixelHitArray){
120  std::cout << "-W- PndTrkLegendreNew::Init: " << "No MVD Pixel hitArray, return!" << std::endl;
121  return kERROR;
122  }
123  //
124  // MVD STRIP
125  fMvdStripHitArray = (TClonesArray*) ioman->GetObject(fMvdStripBranch);
126  if ( !fMvdStripHitArray){
127  std::cout << "-W- PndTrkLegendreNew::Init: " << "No MVD Strip hitArray, return!" << std::endl;
128  return kERROR;
129  }
130 
131  fTrackArray = new TClonesArray("PndTrack");
132  fTrackCandArray = new TClonesArray("PndTrackCand");
133  ioman->Register("Track", "pr", fTrackArray, fPersistence); // CHECK
134  ioman->Register("TrackCand", "pr", fTrackCandArray, fPersistence); // CHECK
135 
136 
137  // ---------------------------------------- maps of STT tubes
140  // ---------------------------------------------------- end map
141 
142  if(fDisplayOn) {
143  display = new TCanvas("display", "display", 0, 0, 800, 800); // CHECK
144  display->Divide(2, 2);
145  }
146 
148 
149  if(fSecondary == kFALSE) legendre->SetUpLegendreHisto();
150  // else it will be set up cluster by cluster
152 
154 
155  tools = new PndTrkTools();
158  fTimer = new TStopwatch();
159 
160  return kSUCCESS;
161 
162 }
int fVerbose
Definition: poormantracks.C:24
void SetUpZoomHisto(double theta, double r, double deltatheta, double deltar)
PndTrkFitter * fFitter
PndTrkNeighboringMap * fHitMap
Double_t fMvdStr_RealDistLimit
PndGeoSttPar * fSttParameters
PndTrkLegendreTransform * legendre
TClonesArray * fTrackArray
TClonesArray * fSttHitArray
Double_t fMvdStr_ConfDistLimit
PndTrkConformalTransform * conform
TClonesArray * fMvdPixelHitArray
PndSttMapCreator * fMapper
TClonesArray * fTubeArray
TClonesArray * fTrackCandArray
TClonesArray * FillTubeArray()
Double_t fMvdPix_RealDistLimit
TClonesArray * fMvdStripHitArray
Double_t fMvdPix_ConfDistLimit
void PndTrkLegendreNew::Initialize ( )

Definition at line 174 of file PndTrkLegendreNew.cxx.

References PndTrkHitList::AddTCA(), fFoundPeaks, fInitDone, fMvdPixelBranch, fMvdPixelHitArray, fMvdStripBranch, fMvdStripHitArray, fSttBranch, fSttHitArray, fTubeArray, fUseMVDPix, fUseMVDStr, fUseSTT, PndTrkSttHitList::Instanciate(), PndTrkSdsHitList::InstanciatePixel(), PndTrkSdsHitList::InstanciateStrip(), MVDPIXEL, mvdpixhitlist, mvdstrhitlist, MVDSTRIP, and stthitlist.

Referenced by Exec().

174  {
175 
179 
180  if(fUseSTT) {
181  stthitlist->AddTCA(FairRootManager::Instance()->GetBranchId(fSttBranch), fSttHitArray);
183  }
184 
185  if(fUseMVDPix) {
186  mvdpixhitlist->AddTCA(FairRootManager::Instance()->GetBranchId(fMvdPixelBranch), fMvdPixelHitArray);
188  }
189 
190  if(fUseMVDStr) {
191  mvdstrhitlist->AddTCA(FairRootManager::Instance()->GetBranchId(fMvdStripBranch), fMvdStripHitArray);
193  }
194 
195  // conformalhitlist = new PndTrkConformalHitList();
196  fFoundPeaks.clear();
197 
198  fInitDone = kTRUE;
199  // stthitlist->PrintSectors();
200 }
PndTrkSdsHitList * mvdstrhitlist
std::vector< std::pair< double, double > > fFoundPeaks
void AddTCA(Int_t detID, TClonesArray *array)
PndTrkSttHitList * stthitlist
PndTrkSttHitList * Instanciate()
PndTrkSdsHitList * mvdpixhitlist
TClonesArray * fSttHitArray
#define MVDSTRIP
TClonesArray * fMvdPixelHitArray
PndTrkSdsHitList * InstanciateStrip()
TClonesArray * fTubeArray
TClonesArray * fMvdStripHitArray
#define MVDPIXEL
PndTrkSdsHitList * InstanciatePixel()
void PndTrkLegendreNew::IntersectionFinder ( PndTrkHit hit,
double  xc,
double  yc,
double  R 
)

Definition at line 1835 of file PndTrkLegendreNew.cxx.

References Double_t, fabs(), fTubeArray, PndTrkHit::GetIsochrone(), PndSttTube::GetPosition(), PndTrkHit::GetTubeID(), m, point, R, PndTrkHit::SetPosition(), sqrt(), and vec.

Referenced by AnalyticalFit(), and AnalyticalFit2().

1835  {
1836 
1837  TVector2 vec(xc, yc);
1838 
1839  // tubeID CHECK added
1840  Int_t tubeID = hit->GetTubeID();
1841  PndSttTube *tube = (PndSttTube*) fTubeArray->At(tubeID);
1842 
1843  // [xp, yp] point = coordinates xy of the centre of the firing tube
1844  TVector2 point(tube->GetPosition().X(), tube->GetPosition().Y());
1845  double radius = hit->GetIsochrone();
1846 
1847  // the coordinates of the point are taken from the intersection
1848  // between the circumference from the drift time and the R radius of
1849  // curvature. -------------------------------------------------------
1850  // 2. find the intersection between the little circle and the line // R
1851  // 2.a
1852  // find the line passing throught [xc, yc] (centre of curvature) and [xp, yp] (first wire)
1853  // y = mx + q
1854  Double_t m = (point.Y() - vec.Y())/(point.X() - vec.X());
1855  Double_t q = point.Y() - m*point.X();
1856 
1857  Double_t x1 = 0, y1 = 0,
1858  x2 = 0, y2 = 0,
1859  xb1 = 0, yb1 = 0,
1860  xb2 = 0, yb2 = 0;
1861 
1862  // CHECK the vertical track
1863  if(fabs(point.X() - vec.X()) < 1e-6) {
1864 
1865  // 2.b
1866  // intersection little circle and line --> [x1, y1]
1867  // + and - refer to the 2 possible intersections
1868  // +
1869  x1 = point.X();
1870  y1 = point.Y() + sqrt(radius * radius - (x1 - point.X()) * (x1 - point.X()));
1871  // -
1872  x2 = x1;
1873  y2 = point.Y() - sqrt(radius * radius - (x2 - point.X()) * (x2 - point.X()));
1874 
1875  // 2.c intersection between line and circle
1876  // +
1877  xb1 = vec.X();
1878  yb1 = vec.Y() + sqrt(R * R - (xb1 - vec.X()) * (xb1 - vec.X()));
1879  // -
1880  xb2 = xb1;
1881  yb2 = vec.Y() - sqrt(R * R - (xb2 - vec.X()) * (xb2 - vec.X()));
1882 
1883  } // END CHECK
1884  else {
1885 
1886  // 2.b
1887  // intersection little circle and line --> [x1, y1]
1888  // + and - refer to the 2 possible intersections
1889  // +
1890  x1 = (-(m*(q - point.Y()) - point.X()) + sqrt((m*(q - point.Y()) - point.X())*(m*(q - point.Y()) - point.X()) - (m*m + 1)*((q - point.Y())*(q - point.Y()) + point.X()*point.X() - radius*radius))) / (m*m + 1);
1891  y1 = m*x1 + q;
1892  // -
1893  x2 = (-(m*(q - point.Y()) - point.X()) - sqrt((m*(q - point.Y()) - point.X())*(m*(q - point.Y()) - point.X()) - (m*m + 1)*((q - point.Y())*(q - point.Y()) + point.X()*point.X() - radius*radius))) / (m*m + 1);
1894  y2 = m*x2 + q;
1895 
1896  // 2.c intersection between line and circle
1897  // +
1898  xb1 = (-(m*(q - vec.Y()) - vec.X()) + sqrt((m*(q - vec.Y()) - vec.X())*(m*(q - vec.Y()) - vec.X()) - (m*m + 1)*((q - vec.Y())*(q - vec.Y()) + vec.X()*vec.X() - R * R))) / (m*m + 1);
1899  yb1 = m*xb1 + q;
1900  // -
1901  xb2 = (-(m*(q - vec.Y()) - vec.X()) - sqrt((m*(q - vec.Y()) - vec.X())*(m*(q - vec.Y()) - vec.X()) - (m*m + 1)*((q - vec.Y())*(q - vec.Y()) + vec.X()*vec.X() - R * R))) / (m*m + 1);
1902  yb2 = m*xb2 + q;
1903  }
1904 
1905  // calculation of the distance between [xb, yb] and [xp, yp]
1906  Double_t distb1 = sqrt((yb1 - point.Y())*(yb1 - point.Y()) + (xb1 - point.X())*(xb1 - point.X()));
1907  Double_t distb2 = sqrt((yb2 - point.Y())*(yb2 - point.Y()) + (xb2 - point.X())*(xb2 - point.X()));
1908 
1909  // choice of [xb, yb]
1910  TVector2 xyb;
1911  if(distb1 > distb2) xyb.Set(xb2, yb2);
1912  else xyb.Set(xb1, yb1);
1913 
1914  // calculation of the distance between [x, y] and [xb. yb]
1915  Double_t dist1 = sqrt((xyb.Y() - y1)*(xyb.Y() - y1) + (xyb.X() - x1)*(xyb.X() - x1));
1916  Double_t dist2 = sqrt((xyb.Y() - y2)*(xyb.Y() - y2) + (xyb.X() - x2)*(xyb.X() - x2));
1917 
1918  // choice of [x, y]
1919  TVector2 *xy;
1920  if(dist1 > dist2) xy = new TVector2(x2, y2);
1921  else xy = new TVector2(x1, y1); // <========= THIS IS THE NEW POINT to be used for the fit
1922 
1923  hit->SetPosition(TVector3(xy->X(), xy->Y(), 0.0));
1924 
1925  delete xy;
1926 }
__m128 m
Definition: P4_F32vec4.h:28
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Double_t
TVector3 GetPosition()
Definition: PndSttTube.cxx:87
void SetPosition(TVector3 pos)
Definition: PndTrkHit.h:47
TClonesArray * fTubeArray
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
Double_t GetIsochrone()
Definition: PndTrkHit.h:63
Int_t GetTubeID()
Definition: PndTrkHit.h:61
Double_t R
Definition: checkhelixhit.C:61
dble_vec_t vec[12]
Definition: ranlxd.cxx:380
PndSdsMCPoint * point
Definition: anaLmdCluster.C:72
void PndTrkLegendreNew::IntersectionFinder ( PndTrkConformalHit chit,
double  fitm,
double  fitp 
)

Definition at line 1819 of file PndTrkLegendreNew.cxx.

References fabs(), PndTrkConformalHit::GetIsochrone(), PndTrkConformalHit::GetU(), PndTrkConformalHit::GetV(), PndTrkConformalHit::SetPosition(), and CAMath::Sqrt().

1819  {
1820 
1821  double xi1 = chit->GetU() + fitm * chit->GetIsochrone()/ TMath::Sqrt(fitm * fitm + 1);
1822  double yi1 = chit->GetV() - chit->GetIsochrone() / TMath::Sqrt(fitm * fitm + 1);
1823 
1824  double xi2 = chit->GetU() - fitm * chit->GetIsochrone() / TMath::Sqrt(fitm * fitm + 1);
1825  double yi2 = chit->GetV() + chit->GetIsochrone()/ TMath::Sqrt(fitm * fitm + 1);
1826 
1827  double xi = 0, yi = 0;
1828 
1829  fabs(yi1 - (fitm * xi1 + fitp)) < fabs(yi2 - (fitm * xi2 + fitp)) ? (yi = yi1, xi = xi1) : (yi = yi2, xi = xi2);
1830 
1831  chit->SetPosition(xi, yi);
1832 
1833 }
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
void SetPosition(double x, double y)
PndTrkTrack * PndTrkLegendreNew::LegendreFit ( PndTrkCluster cluster)

Definition at line 1491 of file PndTrkLegendreNew.cxx.

References display, Double_t, DrawGeometryConf(), ExtractLegendre(), PndTrkLegendreTransform::ExtractLegendreSingleLineParameters(), fDisplayOn, FillLegendreHisto(), FromConformalToRealTrack(), fUmax, fUmin, fVmax, fVmin, PndTrkCluster::GetNofHits(), legendre, R, RefreshConf(), PndTrkLegendreTransform::ResetLegendreHisto(), and track.

Referenced by Exec().

1491  {
1492 
1493  cout << "APPLY LEGENDRE =======================" << endl;
1494  cout << "nof hits " << cluster->GetNofHits() << endl;
1495 
1496  // reset the legendre histo for a new legendre fit
1498 
1499  if(fDisplayOn) {
1500  RefreshConf();
1502  }
1503 
1504  // fill legendre histo with the cluster hits
1505  FillLegendreHisto(cluster);
1506  double theta_max, r_max;
1507  // get the peak
1508  int maxpeak = ExtractLegendre(1, theta_max, r_max); // CHECK mode??
1509 
1510  if(maxpeak < 4) return NULL; // CHECK
1511  // from theta/r to line parameters in CONFORMAL plane
1512  double fitm, fitq;
1514  if(fDisplayOn) {
1515  display->cd(2);
1516  TLine *line = new TLine(-10.07, fitq + fitm * (-10.07), 10.07, fitq + fitm * (10.07));
1517  line->Draw("SAME");
1518  }
1519 
1520  // from line parameters to center/radius in REAL plane
1521  Double_t xc, yc, R;
1522  FromConformalToRealTrack(fitm, fitq, xc, yc, R);
1523  cout << "\033[1;33m MAXPEAK " << maxpeak << " XR, YC, R: " << xc << " " << yc << " " << R << "\033[0m" << endl;
1524  // cout << "start hit " << ihit << " " << hit->GetHitID() << " " << endsecid << " " << endlayid << endl;
1525 
1526  // create a track from the cluster
1527  PndTrkTrack *track = new PndTrkTrack(cluster, xc, yc, R);
1528 
1529  return track;
1530 }
void FillLegendreHisto(PndTrkCluster *cluster)
void FromConformalToRealTrack(double fitm, double fitp, double &x0, double &y0, double &R)
PndTrkLegendreTransform * legendre
Double_t
PndMCTrack * track
Definition: anaLmdCluster.C:89
Int_t ExtractLegendre(Int_t mode, double &theta_max, double &r_max)
void ExtractLegendreSingleLineParameters(double &slope, double &intercept)
void DrawGeometryConf(double x1, double x2, double y1, double y2)
Int_t GetNofHits()
Definition: PndTrkCluster.h:52
Double_t R
Definition: checkhelixhit.C:61
void PndTrkLegendreNew::LightCluster ( PndTrkCluster cluster)
void PndTrkLegendreNew::Refresh ( )

Definition at line 459 of file PndTrkLegendreNew.cxx.

References DrawGeometry(), DrawHits(), fVerbose, mvdpixhitlist, mvdstrhitlist, and stthitlist.

Referenced by AnalyticalFit(), AnalyticalFit2(), DrawLists(), DrawNeighboringsToHit(), Exec(), and FillHitMap().

459  {
460  // CHECK
461  char goOnChar;
462  // cout << "Refresh?" << endl;
463  // cin >> goOnChar;
464  // cout << "REFRESHING" << endl;
465  DrawGeometry();
466  if(fVerbose) cout << "Refresh stt" << endl;
468  if(fVerbose) cout << "Refresh pixel" << endl;
470  if(fVerbose) cout << "Refresh strip" << endl;
472  if(fVerbose) cout << "Refresh stop" << endl;
473 
474 }
PndTrkSdsHitList * mvdstrhitlist
int fVerbose
Definition: poormantracks.C:24
void DrawHits(PndTrkHitList *hitlist)
PndTrkSttHitList * stthitlist
PndTrkSdsHitList * mvdpixhitlist
void PndTrkLegendreNew::RefreshConf ( )

Definition at line 483 of file PndTrkLegendreNew.cxx.

Referenced by Exec(), LegendreFit(), and RePrepareLegendre().

483  { // CHECK delete
484  // CHECK
485  char goOnChar;
486  // cout << "RefreshConf?" << endl;
487  // cin >> goOnChar;
488  // cout << "REFRESHING CONF" << endl;
489 }
void PndTrkLegendreNew::RePrepareLegendre ( PndTrkCluster cluster)

Definition at line 892 of file PndTrkLegendreNew.cxx.

References DrawGeometryConf(), fDisplayOn, FillLegendreHisto(), fUmax, fUmin, fVmax, fVmin, legendre, RefreshConf(), and PndTrkLegendreTransform::ResetLegendreHisto().

Referenced by ApplyLegendre().

892  {
893 
894  // cout << "RESETTING LEGENDRE HISTO" << endl;
896 
897  if(fDisplayOn) {
898  RefreshConf();
900  }
901  // cout << "%%%%%%%%%%%%%%%%%%%% XY FINDE %%%%%%%%%%%%%%%%%%%%%%%%%%" << endl;
902  FillLegendreHisto(cluster);
903 }
void FillLegendreHisto(PndTrkCluster *cluster)
PndTrkLegendreTransform * legendre
void DrawGeometryConf(double x1, double x2, double y1, double y2)
void PndTrkLegendreNew::Reset ( )

Definition at line 427 of file PndTrkLegendreNew.cxx.

References display, fDisplayOn, fEventCounter, fInitDone, fTime, fTimer, fVerbose, mvdpixhitlist, mvdstrhitlist, and stthitlist.

Referenced by Exec().

428 {
429 
430  if(fDisplayOn) {
431  char goOnChar;
432  display->Update();
433  display->Modified();
434  cout << "Finish? ";
435  cin >> goOnChar;
436  cout << "FINISH" << endl;
437  }
438 
439  if(fInitDone) {
440  if(stthitlist) delete stthitlist;
441  if(mvdpixhitlist) delete mvdpixhitlist;
442  if(mvdstrhitlist) delete mvdstrhitlist;
443  if(fTimer) {
444  fTimer->Stop();
445  fTime += fTimer->RealTime();
446 
447  if(fVerbose > 0) cerr << fEventCounter << " Real time " << fTime << " s" << endl;
448  }
449  }
450 
451  fInitDone = kFALSE;
452 }
PndTrkSdsHitList * mvdstrhitlist
int fVerbose
Definition: poormantracks.C:24
PndTrkSttHitList * stthitlist
PndTrkSdsHitList * mvdpixhitlist
void PndTrkLegendreNew::SearchSecondaryTracks ( )
inline

Definition at line 95 of file PndTrkLegendreNew.h.

References fSecondary.

95 { fSecondary = kTRUE; }
void PndTrkLegendreNew::SetParContainers ( )

Definition at line 166 of file PndTrkLegendreNew.cxx.

References fSttParameters, and rtdb.

166  {
167  FairRuntimeDb* rtdb = FairRunAna::Instance()->GetRuntimeDb();
168  fSttParameters = (PndGeoSttPar*) rtdb->getContainer("PndGeoSttPar");
169 }
PndGeoSttPar * fSttParameters
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
void PndTrkLegendreNew::SwitchOnDisplay ( )
inline

Definition at line 61 of file PndTrkLegendreNew.h.

References fDisplayOn.

61 { fDisplayOn = kTRUE; }

Member Data Documentation

PndTrkConformalTransform* PndTrkLegendreNew::conform
private
PndTrkConformalHitList* PndTrkLegendreNew::conformalhitlist
private
TCanvas* PndTrkLegendreNew::display
private
double PndTrkLegendreNew::fDeltaThetaRad
private

Definition at line 156 of file PndTrkLegendreNew.h.

Bool_t PndTrkLegendreNew::fDisplayOn
private
Int_t PndTrkLegendreNew::fEventCounter
private

Definition at line 147 of file PndTrkLegendreNew.h.

Referenced by Exec(), Init(), and Reset().

PndTrkFitter* PndTrkLegendreNew::fFitter
private

Definition at line 174 of file PndTrkLegendreNew.h.

Referenced by AnalyticalFit(), AnalyticalFit2(), and Init().

std::vector< std::pair<double, double> > PndTrkLegendreNew::fFoundPeaks
private

Definition at line 171 of file PndTrkLegendreNew.h.

Referenced by ExtractLegendre(), and Initialize().

PndTrkNeighboringMap* PndTrkLegendreNew::fHitMap
private
Bool_t PndTrkLegendreNew::fInitDone
private

Definition at line 159 of file PndTrkLegendreNew.h.

Referenced by Initialize(), and Reset().

PndSttMapCreator* PndTrkLegendreNew::fMapper
private

Definition at line 145 of file PndTrkLegendreNew.h.

Referenced by Init().

Double_t PndTrkLegendreNew::fMvdPix_ConfDistLimit
private

Definition at line 169 of file PndTrkLegendreNew.h.

Referenced by Init().

Double_t PndTrkLegendreNew::fMvdPix_RealDistLimit
private

Definition at line 169 of file PndTrkLegendreNew.h.

Referenced by Init().

char PndTrkLegendreNew::fMvdPixelBranch[200]
private

Definition at line 141 of file PndTrkLegendreNew.h.

Referenced by Init(), Initialize(), and PndTrkLegendreNew().

TClonesArray* PndTrkLegendreNew::fMvdPixelHitArray
private

Input array of MvdPixelHitArray

Definition at line 131 of file PndTrkLegendreNew.h.

Referenced by Exec(), Init(), and Initialize().

Double_t PndTrkLegendreNew::fMvdStr_ConfDistLimit
private

Definition at line 169 of file PndTrkLegendreNew.h.

Referenced by Init().

Double_t PndTrkLegendreNew::fMvdStr_RealDistLimit
private

Definition at line 169 of file PndTrkLegendreNew.h.

Referenced by Init().

char PndTrkLegendreNew::fMvdStripBranch[200]
private

Definition at line 141 of file PndTrkLegendreNew.h.

Referenced by Init(), Initialize(), and PndTrkLegendreNew().

TClonesArray* PndTrkLegendreNew::fMvdStripHitArray
private

Input array of MvdStripHitArray

Definition at line 133 of file PndTrkLegendreNew.h.

Referenced by Exec(), Init(), and Initialize().

Int_t PndTrkLegendreNew::fNofHits
private

Definition at line 121 of file PndTrkLegendreNew.h.

Int_t PndTrkLegendreNew::fNofMvdPixHits
private

Definition at line 121 of file PndTrkLegendreNew.h.

Int_t PndTrkLegendreNew::fNofMvdStrHits
private

Definition at line 121 of file PndTrkLegendreNew.h.

Int_t PndTrkLegendreNew::fNofSttHits
private

Definition at line 121 of file PndTrkLegendreNew.h.

Int_t PndTrkLegendreNew::fNofTriplets
private

Definition at line 121 of file PndTrkLegendreNew.h.

Bool_t PndTrkLegendreNew::fPersistence
private

Definition at line 159 of file PndTrkLegendreNew.h.

Referenced by Init().

PndTrkHit* PndTrkLegendreNew::fRefHit
private

Definition at line 167 of file PndTrkLegendreNew.h.

Referenced by ClusterToConformal(), and FillConformalHitList().

double PndTrkLegendreNew::fRmax
private

Definition at line 177 of file PndTrkLegendreNew.h.

Referenced by ComputePlaneExtremities(), and Exec().

double PndTrkLegendreNew::fRmin
private

Definition at line 177 of file PndTrkLegendreNew.h.

Referenced by ComputePlaneExtremities(), and Exec().

Bool_t PndTrkLegendreNew::fSecondary
private

Definition at line 159 of file PndTrkLegendreNew.h.

Referenced by ClusterToConformal(), Exec(), Init(), and SearchSecondaryTracks().

Double_t PndTrkLegendreNew::fStt_ConfDistLimit
private

Definition at line 169 of file PndTrkLegendreNew.h.

Referenced by Init().

Double_t PndTrkLegendreNew::fStt_RealDistLimit
private

Definition at line 169 of file PndTrkLegendreNew.h.

Referenced by Init().

char PndTrkLegendreNew::fSttBranch[200]
private

Definition at line 141 of file PndTrkLegendreNew.h.

Referenced by Init(), Initialize(), and PndTrkLegendreNew().

TClonesArray* PndTrkLegendreNew::fSttHitArray
private

Input array of PndSttHit

Definition at line 127 of file PndTrkLegendreNew.h.

Referenced by Exec(), Init(), and Initialize().

Double_t PndTrkLegendreNew::fSttParalDistance
private

Definition at line 153 of file PndTrkLegendreNew.h.

PndGeoSttPar* PndTrkLegendreNew::fSttParameters
private

Definition at line 140 of file PndTrkLegendreNew.h.

Referenced by Init(), and SetParContainers().

TClonesArray* PndTrkLegendreNew::fSttPointArray
private

Input array of PndSttPoints

Definition at line 125 of file PndTrkLegendreNew.h.

Double_t PndTrkLegendreNew::fSttToMvdStripDistance
private

Definition at line 153 of file PndTrkLegendreNew.h.

double PndTrkLegendreNew::fThetamax
private

Definition at line 177 of file PndTrkLegendreNew.h.

Referenced by Exec().

double PndTrkLegendreNew::fThetamin
private

Definition at line 177 of file PndTrkLegendreNew.h.

Referenced by Exec().

double PndTrkLegendreNew::fTime
private

Definition at line 172 of file PndTrkLegendreNew.h.

Referenced by Reset().

TStopwatch* PndTrkLegendreNew::fTimer
private

Definition at line 173 of file PndTrkLegendreNew.h.

Referenced by Init(), and Reset().

TClonesArray* PndTrkLegendreNew::fTrackArray
private

Definition at line 135 of file PndTrkLegendreNew.h.

Referenced by Exec(), and Init().

TClonesArray * PndTrkLegendreNew::fTrackCandArray
private

Definition at line 135 of file PndTrkLegendreNew.h.

Referenced by Exec(), and Init().

TClonesArray* PndTrkLegendreNew::fTubeArray
private
double PndTrkLegendreNew::fUmax
private

Definition at line 177 of file PndTrkLegendreNew.h.

Referenced by ComputePlaneExtremities(), Exec(), LegendreFit(), and RePrepareLegendre().

double PndTrkLegendreNew::fUmin
private

Definition at line 177 of file PndTrkLegendreNew.h.

Referenced by ComputePlaneExtremities(), Exec(), LegendreFit(), and RePrepareLegendre().

Bool_t PndTrkLegendreNew::fUseMVDPix
private

Definition at line 159 of file PndTrkLegendreNew.h.

Referenced by Initialize().

Bool_t PndTrkLegendreNew::fUseMVDStr
private

Definition at line 159 of file PndTrkLegendreNew.h.

Referenced by Initialize().

Bool_t PndTrkLegendreNew::fUseSTT
private

Definition at line 159 of file PndTrkLegendreNew.h.

Referenced by Initialize().

double PndTrkLegendreNew::fVmax
private

Definition at line 177 of file PndTrkLegendreNew.h.

Referenced by ComputePlaneExtremities(), Exec(), LegendreFit(), and RePrepareLegendre().

double PndTrkLegendreNew::fVmin
private

Definition at line 177 of file PndTrkLegendreNew.h.

Referenced by ComputePlaneExtremities(), Exec(), LegendreFit(), and RePrepareLegendre().

TH2F* PndTrkLegendreNew::huv
private

Definition at line 183 of file PndTrkLegendreNew.h.

Referenced by DrawGeometryConf().

TH2F* PndTrkLegendreNew::hxy
private

Definition at line 181 of file PndTrkLegendreNew.h.

Referenced by DrawGeometry().

TH2F * PndTrkLegendreNew::hxz
private

Definition at line 181 of file PndTrkLegendreNew.h.

TH2F * PndTrkLegendreNew::hzphi
private

Definition at line 181 of file PndTrkLegendreNew.h.

PndTrkLegendreTransform* PndTrkLegendreNew::legendre
private
PndTrkSdsHitList* PndTrkLegendreNew::mvdpixhitlist
private

Definition at line 151 of file PndTrkLegendreNew.h.

Referenced by FindMvdPixelReferenceHit(), Initialize(), Refresh(), and Reset().

PndTrkSdsHitList* PndTrkLegendreNew::mvdstrhitlist
private

Definition at line 152 of file PndTrkLegendreNew.h.

Referenced by FindMvdStripReferenceHit(), Initialize(), Refresh(), and Reset().

PndTrkSttHitList* PndTrkLegendreNew::stthitlist
private
PndTrkTools* PndTrkLegendreNew::tools
private

Definition at line 165 of file PndTrkLegendreNew.h.

Referenced by Init().


The documentation for this class was generated from the following files: