|
ATLAS Offline Software
|
Go to the documentation of this file.
40 #ifndef _VKalVrt_InDetVKalVxInJetTool_H
41 #define _VKalVrt_InDetVKalVxInJetTool_H
45 #include "GaudiKernel/ToolHandle.h"
46 #include "GaudiKernel/IChronoStatSvc.h"
51 #define BOOST_ALLOW_DEPRECATED_HEADERS
52 #include "boost/graph/adjacency_list.hpp"
72 class TrkVKalVrtFitter;
80 class PixelDetectorManager;
83 typedef std::vector<double>
dvect;
95 std::vector<const xAOD::TrackParticle*>
InpTrk;
115 const TLorentzVector & jetMomentum,
116 const std::vector<const xAOD::IParticle*> &
inputTracks)
const;
175 std::unique_ptr<Hists>
m_h;
178 "Remove track is it has less SCT hits"};
180 "Remove track is it has less Pixel hits"};
182 "Remove track is it has less Pixel+SCT hits"};
184 "Remove track is it has less B-layer hits"};
186 "Reject final 2tr vertices if tracks have shared hits"};
187 DoubleProperty
m_cutPt{
this,
"CutPt", 700.,
"Track Pt selection cut"};
188 DoubleProperty
m_cutZVrt{
this,
"CutZVrt", 15.,
"Track Z impact selection cut"};
189 DoubleProperty
m_cutA0{
this,
"CutA0", 5.,
"Track A0 selection cut"};
190 DoubleProperty
m_cutChi2{
this,
"CutChi2", 5.,
"Track Chi2 selection cut"};
192 "Track - common secondary vertex association cut. Single Vertex Finder only"};
194 "Cone around jet direction for track selection"};
196 "Cut on Chi2 of 2-track vertex for initial selection"};
198 "Cut on significance of 3D distance between initial 2-track vertex and PV"};
200 "Track 3D impact significance w/r primary vertex"};
202 "Track A0 error cut"};
204 "Track Z impact error cut"};
206 "B vertex selection cut on 2track vertex score (probability-like) based on track classification"};
208 "Maximal allowed mass for 2-track vertices"};
211 "Switch from default frozen version to the development/improved one"};
213 "Fill technical histograms"};
215 "Inform whether 3-layer or 4-layer detector is used"};
218 "Use vertex fit with RobustFit functional(VKalVrt) for common secondary vertex fit"};
227 "Clean vertices requiring track pixel hit patterns according to vertex position"};
229 "Clean vertices requiring track F(irst) M(easured) P(oints) matching to vertex position"};
231 "Reject V0s after checking 3D PV impact"};
233 "Run Multiple Secondary Vertices in jet finder"};
235 "Find Multiple Secondary Vertices + primary vertex in jet. MultiVertex Finder only!"};
237 "Allow secondary vertex behind the primary one (negative) w/r jet direction (not for multivertex!)"};
239 "Return ONLY negative secondary vertices (not for multivertex!)"};
241 "Allow one-track-vertex addition to already found secondary vertices. MultiVertex Finder only!"};
244 "To allow vertex merging for MultiVertex Finder"};
246 "To allow track from vertex detachment for MultiVertex Finder"};
249 {
this,
"VertexFitterTool",
"Trk::TrkVKalVrtFitter/VertexFitterTool"};
255 {
this,
"TrackClassTool",
"InDet::InDetTrkInJetType"};
257 {
this,
"EventInfoName",
"EventInfo"};
262 {
this,
"InDetEtaDependentCutsSvc",
""};
265 {
this,
"useITkMaterialRejection",
false,
266 "Reject vertices from hadronic interactions in detector material using ITk layout"};
386 const TLorentzVector & jetDir,
388 std::vector<const xAOD::TrackParticle*> & selSecTrk,
389 std::vector<const xAOD::TrackParticle*> & trkFromV0,
396 const TLorentzVector& jetDir,
401 std::vector< std::deque<long int> > *trkInVrt) ;
403 static double MaxOfShared(std::vector<WrkVrt> *WrkVrtSet,
404 std::vector< std::deque<long int> > *trkInVrt,
405 long int & selectedTrack,
406 long int & selectedVertex) ;
408 std::vector< std::deque<long int> > *trkInVrt,
409 long int & selectedTrack,
410 long int & selectedVertex)
const;
414 void printWrkSet(
const std::vector<WrkVrt> * WrkSet,
const std::string&
name )
const;
417 StatusCode cutTrk(
const std::unordered_map<std::string,double>& TrkVarDouble,
418 const std::unordered_map<std::string,int>& TrkVarInt,
419 float evtWgt=1.)
const;
423 static double massV0( std::vector< std::vector<double> >& trkAtVrt,
double massP,
double massPi ) ;
424 static int findMax( std::vector<double>& chi2PerTrk, std::vector<float>& rank) ;
427 TLorentzVector
totalMom(
const std::vector<const Trk::Perigee*>& inpTrk)
const;
428 static TLorentzVector
totalMom(
const std::vector<const xAOD::TrackParticle*>& inpTrk) ;
429 TLorentzVector
momAtVrt(
const std::vector<double>& inpTrk)
const;
434 void fillVrtNTup( std::vector<Vrt2Tr> & all2TrVrt)
const;
435 void fillNVrtNTup(std::vector<WrkVrt> & vrtSet, std::vector< std::vector<float> > & trkScore,
436 const xAOD::Vertex & primVrt,
const TLorentzVector & jetDir)
const;
443 static int nTrkCommon( std::vector<WrkVrt> *WrkVrtSet,
int V1,
int V2) ;
444 double minVrtVrtDist( std::vector<WrkVrt> *WrkVrtSet,
int & V1,
int & V2)
const;
445 static double minVrtVrtDistNext( std::vector<WrkVrt> *WrkVrtSet,
int & V1,
int & V2) ;
446 static bool isPart( std::deque<long int>
test, std::deque<long int>
base) ;
451 const std::vector<double>& VrtErr,
double& Signif )
const;
453 const std::vector<double>& VrtErr,
double& Signif )
const;
455 const std::vector<double>& SecVrtErr,
const TLorentzVector & JetDir)
const;
457 const Amg::Vector3D & Vrt2,
const std::vector<double>& VrtErr2)
const;
459 template <
class Particle>
461 std::vector<const Particle*> AllTracks,
466 double rankBTrk(
double TrkPt,
double JetPt,
double Signif)
const;
470 std::vector<const Trk::Perigee*>
GetPerigeeVector(
const std::vector<const Trk::TrackParticleBase*>& )
const;
475 std::vector<float> & trkRank,
477 const TLorentzVector & jetDir,
478 std::vector<double> & inpMass,
480 std::vector<double> & errorMatrix,
482 std::vector< std::vector<double> > & trkAtVrt)
const;
485 void removeEntryInList(std::vector<const Trk*>& , std::vector<float>&,
int)
const;
489 template <
class Particle>
491 std::vector<const Particle*> & selectedTracks,
495 template <
class Particle>
500 template <
class Particle>
502 std::vector<const Particle*> & AllTrackList,
504 template <
class Particle>
506 std::vector<const Particle*> & AllTrackLis,
509 template <
class Particle>
510 double improveVertexChi2( std::vector<WrkVrt> *WrkVrtSet,
int V, std::vector<const Particle*> & AllTracks,
516 const TLorentzVector & jetDir,
517 std::vector<const xAOD::TrackParticle*>& selPart,
518 float evtWgt=1.)
const;
523 std::vector<const Trk*> & TracksForFit,
525 const TLorentzVector & JetDir,
526 std::vector<double> & InpMass,
528 std::vector<const Trk*> & TrkFromV0,
529 std::vector<const Trk*> & ListSecondTracks,
531 float evtWgt = 1)
const;
543 template <
class Track>
545 template <
class Track>
555 TLorentzVector& Momentum,
557 std::vector<double>& ErrorMatrix,
558 std::vector<double>& Chi2PerTrk,
559 std::vector< std::vector<double> >& TrkAtVrt,
575 if(
Outlier >= (
int)ListTracks.size() )
return;
576 ListTracks.erase( ListTracks.begin()+
Outlier);
577 rank.erase( rank.begin()+
Outlier);
584 sort(ListTracks.begin(),ListTracks.end());
585 TransfEnd = unique(ListTracks.begin(),ListTracks.end());
586 ListTracks.erase( TransfEnd, ListTracks.end());
593 template <
typename Clique,
typename Graph>
596 std::vector<int> new_clique(0);
597 for(
auto i = clq.begin();
i != clq.end(); ++
i) new_clique.push_back(*
i);
605 template <
class Track>
609 int blTrk=0, blP=0, l1Trk=0, l1P=0, l2Trk=0, nLays=0;
613 double xvt=FitVertex.x();
614 double yvt=FitVertex.y();
615 double R=std::hypot(xvt, yvt);
617 if( blTrk<1 && l1Trk<1 )
return false;
618 if( nLays <2 )
return false;
621 if( blTrk>0 && blP==0 )
return false;
626 if(std::abs(FitVertex.z())<400.){
628 if( l1Trk<1 && l2Trk<1 )
return false;
631 if( l1Trk>0 && l1P==0 )
return false;
635 if( l2Trk==0 )
return false;
638 int d0Trk=0, d1Trk=0, d2Trk=0;
640 if( d0Trk+d1Trk+d2Trk ==0 )
return false;
JetConstituentVector::iterator iterator
std::vector< const xAOD::TrackParticle * > TrkFromV0
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Vertex_v1 Vertex
Define the latest version of the vertex class.
Basic data class defines behavior for all Jet objects The Jet class is the principal data class for...
std::vector< const xAOD::TrackParticle * > InpTrk
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
std::vector< std::vector< const xAOD::TrackParticle * > > FoundSecondTracks
std::vector< const xAOD::TrackParticle * > tmpListTracks
std::vector< const xAOD::TrackParticle * > listJetTracks
def TProfile(*args, **kwargs)
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a truth particle in the MC record.
clique_visitor(std::vector< std::vector< int > > &input)
Ensure that the ATLAS eigen extensions are properly loaded.
std::vector< const xAOD::TrackParticle * > listSecondTracks
std::vector< std::vector< int > > & m_allCliques
Eigen::Matrix< double, 3, 1 > Vector3D
Class describing a Vertex.
void clique(const Clique &clq, Graph &)
std::vector< const xAOD::TrackParticle * > TracksForFit
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Class describing a TrackParticle.
Handle class for reading from StoreGate.