1 #ifndef __KVGEODNTRAJECTORY_H
2 #define __KVGEODNTRAJECTORY_H
5 #include "KVUniqueNameList.h"
7 #include "KVGeoDetectorNode.h"
86 static Int_t fGDNTrajNumber;
87 mutable Int_t fIter_idx;
88 mutable Int_t fIter_limit;
89 mutable Int_t fIter_delta;
90 mutable Int_t fIter_idx_sav;
91 mutable Int_t fIter_limit_sav;
92 mutable Int_t fIter_delta_sav;
98 void increment_identified_particle_counters(
int identified,
int unidentified)
const;
153 if (fAddToNodes)
n->AddTrajectory(
this);
170 return !strcmp(node_name, fNodes.
Last()->
GetName());
207 while ((o = next())) {
218 while ((o = next())) {
237 fIter_idx_sav = fIter_idx;
238 fIter_delta_sav = fIter_delta;
239 fIter_limit_sav = fIter_limit;
245 fIter_idx = fIter_idx_sav;
246 fIter_delta = fIter_delta_sav;
247 fIter_limit = fIter_limit_sav;
258 fIter_idx = (node0 ==
nullptr ? 0 :
Index(node0));
260 fIter_limit =
GetN() - 1;
271 fIter_idx = (node0 ==
nullptr ?
GetN() - 1 :
Index(node0));
281 if (fIter_idx > -1) {
282 if (fIter_delta * (fIter_limit - fIter_idx) > 0) {
283 Int_t idx = fIter_idx;
284 fIter_idx += fIter_delta;
299 return &fIDTelescopes;
304 return &fIDTelescopes;
329 if (!other)
return kFALSE;
332 other_path.
Begin(
"/");
334 auto last_index = this_path.Index(other_path.Next());
335 if (last_index < 0)
return kFALSE;
336 decltype(last_index)
index;
337 while (!other_path.End()) {
338 if ((
index = this_path.Index(other_path.Next())) < last_index)
347 if (fPathInTitle)
return GetTitle();
353 if (fPathInTitle)
return GetName();
363 if (intitle != fPathInTitle) {
367 fPathInTitle = intitle;
378 increment_identified_particle_counters(1, modify_unidentified);
383 increment_identified_particle_counters(modify_identified, 1);
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Base class for KaliVeda framework.
Path taken by particles through multidetector geometry.
void SaveIterationState() const
Bool_t ContainsAll(const TCollection *l) const
void ls(Option_t *="") const override
const Char_t * GetTrajectoryName() const
KVGeoDNTrajectory()
Default constructor.
KVGeoDetectorNode * GetNextNode() const
KVSeqCollection * AccessIDTelescopeList()
Bool_t EndsAt(const Char_t *node_name) const
KVString GetPathString() const
Int_t Index(const TObject *node) const
void AddUnidentifiedParticle(int modify_identified=-1) const
Bool_t Contains(const Char_t *name) const
void Clear(Option_t *="") override
Clear list of nodes in trajectory.
void SetPathInTitle(Bool_t intitle=kTRUE)
Bool_t Contains(const KVGeoDetectorNode *n) const
Bool_t BeginsAt(const KVGeoDetectorNode *d) const
void ReverseOrder()
Reverse the order of the nodes in the trajectory.
void AddLast(KVGeoDetectorNode *n)
void AddToNodes()
Add reference to this trajectory to all nodes on it.
Bool_t EndsAt(const KVGeoDetectorNode *d) const
void IterateFrom(const KVGeoDetectorNode *node0=nullptr) const
Int_t GetNumberOfIdentifications() const
Bool_t ContainsTrajectory(const KVGeoDNTrajectory *other) const
void Copy(TObject &obj) const override
void AddIdentifiedParticle(int modify_unidentified=-1) const
Bool_t BeginsAt(const Char_t *node_name) const
const KVSeqCollection * GetIDTelescopes() const
Bool_t ContainsAny(const TCollection *l) const
KVGeoDetectorNode * GetNodeInFront(const KVGeoDetectorNode *n) const
Bool_t ContainsPath(const KVGeoDNTrajectory *other) const
void IterateBackFrom(const KVGeoDetectorNode *node0=nullptr) const
virtual ~KVGeoDNTrajectory()
Destructor.
void RestoreIterationState() const
Bool_t IsPathInTitle() const
KVGeoDetectorNode * GetNode(const Char_t *name) const
KVGeoDNTrajectory & operator=(const KVGeoDNTrajectory &)
void SetAddToNodes(Bool_t yes=kTRUE)
KVGeoDetectorNode * GetNodeAt(Int_t i) const
Information on relative positions of detectors & particle trajectories.
Group of detectors which can be treated independently of all others in array.
KaliVeda extensions to ROOT collection classes.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
Optimised list in which named objects can only be placed once.
virtual Int_t GetEntries() const
virtual void SetTitle(const char *title="")
const char * GetName() const override
const char * GetTitle() const override
virtual void SetName(const char *name)
Int_t IndexOf(const TObject *obj) const override
TObject * Last() const override
Int_t GetEntries() const override
void AddLast(TObject *obj) override
TObject * First() const override
TObject * FindObject(const char *name) const override
virtual const char * GetName() const