NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
NcVertex Class Reference

Creation and investigation of an NcVertex. More...

#include "NcVertex.h"

Inheritance diagram for NcVertex:
NcJet NcPosition Nc4Vector Nc3Vector NcEvent IceEvent RnoEvent

Detailed Description

Creation and investigation of an NcVertex.


Copyright(c) 1998 NCFS/IIHE, All Rights Reserved. *
*
Authors: The Netherlands Center for Fundamental Studies (NCFS). *
The Inter-university Institute for High Energies (IIHE). *
Website : http://www.iihe.ac.be *
Contact : Nick van Eijndhoven (nickve.nl@gmail.com) *
*
Contributors are mentioned in the code where appropriate. *
*
No part of this software may be used, copied, modified or distributed *
by any means nor transmitted or translated into machine language for *
commercial purposes without written permission by the IIHE representative. *
Permission to use the software strictly for non-commercial purposes *
is hereby granted without fee, provided that the above copyright notice *
appears in all copies and that both the copyright notice and this *
permission notice appear in the supporting documentation. *
This software is provided "as is" without express or implied warranty. *
The authors make no claims that this software is free of error, or is *
consistent with any particular standard of merchantability, or that it *
will meet your requirements for any particular application, other than *
indicated in the corresponding documentation. *
This software should not be relied on for solving a problem whose *
incorrect solution could result in injury to a person or loss of property. *
If you do use this software in such a manner, it is at your own risk. *
The authors disclaim all liability for direct or consequential damage *
resulting from your use of this software. *

// Class NcVertex
// Creation and investigation of an NcVertex.
// An NcVertex can be constructed by adding NcTracks and/or NcJets.
//
// Note : Also (secondary) vertices can be added to a vertex.
//
// To provide maximal flexibility to the user, two modes of vertex storage
// are provided by means of the memberfunction SetVertexCopy().
// The same holds for the storage of jets via SetJetCopy().
//
// a) SetVertexCopy(0) (which is the default).
// Only the pointers of the 'added' vertices are stored.
// This mode is typically used by making vertex studies based on a fixed list
// of vertices which stays under user control or is contained for instance
// in an NcEvent.
// In this way the NcVertex just represents a 'logical structure' for the
// physics analysis which can be embedded in e.g. an NcEvent or NcVertex.
//
// Note :
// Modifications made to the original vertices also affect the NcVertex objects
// which are stored.
//
// b) SetVertexCopy(1).
// Of every 'added' vertex a private copy will be made of which the pointer
// will be stored.
// In this way the NcVertex represents an entity on its own and modifications
// made to the original vertices do not affect the NcVertex objects which are
// stored.
// This mode will allow 'adding' many different NcVertex objects by
// creating only one NcVertex instance in the main programme and using the
// NcVertex::Reset, NcVertex::AddTrack and parameter setting memberfunctions.
//
// See also the documentation provided for the memberfunction SetOwner().
//
// Coding example to make 3 vertices v1, v2 and v3.
// ------------------------------------------------
// v1 contains the tracks 1,2,3 and 4
// v2 contains many different tracks
// v3 contains the jets 1 and 2
//
// NcTrack t1,t2,t3,t4;
// ...
// ... // code to fill the track data
// ...
//
// NcJet j1,j2;
// ...
// ... // code to fill the jet data
// ...
//
// NcVertex v1;
// v1.SetVertexCopy(1);
//
// v1.AddTrack(t1);
// v1.AddTrack(t2);
// v1.AddTrack(t3);
// v1.AddTrack(t4);
//
// Float_t r1[3]={2.4,0.1,-8.5};
// v1.SetPosition(r1,"car");
//
// NcVertex v2;
// v2.SetTrackCopy(1);
//
// NcTrack* tx=new NcTrack();
// for (Int_t i=0; i<10; i++)
// {
// ...
// ... // code to fill the track data
// ...
// v2.AddTrack(tx);
// tx->Reset();
// }
//
// Float_t r2[3]={1.6,-3.2,5.7};
// v2.SetPosition(r2,"car");
//
// NcVertex v3;
//
// v3.AddJet(j1);
// v3.AddJet(j2);
//
// Float_t r3[3]={6.2,4.8,1.3};
// v3.SetPosition(r3,"car");
//
// v1.Data("sph");
// v2.ListAll();
// v3.List("cyl");
//
// Float_t e1=v1.GetEnergy();
// Nc3Vector p1=v1.Get3Momentum();
// Float_t loc[3];
// v1.GetPosition(loc,"sph");
// NcPosition r=v2.GetPosition();
// r.Data();
// Int_t nt=v2.GetNtracks();
// NcTrack* tv=v2.GetTrack(1); // Access track number 1 of Vertex v2
//
// Specify the vertices v2 and v3 as secondary vertices of v1
//
// v1.AddVertex(v2);
// v1.AddVertex(v3);
//
// v1.List();
//
// Int_t nv=v1.GetNvtx();
// NcVertex* vx=v1.GetVertex(1); // Access 1st secondary vertex of v1
// Float_t e=vx->GetEnergy();
//
// Float_t M=v1.GetInvmass();
//
// Reconstruct Vertex v1 from scratch
//
// v1.Reset();
// v1.SetNvmax(25); // Increase initial no. of sec. vertices
// v1.AddTrack(t3);
// v1.AddTrack(t4);
// v1.AddJet(j2);
// Float_t pos[3]={7,9,4};
// v1.SetPosition(pos,"car");
//
// Note : By default all quantities are in meter, GeV, GeV/c or GeV/c**2
// but the user can indicate the usage of a different scale for
// the metric and/or energy-momentum units via the SetUnitScale()
// and SetEscale() memberfunctions, respectively.
// The actual metric and energy-momentum unit scales in use can be
// obtained via the GetUnitScale() and GetEscale() memberfunctions.
//
//--- Author: Nick van Eijndhoven 04-apr-1998 Utrecht University
//- Modified: Nick van Eijndhoven, IIHE-VUB, Brussel, May 4, 2021 11:16Z

