BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
ZHelix Class Reference

#include <ZHelix.h>

Inheritance diagram for ZHelix:

Public Member Functions

 ZHelix ()
 ZHelix (Double_t Azim, Double_t QovR, Double_t QxDh, Double_t refx, Double_t refy, Double_t refz, Double_t TDip, Double_t phii, Double_t phio, Float_t Chi2, Int_t NDoF, EZHelixRangeType RangeType=kBesHelixPhi, Double_t RangeMin=0, Double_t RangeMax=2 *TMath::Pi())
virtual ~ZHelix ()
void Phi2XYZ (Double_t phi, Double_t &x, Double_t &y, Double_t &z)
void Phi2ZR (Double_t phi, Double_t &z, Double_t &r)
void SetRange (EZHelixRangeType RangeType, Double_t RangeMin, Double_t RangeMax)
void SetTrackType (TrackType tt)
virtual void SetPoints (Option_t *option="3D")
Double_t X2Phi (Double_t x)
Double_t Y2Phi (Double_t y)
Double_t Z2Phi (Double_t z)
Double_t R2Phi (Double_t r)
Double_t Phi2S (Double_t phi)
virtual void Print (Option_t *option="") const
virtual void Draw (Option_t *option="3D")
virtual void Paint (Option_t *option="3D")
virtual Int_t SetNextPoint (Double_t x, Double_t y, Double_t z)
virtual void SetPoint (Int_t point, Double_t x, Double_t y, Double_t z)
virtual void Delete (Option_t *option)
virtual void DrawClass ()
virtual void DrawClone (Option_t *option)
virtual void SetDrawOption (Option_t *option)
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 ZHelix ()
 ZHelix (Double_t Azim, Double_t QovR, Double_t QxDh, Double_t refx, Double_t refy, Double_t refz, Double_t TDip, Double_t phii, Double_t phio, Float_t Chi2, Int_t NDoF, EZHelixRangeType RangeType=kBesHelixPhi, Double_t RangeMin=0, Double_t RangeMax=2 *TMath::Pi())
virtual ~ZHelix ()
void Phi2XYZ (Double_t phi, Double_t &x, Double_t &y, Double_t &z)
void Phi2ZR (Double_t phi, Double_t &z, Double_t &r)
void SetRange (EZHelixRangeType RangeType, Double_t RangeMin, Double_t RangeMax)
void SetTrackType (TrackType tt)
virtual void SetPoints (Option_t *option="3D")
Double_t X2Phi (Double_t x)
Double_t Y2Phi (Double_t y)
Double_t Z2Phi (Double_t z)
Double_t R2Phi (Double_t r)
Double_t Phi2S (Double_t phi)
virtual void Print (Option_t *option="") const
virtual void Draw (Option_t *option="3D")
virtual void Paint (Option_t *option="3D")
virtual Int_t SetNextPoint (Double_t x, Double_t y, Double_t z)
virtual void SetPoint (Int_t point, Double_t x, Double_t y, Double_t z)
virtual void Delete (Option_t *option)
virtual void DrawClass ()
virtual void DrawClone (Option_t *option)
virtual void SetDrawOption (Option_t *option)
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 ZHelix ()
 ZHelix (Double_t Azim, Double_t QovR, Double_t QxDh, Double_t refx, Double_t refy, Double_t refz, Double_t TDip, Double_t phii, Double_t phio, Float_t Chi2, Int_t NDoF, EZHelixRangeType RangeType=kBesHelixPhi, Double_t RangeMin=0, Double_t RangeMax=2 *TMath::Pi())
