CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
PFDisplacedVertexCandidateFinder Class Reference

#include <PFDisplacedVertexCandidateFinder.h>

Public Types

typedef
reco::PFDisplacedVertexCandidateCollection::const_iterator 
IBC
 
typedef std::list
< reco::TrackBaseRef >
::iterator 
IE
 
typedef std::list
< reco::TrackBaseRef >
::const_iterator 
IEC
 
typedef std::vector< bool > Mask
 Mask used to spot if a track is free or not. More...
 

Public Member Functions

void findDisplacedVertexCandidates ()
 -----— Main function which find vertices -----— /// More...
 
 PFDisplacedVertexCandidateFinder ()
 
void setDebug (bool debug)
 sets debug printout flag More...
 
void setInput (const edm::Handle< reco::TrackCollection > &trackh, const MagneticField *magField)
 
void setParameters (double dcaCut, double primaryVertexCut, double dcaPInnerHitCut, const edm::ParameterSet &ps_trk)
 ---—— Set different algo parameters —— /// More...
 
std::auto_ptr
< reco::PFDisplacedVertexCandidateCollection
transferVertexCandidates ()
 
const std::auto_ptr
< reco::PFDisplacedVertexCandidateCollection > & 
vertexCandidates () const
 
 ~PFDisplacedVertexCandidateFinder ()
 

Private Member Functions

IE associate (IE next, IE last, reco::PFDisplacedVertexCandidate &tempVertexCandidate)
 --—— Different steps of the finder algorithm --—— /// More...
 
GlobalTrajectoryParameters getGlobalTrajectoryParameters (const reco::Track *) const
 --—— TOOLS --—— // More...
 
bool goodPtResolution (const reco::TrackBaseRef &trackref) const
 Quality Criterion on the Pt resolution to select a Track. More...
 
bool isSelected (const reco::TrackBaseRef &trackref)
 
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. More...
 
void packLinks (reco::PFDisplacedVertexCandidate &vertexCandidate)
 

Private Attributes

double dcaCut_
 –— Algo parameters for the vertex finder -— /// More...
 
double dcaPInnerHitCut2_
 Maximum distance between the DCA Point and the inner hit of the track. More...
 
bool debug_
 if true, debug printouts activated More...
 
std::list< reco::TrackBaseRefeventTracks_
 The track refs. More...
 
std::vector
< GlobalTrajectoryParameters
eventTrackTrajectories_
 
const MagneticFieldmagField_
 
double nChi2_max_
 
double primaryVertexCut2_
 Do not reconstruct vertices wich are too close to the beam pipe. More...
 
double pt_min_
 
TwoTrackMinimumDistance theMinimum_
 
Mask trackMask_
 
std::auto_ptr
< reco::PFDisplacedVertexCandidateCollection
vertexCandidates_
 -----— Members -----— /// More...
 
unsigned vertexCandidatesSize_
 

Friends

std::ostream & operator<< (std::ostream &, const PFDisplacedVertexCandidateFinder &)
 

Detailed Description

Definition at line 22 of file PFDisplacedVertexCandidateFinder.h.

Member Typedef Documentation

typedef reco::PFDisplacedVertexCandidateCollection::const_iterator PFDisplacedVertexCandidateFinder::IBC

Definition at line 36 of file PFDisplacedVertexCandidateFinder.h.

Definition at line 34 of file PFDisplacedVertexCandidateFinder.h.

Definition at line 35 of file PFDisplacedVertexCandidateFinder.h.

typedef std::vector<bool> PFDisplacedVertexCandidateFinder::Mask

Mask used to spot if a track is free or not.

Definition at line 32 of file PFDisplacedVertexCandidateFinder.h.

Constructor & Destructor Documentation

PFDisplacedVertexCandidateFinder::PFDisplacedVertexCandidateFinder ( )

Definition at line 14 of file PFDisplacedVertexCandidateFinder.cc.

References TwoTrackMinimumDistance::SlowMode, and theMinimum_.