Definition at line 18 of file NcVertex.h.

Public Member Functions

 NcVertex ()
 
 NcVertex (const NcVertex &v)
 
 NcVertex (Int_t n)
 
virtual ~NcVertex ()
 
void AddJet (NcJet &j, Int_t tracks=1)
 
void AddJet (NcJet *j, Int_t tracks=1)
 
void AddVertex (NcVertex &v, Int_t connect=1)
 
void AddVertex (NcVertex *v, Int_t connect=1)
 
virtual TObject * Clone (const char *name="") const
 
virtual void Data (TString f="car", TString u="rad")
 
virtual void Data (TString f="car", TString u="rad") const
 
virtual void Draw (Int_t secs, Int_t cons=1, Int_t jets=0)
 
virtual void Draw (Option_t *)
 
NcJetGetIdJet (Int_t id) const
 
NcVertexGetIdVertex (Int_t id) const
 
NcJetGetJet (Int_t i) const
 
Int_t GetJetCopy () const
 
Int_t GetNjets () const
 
Int_t GetNvertices () const
 
NcVertexGetVertex (Int_t i) const
 
Int_t GetVertexCopy () const
 
Int_t IsConnectTrack (NcTrack *t) const
 
Int_t IsJetTrack (NcTrack *t) const
 
virtual void List (TString f="car", TString u="rad", TObjArray *tracks=0)
 
virtual void ListAll (TString f="car", TString u="rad", TObjArray *tracks=0)
 
virtual void Reset ()
 
void ResetVertices ()
 
void SetJetCopy (Int_t j)
 
void SetNjmax (Int_t n=2)
 
void SetNvmax (Int_t n=2)
 
virtual void SetOwner (Bool_t own=kTRUE)
 
void SetVertexCopy (Int_t j)
 
TObjArray * SortJets (Int_t mode=-1, TObjArray *jets=0, TObjArray *ordered=0)
 
- Public Member Functions inherited from NcJet
 NcJet ()
 
 NcJet (const NcJet &j)
 
 NcJet (Int_t n)
 
virtual ~NcJet ()
 
void AddTrack (NcTrack &t)
 
void AddTrack (NcTrack *t)
 
Nc3Vector Get3Momentum (Float_t scale=-1) const
 
Float_t GetCharge () const
 
Double_t GetDistance (NcJet &j, Float_t scale=-1)
 
Double_t GetDistance (NcJet *j, Float_t scale=-1)
 
Double_t GetDistance (NcPosition &p, Float_t scale=-1)
 
Double_t GetDistance (NcPosition *p, Float_t scale=-1)
 
Double_t GetDistance (NcTrack &t, Float_t scale=-1)
 
Double_t GetDistance (NcTrack *t, Float_t scale=-1)
 
Double_t GetEl (Float_t scale=-1)
 
Double_t GetEnergy (Float_t scale=-1)
 
Float_t GetEscale () const
 
Double_t GetEt (Float_t scale=-1)
 
Int_t GetId () const
 
NcTrackGetIdTrack (Int_t id) const
 
Double_t GetInvmass (Float_t scale=-1)
 
Double_t GetMomentum (Float_t scale=-1)
 
Double_t GetMt (Float_t scale=-1)
 
Int_t GetNsignals (TString classname="TObject", Int_t par=0) const
 
