CMS 3D CMS Logo

BPHPlusMinusVertex.h
Go to the documentation of this file.
1 #ifndef HeavyFlavorAnalysis_RecoDecay_BPHPlusMinusVertex_h
2 #define HeavyFlavorAnalysis_RecoDecay_BPHPlusMinusVertex_h
3 
13 //----------------------
14 // Base Class Headers --
15 //----------------------
17 
18 //------------------------------------
19 // Collaborating Class Declarations --
20 //------------------------------------
24 
25 //---------------
26 // C++ Headers --
27 //---------------
28 
29 // ---------------------
30 // -- Class Interface --
31 // ---------------------
32 
33 class BPHPlusMinusVertex : public virtual BPHDecayVertex {
34 public:
38  // deleted copy constructor and assignment operator
39  BPHPlusMinusVertex(const BPHPlusMinusVertex& x) = delete;
41 
44  ~BPHPlusMinusVertex() override;
45 
48  virtual const ClosestApproachInRPhi& cAppInRPhi() const;
50 
51 protected:
53 
54  // utility functions to check/enforce the number of decay particles
55  // at 2
56  template <class T>
57  static bool chkName(const T& cont, const std::string& name, const std::string& msg);
58  template <class T>
59  static bool chkSize(const T& cont, const std::string& msg);
60  bool chkSize(const std::string& msg) const;
61 
62  // utility function used to cash reconstruction results
63  void setNotUpdated() const override;
64 
65 private:
66  // reconstruction results cache
67  mutable bool oldA;
69 
70  // compute closest approach distance and cache it
71  virtual void computeApp() const;
72 };
73 
74 template <class T>
76  if (cont.find(name) != cont.end())
77  return true;
78  edm::LogPrint("ParticleNotFound") << msg << ", " << name << " not found";
79  return false;
80 }
81 
82 template <class T>
84  int n = cont.size();
85  if (n == 2)
86  return true;
87  edm::LogPrint("WrongDataSize") << msg << ", size = " << n;
88  return false;
89 }
90 
91 #endif
MessageLogger.h
BPHPlusMinusVertex::setNotUpdated
void setNotUpdated() const override
Definition: BPHPlusMinusVertex.cc:52
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
BPHPlusMinusVertex::chkName
static bool chkName(const T &cont, const std::string &name, const std::string &msg)
Definition: BPHPlusMinusVertex.h:75
edm::LogPrint
Log< level::Warning, true > LogPrint
Definition: MessageLogger.h:130
BPHPlusMinusVertex::cAppInRPhi
virtual const ClosestApproachInRPhi & cAppInRPhi() const
compute distance of closest approach
Definition: BPHPlusMinusVertex.cc:40
generateEDF.cont
cont
load Luminosity info ##
Definition: generateEDF.py:629
BPHPlusMinusCandidatePtr.h
mps_check.msg
tuple msg
Definition: mps_check.py:285
DDAxes::x
BPHPlusMinusVertex::BPHPlusMinusVertex
BPHPlusMinusVertex(const BPHPlusMinusVertex &x)=delete
BPHPlusMinusVertex
Definition: BPHPlusMinusVertex.h:33
ClosestApproachInRPhi.h
ClosestApproachInRPhi
Definition: ClosestApproachInRPhi.h:26
BPHPlusMinusVertex::inRPhi
ClosestApproachInRPhi * inRPhi
Definition: BPHPlusMinusVertex.h:68
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
BPHDecayVertex
Definition: BPHDecayVertex.h:43
edm::EventSetup
Definition: EventSetup.h:57
BPHPlusMinusVertex::computeApp
virtual void computeApp() const
Definition: BPHPlusMinusVertex.cc:58
BPHPlusMinusVertex::operator=
BPHPlusMinusVertex & operator=(const BPHPlusMinusVertex &x)=delete
BPHPlusMinusVertex::oldA
bool oldA
Definition: BPHPlusMinusVertex.h:67
T
long double T
Definition: Basic3DVectorLD.h:48
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
BPHDecayVertex.h
BPHPlusMinusVertex::chkSize
static bool chkSize(const T &cont, const std::string &msg)
Definition: BPHPlusMinusVertex.h:83
BPHPlusMinusVertex::~BPHPlusMinusVertex
~BPHPlusMinusVertex() override
Definition: BPHPlusMinusVertex.cc:35