14  :
16  dcaCut_(1000),
17  primaryVertexCut2_(0.0),
18  dcaPInnerHitCut2_(1000.0),
20  debug_(false) {
21 
23  theMinimum_ = theMinimum;
24 }
std::vector< PFDisplacedVertexCandidate > PFDisplacedVertexCandidateCollection
collection of PFDisplacedVertexCandidate objects
std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > vertexCandidates_
-----— Members -----— ///
double dcaCut_
–— Algo parameters for the vertex finder -— ///
double primaryVertexCut2_
Do not reconstruct vertices wich are too close to the beam pipe.
double dcaPInnerHitCut2_
Maximum distance between the DCA Point and the inner hit of the track.
bool debug_
if true, debug printouts activated
PFDisplacedVertexCandidateFinder::~PFDisplacedVertexCandidateFinder ( )

Definition at line 27 of file PFDisplacedVertexCandidateFinder.cc.

References gather_cfg::cout, debug_, and eventTracks_.

27  {
28 
29 #ifdef PFLOW_DEBUG
30  if(debug_)
31  cout<<"~PFDisplacedVertexCandidateFinder - number of remaining elements: "
32  <<eventTracks_.size()<<endl;
33 #endif
34 
35 }
std::list< reco::TrackBaseRef > eventTracks_
The track refs.
tuple cout
Definition: gather_cfg.py:41
bool debug_
if true, debug printouts activated

Member Function Documentation

PFDisplacedVertexCandidateFinder::IE PFDisplacedVertexCandidateFinder::associate ( IE  next,
IE  last,
reco::PFDisplacedVertexCandidate tempVertexCandidate 
)
private

--—— Different steps of the finder algorithm --—— ///

Recursive procedure to associate tracks together

Definition at line 109 of file PFDisplacedVertexCandidateFinder.cc.

References reco::PFDisplacedVertexCandidate::addElement(), gather_cfg::cout, debug_, eventTracks_, i, link(), P, trackMask_, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by findDisplacedVertexCandidates().

110  {
111 
112 
113 #ifdef PFLOW_DEBUG
114  if(debug_ ) cout<<"== Start the association procedure =="<<endl;
115 #endif
116 
117  if( last!= eventTracks_.end() ) {
118  double dist = -1;
119  GlobalPoint P(0,0,0);
121  link( (*last), (*next), dist, P, linktest);
122 
123 
124  if(dist<-0.5) {
125 #ifdef PFLOW_DEBUG
126  if(debug_ ) cout<<"link failed"<<endl;
127 #endif
128  return ++next; // association failed
129  }
130  else {
131  // add next element to the current pflowblock
132  tempVertexCandidate.addElement( (*next));
133  trackMask_[(*next).key()] = false;
134 #ifdef PFLOW_DEBUG
135  if(debug_ )
136  cout<<"link parameters "
137  << " *next = " << (*next).key()
138  << " *last = " << (*last).key()
139  << " dist = " << dist
140  << " P.x = " << P.x()
141  << " P.y = " << P.y()
142  << " P.z = " << P.z()
143  << endl;
144 #endif
145  }
146  }
147  else {
148  // add next element to this eflowblock
149 #ifdef PFLOW_DEBUG
150  if(debug_ ) cout<<"adding to block element "
151  << (*next).key()
152  <<endl;
153 #endif
154  tempVertexCandidate.addElement( (*next));
155  trackMask_[(*next).key()] = false;
156 
157 
158  }
159 
160  // recursive call: associate next and other unused elements
161 #ifdef PFLOW_DEBUG
162  if(debug_ ) {
163  for(unsigned i=0; i<trackMask_.size(); i++)
164  cout << " Mask[" << i << "] = " << trackMask_[i];
165  cout << "" << endl;
166  }
167 #endif
168 
169  for(IE ie = eventTracks_.begin();
170  ie != eventTracks_.end();) {
171 
172  if( ie == last || ie == next ) { ++ie; continue;}
173 
174  // *ie already included to a block
175  if( !trackMask_[(*ie).key()] ) { ++ie; continue;}
176 
177 #ifdef PFLOW_DEBUG
178  if(debug_ ) cout<<"calling associate "
179  << (*next).key()
180  <<" & "
181  << (*ie).key()
182  <<endl;
183 #endif
184  ie = associate(next, ie, tempVertexCandidate);
185 
186  }
187 
188 #ifdef PFLOW_DEBUG
189  if(debug_ ) {
190  cout<<"**** removing element "<<endl;
191  }
192 #endif
193 
194  IE iteratorToNextFreeElement = eventTracks_.erase( next );
195 
196 #ifdef PFLOW_DEBUG
197  if(debug_ ) cout<< "== End the association procedure ==" <<endl;
198 #endif
199 
200  return iteratorToNextFreeElement;
201 }
void addElement(const TrackBaseRef)
add a track Reference to the current Candidate
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.
int i
Definition: DBlmapReader.cc:9
IE associate(IE next, IE last, reco::PFDisplacedVertexCandidate &tempVertexCandidate)
--—— Different steps of the finder algorithm --—— ///
#define P
std::list< reco::TrackBaseRef > eventTracks_
The track refs.
tuple cout
Definition: gather_cfg.py:41
std::list< reco::TrackBaseRef >::iterator IE
bool debug_
if true, debug printouts activated
void PFDisplacedVertexCandidateFinder::findDisplacedVertexCandidates ( )