virtual ~ZHelix ()
void Phi2XYZ (Double_t phi, Double_t &x, Double_t &y, Double_t &z)
void Phi2ZR (Double_t phi, Double_t &z, Double_t &r)
void SetRange (EZHelixRangeType RangeType, Double_t RangeMin, Double_t RangeMax)
void SetTrackType (TrackType tt)
virtual void SetPoints (Option_t *option="3D")
Double_t X2Phi (Double_t x)
Double_t Y2Phi (Double_t y)
Double_t Z2Phi (Double_t z)
Double_t R2Phi (Double_t r)
Double_t Phi2S (Double_t phi)
virtual void Print (Option_t *option="") const
virtual void Draw (Option_t *option="3D")
virtual void Paint (Option_t *option="3D")
virtual Int_t SetNextPoint (Double_t x, Double_t y, Double_t z)
virtual void SetPoint (Int_t point, Double_t x, Double_t y, Double_t z)
virtual void Delete (Option_t *option)
virtual void DrawClass ()
virtual void DrawClone (Option_t *option)
virtual void SetDrawOption (Option_t *option)
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)

Protected Attributes

TrackType fTrackType
Double_t fAzim
Double_t fQovR
Double_t fQxDh
Double_t fTDip
Double_t fRefX
Double_t fRefY
Double_t fRefZ
Double_t fRange [2]
EZHelixRangeType fRType
Float_t fChi2
Int_t fNDoF
Double_t fSinAzim
Double_t fCosAzim
Int_t fRSign
Double_t fPhiI
 sign of radius
Double_t fPhiO
Bool_t fEnable

Detailed Description

Constructor & Destructor Documentation

◆ ZHelix() [1/6]

ZHelix::ZHelix ( )

◆ ZHelix() [2/6]

ZHelix::ZHelix ( Double_t Azim,
Double_t QovR,
Double_t QxDh,
Double_t refx,
Double_t refy,
Double_t refz,
Double_t TDip,
Double_t phii,
Double_t phio,
Float_t Chi2,
Int_t NDoF,
EZHelixRangeType RangeType = kBesHelixPhi,
Double_t RangeMin = 0,
Double_t RangeMax = 2 * TMath::Pi() )

Definition at line 53 of file ZHelix.cxx.

56 : TPolyLine3D() {
57 //
58 // ZHelix normal constructor
59 if ( gDebug ) cout << "ZHelix normal ctor called" << endl;
60
61 fAzim = Azim;
62 fSinAzim = TMath::Sin( Azim );
63 fCosAzim = TMath::Cos( Azim );
64 fQovR = QovR;
65 fQxDh = QxDh;
66 fRefX = refx;
67 fRefY = refy;
68 fRefZ = refz;
69 fTDip = TDip;
70 fPhiI = phii;
71 fPhiO = phio;
72 fChi2 = Chi2;
73 fNDoF = NDoF;
74 fRType = RangeType;
75 fEnable = kTRUE;
76
77 fRSign = 0;
78 // fSegment = 1.;
79 SetRange( RangeType, RangeMin, RangeMax );
80}
void SetRange(EZHelixRangeType RangeType, Double_t RangeMin, Double_t RangeMax)
Definition ZHelix.cxx:92

◆ ~ZHelix() [1/3]

ZHelix::~ZHelix ( )
virtual

Definition at line 84 of file ZHelix.cxx.

84 {
85 //
86 // ZHelix standard destructor
87 if ( gDebug ) { cout << "ZHelix dtor called" << endl; }
88}

◆ ZHelix() [3/6]

ZHelix::ZHelix ( )

◆ ZHelix() [4/6]

ZHelix::ZHelix ( Double_t Azim,
Double_t QovR,
Double_t QxDh,
Double_t refx,
Double_t refy,
Double_t refz,
Double_t TDip,
Double_t phii,
Double_t phio,
Float_t Chi2,
Int_t NDoF,
EZHelixRangeType RangeType = kBesHelixPhi,
Double_t RangeMin = 0,
Double_t RangeMax = 2 *TMath::Pi() )

◆ ~ZHelix() [2/3]

virtual ZHelix::~ZHelix ( )
virtual

◆ ZHelix() [5/6]

ZHelix::ZHelix ( )

◆ ZHelix() [6/6]

ZHelix::ZHelix ( Double_t Azim,
Double_t QovR,
Double_t QxDh,
Double_t refx,
Double_t refy,
Double_t refz,
Double_t TDip,
Double_t phii,
Double_t phio,
Float_t Chi2,
Int_t NDoF,
EZHelixRangeType RangeType = kBesHelixPhi,
Double_t RangeMin = 0,
Double_t RangeMax = 2 *TMath::Pi() )

