test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BPHPlusMinusVertex.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * \author Paolo Ronchese INFN Padova
5  *
6  */
7 
8 //-----------------------
9 // This Class' Header --
10 //-----------------------
12 
13 //-------------------------------
14 // Collaborating Class Headers --
15 //-------------------------------
17 
18 //---------------
19 // C++ Headers --
20 //---------------
21 #include <iostream>
22 
23 using namespace std;
24 
25 //-------------------
26 // Initializations --
27 //-------------------
28 
29 
30 //----------------
31 // Constructors --
32 //----------------
34  BPHDecayVertex( es ),
35  oldA( true ),
36  inRPhi( 0 ) {
37 }
38 
39 //--------------
40 // Destructor --
41 //--------------
43  delete inRPhi;
44 }
45 
46 //--------------
47 // Operations --
48 //--------------
50  if ( oldA ) computeApp();
51  if ( inRPhi == 0 ) {
52  static const ClosestApproachInRPhi ca;
53  return ca;
54  }
55  return *inRPhi;
56 }
57 
58 
59 bool BPHPlusMinusVertex::chkSize( const string& msg ) const {
60  return chkSize( daughters(), msg );
61 }
62 
63 
66  oldA = true;
67  return;
68 }
69 
70 
72  static const string msg =
73  "BPHPlusMinusVertex::computeApp: incomplete, no closest approach available";
74  delete inRPhi;
75  if ( !chkSize( msg ) ) {
76  inRPhi = 0;
77  return;
78  }
80  const vector<reco::TransientTrack>& ttk = transientTracks();
81  const reco::TransientTrack& ttp = ttk[0];
82  const reco::TransientTrack& ttn = ttk[1];
84  ttn.impactPointTSCP().theState() );
85  oldA = false;
86  return;
87 }
88 
TrajectoryStateClosestToPoint impactPointTSCP() const
const FreeTrajectoryState & theState() const
static bool chkSize(const T &cont, const std::string &msg)
virtual const std::vector< const reco::Candidate * > & daughters() const
virtual const ClosestApproachInRPhi & cAppInRPhi() const
compute distance of closest approach
virtual void setNotUpdated() const
virtual bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb)
BPHPlusMinusVertex(const edm::EventSetup *es)
virtual void computeApp() const
virtual void setNotUpdated() const
const std::vector< reco::TransientTrack > & transientTracks() const
get list of TransientTracks
ClosestApproachInRPhi * inRPhi