|
|
Go to the documentation of this file.
18 primaryVertexCut2_(0.0),
19 dcaPInnerHitCut2_(1000.0),
20 vertexCandidatesSize_(50),
28 cout <<
"~PFDisplacedVertexCandidateFinder - number of remaining elements: " <<
eventTracks_.size() << endl;
43 mainVertexHandle->begin()->x(), mainVertexHandle->begin()->y(), mainVertexHandle->begin()->z())
62 for (
unsigned i = 0;
i < trackh->size();
i++) {
82 cout <<
"========= Start Finding Displaced Vertex Candidates =========" << endl;
100 if (tempVertexCandidate.
isValid()) {
107 cout <<
"========= End Finding Displaced Vertex Candidates =========" << endl;
114 cout <<
"== Start the association procedure ==" << endl;
126 cout <<
"link failed" << endl;
135 cout <<
"link parameters "
136 <<
" *next = " << (*next).key() <<
" *last = " << (*last).key() <<
" dist = " << dist
137 <<
" P.x = " <<
P.x() <<
" P.y = " <<
P.y() <<
" P.z = " <<
P.z() << endl;
144 cout <<
"adding to block element " << (*next).key() << endl;
173 cout <<
"calling associate " << (*next).key() <<
" & " << (*ie).key() << endl;
180 cout <<
"**** removing element " << endl;
188 cout <<
"== End the association procedure ==" << endl;
191 return iteratorToNextFreeElement;
199 if (fabs(el1->
eta() - el2->
eta()) > 1) {
203 if (el1->
pt() > 2 && el2->
pt() > 2 && fabs(el1->
phi() - el2->
phi()) > 1) {
218 vertexLinkTest = PFDisplacedVertexCandidate::LINKTEST_DCA;
227 double rho2 =
P.
x() *
P.x() +
P.y() *
P.y();
236 double tob_rho_limit2 = 10000;
237 double tec_z_limit = 270;
239 if (rho2 > tob_rho_limit2) {
243 if (fabs(
P.z()) > tec_z_limit) {
279 const vector<TrackBaseRef>& els = vertexCandidate.
elements();
282 for (
unsigned i1 = 0;
i1 < els.size();
i1++) {
283 for (
unsigned i2 =
i1 + 1;
i2 < els.size();
i2++) {
292 link(els[
i1], els[
i2], dist,
P, linktest);
296 cout <<
"Setting link between elements " <<
i1 <<
" key " << els[
i1].key() <<
" and " <<
i2 <<
" key "
297 << els[
i2].key() <<
" of dist =" << dist <<
" computed from link test " << linktest << endl;
322 double pt = trackref->
pt();
323 double dpt = trackref->
ptError();
326 double pt_error = dpt /
pt * 100;
329 cout <<
" PFDisplacedVertexFinder: PFrecTrack->Track Pt= " <<
pt <<
" dPt/Pt = " << pt_error
330 <<
"% nChi2 = " << nChi2 << endl;
333 cout <<
" PFBlockAlgo: skip badly measured or low pt track"
334 <<
" nChi2_cut = " << 5 <<
" pt_cut = " << 0.2 << endl;
349 out <<
"====== Particle Flow Block Algorithm ======= ";
351 out <<
"number of unassociated elements : " <<
a.eventTracks_.size() << endl;
354 out <<
" Tracks selection based on " << std::endl;
355 out <<
" pvtx_ = " <<
a.pvtx_ << std::endl;
356 out <<
" fabs(dxy) < " <<
a.dxy_ <<
" and pt < " <<
a.pt_min_prim_ << std::endl;
357 out <<
" nChi2 < " <<
a.nChi2_max_ <<
" and pt < " <<
a.pt_min_ << std::endl;
362 double pt = (*ie).get()->pt();
367 double innermost_radius =
sqrt(
Pi.x() *
Pi.x() +
Pi.y() *
Pi.y() +
Pi.z() *
Pi.z());
368 double outermost_radius =
sqrt(Po.x() * Po.x() + Po.y() * Po.y() + Po.z() * Po.z());
369 double innermost_rho =
sqrt(
Pi.x() *
Pi.x() +
Pi.y() *
Pi.y());
370 double outermost_rho =
sqrt(Po.x() * Po.x() + Po.y() * Po.y());
372 out <<
"ie = " << (*ie).key() <<
" pt = " <<
pt <<
" innermost hit radius = " << innermost_radius
373 <<
" rho = " << innermost_rho <<
" outermost hit radius = " << outermost_radius <<
" rho = " << outermost_rho
377 const std::unique_ptr<reco::PFDisplacedVertexCandidateCollection>& vertexCandidates =
std::move(
a.vertexCandidates());
379 if (!vertexCandidates.get()) {
380 out <<
"vertexCandidates already transfered" << endl;
382 out <<
"number of vertexCandidates : " << vertexCandidates->size() << endl;
PFDisplacedVertexCandidateFinder()
void link(const reco::TrackBaseRef &el1, const reco::TrackBaseRef &el2, double &dist, GlobalPoint &P, reco::PFDisplacedVertexCandidate::VertexLinkTest &linktest)
Check whether 2 elements are linked and fill the link parameters.
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
IE associate(IE next, IE last, reco::PFDisplacedVertexCandidate &tempVertexCandidate)
-----— Different steps of the finder algorithm -----— ///
void setPrimaryVertex(edm::Handle< reco::VertexCollection > mainVertexHandle, edm::Handle< reco::BeamSpot > beamSpotHandle)
GlobalPoint crossingPoint() const override
GlobalTrajectoryParameters getGlobalTrajectoryParameters(const reco::Track *) const
-----— TOOLS -----— //
unsigned vertexCandidatesSize_
void setInput(const edm::Handle< reco::TrackCollection > &trackh, const MagneticField *magField)
double z0() const
z coordinate
void addElement(const TrackBaseRef)
add a track Reference to the current Candidate
T const * get() const
Returns C++ pointer to the item.
TwoTrackMinimumDistance theMinimum_
const std::vector< TrackBaseRef > & elements() const
bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb) override
std::list< reco::TrackBaseRef > eventTracks_
The track refs.
double pt() const
track transverse momentum
std::list< reco::TrackBaseRef >::iterator IE
~PFDisplacedVertexCandidateFinder()
double phi() const
azimuthal angle of momentum vector
double dcaCut_
--— Algo parameters for the vertex finder -— ///
XYZPointD XYZPoint
point in space with cartesian internal representation
const MagneticField * magField_
double eta() const
pseudorapidity of momentum vector
static int position[264][3]
std::vector< GlobalTrajectoryParameters > eventTrackTrajectories_
reco::PFDisplacedVertexCandidateCollection::const_iterator IBC
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
std::unique_ptr< reco::PFDisplacedVertexCandidateCollection > vertexCandidates_
-----— Members -----— ///
void packLinks(reco::PFDisplacedVertexCandidate &vertexCandidate)
ostream & operator<<(std::ostream &out, const PFDisplacedVertexCandidateFinder &a)
double x0() const
x coordinate
float distance() const override
bool isSelected(const reco::TrackBaseRef &trackref)
std::list< reco::TrackBaseRef >::const_iterator IEC
bool isValid() const
A Vertex Candidate is valid if it has at least two tracks.
bool debug_
if true, debug printouts activated
void findDisplacedVertexCandidates()
-----— Main function which find vertices -----— ///
A block of tracks linked together.
std::pair< OmniClusterRef, TrackingParticleRef > P
double y0() const
y coordinate
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
double primaryVertexCut2_
Do not reconstruct vertices wich are too close to the beam pipe.
bool goodPtResolution(const reco::TrackBaseRef &trackref) const
Quality Criterion on the Pt resolution to select a Track.
void setLink(unsigned i1, unsigned i2, const float dist, const GlobalPoint &dcaPoint, const VertexLinkTest test=LINKTEST_DCA)
std::vector< PFDisplacedVertexCandidate > PFDisplacedVertexCandidateCollection
collection of PFDisplacedVertexCandidate objects