45 ~GappedField()
override{};
67 CmsMagField() : m_magnetIsOn(true), m_reverse(false), m_simpleModel(true) {}
69 ~CmsMagField()
override {}
71 void setMagnetState(
bool state)
73 if (state != m_magnetIsOn) {
75 std::cout <<
"Magnet state is changed to ON" << std::endl;
77 std::cout <<
"Magnet state is changed to OFF" << std::endl;
82 bool isMagnetOn()
const {
return m_magnetIsOn; }
83 void setReverseState(
bool state) { m_reverse = state; }
84 bool isReverse()
const {
return m_reverse; }
85 void setSimpleModel(
bool simpleModel) { m_simpleModel = simpleModel; }
86 bool isSimpleModel()
const {
return m_simpleModel; }
100 if (m_simpleModel || (
R > 461.0 &&
R < 490.5) || (
R > 534.5 &&
R < 597.5) || (
R > 637.0 &&
R < 700.0))
109 return TEveVectorD(
x /
R * field / 3.8 * 2.0,
y /
R * field / 3.8 * 2.0, 0);
111 return TEveVectorD(-
x /
R * field / 3.8 * 2.0, -
y /
R * field / 3.8 * 2.0, 0);
117 return TEveVectorD(
x /
R * field / 3.8 * 2.0,
y /
R * field / 3.8 * 2.0, 0);
119 return TEveVectorD(-
x /
R * field / 3.8 * 2.0, -
y /
R * field / 3.8 * 2.0, 0);
136 rc->fV.Set(0.028558, -0.000918, 3.691919);
137 rc->fP.Set(0.767095, -2.400006, -0.313103);
141 track->SetName(
Form(
"Charge %d", sign));
144 pm1->fV.Set(1.479084, -4.370661, 3.119761);
145 track->AddPathMark(*pm1);
148 pm2->fV.Set(57.72345, -89.77011, -9.783746);
149 track->AddPathMark(*pm2);
161 auto prop = g_prop = list->GetPropagator();
167 list->SetName(
"RK Propagator");
169 list->SetName(
"Heix Propagator");
176 prop->SetMagField(0.);
177 list->SetElementName(
Form(
"%s, zeroB", list->GetElementName()));
178 track = make_track(
prop, 1);
185 list->SetElementName(
Form(
"%s, constB", list->GetElementName()));
186 track = make_track(
prop, 1);
193 list->SetElementName(
Form(
"%s, duoB", list->GetElementName()));
194 track = make_track(
prop, 1);
200 prop->SetMagFieldObj(
new GappedField());
201 list->SetElementName(
Form(
"%s, gappedB", list->GetElementName()));
204 rc->fV.Set(0.028558, -0.000918, 3.691919);
205 rc->fP.Set(0.767095, -0.400006, 2.313103);
210 marker->SetElementName(
"B field break points");
211 marker->SetPoint(0, 0., 0., 300.f);
212 marker->SetPoint(1, 0., 0., 600.f);
213 marker->SetMarkerColor(3);
220 auto mf =
new CmsMagField;
221 mf->setReverseState(
true);
223 prop->SetMagFieldObj(mf);
228 prop->RefPMAtt().SetMarkerStyle(4);
229 list->SetElementName(
Form(
"%s, CMS field", list->GetElementName()));
232 rc->fV.Set(0.027667, 0.007919, 0.895964);
233 rc->fP.Set(3.903134, 2.252232, -3.731366);
255 auto mf =
new CmsMagField;
256 mf->setReverseState(
true);
257 mf->setSimpleModel(
false);
259 prop->SetMagFieldObj(mf);
265 prop->RefPMAtt().SetMarkerStyle(4);
266 list->SetElementName(
Form(
"%s, CMS field", list->GetElementName()));
269 rc->fV.Set(-16.426592, 16.403185, -19.782692);
270 rc->fP.Set(3.631100, 3.643450, 0.682254);
275 TEveVectorD(-1.642659e+01, 1.640318e+01, -1.978269e+01),
278 TEveVectorD(-1.859987e+00, 3.172243e+01, -1.697866e+01),
281 TEveVectorD(4.847579e+01, 9.871711e+01, -5.835719e+00),
305 prop->RefPMAtt().SetMarkerStyle(4);
306 list->SetElementName(
Form(
"%s, Some ILC Detector field", list->GetElementName()));
309 rc->fV.Set(57.1068, 31.2401, -7.07629);
310 rc->fP.Set(4.82895, 2.35083, -0.611757);
330 list->SetLineColor(
kCyan);
335 list->AddElement(track);
R__EXTERN TEveManager * gEve
TEvePathMarkT< Double_t > TEvePathMarkD
TEveRecTrackT< Double_t > TEveRecTrackD
TEveVectorT< Double_t > TEveVectorD
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h prop
Option_t Option_t TPoint TPoint const char mode
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
@ kSigSegmentationViolation
R__EXTERN TSystem * gSystem
void SetLineColor(Color_t col) override
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 TEveVectorD GetFieldD(Double_t x, Double_t y, Double_t z) const
virtual Double_t GetMaxFieldMagD() const
void AddElement(TEveElement *element, TEveElement *parent=nullptr)
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...
void SetMarkerStyle(Style_t mstyle=1) override
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.
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).
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.