Int_t GetNtracks (Int_t idmode=0, Int_t chmode=2, Int_t pcode=0)
 
Int_t GetNtracks (TString name, Int_t mode=0)
 
Double_t GetPl (Float_t scale=-1)
 
Double_t GetPt (Float_t scale=-1)
 
Double_t GetRapidity ()
 
NcPositionGetReferencePoint ()
 
TObjArray * GetSignals (TString classname, Int_t par=0, TObjArray *signals=0)
 
Double_t GetSignalValue (TString classname, TString varname, Int_t mode=0, Int_t par=2)
 
NcTrackGetTrack (Int_t i) const
 
Int_t GetTrackCopy () const
 
TObjArray * GetTracks (Int_t idmode=0, Int_t chmode=2, Int_t pcode=0, TObjArray *tracks=0)
 
TObjArray * GetTracks (TString name, Int_t mode=0, TObjArray *tracks=0)
 
void RemoveTrack (NcTrack *t)
 
void RemoveTracks (Int_t idmode=0, Int_t chmode=2, Int_t pcode=0)
 
void RemoveTracks (TString name, Int_t mode=0)
 
void ReplaceTrack (NcTrack *told, NcTrack *tnew)
 
void SetEscale (Float_t scale)
 
void SetId (Int_t id)
 
void SetReferencePoint (NcPosition &p)
 
void SetTrackCopy (Int_t j)
 
void ShowSignals (TString classname, Int_t par=0, Int_t mode=1, TString f="car", TString u="rad")
 
void ShowTracks (Int_t mode=1, TString f="car", TString u="rad", TObjArray *tracks=0)
 
TObjArray * SortTracks (Int_t mode=-1, TObjArray *tracks=0, TObjArray *ordered=0)
 
- Public Member Functions inherited from Nc4Vector
 Nc4Vector ()
 
 Nc4Vector (const Nc4Vector &v)
 
virtual ~Nc4Vector ()
 
Double_t Dot (Nc4Vector &q)
 
Nc3Vector Get3Vector () const
 
Double_t GetBeta ()
 
Nc3Vector GetBetaVector () const
 
void GetErrors (Double_t *v, TString f, TString u="rad")
 
void GetErrors (Float_t *v, TString f, TString u="rad")
 
Double_t GetGamma ()
 
Double_t GetInvariant ()
 
virtual Double_t GetOpeningAngle (Nc3Vector &q, TString u="rad")
 
virtual Double_t GetOpeningAngle (Nc4Vector &q, TString u="rad")
 
Double_t GetPseudoRapidity ()
 
Double_t GetResultError () const
 
Double_t GetScalar ()
 
Int_t GetScalarFlag () const
 
NcSignalGetUserData () const
 
Nc3Vector GetVecLong () const
 
void GetVector (Double_t *v, TString f, TString u="rad")
 
void GetVector (Float_t *v, TString f, TString u="rad")
 
Nc3Vector GetVecTrans () const
 
Double_t GetX (Int_t i, TString f, TString u="rad")
 
Int_t HasErrors () const
 
Int_t HasVector () const
 
virtual void Load (Nc4Vector &q)
 
Nc4Vector operator* (Double_t s)
 
Nc4Vectoroperator*= (Double_t s)
 
Nc4Vector operator+ (Nc4Vector &q)
 
Nc4Vectoroperator+= (Nc4Vector &q)
 
Nc4Vector operator- (Nc4Vector &q)
 
Nc4Vectoroperator-= (Nc4Vector &q)
 
Nc4Vector operator/ (Double_t s)
 
Nc4Vectoroperator/= (Double_t s)
 
Nc4Vectoroperator= (const Nc4Vector &q)
 
void Set3Vector (Double_t *v, TString f, TString u="rad")
 
void Set3Vector (Double_t v1, Double_t v2, Double_t v3, TString f, TString u="rad")
 
void Set3Vector (Float_t *v, TString f, TString u="rad")
 
void Set3Vector (Nc3Vector &v)
 
void SetErrors (Double_t *v, TString f, TString u="rad")
 
void SetErrors (Double_t e0, Double_t e1, Double_t e2, Double_t e3, TString f, TString u="rad")
 
void SetErrors (Float_t *v, TString f, TString u="rad")
 
void SetInvariant (Double_t v2, Double_t dv2=0)
 
void SetInvariantError (Double_t dv2)
 
void SetScalar (Double_t v0, Double_t dv0=0)
 
void SetScalarError (Double_t dv0)
 
void SetUserData (NcSignal &s)
 
void SetUserData (NcSignal *s)
 
void SetVector (Double_t *v, TString f, TString u="rad")
 
void SetVector (Double_t v0, Double_t v1, Double_t v2, Double_t v3, TString f, TString u="rad")
 