-----— Main function which find vertices -----— ///

Definition at line 74 of file PFDisplacedVertexCandidateFinder.cc.

References associate(), gather_cfg::cout, debug_, eventTracks_, reco::PFDisplacedVertexCandidate::isValid(), packLinks(), vertexCandidates_, and vertexCandidatesSize_.

74  {
75 
76  if (debug_) cout << "========= Start Finding Displaced Vertex Candidates =========" << endl;
77 
78  // The vertexCandidates have not been passed to the event, and need to be cleared
79  if(vertexCandidates_.get() )vertexCandidates_->clear();
80  else
82 
84  for(IE ie = eventTracks_.begin();
85  ie != eventTracks_.end();) {
86 
87  // Run the recursive procedure to find all tracks link together
88  // In one blob called Candidate
89 
90  PFDisplacedVertexCandidate tempVertexCandidate;
91 
92  ie = associate( eventTracks_.end() , ie, tempVertexCandidate);
93 
94  // Build remaining links in current block
95  if(tempVertexCandidate.isValid()) {
96  packLinks( tempVertexCandidate );
97  vertexCandidates_->push_back( tempVertexCandidate );
98  }
99  }
100 
101  if(debug_) cout << "========= End Finding Displaced Vertex Candidates =========" << endl;
102 
103 }
std::vector< PFDisplacedVertexCandidate > PFDisplacedVertexCandidateCollection
collection of PFDisplacedVertexCandidate objects
A block of tracks linked together.
IE associate(IE next, IE last, reco::PFDisplacedVertexCandidate &tempVertexCandidate)
--—— Different steps of the finder algorithm --—— ///
std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > vertexCandidates_
-----— Members -----— ///
bool isValid() const
A Vertex Candidate is valid if it has at least two tracks.
void packLinks(reco::PFDisplacedVertexCandidate &vertexCandidate)
std::list< reco::TrackBaseRef > eventTracks_
The track refs.
tuple cout
Definition: gather_cfg.py:41
std::list< reco::TrackBaseRef >::iterator IE
bool debug_
if true, debug printouts activated
GlobalTrajectoryParameters PFDisplacedVertexCandidateFinder::getGlobalTrajectoryParameters ( const reco::Track track) const
private

--—— TOOLS --—— //

Allows to calculate the helix aproximation for a given track which may be then extrapolated to any point.

Definition at line 321 of file PFDisplacedVertexCandidateFinder.cc.

References reco::TrackBase::charge(), reco::TrackBase::momentum(), position, reco::TrackBase::vx(), reco::TrackBase::vy(), and reco::TrackBase::vz().

Referenced by setInput().

322 {
323 
324  const GlobalPoint position(track->vx(),
325  track->vy(),
326  track->vz());
327 
328  const GlobalVector momentum(track->momentum().x(),
329  track->momentum().y(),
330  track->momentum().z());
331 
333  track->charge(),magField_);
334 
335  return gtp;
336 }
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:149
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:146
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:144
int charge() const
track electric charge
Definition: TrackBase.h:112
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:142
bool PFDisplacedVertexCandidateFinder::goodPtResolution ( const reco::TrackBaseRef trackref) const
private

Quality Criterion on the Pt resolution to select a Track.

Definition at line 341 of file PFDisplacedVertexCandidateFinder.cc.

References gather_cfg::cout, debug_, nChi2_max_, reco::TrackBase::normalizedChi2(), reco::TrackBase::pt(), ExpressReco_HICollisions_FallBack::pt, pt_min_, and reco::TrackBase::ptError().