◆ ~ZHelix() [3/3]

virtual ZHelix::~ZHelix ( )
virtual

Member Function Documentation

◆ Delete() [1/3]

virtual void ZHelix::Delete ( Option_t * option)
inlinevirtual

Definition at line 80 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

80{ TObject::Delete( option ); }

◆ Delete() [2/3]

virtual void ZHelix::Delete ( Option_t * option)
inlinevirtual

Definition at line 80 of file InstallArea/x86_64-el9-gcc13-dbg/include/BesVisLib/ZHelix.h.

80{ TObject::Delete( option ); }

◆ Delete() [3/3]

virtual void ZHelix::Delete ( Option_t * option)
inlinevirtual

Definition at line 80 of file InstallArea/x86_64-el9-gcc13-opt/include/BesVisLib/ZHelix.h.

80{ TObject::Delete( option ); }

◆ Draw() [1/3]

void ZHelix::Draw ( Option_t * option = "3D")
virtual

Definition at line 370 of file ZHelix.cxx.

370 {
371 //
372 // Draw this helix with its current attributes.
373 AppendPad( option );
374}

◆ Draw() [2/3]

virtual void ZHelix::Draw ( Option_t * option = "3D")
virtual

◆ Draw() [3/3]

virtual void ZHelix::Draw ( Option_t * option = "3D")
virtual

◆ DrawClass() [1/3]

virtual void ZHelix::DrawClass ( )
inlinevirtual

Definition at line 81 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

81{ TObject::DrawClass(); }

◆ DrawClass() [2/3]

virtual void ZHelix::DrawClass ( )
inlinevirtual

Definition at line 81 of file InstallArea/x86_64-el9-gcc13-dbg/include/BesVisLib/ZHelix.h.

81{ TObject::DrawClass(); }

◆ DrawClass() [3/3]

virtual void ZHelix::DrawClass ( )
inlinevirtual

Definition at line 81 of file InstallArea/x86_64-el9-gcc13-opt/include/BesVisLib/ZHelix.h.

81{ TObject::DrawClass(); }

◆ DrawClone() [1/3]

virtual void ZHelix::DrawClone ( Option_t * option)
inlinevirtual

Definition at line 82 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

82{ TObject::DrawClone( option ); }

◆ DrawClone() [2/3]

virtual void ZHelix::DrawClone ( Option_t * option)
inlinevirtual

Definition at line 82 of file InstallArea/x86_64-el9-gcc13-dbg/include/BesVisLib/ZHelix.h.

82{ TObject::DrawClone( option ); }

◆ DrawClone() [3/3]

virtual void ZHelix::DrawClone ( Option_t * option)
inlinevirtual

Definition at line 82 of file InstallArea/x86_64-el9-gcc13-opt/include/BesVisLib/ZHelix.h.

82{ TObject::DrawClone( option ); }

◆ ExecuteEvent() [1/3]

virtual void ZHelix::ExecuteEvent ( Int_t event,
Int_t px,
Int_t py )
inlinevirtual

Definition at line 84 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

84{ ; }

◆ ExecuteEvent() [2/3]

virtual void ZHelix::ExecuteEvent ( Int_t event,
Int_t px,
Int_t py )
inlinevirtual

◆ ExecuteEvent() [3/3]

virtual void ZHelix::ExecuteEvent ( Int_t event,
Int_t px,
Int_t py )
inlinevirtual

◆ Paint() [1/3]

void ZHelix::Paint ( Option_t * option = "3D")
virtual

Definition at line 378 of file ZHelix.cxx.

378 {
379 //
380 // Draw this helix with its current attributes
381 TString opt = option;
382 opt.ToUpper();
383
384 if ( ( ( fRange[1] < fRange[0] ) || ( fRange[1] > fRange[0] ) ) && fEnable )
385 {
386 SetPoints( option );
387 TPolyLine3D::Paint( "SAME" );
388 }
389}
virtual void SetPoints(Option_t *option="3D")
Definition ZHelix.cxx:122