void SetVector (Double_t v0, Nc3Vector &v)
 
void SetVector (Float_t *v, TString f, TString u="rad")
 
virtual void SetZero ()
 
- Public Member Functions inherited from NcPosition
 NcPosition ()
 
 NcPosition (const NcPosition &p)
 
virtual ~NcPosition ()
 
Double_t GetDistance (NcPosition &p, Float_t scale=-1)
 
Double_t GetDistance (NcPosition *p, Float_t scale=-1)
 
NcPositionGetPosition ()
 
void GetPosition (Double_t *r, TString f, TString u="rad", Float_t s=-1) const
 
void GetPosition (Float_t *r, TString f, TString u="rad", Float_t s=-1) const
 
void GetPositionErrors (Double_t *e, TString f, TString u="rad", Float_t s=-1) const
 
void GetPositionErrors (Float_t *e, TString f, TString u="rad", Float_t s=-1) const
 
NcTimestampGetTimestamp ()
 
Float_t GetUnitScale () const
 
void RemoveTimestamp ()
 
void ResetPosition ()
 
void SetPosition (Double_t *r, TString f, TString u="rad")
 
void SetPosition (Double_t r1, Double_t r2, Double_t r3, TString f, TString u="rad")
 
void SetPosition (Float_t *r, TString f, TString u="rad")
 
void SetPosition (Nc3Vector &r)
 
void SetPositionErrors (Double_t *e, TString f, TString u="rad")
 
void SetPositionErrors (Double_t e1, Double_t e2, Double_t e3, TString f, TString u="rad")
 
void SetPositionErrors (Float_t *e, TString f, TString u="rad")
 
void SetTimestamp (NcTimestamp &t)
 
void SetUnitScale (Float_t s)
 
- Public Member Functions inherited from Nc3Vector
 Nc3Vector ()
 
 Nc3Vector (const Nc3Vector &v)
 
virtual ~Nc3Vector ()
 
Double_t ConvertAngle (Double_t a, TString in, TString out) const
 
Nc3Vector Cross (Nc3Vector &q) const
 
Double_t Dot (Nc3Vector &q)
 
void GetErrors (Double_t *e, TString f, TString u="rad") const
 
void GetErrors (Float_t *e, TString f, TString u="rad") const
 
Double_t GetNorm ()
 
virtual Double_t GetOpeningAngle (Nc3Vector &q, TString u="rad")
 
Nc3Vector GetPrimed (TRotMatrix *m) const
 
Double_t GetPseudoRapidity ()
 
Double_t GetResultError () const
 
Nc3Vector GetUnprimed (TRotMatrix *m) const
 
Nc3Vector GetVecLong () const
 
void GetVector (Double_t *v, TString f, TString u="rad") const
 
void GetVector (Float_t *v, TString f, TString u="rad") const
 
Nc3Vector GetVecTrans () const
 
Double_t GetX (Int_t i, TString f, TString u="rad")
 
Int_t HasErrors () const
 
Int_t HasVector () const
 
virtual void Load (Nc3Vector &q)
 
Nc3Vector operator* (Double_t s) const
 
Nc3Vectoroperator*= (Double_t s)
 
Nc3Vector operator+ (Nc3Vector &q) const
 
Nc3Vectoroperator+= (Nc3Vector &q)
 
Nc3Vector operator- (Nc3Vector &q) const
 
Nc3Vectoroperator-= (Nc3Vector &q)
 
Nc3Vector operator/ (Double_t s) const
 
Nc3Vectoroperator/= (Double_t s)
 
Nc3Vectoroperator= (const Nc3Vector &q)
 
void PrintAngle (Double_t a, TString in, TString out, Int_t ndig=1, Bool_t align=kFALSE) const
 
void SetErrors (Double_t *e, TString f, TString u="rad")
 
void SetErrors (Double_t e1, Double_t e2, Double_t e3, TString f, TString u="rad")
 
void SetErrors (Float_t *e, TString f, TString u="rad")
 
void SetVector (Double_t *v, TString f, TString u="rad")
 
void SetVector (Double_t v1, Double_t v2, Double_t v3, TString f, TString u="rad")
 
void SetVector (Float_t *v, TString f, TString u="rad")
 
virtual void SetZero ()
 

Protected Member Functions

void Init ()
 
- Protected Member Functions inherited from NcJet
void AddTrack (NcTrack &t, Int_t copy)
 
void AddTrack (NcTrack *t, Int_t copy)
 
void Init ()
 
void RemoveTrack (NcTrack *t, Int_t compress)
 
void SetNtinit (Int_t n=2)
 
- Protected Member Functions inherited from Nc4Vector
Double_t GetScaLong ()
 
