ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigTools
TrigInDetPattRecoTools
src
TrigInDetUtils.cxx
Go to the documentation of this file.
1
//utils.cxx
2
#include "
TrigInDetPattRecoTools/TrigInDetUtils.h
"
3
4
bool
FTF::isGoodTrackUTT
(
const
Trk::Track
* track,
trackInfo
& theTrackInfo,
const
float
shift_x,
const
float
shift_y,
float
trkcut_ptgev) {
5
static
constexpr
int
TRKCUT_N_HITS_INNER = 1;
6
static
constexpr
int
TRKCUT_N_HITS_PIX = 2;
7
static
constexpr
float
TRKCUT_A0BEAM = 2.5;
8
static
constexpr
int
TRKCUT_N_HITS = 4;
9
10
if
( track->perigeeParameters()==
nullptr
)
return
false
;
11
if
( track->trackSummary()==
nullptr
)
return
false
;
12
theTrackInfo.
n_hits_innermost
= track->trackSummary()->get(
Trk::SummaryType::numberOfInnermostPixelLayerHits
);
13
float
n_hits_next_to_innermost = track->trackSummary()->get(
Trk::SummaryType::numberOfNextToInnermostPixelLayerHits
);
14
theTrackInfo.
n_hits_inner
= theTrackInfo.
n_hits_innermost
+ n_hits_next_to_innermost;
15
theTrackInfo.
n_hits_pix
= track->trackSummary()->get(
Trk::SummaryType::numberOfPixelHits
);
16
theTrackInfo.
n_hits_sct
= track->trackSummary()->get(
Trk::SummaryType::numberOfSCTHits
);
17
if
( theTrackInfo.
n_hits_inner
< TRKCUT_N_HITS_INNER )
return
false
;
18
if
( theTrackInfo.
n_hits_pix
< TRKCUT_N_HITS_PIX )
return
false
;
19
if
( (theTrackInfo.
n_hits_pix
+theTrackInfo.
n_hits_sct
) < TRKCUT_N_HITS )
return
false
;
20
theTrackInfo.
eta
= track->perigeeParameters()->eta();
21
theTrackInfo.
ptGeV
= track->perigeeParameters()->pT()/Gaudi::Units::GeV;
22
if
( theTrackInfo.
ptGeV
< trkcut_ptgev )
return
false
;
23
float
a0
= track->perigeeParameters()->parameters()[
Trk::d0
];
24
theTrackInfo.
phi0
= track->perigeeParameters()->parameters()[
Trk::phi0
];
25
theTrackInfo.
a0beam
=
a0
+ shift_x*sin(theTrackInfo.
phi0
)-shift_y*cos(theTrackInfo.
phi0
);
26
if
( std::abs(theTrackInfo.
a0beam
) > TRKCUT_A0BEAM ) {
return
false
;}
27
return
true
;
28
}
29
30
void
FTF::getBeamSpotShift
(
float
& shift_x,
float
& shift_y,
const
InDet::BeamSpotData
& beamSpotHandle) {
31
Amg::Vector3D
vertex = beamSpotHandle.
beamPos
();
32
//ATH_MSG_VERBOSE("Beam spot position " << vertex);
33
double
xVTX = vertex.x();
34
double
yVTX = vertex.y();
35
double
zVTX = vertex.z();
36
double
tiltXZ = beamSpotHandle.
beamTilt
(0);
37
double
tiltYZ = beamSpotHandle.
beamTilt
(1);
38
shift_x = xVTX - tiltXZ*zVTX;
//correction for tilt
39
shift_y = yVTX - tiltYZ*zVTX;
//correction for tilt
40
//ATH_MSG_VERBOSE("Beam center position: " << shift_x <<" "<< shift_y);
41
}
TrigInDetUtils.h
InDet::BeamSpotData
Definition
BeamSpotData.h:21
InDet::BeamSpotData::beamTilt
float beamTilt(int i) const noexcept
Returns the beam sigma for the i+3-th error matrix element (the 'tilt').
Definition
BeamSpotData.h:74
InDet::BeamSpotData::beamPos
const Amg::Vector3D & beamPos() const noexcept
Definition
BeamSpotData.h:68
Trk::Track
The ATLAS Track class.
Definition
Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
a0
double a0
Definition
globals.cxx:27
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
FTF::getBeamSpotShift
void getBeamSpotShift(float &shift_x, float &shift_y, const InDet::BeamSpotData &beamSpotHandle)
Definition
TrigInDetUtils.cxx:30
FTF::isGoodTrackUTT
bool isGoodTrackUTT(const Trk::Track *track, trackInfo &theTrackInfo, const float shift_x, const float shift_y, float trkcut_ptgev)
Definition
TrigInDetUtils.cxx:4
Trk::phi0
@ phi0
Definition
ParamDefs.h:65
Trk::d0
@ d0
Definition
ParamDefs.h:63
Trk::numberOfSCTHits
@ numberOfSCTHits
number of SCT holes
Definition
Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:71
Trk::numberOfPixelHits
@ numberOfPixelHits
number of pixel layers on track with absence of hits
Definition
Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:57
Trk::numberOfNextToInnermostPixelLayerHits
@ numberOfNextToInnermostPixelLayerHits
these are the pixel hits, including the b-layer
Definition
Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:55
Trk::numberOfInnermostPixelLayerHits
@ numberOfInnermostPixelLayerHits
these are the hits in the 1st pixel layer
Definition
Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:53
trackInfo
Definition
TrigInDetUtils.h:13
trackInfo::n_hits_innermost
int n_hits_innermost
Definition
TrigInDetUtils.h:14
trackInfo::n_hits_inner
int n_hits_inner
Definition
TrigInDetUtils.h:14
trackInfo::eta
float eta
Definition
TrigInDetUtils.h:15
trackInfo::phi0
float phi0
Definition
TrigInDetUtils.h:15
trackInfo::a0beam
float a0beam
Definition
TrigInDetUtils.h:15
trackInfo::ptGeV
float ptGeV
Definition
TrigInDetUtils.h:15
trackInfo::n_hits_sct
int n_hits_sct
Definition
TrigInDetUtils.h:14
trackInfo::n_hits_pix
int n_hits_pix
Definition
TrigInDetUtils.h:14
Generated on
for ATLAS Offline Software by
1.17.0