◆ Paint() [2/3]

virtual void ZHelix::Paint ( Option_t * option = "3D")
virtual

◆ Paint() [3/3]

virtual void ZHelix::Paint ( Option_t * option = "3D")
virtual

◆ Phi2S() [1/3]

Double_t ZHelix::Phi2S ( Double_t phi)

Definition at line 393 of file ZHelix.cxx.

393 {
394 //
395 // calculates pathlength for phi
396
397 return -( phi - fAzim ) / fQovR;
398}

◆ Phi2S() [2/3]

Double_t ZHelix::Phi2S ( Double_t phi)

◆ Phi2S() [3/3]

Double_t ZHelix::Phi2S ( Double_t phi)

◆ Phi2XYZ() [1/3]

void ZHelix::Phi2XYZ ( Double_t phi,
Double_t & x,
Double_t & y,
Double_t & z )

Definition at line 249 of file ZHelix.cxx.

249 {
250 //
251 // Calculate XYZ for a given azimuth
252 x = fRefX - TMath::Sin( phi ) / fQovR + fSinAzim * ( 1 / fQovR + fQxDh );
253 y = fRefY + TMath::Cos( phi ) / fQovR - fCosAzim * ( 1 / fQovR + fQxDh );
254 z = fRefZ + ( fAzim - phi ) * fTDip / fQovR;
255}
Double_t x[10]

Referenced by Phi2ZR(), R2Phi(), and SetPoints().

◆ Phi2XYZ() [2/3]

void ZHelix::Phi2XYZ ( Double_t phi,
Double_t & x,
Double_t & y,
Double_t & z )

◆ Phi2XYZ() [3/3]

void ZHelix::Phi2XYZ ( Double_t phi,
Double_t & x,
Double_t & y,
Double_t & z )

◆ Phi2ZR() [1/3]

void ZHelix::Phi2ZR ( Double_t phi,
Double_t & z,
Double_t & r )

Definition at line 259 of file ZHelix.cxx.

259 {
260 //
261 // Calculate ZR for a given azimuth
262 Double_t x, y;
263 Phi2XYZ( phi, x, y, z );
264 r = TMath::Sqrt( TMath::Power( x, 2 ) + TMath::Power( y, 2 ) );
265}
void Phi2XYZ(Double_t phi, Double_t &x, Double_t &y, Double_t &z)
Definition ZHelix.cxx:249

Referenced by SetPoints().

◆ Phi2ZR() [2/3]

void ZHelix::Phi2ZR ( Double_t phi,
Double_t & z,
Double_t & r )

◆ Phi2ZR() [3/3]

void ZHelix::Phi2ZR ( Double_t phi,
Double_t & z,
Double_t & r )

◆ Print() [1/3]

void ZHelix::Print ( Option_t * option = "") const
virtual

Definition at line 345 of file ZHelix.cxx.

345 {
346 //
347 // Dump the helix attributes
348 TString opt = option;
349 opt.ToUpper();
350
351 cout << endl
352 << "Parameters of helix " << this->GetName() << ":" << endl
353 << "Azimuth = " << fAzim << endl
354 << "Q/R = " << fQovR << endl
355 << "Q*D_h = " << fQxDh << endl
356 << "Z_h = " << fRefZ << endl
357 << "cot(Dip) = " << fTDip << endl
358 << "PhiI = " << fPhiI << endl
359 << "PhiO = " << fPhiO << endl
360 << "Chi2 = " << fChi2 << endl
361 << "D.o.F. = " << fNDoF << endl
362 << "RangeType = " << fRType << endl
363 << "Range: " << fRange[0] << " -> " << fRange[1] << endl;
364 if ( opt.Contains( "ALL" ) ) TPolyLine3D::Print( "ALL" );
365 cout << endl;
366}

◆ Print() [2/3]

virtual void ZHelix::Print ( Option_t * option = "") const
virtual

◆ Print() [3/3]

virtual void ZHelix::Print ( Option_t * option = "") const
virtual

◆ R2Phi() [1/3]

Double_t ZHelix::R2Phi ( Double_t r)

Definition at line 299 of file ZHelix.cxx.