Referenced by isSelected().

341  {
342 
343  double nChi2 = trackref->normalizedChi2();
344  double pt = trackref->pt();
345  double dpt = trackref->ptError();
346 
347  double pt_error = dpt/pt*100;
348 
349  if (debug_) cout << " PFDisplacedVertexFinder: PFrecTrack->Track Pt= "
350  << pt << " dPt/Pt = " << pt_error << "% nChi2 = " << nChi2 << endl;
351  if (nChi2 > nChi2_max_ || pt < pt_min_){
352 
353  if (debug_) cout << " PFBlockAlgo: skip badly measured or low pt track"
354  << " nChi2_cut = " << 5
355  << " pt_cut = " << 0.2 << endl;
356  return false;
357  }
358 
359  return true;
360 }
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:110
double pt() const
track transverse momentum
Definition: TrackBase.h:130
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Definition: TrackBase.h:187
tuple cout
Definition: gather_cfg.py:41
bool debug_
if true, debug printouts activated
bool PFDisplacedVertexCandidateFinder::isSelected ( const reco::TrackBaseRef trackref)
inlineprivate

A function which gather the information if a track is available for vertexing

Definition at line 103 of file PFDisplacedVertexCandidateFinder.h.

References goodPtResolution().

Referenced by python.Vispa.Views.LineDecayView.LineDecayContainer::keyPressEvent(), python.Vispa.Gui.ConnectableWidget.ConnectableWidget::leaveEvent(), python.Vispa.Views.LineDecayView.ParticleWidget::paint(), and setInput().

104  { return goodPtResolution(trackref);}
bool goodPtResolution(const reco::TrackBaseRef &trackref) const
Quality Criterion on the Pt resolution to select a Track.
void PFDisplacedVertexCandidateFinder::link ( const reco::TrackBaseRef el1,
const reco::TrackBaseRef el2,
double &  dist,
GlobalPoint P,
reco::PFDisplacedVertexCandidate::VertexLinkTest linktest 
)
private

Check whether 2 elements are linked and fill the link parameters.

Definition at line 206 of file PFDisplacedVertexCandidateFinder.cc.

References TwoTrackMinimumDistance::calculate(), TwoTrackMinimumDistance::crossingPoint(), dcaCut_, TwoTrackMinimumDistance::distance(), reco::TrackBase::eta(), eventTrackTrajectories_, edm::RefToBase< T >::key(), reco::TrackBase::phi(), primaryVertexCut2_, reco::TrackBase::pt(), theMinimum_, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by associate(), and packLinks().

210  {
211 
212  if ( fabs(el1->eta()-el2->eta()) > 1) {dist = -1; return;}
213  if ( el1->pt()>2 && el2->pt()>2 && fabs(el1->phi()-el2->phi()) > 1) {dist = -1; return;}
214 
217 
218 
219  // Closest approach
220  theMinimum_.calculate(gt1,gt2);
221 
222  // Fill the parameters
223  dist = theMinimum_.distance();
225 
226  vertexLinkTest = PFDisplacedVertexCandidate::LINKTEST_DCA; //rechit by default
227 
228 
229  // Check if the link test fails
230  if (dist > dcaCut_) {dist = -1; return;}
231 
232  // Check if the closses approach point is too close to the primary vertex/beam pipe
233  double rho2 = P.x()*P.x()+P.y()*P.y();
234 
235  if ( rho2 < primaryVertexCut2_) {dist = -1; return;}
236 
237  // Check if the closses approach point is out of range of the tracker
238 
239  double tob_rho_limit2 = 10000;
240  double tec_z_limit = 270;
241 
242  if ( rho2 > tob_rho_limit2) {dist = -1; return;}
243  if ( fabs(P.z()) > tec_z_limit) {dist = -1; return;}
244 
245  return;
246 
247 
248  /*
249  // Check if the inner hit of one of the tracks is not too far away from the vertex
250  double dx = el1->innerPosition().x()-P.x();
251  double dy = el1->innerPosition().y()-P.y();
252  double dz = el1->innerPosition().z()-P.z();
253  double dist2 = dx*dx+dy*dy+dz*dz;
254 
255  if (dist2 > dcaPInnerHitCut2_) {
256  dist = -1;
257  if (debug_) cout << "track " << el1.key() << " dist to vertex " << sqrt(dist2) << endl;
258  return;
259  }
260 
261  dx = el2->innerPosition().x()-P.x();
262  dy = el2->innerPosition().y()-P.y();
263  dz = el2->innerPosition().z()-P.z();
264  dist2 = dx*dx+dy*dy+dz*dz;
265 
266  if (dist2 > dcaPInnerHitCut2_) {
267  dist = -1;
268  if (debug_) cout << "track " << el2.key() << " dist to vertex " << sqrt(dist2) << endl;
269  return;
270  }
271  */
272 
273 }
virtual float distance() const
virtual bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb)
virtual GlobalPoint crossingPoint() const
T y() const
Definition: PV3DBase.h:57
std::vector< GlobalTrajectoryParameters > eventTrackTrajectories_
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:138
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:140
double dcaCut_
–— Algo parameters for the vertex finder -— ///
double pt() const
track transverse momentum
Definition: TrackBase.h:130
T z() const
Definition: PV3DBase.h:58
size_t key() const
Definition: RefToBase.h:223
double primaryVertexCut2_
Do not reconstruct vertices wich are too close to the beam pipe.
T x() const
Definition: PV3DBase.h:56
void PFDisplacedVertexCandidateFinder::packLinks ( reco::PFDisplacedVertexCandidate vertexCandidate)
private

