CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
BPHMassSymSelect Class Reference

#include <BPHMassSymSelect.h>

Inheritance diagram for BPHMassSymSelect:
BPHMomentumSelect

Public Member Functions

bool accept (const BPHDecayMomentum &cand) const override
 select particle More...
 
 BPHMassSymSelect (const BPHMassSymSelect &x)=delete
 
 BPHMassSymSelect (const std::string &np, const std::string &nn, const BPHMassSelect *ms)
 
BPHMassSymSelectoperator= (const BPHMassSymSelect &x)=delete
 
 ~BPHMassSymSelect () override
 
- Public Member Functions inherited from BPHMomentumSelect
 BPHMomentumSelect ()
 
 BPHMomentumSelect (const BPHMomentumSelect &x)=delete
 
BPHMomentumSelectoperator= (const BPHMomentumSelect &x)=delete
 
virtual ~BPHMomentumSelect ()
 

Private Attributes

const BPHMassSelectmSel
 
std::string nNeg
 
std::string nPos
 

Additional Inherited Members

- Public Types inherited from BPHMomentumSelect
using AcceptArg = BPHDecayMomentum
 

Detailed Description

Description: Class for candidate selection by invariant mass (at momentum sum level) allowing for decay product mass swap

Author
Paolo Ronchese INFN Padova

Definition at line 33 of file BPHMassSymSelect.h.

Constructor & Destructor Documentation

◆ BPHMassSymSelect() [1/2]

BPHMassSymSelect::BPHMassSymSelect ( const std::string &  np,
const std::string &  nn,
const BPHMassSelect ms 
)
inline

Constructor

Definition at line 37 of file BPHMassSymSelect.h.

38  : nPos(np), nNeg(nn), mSel(ms) {}

◆ BPHMassSymSelect() [2/2]

BPHMassSymSelect::BPHMassSymSelect ( const BPHMassSymSelect x)
delete

◆ ~BPHMassSymSelect()

BPHMassSymSelect::~BPHMassSymSelect ( )
inlineoverride

Destructor

Definition at line 46 of file BPHMassSymSelect.h.

46 {}

Member Function Documentation

◆ accept()

bool BPHMassSymSelect::accept ( const BPHDecayMomentum cand) const
inlineoverridevirtual

select particle

Operations

Implements BPHMomentumSelect.

Definition at line 51 of file BPHMassSymSelect.h.

51  {
52  if (mSel->accept(cand))
53  return true;
54 
55  const reco::Candidate* pp = cand.getDaug(nPos);
56  const reco::Candidate* np = cand.getDaug(nNeg);
57 
58  reco::Candidate* pc = cand.originalReco(pp)->clone();
59  reco::Candidate* nc = cand.originalReco(np)->clone();
60 
61  pc->setMass(np->p4().mass());
62  nc->setMass(pp->p4().mass());
63  const reco::Candidate::LorentzVector s4 = pc->p4() + nc->p4();
64  double mass = s4.mass();
65 
66  delete pc;
67  delete nc;
68  return ((mass >= mSel->getMassMin()) && (mass <= mSel->getMassMax()));
69  }

Referenced by esMonitoring.FDJsonServer::handle_accept().

◆ operator=()

BPHMassSymSelect& BPHMassSymSelect::operator= ( const BPHMassSymSelect x)
delete

Member Data Documentation

◆ mSel

const BPHMassSelect* BPHMassSymSelect::mSel
private

Definition at line 74 of file BPHMassSymSelect.h.

◆ nNeg

std::string BPHMassSymSelect::nNeg
private

Definition at line 73 of file BPHMassSymSelect.h.

◆ nPos

std::string BPHMassSymSelect::nPos
private

Definition at line 72 of file BPHMassSymSelect.h.

reco::Candidate::setMass
virtual void setMass(double m)=0
set particle mass
np
int np
Definition: AMPTWrapper.h:43
BPHMassCuts::getMassMin
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:58
BPHMassSymSelect::nNeg
std::string nNeg
Definition: BPHMassSymSelect.h:73
BPHMassSymSelect::nPos
std::string nPos
Definition: BPHMassSymSelect.h:72
BPHMassSymSelect::mSel
const BPHMassSelect * mSel
Definition: BPHMassSymSelect.h:74
cand
Definition: decayParser.h:34
reco::Candidate
Definition: Candidate.h:27
groupFilesInBlocks.nn
nn
Definition: groupFilesInBlocks.py:150
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
reco::Candidate::p4
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
BPHMassSelect::accept
bool accept(const BPHDecayMomentum &cand) const override
select particle
Definition: BPHMassSelect.h:48
createTree.pp
pp
Definition: createTree.py:17
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36