ATLAS Offline Software
Loading...
Searching...
No Matches
VP1BPhysSystem.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef VP1BPhysSystem_H
6#define VP1BPhysSystem_H
7
9// //
10// Header file for class VP1BPhysSystem //
11// //
12// Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> //
13// //
14// Initial version: June 2007 //
15// //
17
20//#include "TrkParametersBase/ParametersBase.h"
21
23
24
25class SoSwitch;
26class SoLineSet;
27
28namespace Trk {
29 class Track;
30// class IExtrapolator;
31}
32
33namespace Rec {
34 class TrackParticle;
36}
37
39// class TrackPropagationHelper;
40class TFile;
41class TTree;
42
43
44class Br {
45
46 public:
47
48 bool init(TTree* tree);
49 int GetEntry(int i);
50
51 TTree* vp1Filter;
52
53 int evtNum; //event number
54 int runNum; //run number
55
56 //vertices
57 double vtx_x; //vtx position
58 double vtx_y;
59 double vtx_z;
60 double vtx_xx; //covariance matrix
61 double vtx_yy;
62 double vtx_zz;
63 double vtx_xy;
64 double vtx_xz;
65 double vtx_yz;
66 int vtx_mother; //index of mother vertex
67 unsigned long vtx_color; //color of the vertex (for drawing)
68 std::vector<int>* vtx_daughters; //daughter vertices
69
70 //tracks
71 std::vector<double>* track_pt ; //track parameters
72 std::vector<double>* track_eta;
73 std::vector<double>* track_phi;
74 std::vector<double>* track_d0 ;
75 std::vector<double>* track_z0 ;
76 std::vector<double>* track_charge;
77 std::vector<double>* track_refitted_px; //refitted momentum
78 std::vector<double>* track_refitted_py;
79 std::vector<double>* track_refitted_pz;
80 std::vector<unsigned long>* track_color; //track color
81 std::vector<unsigned long>* track_refitted_color; //refitted momentum color
82
83 //neutral tracks
84 std::vector<double>* neutral_refitted_px; //neutral track momentum
85 std::vector<double>* neutral_refitted_py;
86 std::vector<double>* neutral_refitted_pz;
87 std::vector<double>* neutral_length; //length of the track
88 std::vector<int>* neutral_decay; //decay vertex
89 std::vector<unsigned long>* neutral_color; //track color
90
91
92};
93//________________________________________________________________
94
96
97 Q_OBJECT
98
99public:
101 virtual ~VP1BPhysSystem(){};
102 void buildEventSceneGraph(StoreGateSvc* sg, SoSeparator *root);
103
104 QWidget * buildController();
105
106private:
107
108 //drawing methods
109 void actualBuild();
110
111 void filterTrack(SoSeparator *root, const Rec::TrackParticleContainer* partCont,
112 double pt, double eta, double phi, double d0, double z0,
113 double x, double y, double z, unsigned long color, std::vector<const Rec::TrackParticle*>* selectedParticles);
114
115 void drawAllTrackParticles(StoreGateSvc* sg, SoSeparator *root, std::vector<const Rec::TrackParticle*>* selectedParticles);
116
117 void drawTrackParticle(SoSwitch* trackSwitch, const Rec::TrackParticle* part, unsigned long color);
118
119 void drawCutoffTrackParticle(SoSeparator *root, const Rec::TrackParticle* part, double x, double y, double z, unsigned long color);
120
121 void drawNeutralTrack(SoSeparator* root, double x, double y, double z, double px, double py, double pz, double length, unsigned long color);
122
123 void drawRefittedTrack(SoSeparator* root, double x, double y, double z, double px, double py, double pz, double charge, unsigned long color);
124
125 void drawVertex(SoSeparator *root, double x, double y, double z, double radius,
126 double xx, double xy, double xz, double yy, double yz, double zz, unsigned long color,
127 std::vector<SoSwitch*>& vertexSwitches);
128
129 void drawPoints(SoSwitch* trackSwitch, std::vector<Amg::Vector3D >* points, unsigned long color, double width, bool isNeutral);
130
131 std::vector<Amg::Vector3D >* getPoints(const Trk::Track* track);
132 std::vector<Amg::Vector3D >* getPoints(const Rec::TrackParticle* part);
133
134 std::vector<Amg::Vector3D >* findClosestApproach(std::vector<Amg::Vector3D >* points, double x, double y, double z);
135
136 //utils
137 const Trk::Track* getTrack(const Rec::TrackParticle* trackparticle);
138 const Trk::Track* getRefittedTrack(const Amg::Vector3D& pos, const Amg::Vector3D& mom, double charge);
139
140 void getColor(unsigned long icolor, double& r, double& g, double& b);
141 SoLineSet* createCross(double extent );
142
143 //member attributes
144
146 TTree* m_tree;
147 QString m_fileName;
148
150 SoSeparator* m_root;
151
154 std::vector<SoSwitch*> m_vertexSwitches;
155
160
161 std::vector<SoSwitch*> m_trackSwitches;
162 std::vector<SoSwitch*> m_overlapSwitches;
163 std::vector<SoSwitch*> m_signalSwitches;
164 std::vector<SoSwitch*> m_neutralSwitches;
165 std::vector<SoSwitch*> m_refittedSwitches;
166
168
169 class Clockwork;
171
172private Q_SLOTS:
173
174 void loadFile();
175 void displayVerticesChanged ( int state );
176 void sphereToggled ( bool checked );
177 void crossToggled ( bool checked );
178 void ellipsoidToggled ( bool checked );
179
180 void displayAllTracksChanged ( int state );
181 void displayOrigSignalChanged ( int state );
182 void displayRefTracksChanged ( int state );
183 void displayNeutralChanged ( int state );
184
185
186};
187
188#endif
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
double charge(const T &p)
Definition AtlasPID.h:997
bool isNeutral(const T &p)
Definition AtlasPID.h:1085
double length(const pvec &v)
const double width
#define y
#define x
#define z
std::vector< double > * neutral_refitted_px
std::vector< double > * track_refitted_pz
std::vector< double > * neutral_refitted_pz
double vtx_xy
double vtx_x
std::vector< unsigned long > * neutral_color
double vtx_xz
TTree * vp1Filter
double vtx_z
int vtx_mother
std::vector< int > * vtx_daughters
double vtx_xx
std::vector< double > * track_d0
unsigned long vtx_color
std::vector< double > * track_phi
double vtx_y
std::vector< double > * track_pt
std::vector< double > * track_refitted_px
std::vector< double > * neutral_refitted_py
std::vector< double > * track_refitted_py
int runNum
std::vector< double > * track_charge
std::vector< double > * neutral_length
int evtNum
std::vector< double > * track_eta
double vtx_yz
std::vector< double > * track_z0
std::vector< unsigned long > * track_refitted_color
int GetEntry(int i)
bool init(TTree *tree)
std::vector< int > * neutral_decay
std::vector< unsigned long > * track_color
double vtx_zz
double vtx_yy
IVP13DSystemSimple(const QString &name, const QString &information, const QString &contact_info)
State state() const
The Athena Transient Store API.
void drawTrackParticle(SoSwitch *trackSwitch, const Rec::TrackParticle *part, unsigned long color)
SoSeparator * m_root
void buildEventSceneGraph(StoreGateSvc *sg, SoSeparator *root)
const Trk::Track * getTrack(const Rec::TrackParticle *trackparticle)
utils *****************************************************************************
void displayNeutralChanged(int state)
void ellipsoidToggled(bool checked)
const Trk::Track * getRefittedTrack(const Amg::Vector3D &pos, const Amg::Vector3D &mom, double charge)
void displayOrigSignalChanged(int state)
std::vector< SoSwitch * > m_refittedSwitches
std::vector< SoSwitch * > m_overlapSwitches
StoreGateSvc * m_sg
void drawAllTrackParticles(StoreGateSvc *sg, SoSeparator *root, std::vector< const Rec::TrackParticle * > *selectedParticles)
SoLineSet * createCross(double extent)
std::vector< SoSwitch * > m_neutralSwitches
std::vector< Amg::Vector3D > * findClosestApproach(std::vector< Amg::Vector3D > *points, double x, double y, double z)
void displayVerticesChanged(int state)
void crossToggled(bool checked)
virtual ~VP1BPhysSystem()
void loadFile()
slots *****************************************************************************
void drawVertex(SoSeparator *root, double x, double y, double z, double radius, double xx, double xy, double xz, double yy, double yz, double zz, unsigned long color, std::vector< SoSwitch * > &vertexSwitches)
std::vector< Amg::Vector3D > * getPoints(const Trk::Track *track)
Clockwork * m_c
std::vector< SoSwitch * > m_signalSwitches
void drawRefittedTrack(SoSeparator *root, double x, double y, double z, double px, double py, double pz, double charge, unsigned long color)
void drawNeutralTrack(SoSeparator *root, double x, double y, double z, double px, double py, double pz, double length, unsigned long color)
std::vector< SoSwitch * > m_trackSwitches
void filterTrack(SoSeparator *root, const Rec::TrackParticleContainer *partCont, double pt, double eta, double phi, double d0, double z0, double x, double y, double z, unsigned long color, std::vector< const Rec::TrackParticle * > *selectedParticles)
drawing methods *******************************************************************
QWidget * buildController()
void sphereToggled(bool checked)
void getColor(unsigned long icolor, double &r, double &g, double &b)
std::vector< SoSwitch * > m_vertexSwitches
void displayRefTracksChanged(int state)
void displayAllTracksChanged(int state)
void drawCutoffTrackParticle(SoSeparator *root, const Rec::TrackParticle *part, double x, double y, double z, unsigned long color)
void drawPoints(SoSwitch *trackSwitch, std::vector< Amg::Vector3D > *points, unsigned long color, double width, bool isNeutral)
int r
Definition globals.cxx:22
Eigen::Matrix< double, 3, 1 > Vector3D
Gaudi Tools.
Ensure that the ATLAS eigen extensions are properly loaded.
TChain * tree