CMS 3D CMS Logo

BPHChi2Select.h
Go to the documentation of this file.
1 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHChi2Select_h
2 #define HeavyFlavorAnalysis_SpecificDecay_BPHChi2Select_h
3 
12 //----------------------
13 // Base Class Headers --
14 //----------------------
16 
17 //------------------------------------
18 // Collaborating Class Declarations --
19 //------------------------------------
21 #include "TMath.h"
22 
23 //---------------
24 // C++ Headers --
25 //---------------
26 
27 // ---------------------
28 // -- Class Interface --
29 // ---------------------
30 
32 public:
36 
37  // deleted copy constructor and assignment operator
38  BPHChi2Select(const BPHChi2Select& x) = delete;
39  BPHChi2Select& operator=(const BPHChi2Select& x) = delete;
40 
43  ~BPHChi2Select() override {}
44 
47  bool accept(const BPHDecayVertex& cand) const override {
49  if (probMin < 0.0)
50  return true;
51  const reco::Vertex& v = cand.vertex();
52  if (v.isFake())
53  return false;
54  if (!v.isValid())
55  return false;
56  return (TMath::Prob(v.chi2(), lround(v.ndof())) >= probMin);
57  }
58 
60  void setProbMin(double p) {
61  probMin = p;
62  return;
63  }
64 
66  double getProbMin() const { return probMin; }
67 
68 private:
69  double probMin;
70 };
71 
72 #endif
BPHChi2Select::setProbMin
void setProbMin(double p)
set prob min
Definition: BPHChi2Select.h:60
BPHChi2Select::getProbMin
double getProbMin() const
get current prob min
Definition: BPHChi2Select.h:66
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
DDAxes::x
findQualityFiles.v
v
Definition: findQualityFiles.py:179
BPHChi2Select::probMin
double probMin
Definition: BPHChi2Select.h:69
BPHChi2Select::BPHChi2Select
BPHChi2Select(double prob)
Definition: BPHChi2Select.h:35
BPHDecayVertex
Definition: BPHDecayVertex.h:43
cand
Definition: decayParser.h:32
BPHVertexSelect
Definition: BPHVertexSelect.h:29
BPHChi2Select
Definition: BPHChi2Select.h:31
BPHVertexSelect.h
BPHChi2Select::~BPHChi2Select
~BPHChi2Select() override
Definition: BPHChi2Select.h:43
BPHDecayVertex.h
BPHChi2Select::operator=
BPHChi2Select & operator=(const BPHChi2Select &x)=delete
BPHChi2Select::accept
bool accept(const BPHDecayVertex &cand) const override
select vertex
Definition: BPHChi2Select.h:48
TtFullHadEvtBuilder_cfi.prob
prob
Definition: TtFullHadEvtBuilder_cfi.py:33
reco::Vertex
Definition: Vertex.h:35