Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
15 #include "GaudiKernel/ITHistSvc.h"
16 #include "GaudiKernel/ConcurrencyFlags.h"
31 const std::string&
name,
36 m_is_selected(
"is_selected"),
37 m_is_svtrk_final(
"is_svtrk_final"),
38 m_pt_wrtSV(
"pt_wrtSV"),
39 m_eta_wrtSV(
"eta_wrtSV"),
40 m_phi_wrtSV(
"phi_wrtSV"),
41 m_d0_wrtSV(
"d0_wrtSV"),
42 m_z0_wrtSV(
"z0_wrtSV"),
43 m_errP_wrtSV(
"errP_wrtSV"),
44 m_errd0_wrtSV(
"errd0_wrtSV"),
45 m_errz0_wrtSV(
"errz0_wrtSV"),
46 m_chi2_toSV(
"chi2_toSV")
51 declareInterface< IVrtInclusive >(
this);
73 ATH_MSG_DEBUG(
"NewVrtSecInclusiveTool TrkVKalVrtFitter found");
91 ATH_MSG_FATAL(
"Filling histograms not supported in MT jobs.");
92 return StatusCode::FAILURE;
95 SmartIF<ITHistSvc> hist_root{service(
"THistSvc")};
96 if( !hist_root )
ATH_MSG_DEBUG(
"Could not find THistSvc service");
97 else ATH_MSG_DEBUG(
"NewVrtSecInclusiveTool Histograms found");
101 m_h = std::make_unique<Hists>();
111 TFile*
rootFile = TFile::Open(rootFilePath.c_str(),
"READ");
114 return StatusCode::FAILURE;
116 TTree * training = (TTree*)
rootFile->Get(
"BDT");
117 m_SV2T_BDT = std::make_unique<MVAUtils::BDT>(training);
119 return StatusCode::SUCCESS;
125 const std::string& histDir)
127 m_hb_massPiPi =
new TH1D(
"massPiPi",
" mass PiPi",200,0., 4000.);
128 m_hb_massPiPi1 =
new TH1D(
"massPiPi1",
" mass PiPi",200,0., 4000.);
129 m_hb_massPPi =
new TH1D(
"massPPi",
" massPPi", 100,1000., 1250.);
130 m_hb_massEE =
new TH1D(
"massEE",
" massEE", 100,0., 200.);
131 m_hb_nvrt2 =
new TH1D(
"nvrt2",
" vertices2", 50,0., 50.);
132 m_hb_ratio =
new TH1D(
"ratio",
" ratio", 51,0., 1.02);
133 m_hb_totmass =
new TH1D(
"totmass",
" totmass", 250,0., 10000.);
134 m_hb_impact =
new TH1D(
"impact",
" impact", 100,0., 20.);
135 m_hb_impactR =
new TH1D(
"impactR",
" impactR", 400,-30., 70.);
136 m_hb_impactZ =
new TH1D(
"impactZ",
" impactZ", 100,-30., 70.);
137 m_hb_impactRZ =
new TH2D(
"impactRZ",
" impactRZ", 40,-10., 10., 60, -30.,30. );
138 m_hb_trkD0 =
new TH1D(
"trkD0",
" d0 of tracks", 100, 0., 10.);
139 m_hb_trkZ =
new TH1D(
"trkZ",
" Z of tracks", 120,-60., 60.);
140 m_hb_r2d =
new TH1D(
"r2interact",
"Interaction radius 2tr selected", 150,0., 150.);
141 m_hb_ntrksel =
new TH1F(
"NTrkSel",
"Number of selected tracks", 200,0., 200.);
144 m_hb_signif3D =
new TH1D(
"signif3D",
" Signif3D for initial 2tr vertex", 140,-20., 50.);
145 m_hb_sig3DTot =
new TH1D(
"sig3dcommon",
" Signif3D for common vertex", 140,-20., 50.);
146 m_hb_sig3D1tr =
new TH1D(
"sig3D1tr",
"Signif3D for 1tr vertices", 140,-20., 50.);
147 m_hb_sig3D2tr =
new TH1D(
"sig3D2tr",
"Signif3D for 2tr single vertex", 140,-20., 50.);
148 m_hb_sig3DNtr =
new TH1D(
"sig3DNtr",
"Signif3D for many-tr single vertex", 140,-20., 50.);
151 m_hb_distVV =
new TH1D(
"distvv",
"Vertex-Vertex dist", 100,0., 20.);
152 m_hb_diffPS =
new TH1D(
"diffPS",
"Primary-Secondary assoc", 200,-20., 20.);
153 m_hb_rawVrtN =
new TH1F(
"rawVrtN",
"Number of raw vertices multivertex case", 20, 0., 20.);
189 m_tuple =
new TTree(
"Vertices",
"Vertices");
247 return StatusCode::SUCCESS;
254 return StatusCode::SUCCESS;
260 const std::vector<const xAOD::TrackParticle*> & inpTrk,
263 std::vector<xAOD::Vertex*> listVrtSec(0);
273 tmpVectxAOD->
inpTrk.resize(inpTrk.size());
276 tmpVectxAOD->
beamX=beamSpotHandle->beamPos().x();
277 tmpVectxAOD->
beamY=beamSpotHandle->beamPos().y();
278 tmpVectxAOD->
beamZ=beamSpotHandle->beamPos().z();
283 listVrtSec =
getVrtSecMulti(tmpVectxAOD,primVrt,compatibilityGraph);
292 for (
const auto &vrt : listVrtSec) {
293 for (
const auto &trk : vrt->trackParticleLinks()) {
299 ATH_MSG_VERBOSE(
" > " << __FUNCTION__ <<
": > Track index " << (*trk)->index() <<
": Get the perigee of the track at the vertex." );
300 auto sv_perigee =
m_trackToVertexTool->perigeeAtVertex(Gaudi::Hive::currentContext(), **trk, vrt->position() );
302 ATH_MSG_WARNING(
" > " << __FUNCTION__ <<
": > Track index " << (*trk)->index() <<
": Failed in obtaining the SV perigee!" );
305 float qOverP_wrtSV = sv_perigee ? sv_perigee->parameters() [
Trk::qOverP] : -FLT_MAX;
306 float theta_wrtSV = sv_perigee ? sv_perigee->parameters() [
Trk::theta] : -FLT_MAX;
307 float p_wrtSV = sv_perigee ? 1.0 / std::abs( qOverP_wrtSV ) : -FLT_MAX;
308 float pt_wrtSV = sv_perigee ? p_wrtSV *
sin( theta_wrtSV ) : -FLT_MAX;
309 float eta_wrtSV = sv_perigee ? -
log(
tan( theta_wrtSV/2. ) ) : -FLT_MAX;
310 float phi_wrtSV = sv_perigee ? sv_perigee->parameters() [
Trk::phi] : -FLT_MAX;
311 float d0_wrtSV = sv_perigee ? sv_perigee->parameters() [
Trk::d0] : -FLT_MAX;
312 float z0_wrtSV = sv_perigee ? sv_perigee->parameters() [
Trk::z0] : -FLT_MAX;
313 float errd0_wrtSV = sv_perigee ? std::sqrt((*sv_perigee->covariance())(
Trk::d0,
Trk::d0 )) : -FLT_MAX;
314 float errz0_wrtSV = sv_perigee ? std::sqrt((*sv_perigee->covariance())(
Trk::z0,
Trk::z0 )) : -FLT_MAX;
315 float errP_wrtSV = sv_perigee ? std::sqrt((*sv_perigee->covariance())(
Trk::qOverP,
Trk::qOverP )) : -FLT_MAX;
328 std::unique_ptr<Trk::VxSecVertexInfo>
res = std::make_unique<Trk::VxSecVertexInfo>(
Trk::VxSecVertexInfo(listVrtSec));
346 std::vector<const SG::AuxVectorData*>
containers;
static std::string find_calib_file(const std::string &logical_file_name)
std::string find(const std::string &s)
return a remapped string
std::vector< const xAOD::TrackParticle * > listSelTracks
void lockDecoration(SG::auxid_t auxid)
Explicitly lock a decoration.
#define ATH_MSG_VERBOSE(x)
Helper class to provide type-safe access to aux data.
containers
Associate the close-by pflow objects and the calorimeter clusters.
Name: MuonSpContainer.h Package : offline/Reconstruction/MuonIdentification/muonEvent.
::StatusCode StatusCode
StatusCode definition for legacy code.
@ GaussianSumFilter
Tracks from Gaussian Sum Filter.
std::pair< std::vector< unsigned int >, bool > res
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses
StatusCode initialize(bool used=true)
std::vector< const xAOD::TrackParticle * > inpTrk
const xAOD::TrackParticle * getOriginalTrackParticleFromGSF(const xAOD::TrackParticle *trkPar)
Helper function for getting the "Original" Track Particle (i.e before GSF) via the GSF Track Particle...
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Manage lookup of vectors of auxiliary data.
#define ATLAS_THREAD_SAFE
Class describing a TrackParticle.
Define macros for attributes used to control the static checker.