299 {
300 //
301 // Convert r to phi
302 Double_t k = 1 / fQovR + fQxDh;
303 Double_t my_value =
304 fQovR / ( 2 * k ) *
305 ( -TMath::Power( r, 2 ) + 1 / TMath::Power( fQovR, 2 ) + TMath::Power( k, 2 ) );
306 // check if my_value is ouside acos validity range
307 if ( ( my_value < -1 ) || ( my_value > 1 ) ) return 999999999;
308 Double_t my_phi = TMath::ACos( my_value );
309
310 Double_t phi1 = fAzim - my_phi;
311 Double_t phi2 = fAzim + my_phi;
312
313 Double_t x1 = 0;
314 Double_t y1 = 0;
315 Double_t z1 = 0;
316 Double_t x2 = 0;
317 Double_t y2 = 0;
318 Double_t z2 = 0;
319 Double_t phi = 0;
320 ;
321 this->Phi2XYZ( phi1, x1, y1, z1 );
322 this->Phi2XYZ( phi2, x2, y2, z2 );
323
324 // check if phi1 would result in a z value with the correct sign corrsponding
325 // to fTDip
326 if ( TMath::Sign( 1., fTDip ) == TMath::Sign( 1., ( z1 - fRefZ ) ) )
327 {
328 // check if phi2 would result in a z value with the correct sign corrsponding
329 // to fTDip
330 if ( TMath::Sign( 1., fTDip ) == TMath::Sign( 1., ( z2 - fRefZ ) ) )
331 {
332 // take phi with smallest resulting z difference to fRefZ (Zh)
333 if ( TMath::Abs( z1 - fRefZ ) <= TMath::Abs( z2 - fRefZ ) ) phi = phi1;
334 else phi = phi2;
335 }
336 else phi = phi1;
337 }
338 else { phi = phi2; }
339
340 return phi;
341}
Double_t phi2
Double_t phi1

Referenced by SetRange().

◆ R2Phi() [2/3]

Double_t ZHelix::R2Phi ( Double_t r)

◆ R2Phi() [3/3]

Double_t ZHelix::R2Phi ( Double_t r)

◆ SetDrawOption() [1/3]

virtual void ZHelix::SetDrawOption ( Option_t * option)
inlinevirtual

Definition at line 83 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

83{ TObject::SetDrawOption( option ); }

◆ SetDrawOption() [2/3]

virtual void ZHelix::SetDrawOption ( Option_t * option)
inlinevirtual

Definition at line 83 of file InstallArea/x86_64-el9-gcc13-dbg/include/BesVisLib/ZHelix.h.

83{ TObject::SetDrawOption( option ); }

◆ SetDrawOption() [3/3]

virtual void ZHelix::SetDrawOption ( Option_t * option)
inlinevirtual

Definition at line 83 of file InstallArea/x86_64-el9-gcc13-opt/include/BesVisLib/ZHelix.h.

83{ TObject::SetDrawOption( option ); }

◆ SetNextPoint() [1/3]

virtual Int_t ZHelix::SetNextPoint ( Double_t x,
Double_t y,
Double_t z )
inlinevirtual

Definition at line 74 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

74 {
75 return TPolyLine3D::SetNextPoint( x, y, z );
76 }

◆ SetNextPoint() [2/3]

virtual Int_t ZHelix::SetNextPoint ( Double_t x,
Double_t y,
Double_t z )
inlinevirtual

Definition at line 74 of file InstallArea/x86_64-el9-gcc13-dbg/include/BesVisLib/ZHelix.h.

74 {
75 return TPolyLine3D::SetNextPoint( x, y, z );
76 }

◆ SetNextPoint() [3/3]

virtual Int_t ZHelix::SetNextPoint ( Double_t x,
Double_t y,
Double_t z )
inlinevirtual

Definition at line 74 of file InstallArea/x86_64-el9-gcc13-opt/include/BesVisLib/ZHelix.h.

74 {
75 return TPolyLine3D::SetNextPoint( x, y, z );
76 }

◆ SetPoint() [1/3]

