CMS 3D CMS Logo

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

#include <BPHMassSymSelect.h>

Inheritance diagram for BPHMassSymSelect:
BPHMomentumSelect

Public Member Functions

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

Private Member Functions

 BPHMassSymSelect (const BPHMassSymSelect &x)
 
BPHMassSymSelectoperator= (const BPHMassSymSelect &x)
 

Private Attributes

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

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::BPHMassSymSelect ( const std::string &  np,
const std::string &  nn,
const BPHMassSelect ms 
)
inline

Constructor

Definition at line 39 of file BPHMassSymSelect.h.

40  : nPos( np ), nNeg( nn ),
41  mSel( ms ) {}
int np
Definition: AMPTWrapper.h:33
const BPHMassSelect * mSel
virtual BPHMassSymSelect::~BPHMassSymSelect ( )
inlinevirtual

Destructor

Definition at line 45 of file BPHMassSymSelect.h.

45 {}
BPHMassSymSelect::BPHMassSymSelect ( const BPHMassSymSelect x)
private

Member Function Documentation

virtual bool BPHMassSymSelect::accept ( const BPHDecayMomentum cand) const
inlinevirtual

select particle

Operations

Implements BPHMomentumSelect.

Definition at line 50 of file BPHMassSymSelect.h.

Referenced by Vispa.Gui.BoxContentDialog.BoxContentDialog::apply(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog::apply(), and esMonitoring.FDJsonServer::handle_accept().

50  {
51 
52  if ( mSel->accept( cand ) ) return true;
53 
54  const
55  reco::Candidate* pp = cand.getDaug( nPos );
56  const
57  reco::Candidate* np = cand.getDaug( nNeg );
58 
59  reco::Candidate* pc = cand.originalReco( pp )->clone();
60  reco::Candidate* nc = cand.originalReco( np )->clone();
61 
62  pc->setMass( np->p4().mass() );
63  nc->setMass( pp->p4().mass() );
64  const reco::Candidate::LorentzVector s4 = pc->p4() + nc->p4();
65  double mass = s4.mass();
66 
67  delete pc;
68  delete nc;
69  return ( ( mass > mSel->getMassMin() ) &&
70  ( mass < mSel->getMassMax() ) );
71 
72  }
tuple pp
Definition: createTree.py:15
virtual bool accept(const BPHDecayMomentum &cand) const
select particle
Definition: BPHMassSelect.h:48
int np
Definition: AMPTWrapper.h:33
virtual const reco::Candidate * originalReco(const reco::Candidate *daug) const
get the original particle from the clone
virtual Candidate * clone() const =0
returns a clone of the Candidate object
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:54
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
virtual const reco::Candidate * getDaug(const std::string &name) const
virtual void setMass(double m)=0
set particle mass
const BPHMassSelect * mSel
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector
BPHMassSymSelect& BPHMassSymSelect::operator= ( const BPHMassSymSelect x)
private

Member Data Documentation

const BPHMassSelect* BPHMassSymSelect::mSel
private

Definition at line 82 of file BPHMassSymSelect.h.

std::string BPHMassSymSelect::nNeg
private

Definition at line 81 of file BPHMassSymSelect.h.

std::string BPHMassSymSelect::nPos
private

Definition at line 80 of file BPHMassSymSelect.h.