Double_t GetScaTrans ()
 

Protected Attributes

TObjArray * fConnects
 
Int_t fJetCopy
 
TObjArray * fJets
 
TObjArray * fJetTracks
 
TObjArray * fLines
 ! Array to (temporarily) store the 3D lines for the event display
 
Int_t fNjets
 
Int_t fNjmax
 
Int_t fNvmax
 
Int_t fNvtx
 
Int_t fVertexCopy
 
TObjArray * fVertices
 
- Protected Attributes inherited from NcJet
Float_t fEscale
 
Int_t fNtinit
 
Int_t fNtmax
 
Int_t fNtrk
 
Float_t fQ
 
NcPositionObjfRef
 
TObjArray * fSelected
 ! Temp. array to hold user selected or ordered objects
 
Int_t fTrackCopy
 
TObjArray * fTracks
 
Int_t fUserId
 
- Protected Attributes inherited from Nc4Vector
Double32_t fDresult
 ! The error on the scalar result of an operation (e.g. dotproduct)
 
Double32_t fDv0
 
Double32_t fDv2
 
Int_t fScalar
 
NcSignalfUser
 
Nc3Vector fV
 
Double32_t fV0
 
Double32_t fV2
 
- Protected Attributes inherited from NcPosition
Float_t fScale
 
NcTimestampfTstamp
 
- Protected Attributes inherited from Nc3Vector
Double32_t fDresult
 ! Error on scalar result (e.g. norm or dotproduct)
 
Int_t fNv
 
Double32_t * fV
 

Private Member Functions

void Dumps (NcVertex *v, Int_t n, TString f, TString u)
 

Constructor & Destructor Documentation

◆ NcVertex() [1/3]

NcVertex::NcVertex ( )
// Default constructor.
// All variables initialised to 0.
// Initial maximum number of tracks is set to the default value.
// Initial maximum number of sec. vertices is set to the default value.

Definition at line 175 of file NcVertex.cxx.

◆ NcVertex() [2/3]

NcVertex::NcVertex ( Int_t n)
// Create a vertex to hold initially a maximum of n tracks.
// All variables initialised to 0.

Definition at line 211 of file NcVertex.cxx.

◆ ~NcVertex()

NcVertex::~NcVertex ( )
virtual
// Default destructor.

Definition at line 230 of file NcVertex.cxx.

◆ NcVertex() [3/3]

NcVertex::NcVertex ( const NcVertex & v)
// Copy constructor.

Definition at line 300 of file NcVertex.cxx.

Member Function Documentation

◆ AddJet() [1/2]

void NcVertex::AddJet ( NcJet & j,
Int_t tracks = 1 )
// Add a jet (and its tracks) to the vertex
// In case the maximum number of jets has been reached,
// the array space will be extended automatically
//
// Note : By default the tracks of the jet are added to the current (primary)
// vertex.
// The automatic addition of the tracks of the jet can be suppressed
// by specifying tracks=0. In this case only the NcJet object will
// be stored according to the mode specified by SetJetCopy().
// The latter will enable jet studies based on a fixed list of tracks
// as contained e.g. in an NcVertex or NcEvent.
//
// In case a private copy is made, this is performed via the Clone() memberfunction.
// All NcJet and derived classes have the default TObject::Clone() memberfunction.
// However, derived classes generally contain an internal data structure which may
// include pointers to other objects. Therefore it is recommended to provide
// for all derived classes a specific copy constructor and override the default Clone()
// memberfunction using this copy constructor.
// An example for this may be seen from NcJet.

Definition at line 500 of file NcVertex.cxx.

◆ AddJet() [2/2]

void NcVertex::AddJet ( NcJet * j,
Int_t tracks = 1 )
inline

Definition at line 31 of file NcVertex.h.

◆ AddVertex() [1/2]

void NcVertex::AddVertex ( NcVertex & v,
Int_t connect = 1 )
// Add a (secondary) vertex to the current vertex.
// In case the maximum number of (secondary) vertices has been reached,
// the array space will be extended automatically
//
// Note : By default the 4-momentum and charge of the current (primary) vertex
// are updated by automatically creating the track connecting
// both vertices. The track parameters are taken from the
// 4-momentum and charge of the secondary vertex.
// The automatic creation of the connecting track and updating
// of the (primary) vertex 4-momentum and charge can be suppressed
// by specifying connect=0. In this case, however, the user
// has to introduce the connecting track lateron by hand
// explicitly in order to match the kinematics and charge.
//
// In case a private copy is made, this is performed via the Clone() memberfunction.
// All NcVertex and derived classes have the default TObject::Clone() memberfunction.
// However, derived classes generally contain an internal data structure which may
// include pointers to other objects. Therefore it is recommended to provide
// for all derived classes a specific copy constructor and override the default Clone()
// memberfunction using this copy constructor.
// An example for this may be seen from NcVertex.