virtual void ZHelix::SetPoint ( Int_t point,
Double_t x,
Double_t y,
Double_t z )
inlinevirtual

Definition at line 77 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

77 {
78 TPolyLine3D::SetPoint( point, x, y, z );
79 }

Referenced by SetPoints().

◆ SetPoint() [2/3]

virtual void ZHelix::SetPoint ( Int_t point,
Double_t x,
Double_t y,
Double_t z )
inlinevirtual

Definition at line 77 of file InstallArea/x86_64-el9-gcc13-dbg/include/BesVisLib/ZHelix.h.

77 {
78 TPolyLine3D::SetPoint( point, x, y, z );
79 }

◆ SetPoint() [3/3]

virtual void ZHelix::SetPoint ( Int_t point,
Double_t x,
Double_t y,
Double_t z )
inlinevirtual

Definition at line 77 of file InstallArea/x86_64-el9-gcc13-opt/include/BesVisLib/ZHelix.h.

77 {
78 TPolyLine3D::SetPoint( point, x, y, z );
79 }

◆ SetPoints() [1/3]

void ZHelix::SetPoints ( Option_t * option = "3D")
virtual

Definition at line 122 of file ZHelix.cxx.

122 {
123 //
124 // Set PolyLine3D points
125 TString opt = option;
126 opt.ToUpper();
127
128 // Get view
129 BesView* view = dynamic_cast<BesView*>( gPad->GetView() );
130
131 // check with which sign the segmnents have to added to fRange[0]
132 Int_t sign = 0;
133 if ( fQovR >= 0 ) sign = -1;
134 else sign = +1;
135
136 // calculate distance between ranges in rad
137 Double_t degrad = TMath::Pi() / 180.0;
138 Double_t segment = 1. * degrad; // 1 degree segments
139 Double_t df = 0;
140 if ( sign == +1 )
141 {
142 if ( fRange[1] > fRange[0] ) df = fRange[1] - fRange[0];
143 else df = 2 * TMath::Pi() + fRange[1] - fRange[0];
144 }
145 else
146 {
147 if ( fRange[1] < fRange[0] ) df = fRange[1] - fRange[0];
148 else df = 2 * TMath::Pi() - fRange[1] + fRange[0];
149 }
150 // number of segments with degree distance
151 Int_t nSeg = Int_t( TMath::Abs( df ) / segment ) + 1;
152
153 // solve problem with nseg = 1 , means df too small compared to
154 // segment -> new segment
155 if ( nSeg < 2 )
156 {
157 segment = 0.01 * degrad;
158 nSeg = Int_t( TMath::Abs( df ) / segment ) + 1;
159 }
160 // if ( nSeg < 10 ) nSeg = 10;
161
162 // newly calculation of segment
163 segment = TMath::Abs( df ) / nSeg;
164
165 Double_t phi, x, y, z, r;
166 TPolyLine3D::SetPolyLine( nSeg + 1 );
167
168 if ( opt.Contains( "3D" ) )
169 {
170 // 3D view
171 for ( Int_t i = 0; i <= nSeg; i++ )
172 {
173 phi = fRange[0] + segment * i * sign;
174 Phi2XYZ( phi, x, y, z );
175 TPolyLine3D::SetPoint( i, x, y, z );
176 }
177 }
178 else if ( opt.Contains( "XY" ) )
179 {
180 // XY view
181 for ( Int_t i = 0; i <= nSeg; i++ )
182 {
183 phi = fRange[0] + segment * i * sign;
184 Phi2XYZ( phi, x, y, z );
185 TPolyLine3D::SetPoint( i, x, y, 0 );
186 }
187 }
188 else if ( opt.Contains( "ZR" ) )
189 {
190 // ZR view
191
192 // The track is drawn either in the upper or lower region of
193 // the ZR view depending on how many of its segements lay in
194 // each region. If these numbers are unbalanced, the starting
195 // point of the track is taken as criterium
196 Int_t isgn = 0;
197 for ( Int_t i = 0; i <= nSeg; i++ )
198 {
199
200 // Get ZR coordinates
201 phi = fRange[0] + segment * i * sign;
202 Phi2ZR( phi, z, r );
203
204 // Set point
205 TPolyLine3D::SetPoint( i, z, r, 0 );
206
207 // Get sign for R coordinate
208 isgn += view->GetRSign( phi );
209 if ( i == 0 ) fRSign = view->GetRSign( phi );
210 }
211 if ( isgn != 0 ) fRSign = TMath::Sign( 1, isgn );
212
213 // The vertex fitted tracks need to be displaced otherwise they are
214 // are not drawn to emanate from the vertex.
215
216 Float_t z, r, rref, rdisp;
217
218 rref = TMath::Sqrt( ( fRefX * fRefX ) + ( fRefY * fRefY ) );
219
220 if ( ( fTrackType != kVctpar ) || ( fTrackType != kVcparsec ) ||
221 ( fTrackType != kZttrprm ) || ( fTrackType != kZttrsec ) )
222 {
223
224 // Set R sign for each point
225 for ( Int_t i = 0; i <= nSeg; i++ )
226 {
227 z = GetP()[i * 3];
228 r = GetP()[i * 3 + 1];
229 SetPoint( i, z, r * fRSign, 0 );
230 }
231 }
232 else
233 {
234
235 for ( Int_t i = 0; i <= nSeg; i++ )
236 {
237 z = GetP()[i * 3];
238 r = GetP()[i * 3 + 1];
239 rdisp = r * fRSign;
240 if ( fRSign < 0 ) rdisp += 2 * rref;
241 SetPoint( i, z, rdisp, 0 );
242 }
243 }
244 }
245}
virtual Int_t GetRSign(Float_t Phi)
Definition BesView.cxx:625
void Phi2ZR(Double_t phi, Double_t &z, Double_t &r)
Definition ZHelix.cxx:259
virtual void SetPoint(Int_t point, Double_t x, Double_t y, Double_t z)

