72 virtual ~CmsMagField(){}
74 void setMagnetState(
bool state )
76 if (state != m_magnetIsOn)
79 std::cout <<
"Magnet state is changed to ON" << std::endl;
81 std::cout <<
"Magnet state is changed to OFF" << std::endl;
86 bool isMagnetOn()
const {
return m_magnetIsOn;}
87 void setReverseState(
bool state) { m_reverse = state; }
88 bool isReverse()
const {
return m_reverse;}
89 void setSimpleModel(
bool simpleModel) { m_simpleModel = simpleModel; }
90 bool isSimpleModel()
const {
return m_simpleModel;}
104 if ( m_simpleModel ||
105 (
R>461.0 &&
R<490.5 ) ||
106 (
R>534.5 &&
R<597.5 ) ||
107 (
R>637.0 &&
R<700.0 ) )
146 rc->fV.Set(0.028558, -0.000918, 3.691919);
147 rc->fP.Set(0.767095, -2.400006, -0.313103);
151 track->SetName(
Form(
"Charge %d", sign));
154 pm1->fV.Set(1.479084, -4.370661, 3.119761);
155 track->AddPathMark(*pm1);
158 pm2->fV.Set(57.72345, -89.77011, -9.783746);
159 track->AddPathMark(*pm2);
172 auto prop = g_prop = list->GetPropagator();
179 list->SetName(
"RK Propagator");
183 list->SetName(
"Heix Propagator");
193 list->SetElementName(
Form(
"%s, zeroB", list->GetElementName()));
194 track = make_track(prop, 1);
202 list->SetElementName(
Form(
"%s, constB", list->GetElementName()));
203 track = make_track(prop, 1);
211 list->SetElementName(
Form(
"%s, duoB", list->GetElementName()));
212 track = make_track(prop, 1);
220 list->SetElementName(
Form(
"%s, gappedB", list->GetElementName()));
224 rc->fV.Set(0.028558, -0.000918, 3.691919);
225 rc->fP.Set(0.767095, -0.400006, 2.313103);
230 marker->SetElementName(
"B field break points");
231 marker->SetPoint(0, 0., 0., 300.f);
232 marker->SetPoint(1, 0., 0., 600.f);
233 marker->SetMarkerColor(3);
241 auto mf =
new CmsMagField;
242 mf->setReverseState(
true);
250 list->SetElementName(
Form(
"%s, CMS field", list->GetElementName()));
254 rc->fV.Set(0.027667, 0.007919, 0.895964);
255 rc->fP.Set(3.903134, 2.252232, -3.731366);
260 TEveVectorD(3.576755e+00, 2.080579e+00, -2.507230e+00)));
262 TEveVectorD(8.440379e+01, 6.548286e+01, -8.788129e+01)));
264 TEveVectorD(1.841321e+02, 3.915693e+02, -3.843072e+02)));
266 TEveVectorD(1.946167e+02, 4.793932e+02, -4.615060e+02)));
268 TEveVectorD(2.249656e+02, 5.835767e+02, -5.565275e+02)));
279 auto mf =
new CmsMagField;
280 mf->setReverseState(
true);
281 mf->setSimpleModel(
false);
290 list->SetElementName(
Form(
"%s, CMS field", list->GetElementName()));
293 rc->fV.Set(-16.426592, 16.403185, -19.782692);
294 rc->fP.Set(3.631100, 3.643450, 0.682254);
299 TEveVectorD(-1.642659e+01, 1.640318e+01, -1.978269e+01),
302 TEveVectorD(-1.859987e+00, 3.172243e+01, -1.697866e+01),
305 TEveVectorD(4.847579e+01, 9.871711e+01, -5.835719e+00),
308 TEveVectorD(1.342045e+02, 4.203950e+02, 3.846268e+01)));
310 TEveVectorD(1.483827e+02, 5.124750e+02, 5.064311e+01)));
312 TEveVectorD(1.674676e+02, 6.167731e+02, 6.517403e+01)));
314 TEveVectorD(1.884976e+02, 7.202000e+02, 7.919290e+01)));
332 list->SetElementName(
Form(
"%s, Some ILC Detector field",
333 list->GetElementName()));
336 rc->fV.Set(57.1068, 31.2401, -7.07629);
337 rc->fP.Set(4.82895, 2.35083, -0.611757);
342 TEveVectorD(1.692235e+02, 7.047929e+01, -2.064785e+01)));
344 TEveVectorD(5.806180e+02, 6.990633e+01, -6.450000e+01)));
346 TEveVectorD(6.527213e+02, 1.473249e+02, -8.348498e+01)));
358 list->SetLineColor(
kCyan);
363 list->AddElement(track);
#define R(a, b, c, d, e, f, g, h, i)
R__EXTERN TEveManager * gEve
TEvePathMarkT< Double_t > TEvePathMarkD
TEveRecTrackT< Double_t > TEveRecTrackD
TEveVectorT< Double_t > TEveVectorD
char * Form(const char *fmt,...)
@ kSigSegmentationViolation
R__EXTERN TSystem * gSystem
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetLineColor(Color_t col)
Set the line color.
void SetRnrPoints(Bool_t r)
Set rendering of points. Propagate to projected lines.
Implements constant magnetic field, given by a vector fB.
Implements constant magnetic filed that switches on given axial radius fR2 from vector fBIn to fBOut.
Abstract base-class for interfacing to magnetic field needed by the TEveTrackPropagator.
virtual TEveVector GetField(Float_t, Float_t, Float_t) const
virtual Float_t GetMaxFieldMag() const
TEveVectorD GetFieldD(const TEveVectorD &v) const
virtual Double_t GetMaxFieldMagD() const
void AddElement(TEveElement *element, TEveElement *parent=0)
Add an element.
TEveViewer * GetDefaultViewer() const
Returns the default viewer - the first one in the fViewers list.
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
TEvePointSet is a render-element holding a collection of 3D points with optional per-point TRef and a...
virtual void SetMarkerStyle(Style_t mstyle=1)
Set marker style, propagate to projecteds.
A list of tracks supporting change of common attributes and selection based on track parameters.
Holding structure for a number of track rendering parameters.
void SetRnrDecay(Bool_t x)
Set decay rendering and rebuild tracks.
void SetRnrDaughters(Bool_t x)
Set daughter rendering and rebuild tracks.
void SetMagFieldObj(TEveMagField *field, Bool_t own_field=kTRUE)
Set constant magnetic field and rebuild tracks.
void SetMaxR(Double_t x)
Set maximum radius and rebuild tracks.
void SetFitDaughters(Bool_t x)
Set daughter creation point fitting and rebuild tracks.
void SetStepper(EStepper_e s)
void SetRnrReferences(Bool_t x)
Set track-reference rendering and rebuild tracks.
void SetMaxZ(Double_t x)
Set maximum z and rebuild tracks.
void SetMagField(Double_t bX, Double_t bY, Double_t bZ)
Set constant magnetic field and rebuild tracks.
Visual representation of a track.
virtual void MakeTrack(Bool_t recurse=kTRUE)
Calculate track representation based on track data and current settings of the propagator.
void AddPathMark(const TEvePathMarkD &pm)
Eve representation of TGLViewer.
TGLViewer * GetGLViewer() const
virtual Bool_t RotateRad(Double_t hRotate, Double_t vRotate)
Rotate camera around center.
Base GL viewer object - used by both standalone and embedded (in pad) GL.
void RequestDraw(Short_t LOD=TGLRnrCtx::kLODMed)
Post request for redraw of viewer at level of detail 'LOD' Request is directed via cross thread gVirt...
void SetGuideState(Int_t axesType, Bool_t axesDepthTest, Bool_t referenceOn, const Double_t *referencePos)
Set the state of guides (axes & reference markers) from arguments.
TGLCamera & CurrentCamera() const
virtual void IgnoreSignal(ESignals sig, Bool_t ignore=kTRUE)
If ignore is true ignore the specified signal, else restore previous behaviour.
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).