Compute missing links in the displacedVertexCandidates (the recursive procedure does not build all links)

Definition at line 279 of file PFDisplacedVertexCandidateFinder.cc.

References gather_cfg::cout, debug_, reco::PFDisplacedVertexCandidate::elements(), asciidump::els, link(), P, and reco::PFDisplacedVertexCandidate::setLink().

Referenced by findDisplacedVertexCandidates().

279  {
280 
281 
282  const vector < TrackBaseRef >& els = vertexCandidate.elements();
283 
284  //First Loop: update all link data
285  for( unsigned i1=0; i1<els.size(); i1++ ) {
286  for( unsigned i2=i1+1; i2<els.size(); i2++ ) {
287 
288  // no reflexive link
289  if( i1==i2 ) continue;
290 
291  double dist = -1;
292  GlobalPoint P(0,0,0);
294 
295  link( els[i1], els[i2], dist, P, linktest);
296 
297 
298 #ifdef PFLOW_DEBUG
299  if( debug_ )
300  cout << "Setting link between elements " << i1 << " key " << els[i1].key()
301  << " and " << i2 << " key " << els[i2].key()
302  << " of dist =" << dist << " computed from link test "
303  << linktest << endl;
304 #endif
305 
306  if(dist >-0.5) vertexCandidate.setLink( i1, i2, dist, P, linktest );
307  }
308  }
309 
310 }
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.
#define P
tuple els
Definition: asciidump.py:420
void setLink(unsigned i1, unsigned i2, const float dist, const GlobalPoint &dcaPoint, const VertexLinkTest test=LINKTEST_DCA)
tuple cout
Definition: gather_cfg.py:41
const std::vector< TrackBaseRef > & elements() const
bool debug_
if true, debug printouts activated
void PFDisplacedVertexCandidateFinder::setDebug ( bool  debug)
inline

sets debug printout flag

Definition at line 52 of file PFDisplacedVertexCandidateFinder.h.

References debug, and debug_.

52 {debug_ = debug;}
#define debug
Definition: MEtoEDMFormat.h:34
bool debug_
if true, debug printouts activated
void PFDisplacedVertexCandidateFinder::setInput ( const edm::Handle< reco::TrackCollection > &  trackh,
const MagneticField magField 
)

Set the imput collection of tracks and calculate their trajectory parameters the Global Trajectory Parameters

Definition at line 40 of file PFDisplacedVertexCandidateFinder.cc.

References eventTracks_, eventTrackTrajectories_, edm::Ref< C, T, F >::get(), getGlobalTrajectoryParameters(), i, isSelected(), edm::HandleBase::isValid(), magField_, and trackMask_.