Definition at line 568 of file NcVertex.cxx.

◆ AddVertex() [2/2]

void NcVertex::AddVertex ( NcVertex * v,
Int_t connect = 1 )
inline

Definition at line 32 of file NcVertex.h.

◆ Clone()

TObject * NcVertex::Clone ( const char * name = "") const
virtual
// Make a deep copy of the current object and provide the pointer to the copy.
// This memberfunction enables automatic creation of new objects of the
// correct type depending on the object type, a feature which may be very useful
// for containers when adding objects in case the container owns the objects.
// This feature allows e.g. NcEvent to store either NcVertex objects or
// objects derived from NcVertex via the AddVertex memberfunction, provided
// these derived classes also have a proper Clone memberfunction.

Reimplemented from NcJet.

Reimplemented in IceEvent, NcEvent, and RnoEvent.

Definition at line 1414 of file NcVertex.cxx.

◆ Data() [1/2]

void NcVertex::Data ( TString f = "car",
TString u = "rad" )
virtual
// Provide vertex information within the coordinate frame f
//
// The string argument "u" allows to choose between different angular units
// in case e.g. a spherical frame is selected.
// u = "rad" : angles provided in radians
// "deg" : angles provided in degrees
//
// The defaults are f="car" and u="rad".

Reimplemented from NcJet.

Reimplemented in NcEvent.

Definition at line 637 of file NcVertex.cxx.

◆ Data() [2/2]

void NcPosition::Data ( TString f = "car",
TString u = "rad" ) const
virtual
// Provide all position/time information within the coordinate frame f.
//
// The string argument "u" allows to choose between different angular units
// in case e.g. a spherical frame is selected.
// u = "rad" : angles provided in radians
// "deg" : angles provided in degrees
//
// The defaults are f="car" and u="rad".

Reimplemented from NcPosition.

Definition at line 43 of file NcPosition.cxx.

◆ Draw() [1/2]

void NcVertex::Draw ( Int_t secs,
Int_t cons = 1,
Int_t jets = 0 )
virtual
// 3-Dimensional visualisation of an NcVertex with its attributes.
// The displayed tracklength is proportional to the momentum of the track.
//
// Color conventions :
// -------------------
// positive track : red
// neutral track : green
// negative track : blue
// jet-track : magenta (if explicit marking selected)
//
// secs = 1 --> Draw secondary vertices. (Default)
// 0 --> Don't draw secondary vertices.
//
// cons = 1 --> Draw (auto generated) connecting tracks. (Default)
// 0 --> Don't draw (auto generated) connecting tracks.
//
// jets = 1 --> Mark tracks belonging to jets.
// 0 --> Don't mark jet-tracks. (Default)
//
// Notes :
// -------
// Auto generated connecting tracks will be drawn as thin lines.
// Tracks belonging to jets will be marked as somewhat thinner magenta lines.
// This memberfunction is used recursively.

Definition at line 1118 of file NcVertex.cxx.

◆ Draw() [2/2]

virtual void NcVertex::Draw ( Option_t * )
inlinevirtual

Definition at line 51 of file NcVertex.h.

◆ Dumps()

void NcVertex::Dumps ( NcVertex * v,
Int_t n,
TString f,
TString u )
private
// Recursively provide the info of all secondary vertices of this vertex.

Definition at line 813 of file NcVertex.cxx.

◆ GetIdJet()

NcJet * NcVertex::GetIdJet ( Int_t id) const
// Return the jet with user identifier "id".

Definition at line 1008 of file NcVertex.cxx.

◆ GetIdVertex()

NcVertex * NcVertex::GetIdVertex ( Int_t id) const
// Return the (sec.) vertex with user identifier "id".

Definition at line 897 of file NcVertex.cxx.

◆ GetJet()

NcJet * NcVertex::GetJet ( Int_t i) const
// Return the i-th jet of the current vertex.

Definition at line 980 of file NcVertex.cxx.

◆ GetJetCopy()

Int_t NcVertex::GetJetCopy ( ) const
// Provide value of the JetCopy mode.
// 0 ==> No private copies are made; pointers of original jets are stored.
// 1 ==> Private copies of the jets are made and these pointers are stored.

Definition at line 1067 of file NcVertex.cxx.

◆ GetNjets()

Int_t NcVertex::GetNjets ( ) const
// Return the current number of jets.

Definition at line 969 of file NcVertex.cxx.

◆ GetNvertices()

Int_t NcVertex::GetNvertices ( ) const
// Return the current number of (secondary) vertices.

