ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkUtilityPackages
TrkValidationUtils
src
SurfaceNtupleBranch.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrkValidationUtils/SurfaceNtupleBranch.h
"
6
#include "
TrkSurfaces/Surface.h
"
7
#include <TTree.h>
8
9
namespace
Trk
{
10
11
void
SurfaceNtupleBranch::initForWrite
(TTree&
tree
,
const
std::string& prefix ){
12
m_transform
.initForWrite(
tree
,prefix);
13
m_center
.initForWrite(
tree
,
"center"
,3,prefix);
14
m_normal
.initForWrite(
tree
,
"normal"
,3,prefix);
15
16
TString bname = prefix.c_str();
17
bname +=
"id"
;
18
tree
.Branch(bname,&
m_id
);
19
}
20
21
void
SurfaceNtupleBranch::initForRead
(TTree&
tree
,
const
std::string& prefix ) {
22
m_transform
.initForRead(
tree
,prefix);
23
m_center
.initForRead(
tree
,
"center"
,3,prefix);
24
m_normal
.initForRead(
tree
,
"normal"
,3,prefix);
25
TString bname = prefix.c_str();
26
bname +=
"_id"
;
27
tree
.SetBranchAddress(bname,&
m_id
);
28
}
29
30
void
SurfaceNtupleBranch::fill
(
const
Trk::Surface
& surface ) {
31
32
m_transform
.fill(surface.
transform
());
33
m_center
.fill(surface.
center
());
34
m_normal
.fill(surface.
normal
());
35
m_id
= surface.
associatedDetectorElementIdentifier
().
get_compact
();
36
}
37
}
SurfaceNtupleBranch.h
Surface.h
Identifier::get_compact
value_type get_compact() const
Get the compact id.
Trk::Surface
Abstract Base Class for tracking surfaces.
Definition
Surface.h:79
Trk::Surface::normal
virtual const Amg::Vector3D & normal() const
Returns the normal vector of the Surface (i.e.
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Trk::Surface::associatedDetectorElementIdentifier
Identifier associatedDetectorElementIdentifier() const
return Identifier of the associated Detector Element
Trk::Surface::center
const Amg::Vector3D & center() const
Returns the center position of the Surface.
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
Trk::SurfaceNtupleBranch::initForRead
void initForRead(TTree &tree, const std::string &prefix="")
initialize class for reading
Definition
SurfaceNtupleBranch.cxx:21
Trk::SurfaceNtupleBranch::m_transform
TransformNtupleBranch m_transform
data
Definition
SurfaceNtupleBranch.h:48
Trk::SurfaceNtupleBranch::initForWrite
void initForWrite(TTree &tree, const std::string &prefix="")
initialize class for writing
Definition
SurfaceNtupleBranch.cxx:11
Trk::SurfaceNtupleBranch::m_center
VectorNtupleBranch m_center
Definition
SurfaceNtupleBranch.h:49
Trk::SurfaceNtupleBranch::m_normal
VectorNtupleBranch m_normal
Definition
SurfaceNtupleBranch.h:50
Trk::SurfaceNtupleBranch::fill
void fill(const Trk::Surface &surface)
fill a vector
Definition
SurfaceNtupleBranch.cxx:30
Trk::SurfaceNtupleBranch::m_id
int m_id
Definition
SurfaceNtupleBranch.h:51
tree
TChain * tree
Definition
tile_monitor.h:30
Generated on
for ATLAS Offline Software by
1.17.0