ATLAS Offline Software
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 
25 class SoSwitch;
26 class SoLineSet;
27 
28 namespace Trk {
29  class Track;
30 // class IExtrapolator;
31 }
32 
33 namespace Rec {
34  class TrackParticle;
36 }
37 
39 // class TrackPropagationHelper;
40 class TFile;
41 class TTree;
42 
43 
44 class 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 
99 public:
100  VP1BPhysSystem();
101  virtual ~VP1BPhysSystem(){};
102  void buildEventSceneGraph(StoreGateSvc* sg, SoSeparator *root);
103 
104  QWidget * buildController();
105 
106 private:
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 
145  TFile* m_rootFile;
146  TTree* m_tree;
147  QString m_fileName;
148 
150  SoSeparator* m_root;
151 
154  std::vector<SoSwitch*> m_vertexSwitches;
155 
156  bool m_showAll;
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 
172 private 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
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
Br::vtx_x
double vtx_x
Definition: VP1BPhysConvertor.h:22
Br::neutral_refitted_pz
std::vector< double > * neutral_refitted_pz
Definition: VP1BPhysConvertor.h:50
VP1BPhysSystem::m_trackSwitches
std::vector< SoSwitch * > m_trackSwitches
Definition: VP1BPhysSystem.h:161
Br::vtx_xy
double vtx_xy
Definition: VP1BPhysConvertor.h:28
beamspotman.r
def r
Definition: beamspotman.py:676
VP1BPhysSystem::crossToggled
void crossToggled(bool checked)
Definition: VP1BPhysSystem.cxx:856
TrackPropagationHelper.h
VP1BPhysSystem::drawRefittedTrack
void drawRefittedTrack(SoSeparator *root, double x, double y, double z, double px, double py, double pz, double charge, unsigned long color)
Definition: VP1BPhysSystem.cxx:487
Br::track_refitted_py
std::vector< double > * track_refitted_py
Definition: VP1BPhysConvertor.h:42
color
Definition: jFexInputByteStreamTool.cxx:25
IVP13DSystemSimple
Definition: IVP13DSystemSimple.h:24
test_pyathena.px
px
Definition: test_pyathena.py:18
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
Br::vtx_yz
double vtx_yz
Definition: VP1BPhysConvertor.h:30
PlotCalibFromCool.yy
yy
Definition: PlotCalibFromCool.py:714
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
VP1BPhysSystem::actualBuild
void actualBuild()
Definition: VP1BPhysSystem.cxx:190
AthCUDAExamples::TrackParticleContainer
vecmem::edm::container< TrackParticleInterface, vecmem::edm::type::vector< float >, vecmem::edm::type::vector< float >, vecmem::edm::type::vector< float > > TrackParticleContainer
SoA, GPU friendly TrackParticleContainer.
Definition: Control/AthenaExamples/AthExCUDA/src/TrackParticleContainer.h:46
VP1BPhysSystem::drawTrackParticle
void drawTrackParticle(SoSwitch *trackSwitch, const Rec::TrackParticle *part, unsigned long color)
Definition: VP1BPhysSystem.cxx:419
VP1BPhysSystem::m_showAll
bool m_showAll
Definition: VP1BPhysSystem.h:156
VP1BPhysSystem::m_showNeutral
bool m_showNeutral
Definition: VP1BPhysSystem.h:158
VP1BPhysSystem::m_fileName
QString m_fileName
Definition: VP1BPhysSystem.h:147
Br::track_charge
std::vector< double > * track_charge
Definition: VP1BPhysConvertor.h:40
VP1BPhysSystem::displayNeutralChanged
void displayNeutralChanged(int state)
Definition: VP1BPhysSystem.cxx:945
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
Br::vtx_color
unsigned long vtx_color
Definition: VP1BPhysConvertor.h:32
Br::vtx_y
double vtx_y
Definition: VP1BPhysConvertor.h:23
VP1BPhysSystem::drawAllTrackParticles
void drawAllTrackParticles(StoreGateSvc *sg, SoSeparator *root, std::vector< const Rec::TrackParticle * > *selectedParticles)
Definition: VP1BPhysSystem.cxx:378
VP1BPhysSystem::displayAllTracksChanged
void displayAllTracksChanged(int state)
Definition: VP1BPhysSystem.cxx:888
tree
TChain * tree
Definition: tile_monitor.h:30
VP1BPhysSystem::m_rootFile
TFile * m_rootFile
Definition: VP1BPhysSystem.h:145
test_pyathena.pt
pt
Definition: test_pyathena.py:11
Br::track_z0
std::vector< double > * track_z0
Definition: VP1BPhysConvertor.h:39
Br::track_color
std::vector< unsigned long > * track_color
Definition: VP1BPhysConvertor.h:44
VP1BPhysSystem::m_refittedSwitches
std::vector< SoSwitch * > m_refittedSwitches
Definition: VP1BPhysSystem.h:165
VP1BPhysSystem::createCross
SoLineSet * createCross(double extent)
Definition: VP1BPhysSystem.cxx:1078
Br::track_refitted_pz
std::vector< double > * track_refitted_pz
Definition: VP1BPhysConvertor.h:43
VP1BPhysSystem::getRefittedTrack
const Trk::Track * getRefittedTrack(const Amg::Vector3D &pos, const Amg::Vector3D &mom, double charge)
Definition: VP1BPhysSystem.cxx:1021
VP1BPhysSystem::m_showVertices
bool m_showVertices
Definition: VP1BPhysSystem.h:153
VP1BPhysSystem::m_sg
StoreGateSvc * m_sg
Definition: VP1BPhysSystem.h:149
sendEI_SPB.root
root
Definition: sendEI_SPB.py:34
Br::evtNum
int evtNum
Definition: VP1BPhysSystem.h:53
Br::vtx_z
double vtx_z
Definition: VP1BPhysConvertor.h:24
VP1BPhysSystem::drawCutoffTrackParticle
void drawCutoffTrackParticle(SoSeparator *root, const Rec::TrackParticle *part, double x, double y, double z, unsigned long color)
Definition: VP1BPhysSystem.cxx:436
IVP13DSystemSimple.h
VP1BPhysSystem::loadFile
void loadFile()
slots *****************************************************************************
Definition: VP1BPhysSystem.cxx:770
x
#define x
Br::track_refitted_px
std::vector< double > * track_refitted_px
Definition: VP1BPhysConvertor.h:41
VP1BPhysSystem::buildController
QWidget * buildController()
Definition: VP1BPhysSystem.cxx:152
VP1BPhysSystem::m_showSignal
bool m_showSignal
Definition: VP1BPhysSystem.h:157
IVP1System::state
State state() const
Definition: IVP1System.cxx:129
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
VP1BPhysSystem::m_vertexSwitches
std::vector< SoSwitch * > m_vertexSwitches
Definition: VP1BPhysSystem.h:154
VP1BPhysSystem::m_c
Clockwork * m_c
Definition: VP1BPhysSystem.h:169
Br
Definition: VP1BPhysConvertor.h:14
GeoPrimitives.h
VP1BPhysSystem::Clockwork
Definition: VP1BPhysSystem.cxx:109
VP1BPhysSystem::displayOrigSignalChanged
void displayOrigSignalChanged(int state)
Definition: VP1BPhysSystem.cxx:907
VP1BPhysSystem::buildEventSceneGraph
void buildEventSceneGraph(StoreGateSvc *sg, SoSeparator *root)
Definition: VP1BPhysSystem.cxx:336
Br::vtx_mother
int vtx_mother
Definition: VP1BPhysConvertor.h:31
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
Br::neutral_refitted_py
std::vector< double > * neutral_refitted_py
Definition: VP1BPhysConvertor.h:49
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
VP1BPhysSystem::drawPoints
void drawPoints(SoSwitch *trackSwitch, std::vector< Amg::Vector3D > *points, unsigned long color, double width, bool isNeutral)
Definition: VP1BPhysSystem.cxx:515
VP1BPhysSystem::sphereToggled
void sphereToggled(bool checked)
Definition: VP1BPhysSystem.cxx:839
lumiFormat.i
int i
Definition: lumiFormat.py:85
Br::vtx_xz
double vtx_xz
Definition: VP1BPhysConvertor.h:29
z
#define z
Rec
Name: MuonSpContainer.h Package : offline/Reconstruction/MuonIdentification/muonEvent.
Definition: FakeTrackBuilder.h:10
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
Br::track_refitted_color
std::vector< unsigned long > * track_refitted_color
Definition: VP1BPhysConvertor.h:45
VP1BPhysSystem::m_overlapSwitches
std::vector< SoSwitch * > m_overlapSwitches
Definition: VP1BPhysSystem.h:162
Br::neutral_decay
std::vector< int > * neutral_decay
Definition: VP1BPhysConvertor.h:52
Br::track_pt
std::vector< double > * track_pt
Definition: VP1BPhysConvertor.h:35
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
VP1BPhysSystem::findClosestApproach
std::vector< Amg::Vector3D > * findClosestApproach(std::vector< Amg::Vector3D > *points, double x, double y, double z)
Definition: VP1BPhysSystem.cxx:632
Br::vtx_zz
double vtx_zz
Definition: VP1BPhysConvertor.h:27
isNeutral
bool isNeutral(const T &p)
Definition: AtlasPID.h:546
VP1BPhysSystem::getColor
void getColor(unsigned long icolor, double &r, double &g, double &b)
Definition: VP1BPhysSystem.cxx:1059
Br::vtx_daughters
std::vector< int > * vtx_daughters
Definition: VP1BPhysSystem.h:68
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
VP1BPhysSystem::drawVertex
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)
Definition: VP1BPhysSystem.cxx:679
Br::init
bool init(TTree *tree)
Definition: VP1BPhysSystem.cxx:58
VP1BPhysSystem::VP1BPhysSystem
VP1BPhysSystem()
Definition: VP1BPhysSystem.cxx:115
VP1BPhysSystem::displayRefTracksChanged
void displayRefTracksChanged(int state)
Definition: VP1BPhysSystem.cxx:926
VP1BPhysSystem::m_neutralSwitches
std::vector< SoSwitch * > m_neutralSwitches
Definition: VP1BPhysSystem.h:164
Br::neutral_refitted_px
std::vector< double > * neutral_refitted_px
Definition: VP1BPhysConvertor.h:48
VP1BPhysSystem::m_vertexStyle
int m_vertexStyle
Definition: VP1BPhysSystem.h:152
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg::py
@ py
Definition: GeoPrimitives.h:39
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
Br::track_phi
std::vector< double > * track_phi
Definition: VP1BPhysConvertor.h:37
Br::track_eta
std::vector< double > * track_eta
Definition: VP1BPhysConvertor.h:36
charge
double charge(const T &p)
Definition: AtlasPID.h:538
VP1BPhysSystem::m_signalSwitches
std::vector< SoSwitch * > m_signalSwitches
Definition: VP1BPhysSystem.h:163
Rec::TrackParticleContainer
Definition: Reconstruction/Particle/Particle/TrackParticleContainer.h:33
VP1BPhysSystem::m_br
Br * m_br
Definition: VP1BPhysSystem.h:167
Br::vtx_yy
double vtx_yy
Definition: VP1BPhysConvertor.h:26
VP1BPhysSystem::m_showRefitted
bool m_showRefitted
Definition: VP1BPhysSystem.h:159
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Br::neutral_color
std::vector< unsigned long > * neutral_color
Definition: VP1BPhysConvertor.h:53
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
VP1BPhysSystem::ellipsoidToggled
void ellipsoidToggled(bool checked)
Definition: VP1BPhysSystem.cxx:872
Br::GetEntry
int GetEntry(int i)
Definition: VP1BPhysSystem.cxx:105
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Rec::TrackParticle
Definition: Reconstruction/Particle/Particle/TrackParticle.h:47
Br::track_d0
std::vector< double > * track_d0
Definition: VP1BPhysConvertor.h:38
Br::runNum
int runNum
Definition: VP1BPhysSystem.h:54
VP1BPhysSystem::m_root
SoSeparator * m_root
Definition: VP1BPhysSystem.h:150
y
#define y
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
VP1BPhysSystem::~VP1BPhysSystem
virtual ~VP1BPhysSystem()
Definition: VP1BPhysSystem.h:101
VP1ToolAccessHelper
Definition: VP1ToolAccessHelper.h:29
Br::vtx_xx
double vtx_xx
Definition: VP1BPhysConvertor.h:25
VP1BPhysSystem::displayVerticesChanged
void displayVerticesChanged(int state)
Definition: VP1BPhysSystem.cxx:819
VP1BPhysSystem::drawNeutralTrack
void drawNeutralTrack(SoSeparator *root, double x, double y, double z, double px, double py, double pz, double length, unsigned long color)
Definition: VP1BPhysSystem.cxx:460
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
VP1BPhysSystem::filterTrack
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 *******************************************************************
Definition: VP1BPhysSystem.cxx:349
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
VP1BPhysSystem::getPoints
std::vector< Amg::Vector3D > * getPoints(const Trk::Track *track)
Definition: VP1BPhysSystem.cxx:565
VP1BPhysSystem
Definition: VP1BPhysSystem.h:95
VP1BPhysSystem::m_tree
TTree * m_tree
Definition: VP1BPhysSystem.h:146
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
Br::vp1Filter
TTree * vp1Filter
Definition: VP1BPhysSystem.h:51
jobOptions.points
points
Definition: jobOptions.GenevaPy8_Zmumu.py:97
Br::neutral_length
std::vector< double > * neutral_length
Definition: VP1BPhysConvertor.h:51
VP1BPhysSystem::getTrack
const Trk::Track * getTrack(const Rec::TrackParticle *trackparticle)
utils *****************************************************************************
Definition: VP1BPhysSystem.cxx:960