16 #include "GaudiKernel/ITHistSvc.h"
17 #include "GaudiKernel/ConcurrencyFlags.h"
32 const std::string&
name,
46 m_sel2VrtProbCut(0.02),
47 m_globVrtProbCut(0.005),
48 m_maxSVRadiusCut(140.),
51 m_vrtMassLimit(5500.),
52 m_vrt2TrMassLimit(4000.),
53 m_vrt2TrPtLimit(5.e5),
54 m_antiPileupSigRCut(2.0),
60 m_firstPixelLayerR(32.0),
61 m_removeTrkMatSignif(0.),
65 m_useVertexCleaning(true),
66 m_multiWithOneTrkVrt(true),
67 m_calibFileName(
"Fake2TrVertexReject.MVA.v02.root"),
69 m_fitSvc(
"Trk::TrkVKalVrtFitter/VertexFitterTool",this)
74 declareInterface< IVrtInclusive >(
this);
144 ATH_MSG_DEBUG(
"NewVrtSecInclusiveTool TrkVKalVrtFitter found");
150 ATH_MSG_FATAL(
"Filling histograms not supported in MT jobs.");
151 return StatusCode::FAILURE;
154 SmartIF<ITHistSvc> hist_root{service(
"THistSvc")};
155 if( !hist_root )
ATH_MSG_DEBUG(
"Could not find THistSvc service");
156 else ATH_MSG_DEBUG(
"NewVrtSecInclusiveTool Histograms found");
160 m_h = std::make_unique<Hists>();
170 TFile*
rootFile = TFile::Open(rootFilePath.c_str(),
"READ");
173 return StatusCode::FAILURE;
175 TTree * training = (TTree*)
rootFile->Get(
"BDT");
176 m_SV2T_BDT = std::make_unique<MVAUtils::BDT>(training);
178 return StatusCode::SUCCESS;
184 const std::string& histDir)
186 m_hb_massPiPi =
new TH1D(
"massPiPi",
" mass PiPi",200,0., 4000.);
187 m_hb_massPiPi1 =
new TH1D(
"massPiPi1",
" mass PiPi",200,0., 4000.);
188 m_hb_massPPi =
new TH1D(
"massPPi",
" massPPi", 100,1000., 1250.);
189 m_hb_massEE =
new TH1D(
"massEE",
" massEE", 100,0., 200.);
190 m_hb_nvrt2 =
new TH1D(
"nvrt2",
" vertices2", 50,0., 50.);
191 m_hb_ratio =
new TH1D(
"ratio",
" ratio", 51,0., 1.02);
192 m_hb_totmass =
new TH1D(
"totmass",
" totmass", 250,0., 10000.);
193 m_hb_impact =
new TH1D(
"impact",
" impact", 100,0., 20.);
194 m_hb_impactR =
new TH1D(
"impactR",
" impactR", 400,-30., 70.);
195 m_hb_impactZ =
new TH1D(
"impactZ",
" impactZ", 100,-30., 70.);
196 m_hb_impactRZ =
new TH2D(
"impactRZ",
" impactRZ", 40,-10., 10., 60, -30.,30. );
197 m_hb_trkD0 =
new TH1D(
"trkD0",
" d0 of tracks", 100, 0., 10.);
198 m_hb_trkZ =
new TH1D(
"trkZ",
" Z of tracks", 120,-60., 60.);
199 m_hb_r2d =
new TH1D(
"r2interact",
"Interaction radius 2tr selected", 150,0., 150.);
200 m_hb_ntrksel =
new TH1F(
"NTrkSel",
"Number of selected tracks", 200,0., 200.);
203 m_hb_signif3D =
new TH1D(
"signif3D",
" Signif3D for initial 2tr vertex", 140,-20., 50.);
204 m_hb_sig3DTot =
new TH1D(
"sig3dcommon",
" Signif3D for common vertex", 140,-20., 50.);
205 m_hb_sig3D1tr =
new TH1D(
"sig3D1tr",
"Signif3D for 1tr vertices", 140,-20., 50.);
206 m_hb_sig3D2tr =
new TH1D(
"sig3D2tr",
"Signif3D for 2tr single vertex", 140,-20., 50.);
207 m_hb_sig3DNtr =
new TH1D(
"sig3DNtr",
"Signif3D for many-tr single vertex", 140,-20., 50.);
210 m_hb_distVV =
new TH1D(
"distvv",
"Vertex-Vertex dist", 100,0., 20.);
211 m_hb_diffPS =
new TH1D(
"diffPS",
"Primary-Secondary assoc", 200,-20., 20.);
212 m_hb_rawVrtN =
new TH1F(
"rawVrtN",
"Number of raw vertices multivertex case", 20, 0., 20.);
248 m_tuple =
new TTree(
"Vertices",
"Vertices");
306 return StatusCode::SUCCESS;
313 return StatusCode::SUCCESS;
320 const std::vector<const xAOD::TrackParticle*> & inpTrk,
323 std::vector<xAOD::Vertex*> listVrtSec(0);
333 tmpVectxAOD->
inpTrk.resize(inpTrk.size());
336 tmpVectxAOD->
beamX=beamSpotHandle->beamPos().x();
337 tmpVectxAOD->
beamY=beamSpotHandle->beamPos().y();
338 tmpVectxAOD->
beamZ=beamSpotHandle->beamPos().z();
343 listVrtSec =
getVrtSecMulti(tmpVectxAOD,primVrt,compatibilityGraph);
348 std::vector<const xAOD::IParticle*> iparTrkV0(0);
349 std::unique_ptr<Trk::VxSecVertexInfo>
res = std::make_unique<Trk::VxSecVertexInfo>(
Trk::VxSecVertexInfo(listVrtSec));