RooParticle
Particle scattering simulator with ROOT
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
inspectorE Class Reference

Inspector on the whole event. More...

#include <inspector.hpp>

Inheritance diagram for inspectorE:
inspector

Public Member Functions

 inspectorE (event *event_, TString method_, Double_t val_=-1)
 Make an inspector on an event, method by name.
 
 inspectorE (event *event_, methodID method_, Double_t val_=-1)
 Make an inspector on an event, method by enumerator.
 
void SetEvent (event *event_)
 Set the event to watch (forgets the reference energy E0).
 
event * GetEvent ()
 The watched event.
 
Bool_t Inspect ()
 Whether the condition is satisfied now (kFALSE for an invalid method, with a message on stderr).
 
Double_t Evaluate ()
 The compared quantity, see the table (the first "EDG"/"EDL" call sets E0 and gives 0).
 
Bool_t IsValid ()
 Whether the method is one of the inspectorE methods.
 
void ResetReference ()
 Forget E0 of "EDG"/"EDL"; the next evaluation takes the present energy as E0.
 
TString Print (Bool_t element=kFALSE, Bool_t mechanics=kFALSE, Bool_t mute=kFALSE, Bool_t pprint=kFALSE)
 Describe as text "[ Inspector Event: MTD, CRT, VAL, RST (, ABORT) ]".
 
Bool_t IsInspectorE ()
 Always kTRUE.
 
- Public Member Functions inherited from inspector
 inspector ()
 Make an inspector without method (invalid until SetMethod()).
 
virtual ~inspector ()
 
void SetValue (Double_t val_)
 Set the criterion value to compare with (in the unit of the quantity).
 
void SetMethod (TString methodname)
 Set the method by name.
 
void SetMethod (const char *methodname)
 Set the method by C string (see SetMethod(TString)).
 
void SetMethod (methodID id_)
 Set the method by identifier.
 
TString GetMethod ()
 The method name as given.
 
methodID GetMethodID ()
 The method identifier (kInvalid for an unknown name).
 
Double_t GetCriterion ()
 The criterion value (default -1).
 
void SetAbort (Bool_t abort_=kTRUE)
 Make this inspector an abort inspector.
 
Bool_t IsAbort ()
 Whether this is an abort inspector.
 
virtual Bool_t IsInspectorP ()
 Whether this is an inspectorP.
 

Private Attributes

event * evt
 the watched event (not owned)
 
Double_t ref = 0.
 reference energy E0 of "EDG"/"EDL"
 
Bool_t hasRef = kFALSE
 E0 is set.
 

Additional Inherited Members

- Public Types inherited from inspector
enum  methodID {
  kInvalid = 0 , kCOS , kDEG , kRAD ,
  kCNT , kSPDG , kSPDL , kDSTG ,
  kDSTL , kVRG , kVRL , kKEG ,
  kKEL , kPEG , kPEL , kPKG ,
  kPKL , kEDG , kEDL , kTMG ,
  kTML , kDXG , kDXL , kDNG ,
  kDNL , kDSG , kDSL , kACG ,
  kACL , kVOUT , kVOUTA , kASYD ,
  kASYV
}
 Method identifier. More...
 
- Static Public Member Functions inherited from inspector
static methodID ParseMethod (TString name)
 Parse a method name.
 
static TString MethodName (methodID id)
 Name of a method identifier.
 
- Protected Attributes inherited from inspector
TString ftn =""
 method name as given
 
methodID mtd =kInvalid
 parsed method
 
Double_t val =-1
 criterion value
 
Bool_t abort =kFALSE
 abort inspector
 

Detailed Description

Inspector on the whole event.

All particles of the event are taken into account, so these methods suit an event with many bodies. "Moving" below means non-invincible.

Method Satisfied when
"KEG" / "KEL" net kinetic energy of the moving particles (event::GetNetKE(), non-relativistic) is greater / less than the value
"PEG" / "PEL" net potential energy (event::GetNetPE()) is greater / less than the value
"PKG" / "PKL" abs(net PE / net KE) is greater / less than the value (PKL : the interaction became negligible); with KE = 0 the ratio is the largest double
"EDG" / "EDL" relative drift of the net energy abs(E-E0)/abs(E0) is greater / less than the value (E0 : energy at the first evaluation; EDG as abort : numerical failure)
"TMG" / "TML" evolved time (event::GetTime(), fm/c) is greater / less than the value
"DXG" largest step count (event::GetDeriveN(kFALSE)) is greater than the value
"DXL" smallest step count (event::GetDeriveN(kTRUE)) is less than the value
"DNG" largest step count is greater than the value
"DNL" smallest step count is less than the value
"DSG" / "DSL" smallest distance between any two particles (fm) is greater / less than the value (DSL : close encounter)
"ACG" / "ACL" largest acceleration of the moving particles is greater / less than the value (ACL : forces became negligible)
"VOUT" any moving particle is outside the event volume (value not used; never satisfied without a volume)
"VOUTA" all moving particles are outside the event volume (value not used)
"ASYD" the deflection every moving particle still has ahead of it, from now to infinity, is less than the value (rad), and every interacting pair is receding
"ASYV" the same for the relative velocity change max|v_inf - v|/|v_inf|