Definition at line 858 of file NcVertex.cxx.

◆ GetVertex()

NcVertex * NcVertex::GetVertex ( Int_t i) const
// Return the i-th (secondary) vertex of the current vertex.

Definition at line 869 of file NcVertex.cxx.

◆ GetVertexCopy()

Int_t NcVertex::GetVertexCopy ( ) const
// Provide value of the VertexCopy mode.
// 0 ==> No private copies are made; pointers of original vertices are stored.
// 1 ==> Private copies of the vertices are made and these pointers are stored.

Definition at line 956 of file NcVertex.cxx.

◆ Init()

void NcVertex::Init ( )
protected
// Initialisation of pointers etc...

Definition at line 192 of file NcVertex.cxx.

◆ IsConnectTrack()

Int_t NcVertex::IsConnectTrack ( NcTrack * t) const
// Indicate whether a track from the tracklist was created via the
// connection of a (secondary) vertex or not.
// In case the track was the result of (secondary) vertex addition the
// return value is 1, otherwise the value 0 will be returned.

Definition at line 1080 of file NcVertex.cxx.

◆ IsJetTrack()

Int_t NcVertex::IsJetTrack ( NcTrack * t) const
// Indicate whether a track from the tracklist was created via the
// addition of a jet or not.
// In case the track was the result of jet addition the return value is 1,
// otherwise the value 0 will be returned.

Definition at line 1099 of file NcVertex.cxx.

◆ List()

void NcVertex::List ( TString f = "car",
TString u = "rad",
TObjArray * tracks = 0 )
virtual
// Provide primary track and sec. vertex information within the coordinate frame f
//
// The string argument "u" allows to choose between different angular units
// in case e.g. a spherical frame is selected.
// u = "rad" : angles provided in radians
// "deg" : angles provided in degrees
//
// The defaults are f="car" and u="rad".
//
// In case the user provides the array "tracks" with selected track pointers, all tracks
// from that user array will be shown.
// In case tracks=0, all the available tracks from this vertex will be shown.
//
// The default is tracks=0.

Reimplemented from NcJet.

Definition at line 669 of file NcVertex.cxx.

◆ ListAll()

void NcVertex::ListAll ( TString f = "car",
TString u = "rad",
TObjArray * tracks = 0 )
virtual
// Provide complete (sec) vertex and (decay) track info within the coordinate frame f
//
// The string argument "u" allows to choose between different angular units
// in case e.g. a spherical frame is selected.
// u = "rad" : angles provided in radians
// "deg" : angles provided in degrees
//
// The defaults are f="car" and u="rad".
//
// In case the user provides the array "tracks" with selected track pointers, all tracks
// from that user array will be shown.
// In case tracks=0, all the available tracks from this vertex will be shown.
//
// The default is tracks=0.

Reimplemented from NcJet.

Definition at line 748 of file NcVertex.cxx.

◆ Reset()

void NcVertex::Reset ( )
virtual
// Reset all variables to 0 and reset all stored vertex and jet lists.
// The max. number of tracks is set to the initial value again
// The max. number of vertices is set to the default value again
// The max. number of jets is set to the default value again

Reimplemented from NcJet.

Reimplemented in IceEvent, NcEvent, and RnoEvent.

Definition at line 423 of file NcVertex.cxx.

◆ ResetVertices()

void NcVertex::ResetVertices ( )
// Reset the stored vertex list and delete all connecting tracks which
// were generated automatically via connect=1 in AddVertex().
// The max. number of vertices is set to the default value again.
// All physics quantities are updated according to the removal of the
// connecting tracks.

Definition at line 461 of file NcVertex.cxx.

◆ SetJetCopy()

void NcVertex::SetJetCopy ( Int_t j)
// (De)activate the creation of private copies of the added jets.
// j=0 ==> No private copies are made; pointers of original jets are stored.
// j=1 ==> Private copies of the jets are made and these pointers are stored.
//
// Note : Once the storage contains pointer(s) to NcJet objects one cannot
// change the JetCopy mode anymore.
// To change the JetCopy mode for an existing NcVertex containing
// jets one first has to invoke Reset().

Definition at line 1034 of file NcVertex.cxx.

◆ SetNjmax()

void NcVertex::SetNjmax ( Int_t n = 2)
// Set the initial maximum number of jets.

Definition at line 400 of file NcVertex.cxx.

◆ SetNvmax()

void NcVertex::SetNvmax ( Int_t n = 2)
// Set the initial maximum number of (secondary) vertices.

Definition at line 377 of file NcVertex.cxx.

◆ SetOwner()