41  {
42 
43  magField_ = magField;
44  trackMask_.clear();
45  trackMask_.resize(trackh->size());
47  eventTrackTrajectories_.resize(trackh->size());
48 
49  for(unsigned i=0;i<trackMask_.size(); i++) trackMask_[i] = true;
50 
51  eventTracks_.clear();
52  if(trackh.isValid()) {
53  for(unsigned i=0;i<trackh->size(); i++) {
54 
55  TrackRef tref( trackh, i);
56  TrackBaseRef tbref(tref);
57 
58  if( !isSelected( tbref ) ) {
59  trackMask_[i] = false;
60  continue;
61  }
62 
63  const Track* trk = tref.get();
64  eventTracks_.push_back( tbref );
66  }
67  }
68 }
int i
Definition: DBlmapReader.cc:9
GlobalTrajectoryParameters getGlobalTrajectoryParameters(const reco::Track *) const
--—— TOOLS --—— //
std::vector< GlobalTrajectoryParameters > eventTrackTrajectories_
bool isValid() const
Definition: HandleBase.h:76
bool isSelected(const reco::TrackBaseRef &trackref)
std::list< reco::TrackBaseRef > eventTracks_
The track refs.
void PFDisplacedVertexCandidateFinder::setParameters ( double  dcaCut,
double  primaryVertexCut,
double  dcaPInnerHitCut,
const edm::ParameterSet ps_trk 
)
inline

---—— Set different algo parameters —— ///

Sets algo parameters for the vertex candidate finder

Definition at line 42 of file PFDisplacedVertexCandidateFinder.h.

References ExpressReco_HICollisions_FallBack::dcaCut, dcaCut_, ExpressReco_HICollisions_FallBack::dcaPInnerHitCut, dcaPInnerHitCut2_, edm::ParameterSet::getParameter(), nChi2_max_, ExpressReco_HICollisions_FallBack::primaryVertexCut, primaryVertexCut2_, and pt_min_.

43  {
44  dcaCut_ = dcaCut;
47  nChi2_max_ = ps_trk.getParameter<double>("nChi2_max");
48  pt_min_ = ps_trk.getParameter<double>("pt_min");
49  }
T getParameter(std::string const &) const
double dcaCut_
–— Algo parameters for the vertex finder -— ///
double primaryVertexCut2_
Do not reconstruct vertices wich are too close to the beam pipe.
double dcaPInnerHitCut2_
Maximum distance between the DCA Point and the inner hit of the track.
std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > PFDisplacedVertexCandidateFinder::transferVertexCandidates ( )
inline
Returns
auto_ptr to collection of DisplacedVertexCandidates

Definition at line 61 of file PFDisplacedVertexCandidateFinder.h.

References vertexCandidates_.

61 {return vertexCandidates_;}
std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > vertexCandidates_
-----— Members -----— ///
const std::auto_ptr< reco::PFDisplacedVertexCandidateCollection >& PFDisplacedVertexCandidateFinder::vertexCandidates ( ) const
inline

Definition at line 63 of file PFDisplacedVertexCandidateFinder.h.

References vertexCandidates_.

Referenced by operator<<().

64  {return vertexCandidates_;}
std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > vertexCandidates_
-----— Members -----— ///

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const PFDisplacedVertexCandidateFinder a 
)
friend

Definition at line 372 of file PFDisplacedVertexCandidateFinder.cc.

372  {
373  if(! out) return out;
374 
375  out<<"====== Particle Flow Block Algorithm ======= ";
376  out<<endl;
377  out<<"number of unassociated elements : "<<a.eventTracks_.size()<<endl;
378  out<<endl;
379 
381  ie != a.eventTracks_.end(); ie++) {
382 
383  double pt = (*ie).get()->pt();
384 
385  math::XYZPoint Pi = (*ie).get()->innerPosition();
386  math::XYZPoint Po = (*ie).get()->outerPosition();
387 
388  double innermost_radius = sqrt(Pi.x()*Pi.x() + Pi.y()*Pi.y() + Pi.z()*Pi.z());
389  double outermost_radius = sqrt(Po.x()*Po.x() + Po.y()*Po.y() + Po.z()*Po.z());
390  double innermost_rho = sqrt(Pi.x()*Pi.x() + Pi.y()*Pi.y());
391  double outermost_rho = sqrt(Po.x()*Po.x() + Po.y()*Po.y());
392 
393  out<<"ie = " << (*ie).key()
394  <<" pt = " << pt
395  <<" innermost hit radius = " << innermost_radius << " rho = " << innermost_rho
396  <<" outermost hit radius = " << outermost_radius << " rho = " << outermost_rho
397  <<endl;
398  }
399 
400 
401  const std::auto_ptr< reco::PFDisplacedVertexCandidateCollection >& vertexCandidates
402  = a.vertexCandidates();
403 
404  if(!vertexCandidates.get() ) {
405  out<<"vertexCandidates already transfered"<<endl;
406  }
407  else {
408  out<<"number of vertexCandidates : "<<vertexCandidates->size()<<endl;
409  out<<endl;
410 
411 
412  for(PFDisplacedVertexCandidateFinder::IBC ib=vertexCandidates->begin();
413  ib != vertexCandidates->end(); ib++)
414  ib->Dump();
415 
416 
417 
418  }
419 
420  return out;
421 }
const double Pi
std::list< reco::TrackBaseRef >::const_iterator IEC
T sqrt(T t)
Definition: SSEVec.h:28
tuple out
Definition: dbtoconf.py:99
reco::PFDisplacedVertexCandidateCollection::const_iterator IBC
const std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > & vertexCandidates() const
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
std::list< reco::TrackBaseRef > eventTracks_
The track refs.