The enumerators are kKEG kKEL kPEG kPEL kPKG kPKL kEDG kEDL kTMG kTML kDXG kDXL kDNG kDNL kDSG kDSL kACG kACL kVOUT kVOUTA kASYD kASYV (inspector::methodID).

Asymptote reached, for any number of bodies
"ASYD" and "ASYV" are the terminating conditions meant for three and more bodies: they ask directly how far the outgoing velocities still are from their values at infinity, through the first-order estimate asymptoteN::RemainingDeflection() / asymptoteN::RemainingChange(). They are never satisfied while any interacting pair is still approaching. One evaluation costs about as much as a few force sweeps, so inspect every 10 to 100 steps (iperiod of event::DeriveInspect()).
Evaluate() against Inspect()
Evaluate() returns the number compared in the table, with one asymmetry: for the step count, Inspect() uses the largest count for "DXG" and "DNG" and the smallest for "DXL" and "DNL", while Evaluate() returns the largest count for "DXG"/"DXL" and the smallest for "DNG"/"DNL". So the value printed for "DXL" or "DNG" is not the one Inspect() compared. For "VOUT"/"VOUTA" Evaluate() returns 1 or 0 (the result itself).
Energy drift
"EDG"/"EDL" use the relativistic energy event::GetNetERel() when the relativistic mode is really in effect (event::SetRelativistic() with an integrator other than kTaylor), and event::GetNetE() otherwise. The reference E0 is taken at the first evaluation after the inspector was made, set to another event, or reset with ResetReference(); with E0 = 0 the absolute value of the energy is used. "KEG"/"KEL"/"PKG"/"PKL" always use the non-relativistic kinetic energy.
Copies
When an event is copied, its inspectorE are remade to watch the new event, and E0 is forgotten.

Definition at line 323 of file inspector.hpp.

Constructor & Destructor Documentation

◆ inspectorE() [1/2]

inspectorE::inspectorE ( event *  event_,
TString  method_,
Double_t  val_ = -1 
)

Make an inspector on an event, method by name.

Parameters
event_the event to watch (normally the event the inspector is added to)
method_method name, see the table
val_criterion value (energies in amu c^2, time in fm/c, distance in fm, acceleration in c^2/fm, ratio and drift without unit)

Definition at line 246 of file inspector.cpp.

◆ inspectorE() [2/2]

inspectorE::inspectorE ( event *  event_,
methodID  method_,
Double_t  val_ = -1 
)

Make an inspector on an event, method by enumerator.

Definition at line 252 of file inspector.cpp.

Member Function Documentation

◆ Evaluate()

Double_t inspectorE::Evaluate ( )
virtual

The compared quantity, see the table (the first "EDG"/"EDL" call sets E0 and gives 0).

Reimplemented from inspector.

Definition at line 290 of file inspector.cpp.

◆ GetEvent()

event * inspectorE::GetEvent ( )
inline

The watched event.

Definition at line 338 of file inspector.hpp.

◆ Inspect()

Bool_t inspectorE::Inspect ( )
virtual

Whether the condition is satisfied now (kFALSE for an invalid method, with a message on stderr).

Reimplemented from inspector.

Definition at line 262 of file inspector.cpp.

◆ IsInspectorE()

Bool_t inspectorE::IsInspectorE ( )
inlinevirtual

Always kTRUE.

Reimplemented from inspector.

Definition at line 360 of file inspector.hpp.

◆ IsValid()

Bool_t inspectorE::IsValid ( )
virtual

Whether the method is one of the inspectorE methods.

Reimplemented from inspector.

Definition at line 258 of file inspector.cpp.

◆ Print()

TString inspectorE::Print ( Bool_t  element = kFALSE,
Bool_t  mechanics = kFALSE,
Bool_t  mute = kFALSE,
Bool_t  pprint = kFALSE 
)
virtual

Describe as text "[ Inspector Event: MTD, CRT, VAL, RST (, ABORT) ]".

Parameters
elementnot used
mechanicsnot used
mutekFALSE (default) also prints to stdout
pprintnot used

Reimplemented from inspector.

Definition at line 333 of file inspector.cpp.

◆ ResetReference()

void inspectorE::ResetReference ( )
inline

Forget E0 of "EDG"/"EDL"; the next evaluation takes the present energy as E0.

Definition at line 350 of file inspector.hpp.

◆ SetEvent()

void inspectorE::SetEvent ( event *  event_)
inline

Set the event to watch (forgets the reference energy E0).

Definition at line 335 of file inspector.hpp.

Member Data Documentation

◆ evt

event* inspectorE::evt
private

the watched event (not owned)

Definition at line 365 of file inspector.hpp.

◆ hasRef

Bool_t inspectorE::hasRef = kFALSE
private

E0 is set.

Definition at line 367 of file inspector.hpp.

◆ ref

Double_t inspectorE::ref = 0.
private

reference energy E0 of "EDG"/"EDL"

Definition at line 366 of file inspector.hpp.


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