void NcVertex::SetOwner ( Bool_t own = kTRUE)
virtual
// Set ownership of all added objects.
// The default parameter is own=kTRUE.
//
// Invokation of this memberfunction also sets all the copy modes
// (e.g. TrackCopy & co.) according to the value of own.
//
// This function (with own=kTRUE) is particularly useful when reading data
// from a tree/file, since Reset() will then actually remove all the
// added objects from memory irrespective of the copy mode settings
// during the tree/file creation process. In this way it provides a nice way
// of preventing possible memory leaks in the reading/analysis process.
//
// In addition this memberfunction can also be used as a shortcut to set all
// copy modes in one go during a tree/file creation process.
// However, in this case the user has to take care to only set/change the
// ownership (and copy mode) for empty objects (e.g. newly created objects
// or after invokation of the Reset() memberfunction) otherwise it will
// very likely result in inconsistent destructor behaviour.

Reimplemented from NcJet.

Reimplemented in NcEvent.

Definition at line 265 of file NcVertex.cxx.

◆ SetVertexCopy()

void NcVertex::SetVertexCopy ( Int_t j)
// (De)activate the creation of private copies of the added vertices.
// j=0 ==> No private copies are made; pointers of original vertices are stored.
// j=1 ==> Private copies of the vertices are made and these pointers are stored.
//
// Note : Once the storage contains pointer(s) to NcVertex objects one cannot
// change the VertexCopy mode anymore.
// To change the VertexCopy mode for an existing NcVertex containing
// vertices one first has to invoke Reset().

Definition at line 923 of file NcVertex.cxx.

◆ SortJets()

TObjArray * NcVertex::SortJets ( Int_t mode = -1,
TObjArray * jets = 0,
TObjArray * ordered = 0 )
// Order the references to an array of jets by looping over the input array "jets"
// and checking the value of a certain observable.
// The ordered array is returned as a TObjArray either via a user provided array "ordered"
// or as a returned pointer.
// In case jets=0 (default), the registered jets of the current vertex are used.
// Note that the original jet array is not modified.
// Via the "mode" argument the user can specify the observable to be checked upon
// and specify whether sorting should be performed in decreasing order (mode<0)
// or in increasing order (mode>0).
//
// The convention for the observable selection is the following :
// mode : 1 ==> Number of tracks in the jet
// 2 ==> Jet energy
// 3 ==> Jet momentum
// 4 ==> Invariant mass of the jet
// 5 ==> Transverse momentum of the jet
// 6 ==> Longitudinal momentum of the jet
// 7 ==> Transverse energy of the jet
// 8 ==> Longitudinal energy of the jet
// 9 ==> Transverse mass of the jet
// 10 ==> Jet rapidity
// 11 ==> Pseudo-rapidity of the jet
// 12 ==> Number of associated signals
// 13 ==> Total charge of the jet
//
// The default values are : mode=-1, jets=0 and ordered=0.
//
// Note :
// ------
// In case ordered=0 the ordered jet pointers are returned via a multi-purpose array,
// which may be overwritten by other memberfunctions (not restricted to jet ordering).
// It is recommended to provide a user defined array via the argument "ordered" to omit
// the danger of overwriting (or being overwritten by) other selections and to allow to use
// the ordered jet list amongst other selections.
// In case a user defined array "ordered" is provided, this memberfunction returns 0 for the
// return argument.

Definition at line 1231 of file NcVertex.cxx.

Member Data Documentation

◆ fConnects

TObjArray* NcVertex::fConnects
protected

Definition at line 60 of file NcVertex.h.

◆ fJetCopy

Int_t NcVertex::fJetCopy
protected

Definition at line 66 of file NcVertex.h.

◆ fJets

TObjArray* NcVertex::fJets
protected

Definition at line 64 of file NcVertex.h.

◆ fJetTracks

TObjArray* NcVertex::fJetTracks
protected

Definition at line 65 of file NcVertex.h.

◆ fLines

TObjArray* NcVertex::fLines
protected

! Array to (temporarily) store the 3D lines for the event display

Definition at line 67 of file NcVertex.h.

◆ fNjets

Int_t NcVertex::fNjets
protected

Definition at line 63 of file NcVertex.h.

◆ fNjmax

Int_t NcVertex::fNjmax
protected

Definition at line 62 of file NcVertex.h.

◆ fNvmax

Int_t NcVertex::fNvmax
protected

Definition at line 57 of file NcVertex.h.

◆ fNvtx

Int_t NcVertex::fNvtx
protected

Definition at line 58 of file NcVertex.h.

◆ fVertexCopy

Int_t NcVertex::fVertexCopy
protected

Definition at line 61 of file NcVertex.h.

◆ fVertices

TObjArray* NcVertex::fVertices
protected

Definition at line 59 of file NcVertex.h.


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