Member Data Documentation

double PFDisplacedVertexCandidateFinder::dcaCut_
private

–— Algo parameters for the vertex finder -— ///

Distance of minimal approach below which two tracks are considered as linked together

Definition at line 131 of file PFDisplacedVertexCandidateFinder.h.

Referenced by link(), and setParameters().

double PFDisplacedVertexCandidateFinder::dcaPInnerHitCut2_
private

Maximum distance between the DCA Point and the inner hit of the track.

Definition at line 135 of file PFDisplacedVertexCandidateFinder.h.

Referenced by setParameters().

bool PFDisplacedVertexCandidateFinder::debug_
private
std::list< reco::TrackBaseRef > PFDisplacedVertexCandidateFinder::eventTracks_
private
std::vector< GlobalTrajectoryParameters > PFDisplacedVertexCandidateFinder::eventTrackTrajectories_
private

The Trajectories vector allow to calculate snd to store only once the track trajectory parameters

Definition at line 125 of file PFDisplacedVertexCandidateFinder.h.

Referenced by link(), and setInput().

const MagneticField* PFDisplacedVertexCandidateFinder::magField_
private

Definition at line 156 of file PFDisplacedVertexCandidateFinder.h.

Referenced by setInput().

double PFDisplacedVertexCandidateFinder::nChi2_max_
private

Tracks preselection to reduce the combinatorics in PFDisplacedVertexCandidates this cuts are repeated then in a smarter way in the PFDisplacedVertexFinder be sure you are consistent between them

Definition at line 140 of file PFDisplacedVertexCandidateFinder.h.

Referenced by goodPtResolution(), and setParameters().

double PFDisplacedVertexCandidateFinder::primaryVertexCut2_
private

Do not reconstruct vertices wich are too close to the beam pipe.

Definition at line 133 of file PFDisplacedVertexCandidateFinder.h.

Referenced by link(), and setParameters().

double PFDisplacedVertexCandidateFinder::pt_min_
private

Definition at line 141 of file PFDisplacedVertexCandidateFinder.h.

Referenced by goodPtResolution(), and setParameters().

TwoTrackMinimumDistance PFDisplacedVertexCandidateFinder::theMinimum_
private

Definition at line 148 of file PFDisplacedVertexCandidateFinder.h.

Referenced by link(), and PFDisplacedVertexCandidateFinder().

Mask PFDisplacedVertexCandidateFinder::trackMask_
private

The trackMask allows to keep the information on the tracks which are still free and those which are already used or disabled.

Definition at line 122 of file PFDisplacedVertexCandidateFinder.h.

Referenced by associate(), and setInput().

std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > PFDisplacedVertexCandidateFinder::vertexCandidates_
private

-----— Members -----— ///

Definition at line 112 of file PFDisplacedVertexCandidateFinder.h.

Referenced by findDisplacedVertexCandidates(), transferVertexCandidates(), and vertexCandidates().

unsigned PFDisplacedVertexCandidateFinder::vertexCandidatesSize_
private

Max number of expected vertexCandidates in the event Used to allocate the memory and avoid multiple copy

Definition at line 145 of file PFDisplacedVertexCandidateFinder.h.

Referenced by findDisplacedVertexCandidates().