NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
NcVertex.h
Go to the documentation of this file.
1#ifndef NcVertex_h
2#define NcVertex_h
3// Copyright(c) 1998 NCFS/IIHE, All Rights Reserved.
4// See cxx source for full Copyright notice.
5
6#include <cstdlib>
7#include <math.h>
8
9#include "TObject.h"
10#include "TObjArray.h"
11#include "TPolyLine3D.h"
12
13#include "NcJet.h"
14#include "NcPosition.h"
15
17
18class NcVertex : public NcJet,public NcPosition
19{
20 public:
21 NcVertex(); // Default constructor
22 NcVertex(Int_t n); // Create a vertex to hold initially n tracks
23 virtual ~NcVertex(); // Default destructor
24 NcVertex(const NcVertex& v); // Copy constructor
25 virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer
26 virtual void SetOwner(Bool_t own=kTRUE); // Set ownership of all added objects
27 virtual void Reset(); // Reset all values and stored vertex and jet lists
28 void ResetVertices(); // Reset stored vertex list
29 void AddJet(NcJet& j,Int_t tracks=1); // Add a jet (and its tracks) to the vertex
30 void AddVertex(NcVertex& v,Int_t connect=1); // Add (and connect) a (sec.) vertex to the current vertex
31 void AddJet(NcJet* j,Int_t tracks=1) { AddJet(*j,tracks); }
32 void AddVertex(NcVertex* v,Int_t connect=1) { AddVertex(*v,connect); }
33 using NcPosition::Data;
34 virtual void Data(TString f="car",TString u="rad"); // Print the vertex info within frame f and ang units u
35 virtual void List(TString f="car",TString u="rad",TObjArray* tracks=0); // Vertex prim. track info for frame f and ang units u
36 virtual void ListAll(TString f="car",TString u="rad",TObjArray* tracks=0);// Prim.+sec. vtx full track info for frame f and ang units u
37 Int_t GetNvertices() const; // Return the number of (secondary) vertices
38 NcVertex* GetVertex(Int_t i) const; // Provide i-th (secondary) vertex
39 NcVertex* GetIdVertex(Int_t id) const; // Provide the vertex with user identifier "id"
40 void SetNvmax(Int_t n=2); // Set the initial max. number of (secondary) vertices
41 void SetVertexCopy(Int_t j); // (De)activate creation of private copies in fVertices
42 Int_t GetVertexCopy() const; // Provide VertexCopy flag value
43 Int_t GetNjets() const; // Return the number of jets
44 NcJet* GetJet(Int_t i) const; // Provide i-th jet
45 NcJet* GetIdJet(Int_t id) const; // Provide the jet with user identifier "id"
46 void SetNjmax(Int_t n=2); // Set the initial max. number of jets
47 void SetJetCopy(Int_t j); // (De)activate creation of private copies in fJets
48 Int_t GetJetCopy() const; // Provide JetCopy flag value
49 Int_t IsConnectTrack(NcTrack* t) const; // Indicate if track is created by vertex connection
50 Int_t IsJetTrack(NcTrack* t) const; // Indicate if track is resulting from jet addition
51 virtual void Draw(Option_t*) { Draw(1,1,0); } // Override TObject::Draw for default event display
52 virtual void Draw(Int_t secs,Int_t cons=1,Int_t jets=0); // Draw the vertex in an event display
53 TObjArray* SortJets(Int_t mode=-1,TObjArray* jets=0,TObjArray* ordered=0); // Sort jets by a certain observable
54
55 protected:
56 void Init(); // Initialisation of pointers etc...
57 Int_t fNvmax; // The maximum number of (secondary) vertices
58 Int_t fNvtx; // The number of (secondary) vertices
59 TObjArray* fVertices; // Array to hold the pointers to the (secondary) vertices
60 TObjArray* fConnects; // Array to hold the pointers to the auto-generated connecting tracks
61 Int_t fVertexCopy; // Flag to denote creation of private copies in fVertices
62 Int_t fNjmax; // The maximum number of jets
63 Int_t fNjets; // The number of jets
64 TObjArray* fJets; // Array to hold the pointers to the jets
65 TObjArray* fJetTracks;// Array to hold the pointers to tracks introduced by jet addition
66 Int_t fJetCopy; // Flag to denote creation of private copies in fJets
67 TObjArray* fLines;
68
69 private:
70 void Dumps(NcVertex* v,Int_t n,TString f,TString u); // Recursively print all sec. vertices
71
72 ClassDef(NcVertex,2) // Creation and investigation of an NcVertex.
73};
74#endif
Creation and investigation of a jet of particle tracks.
Definition NcJet.h:18
NcJet()
Definition NcJet.cxx:121
virtual void Data(TString f="car", TString u="rad") const
Handling of the attributes of a reconstructed particle track.
Definition NcTrack.h:19
Creation and investigation of an NcVertex.
Definition NcVertex.h:19
TObjArray * fJetTracks
Definition NcVertex.h:65
Int_t fNjets
Definition NcVertex.h:63
virtual void Draw(Option_t *)
Definition NcVertex.h:51
void SetVertexCopy(Int_t j)
Definition NcVertex.cxx:923
TObjArray * SortJets(Int_t mode=-1, TObjArray *jets=0, TObjArray *ordered=0)
Int_t fJetCopy
Definition NcVertex.h:66
void AddJet(NcJet *j, Int_t tracks=1)
Definition NcVertex.h:31
virtual ~NcVertex()
Definition NcVertex.cxx:230
virtual TObject * Clone(const char *name="") const
void SetNjmax(Int_t n=2)
Definition NcVertex.cxx:400
void SetNvmax(Int_t n=2)
Definition NcVertex.cxx:377
void Dumps(NcVertex *v, Int_t n, TString f, TString u)
Definition NcVertex.cxx:813
virtual void Reset()
Definition NcVertex.cxx:423
virtual void ListAll(TString f="car", TString u="rad", TObjArray *tracks=0)
Definition NcVertex.cxx:748
void SetJetCopy(Int_t j)
TObjArray * fVertices
Definition NcVertex.h:59
virtual void Data(TString f="car", TString u="rad")
Definition NcVertex.cxx:637
TObjArray * fLines
! Array to (temporarily) store the 3D lines for the event display
Definition NcVertex.h:67
NcJet * GetIdJet(Int_t id) const
Int_t GetNvertices() const
Definition NcVertex.cxx:858
Int_t IsJetTrack(NcTrack *t) const
virtual void SetOwner(Bool_t own=kTRUE)
Definition NcVertex.cxx:265
NcVertex * GetIdVertex(Int_t id) const
Definition NcVertex.cxx:897
Int_t GetNjets() const
Definition NcVertex.cxx:969
TObjArray * fJets
Definition NcVertex.h:64
Int_t fNvmax
Definition NcVertex.h:57
Int_t GetVertexCopy() const
Definition NcVertex.cxx:956
void AddJet(NcJet &j, Int_t tracks=1)
Definition NcVertex.cxx:500
virtual void List(TString f="car", TString u="rad", TObjArray *tracks=0)
Definition NcVertex.cxx:669
void AddVertex(NcVertex *v, Int_t connect=1)
Definition NcVertex.h:32
Int_t fNjmax
Definition NcVertex.h:62
Int_t fVertexCopy
Definition NcVertex.h:61
void Init()
Definition NcVertex.cxx:192
Int_t GetJetCopy() const
Int_t IsConnectTrack(NcTrack *t) const
Int_t fNvtx
Definition NcVertex.h:58
TObjArray * fConnects
Definition NcVertex.h:60
NcVertex * GetVertex(Int_t i) const
Definition NcVertex.cxx:869
void AddVertex(NcVertex &v, Int_t connect=1)
Definition NcVertex.cxx:568
void ResetVertices()
Definition NcVertex.cxx:461
NcJet * GetJet(Int_t i) const
Definition NcVertex.cxx:980