Referenced by Paint().

◆ SetPoints() [2/3]

virtual void ZHelix::SetPoints ( Option_t * option = "3D")
virtual

◆ SetPoints() [3/3]

virtual void ZHelix::SetPoints ( Option_t * option = "3D")
virtual

◆ SetRange() [1/3]

void ZHelix::SetRange ( EZHelixRangeType RangeType,
Double_t RangeMin,
Double_t RangeMax )

Definition at line 92 of file ZHelix.cxx.

92 {
93 //
94 // Set range for drawing
95 switch ( RangeType )
96 {
97 case kBesHelixPhi:
98 fRange[0] = RangeMin;
99 fRange[1] = RangeMax;
100 break;
101 case kBesHelixX:
102 fRange[0] = X2Phi( RangeMin );
103 fRange[1] = X2Phi( RangeMax );
104 break;
105 case kBesHelixY:
106 fRange[0] = Y2Phi( RangeMin );
107 fRange[1] = Y2Phi( RangeMax );
108 break;
109 case kBesHelixZ:
110 fRange[0] = Z2Phi( RangeMin );
111 fRange[1] = Z2Phi( RangeMax );
112 break;
113 case kBesHelixR:
114 fRange[0] = R2Phi( RangeMin );
115 fRange[1] = R2Phi( RangeMax );
116 break;
117 }
118}
Double_t R2Phi(Double_t r)
Definition ZHelix.cxx:299
Double_t Y2Phi(Double_t y)
Definition ZHelix.cxx:279
Double_t X2Phi(Double_t x)
Definition ZHelix.cxx:269
Double_t Z2Phi(Double_t z)
Definition ZHelix.cxx:289

Referenced by ZHelix().

◆ SetRange() [2/3]

void ZHelix::SetRange ( EZHelixRangeType RangeType,
Double_t RangeMin,
Double_t RangeMax )

◆ SetRange() [3/3]

void ZHelix::SetRange ( EZHelixRangeType RangeType,
Double_t RangeMin,
Double_t RangeMax )

◆ SetTrackType() [1/3]

void ZHelix::SetTrackType ( TrackType tt)
inline

Definition at line 62 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

62{ fTrackType = tt; };

◆ SetTrackType() [2/3]

void ZHelix::SetTrackType ( TrackType tt)
inline

◆ SetTrackType() [3/3]

void ZHelix::SetTrackType ( TrackType tt)
inline

◆ X2Phi() [1/3]

Double_t ZHelix::X2Phi ( Double_t x)

Definition at line 269 of file ZHelix.cxx.

269 {
270 //
271 // Convert x to phi
272 Double_t phi = TMath::ASin( fQovR * ( fSinAzim * ( 1 / fQovR + fQxDh ) - x + fRefX ) );
273
274 return phi;
275}

Referenced by SetRange().

◆ X2Phi() [2/3]

Double_t ZHelix::X2Phi ( Double_t x)

◆ X2Phi() [3/3]

Double_t ZHelix::X2Phi ( Double_t x)

◆ Y2Phi() [1/3]

Double_t ZHelix::Y2Phi ( Double_t y)

Definition at line 279 of file ZHelix.cxx.

279 {
280 //
281 // Convert y to phi
282 Double_t phi = TMath::ACos( fQovR * ( fCosAzim * ( 1 / fQovR + fQxDh ) + y - fRefY ) );
283
284 return phi;
285}

Referenced by SetRange().

◆ Y2Phi() [2/3]

Double_t ZHelix::Y2Phi ( Double_t y)

◆ Y2Phi() [3/3]

Double_t ZHelix::Y2Phi ( Double_t y)

◆ Z2Phi() [1/3]

Double_t ZHelix::Z2Phi ( Double_t z)

Definition at line 289 of file ZHelix.cxx.

289 {
290 //
291 // Convert z to phi
292 Double_t phi = fAzim - fQovR * ( z - fRefZ ) / fTDip;
293
294 return phi;
295}

Referenced by SetRange().

◆ Z2Phi() [2/3]

Double_t ZHelix::Z2Phi ( Double_t z)

◆ Z2Phi() [3/3]

Double_t ZHelix::Z2Phi ( Double_t z)

Member Data Documentation

◆ fAzim

Double_t ZHelix::fAzim
protected

◆ fChi2

Float_t ZHelix::fChi2
protected

Definition at line 41 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

Referenced by Print(), and ZHelix().

◆ fCosAzim

Double_t ZHelix::fCosAzim
protected

Definition at line 44 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

Referenced by Phi2XYZ(), Y2Phi(), and ZHelix().

◆ fEnable

Bool_t ZHelix::fEnable
protected

Definition at line 49 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

Referenced by Paint(), and ZHelix().

◆ fNDoF

Int_t ZHelix::fNDoF
protected

Definition at line 42 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

Referenced by Print(), and ZHelix().

◆ fPhiI

Double_t ZHelix::fPhiI
protected

sign of radius

Definition at line 47 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

Referenced by Print(), and ZHelix().

◆ fPhiO

Double_t ZHelix::fPhiO
protected

Definition at line 48 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

Referenced by Print(), and ZHelix().

◆ fQovR

Double_t ZHelix::fQovR
protected

◆ fQxDh

Double_t ZHelix::fQxDh
protected

◆ fRange

Double_t ZHelix::fRange
protected

◆ fRefX

Double_t ZHelix::fRefX
protected

◆ fRefY

Double_t ZHelix::fRefY
protected

◆ fRefZ

Double_t ZHelix::fRefZ
protected

◆ fRSign

Int_t ZHelix::fRSign
protected

Definition at line 46 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

Referenced by SetPoints(), and ZHelix().

◆ fRType

EZHelixRangeType ZHelix::fRType
protected

Definition at line 40 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

Referenced by Print(), and ZHelix().

◆ fSinAzim

Double_t ZHelix::fSinAzim
protected

Definition at line 43 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

Referenced by Phi2XYZ(), X2Phi(), and ZHelix().

◆ fTDip

Double_t ZHelix::fTDip
protected

◆ fTrackType

TrackType ZHelix::fTrackType
protected

Definition at line 31 of file EventDisplay/BesVisLib/include/BesVisLib/ZHelix.h.

Referenced by SetPoints(), and SetTrackType().


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