CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
BPHDecayToV0Builder Class Referenceabstract

#include <BPHDecayToV0Builder.h>

Inheritance diagram for BPHDecayToV0Builder:
BPHDecayGenericBuilder BPHDecayToV0DiffMassBuilder BPHDecayToV0SameMassBuilder BPHLambda0ToPPiBuilder BPHK0sToPiPiBuilder

Classes

struct  V0Info
 

Public Types

enum  v0Type { VertexCompositeCandidate, VertexCompositePtrCandidate }
 

Public Member Functions

 BPHDecayToV0Builder (const BPHDecayToV0Builder &x)=delete
 
 BPHDecayToV0Builder (const edm::EventSetup &es, const std::string &d1Name, const std::string &d2Name, const BPHRecoBuilder::BPHGenericCollection *d1Collection, const BPHRecoBuilder::BPHGenericCollection *d2Collection)
 
 BPHDecayToV0Builder (const edm::EventSetup &es, const std::string &d1Name, const std::string &d2Name, const std::vector< reco::VertexCompositeCandidate > *v0Collection, const std::string &searchList="cfp")
 
 BPHDecayToV0Builder (const edm::EventSetup &es, const std::string &d1Name, const std::string &d2Name, const std::vector< reco::VertexCompositePtrCandidate > *vpCollection, const std::string &searchList="cfp")
 
std::vector< BPHPlusMinusConstCandPtrbuild ()
 build candidates More...
 
double getEtaMax () const
 
double getPtMin () const
 get current cuts More...
 
BPHDecayToV0Builderoperator= (const BPHDecayToV0Builder &x)=delete
 
void setEtaMax (double eta)
 
void setPtMin (double pt)
 set cuts More...
 
 ~BPHDecayToV0Builder () override
 
- Public Member Functions inherited from BPHDecayGenericBuilder
 BPHDecayGenericBuilder (const BPHDecayGenericBuilder &x)=delete
 
 BPHDecayGenericBuilder (const edm::EventSetup &es, BPHMassFitSelect *mfs=nullptr)
 
double getMassFitMax () const
 
double getMassFitMin () const
 
double getMassMax () const
 
double getMassMin () const
 get current cuts More...
 
double getMinPDiff ()
 
double getProbMin () const
 
BPHDecayGenericBuilderoperator= (const BPHDecayGenericBuilder &x)=delete
 
void setMassFitMax (double m)
 
void setMassFitMin (double m)
 
void setMassFitRange (double mMin, double mMax)
 
void setMassMax (double m)
 
void setMassMin (double m)
 set cuts More...
 
void setMassRange (double mMin, double mMax)
 
void setMinPDiff (double mpd)
 track min p difference More...
 
void setProbMin (double p)
 
virtual ~BPHDecayGenericBuilder ()
 

Protected Member Functions

virtual BPHPlusMinusCandidatePtr buildCandidate (const reco::Candidate *c1, const reco::Candidate *c2, const void *v0, v0Type type)=0
 
virtual void buildFromBPHGenericCollection ()=0
 build candidates and link to V0 More...
 
template<class T >
void buildFromV0 (const T *v0Collection, v0Type type)
 
void v0Clear ()
 

Protected Attributes

std::vector< BPHPlusMinusConstCandPtrcList
 
double etaMax
 
const BPHRecoBuilder::BPHGenericCollectionp1Collection
 
std::string p1Name
 
const BPHRecoBuilder::BPHGenericCollectionp2Collection
 
std::string p2Name
 
double ptMin
 
const std::vector< reco::VertexCompositePtrCandidate > * rCollection
 
std::string sList
 
std::map< const BPHRecoCandidate *, const V0Info * > v0Map
 
const std::vector< reco::VertexCompositeCandidate > * vCollection
 
- Protected Attributes inherited from BPHDecayGenericBuilder
BPHChi2Selectchi2Sel
 
const edm::EventSetupevSetup
 
BPHMassSelectmassSel
 
BPHMassFitSelectmFitSel
 
double minPDiff
 
bool updated
 

Detailed Description

Description: Class to build neutral particles decaying to a V0, starting from reco::Candidates or already reconstructed V0s

Author
Paolo Ronchese INFN Padova

Definition at line 41 of file BPHDecayToV0Builder.h.

Member Enumeration Documentation

◆ v0Type

Enumerator
VertexCompositeCandidate 
VertexCompositePtrCandidate 

Definition at line 43 of file BPHDecayToV0Builder.h.

Constructor & Destructor Documentation

◆ BPHDecayToV0Builder() [1/4]

BPHDecayToV0Builder::BPHDecayToV0Builder ( const edm::EventSetup es,
const std::string &  d1Name,
const std::string &  d2Name,
const BPHRecoBuilder::BPHGenericCollection d1Collection,
const BPHRecoBuilder::BPHGenericCollection d2Collection 
)

Constructor

Definition at line 35 of file BPHDecayToV0Builder.cc.

41  p1Name(d1Name),
42  p2Name(d2Name),
43  p1Collection(d1Collection),
44  p2Collection(d2Collection),
45  vCollection(nullptr),
46  rCollection(nullptr),
47  sList(""),
48  ptMin(0.0),
49  etaMax(100.0) {}

◆ BPHDecayToV0Builder() [2/4]

BPHDecayToV0Builder::BPHDecayToV0Builder ( const edm::EventSetup es,
const std::string &  d1Name,
const std::string &  d2Name,
const std::vector< reco::VertexCompositeCandidate > *  v0Collection,
const std::string &  searchList = "cfp" 
)

Definition at line 51 of file BPHDecayToV0Builder.cc.

57  p1Name(d1Name),
58  p2Name(d2Name),
59  p1Collection(nullptr),
60  p2Collection(nullptr),
61  vCollection(v0Collection),
62  rCollection(nullptr),
64  ptMin(0.0),
65  etaMax(100.0) {}

◆ BPHDecayToV0Builder() [3/4]

BPHDecayToV0Builder::BPHDecayToV0Builder ( const edm::EventSetup es,
const std::string &  d1Name,
const std::string &  d2Name,
const std::vector< reco::VertexCompositePtrCandidate > *  vpCollection,
const std::string &  searchList = "cfp" 
)

Definition at line 67 of file BPHDecayToV0Builder.cc.

73  p1Name(d1Name),
74  p2Name(d2Name),
75  p1Collection(nullptr),
76  p2Collection(nullptr),
77  vCollection(nullptr),
78  rCollection(vpCollection),
80  ptMin(0.0),
81  etaMax(100.0) {}

◆ BPHDecayToV0Builder() [4/4]

BPHDecayToV0Builder::BPHDecayToV0Builder ( const BPHDecayToV0Builder x)
delete

◆ ~BPHDecayToV0Builder()

BPHDecayToV0Builder::~BPHDecayToV0Builder ( )
override

Destructor

Definition at line 86 of file BPHDecayToV0Builder.cc.

86 { v0Clear(); }

References v0Clear().

Member Function Documentation

◆ build()

vector< BPHPlusMinusConstCandPtr > BPHDecayToV0Builder::build ( )

build candidates

Operations

Definition at line 91 of file BPHDecayToV0Builder.cc.

91  {
92  if (updated)
93  return cList;
94  cList.clear();
95  v0Clear();
96 
97  if ((p1Collection != nullptr) && (p2Collection != nullptr))
99  else if (vCollection != nullptr)
101  else if (rCollection != nullptr)
103 
104  updated = true;
105  return cList;
106 }

References buildFromBPHGenericCollection(), buildFromV0(), cList, p1Collection, p2Collection, rCollection, BPHDecayGenericBuilder::updated, v0Clear(), vCollection, VertexCompositeCandidate, and VertexCompositePtrCandidate.

Referenced by BPHWriteSpecificDecay::fill().

◆ buildCandidate()

virtual BPHPlusMinusCandidatePtr BPHDecayToV0Builder::buildCandidate ( const reco::Candidate c1,
const reco::Candidate c2,
const void *  v0,
v0Type  type 
)
protectedpure virtual

◆ buildFromBPHGenericCollection()

virtual void BPHDecayToV0Builder::buildFromBPHGenericCollection ( )
protectedpure virtual

build candidates and link to V0

Implemented in BPHDecayToV0DiffMassBuilder, and BPHDecayToV0SameMassBuilder.

Referenced by build().

◆ buildFromV0()

template<class T >
void BPHDecayToV0Builder::buildFromV0 ( const T v0Collection,
v0Type  type 
)
protected

Definition at line 127 of file BPHDecayToV0Builder.cc.

127  {
128  int iv0;
129  int nv0 = v0Collection->size();
130  cList.reserve(nv0);
131 
132  // cycle over V0 collection
133  for (iv0 = 0; iv0 < nv0; ++iv0) {
134  const typename T::value_type& v0 = v0Collection->at(iv0);
135 
136  // every reco::VertexCompositeCandidate must have exactly two daughters
137  if (v0.numberOfDaughters() != 2)
138  continue;
139  const reco::Candidate* dr = v0.daughter(0);
140  const reco::Candidate* dl = v0.daughter(1);
141 
142  // filters
143  if (dr->p4().pt() < ptMin)
144  continue;
145  if (dl->p4().pt() < ptMin)
146  continue;
147  if (fabs(dr->p4().eta()) > etaMax)
148  continue;
149  if (fabs(dl->p4().eta()) > etaMax)
150  continue;
151 
153  BPHPlusMinusCandidate* cptr = cand.get();
154  if (cand->daughters().size() != 2)
155  continue;
156  if (!massSel->accept(*cand))
157  continue;
158  if ((chi2Sel != nullptr) && (!chi2Sel->accept(*cand)))
159  continue;
160 
161  cList.push_back(cand);
162  V0Info* info = new V0Info;
163  info->type = type;
164  info->v0 = &v0;
165  v0Map[cptr] = info;
166  }
167 
168  return;
169 }

References BPHMassSelect::accept(), BPHChi2Select::accept(), buildCandidate(), BPHDecayGenericBuilder::chi2Sel, cList, flavorHistoryFilter_cfi::dr, etaMax, info(), BPHDecayGenericBuilder::massSel, reco::Candidate::p4(), ptMin, V0Monitor_cff::v0, and v0Map.

Referenced by build().

◆ getEtaMax()

double BPHDecayToV0Builder::getEtaMax ( ) const

Definition at line 124 of file BPHDecayToV0Builder.cc.

124 { return etaMax; }

References etaMax.

◆ getPtMin()

double BPHDecayToV0Builder::getPtMin ( ) const

get current cuts

Definition at line 122 of file BPHDecayToV0Builder.cc.

122 { return ptMin; }

References ptMin.

◆ operator=()

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

◆ setEtaMax()

void BPHDecayToV0Builder::setEtaMax ( double  eta)

◆ setPtMin()

void BPHDecayToV0Builder::setPtMin ( double  pt)

◆ v0Clear()

void BPHDecayToV0Builder::v0Clear ( )
protected

Definition at line 171 of file BPHDecayToV0Builder.cc.

171  {
172  map<const BPHRecoCandidate*, const V0Info*>::iterator iter = v0Map.begin();
173  map<const BPHRecoCandidate*, const V0Info*>::iterator iend = v0Map.end();
174  while (iter != iend)
175  delete iter++->second;
176  return;
177 }

References v0Map.

Referenced by build(), and ~BPHDecayToV0Builder().

Member Data Documentation

◆ cList

std::vector<BPHPlusMinusConstCandPtr> BPHDecayToV0Builder::cList
protected

◆ etaMax

double BPHDecayToV0Builder::etaMax
protected

◆ p1Collection

const BPHRecoBuilder::BPHGenericCollection* BPHDecayToV0Builder::p1Collection
protected

◆ p1Name

std::string BPHDecayToV0Builder::p1Name
protected

◆ p2Collection

const BPHRecoBuilder::BPHGenericCollection* BPHDecayToV0Builder::p2Collection
protected

◆ p2Name

std::string BPHDecayToV0Builder::p2Name
protected

◆ ptMin

double BPHDecayToV0Builder::ptMin
protected

◆ rCollection

const std::vector<reco::VertexCompositePtrCandidate>* BPHDecayToV0Builder::rCollection
protected

Definition at line 97 of file BPHDecayToV0Builder.h.

Referenced by build().

◆ sList

std::string BPHDecayToV0Builder::sList
protected

Definition at line 98 of file BPHDecayToV0Builder.h.

Referenced by BPHDecayToV0DiffMassBuilder::buildCandidate().

◆ v0Map

std::map<const BPHRecoCandidate*, const V0Info*> BPHDecayToV0Builder::v0Map
protected

Definition at line 103 of file BPHDecayToV0Builder.h.

Referenced by buildFromV0(), and v0Clear().

◆ vCollection

const std::vector<reco::VertexCompositeCandidate>* BPHDecayToV0Builder::vCollection
protected

Definition at line 96 of file BPHDecayToV0Builder.h.

Referenced by build().

BPHDecayToV0Builder::VertexCompositePtrCandidate
Definition: BPHDecayToV0Builder.h:43
V0Monitor_cff.v0
v0
Definition: V0Monitor_cff.py:7
BPHDecayToV0Builder::VertexCompositeCandidate
Definition: BPHDecayToV0Builder.h:43
BPHDecayToV0Builder::p2Name
std::string p2Name
Definition: BPHDecayToV0Builder.h:92
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
BPHPlusMinusCandidatePtr
BPHGenericPtr< BPHPlusMinusCandidate >::type BPHPlusMinusCandidatePtr
Definition: BPHPlusMinusCandidatePtr.h:7
BPHDecayToV0Builder::v0Map
std::map< const BPHRecoCandidate *, const V0Info * > v0Map
Definition: BPHDecayToV0Builder.h:103
BPHPlusMinusCandidate
Definition: BPHPlusMinusCandidate.h:32
BPHDecayToV0Builder::v0Clear
void v0Clear()
Definition: BPHDecayToV0Builder.cc:171
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
BPHDecayGenericBuilder::massSel
BPHMassSelect * massSel
Definition: BPHDecayGenericBuilder.h:75
BPHDecayToV0Builder::p1Name
std::string p1Name
Definition: BPHDecayToV0Builder.h:91
BPHDecayToV0Builder::rCollection
const std::vector< reco::VertexCompositePtrCandidate > * rCollection
Definition: BPHDecayToV0Builder.h:97
BPHDecayToV0Builder::ptMin
double ptMin
Definition: BPHDecayToV0Builder.h:100
BPHDecayToV0Builder::buildFromBPHGenericCollection
virtual void buildFromBPHGenericCollection()=0
build candidates and link to V0
BPHDecayGenericBuilder::updated
bool updated
Definition: BPHDecayGenericBuilder.h:80
PVValHelper::eta
Definition: PVValidationHelpers.h:70
BPHDecayToV0Builder::sList
std::string sList
Definition: BPHDecayToV0Builder.h:98
BPHDecayToV0Builder::buildCandidate
virtual BPHPlusMinusCandidatePtr buildCandidate(const reco::Candidate *c1, const reco::Candidate *c2, const void *v0, v0Type type)=0
BPHDecayToV0Builder::p1Collection
const BPHRecoBuilder::BPHGenericCollection * p1Collection
Definition: BPHDecayToV0Builder.h:94
BPHDecayGenericBuilder::chi2Sel
BPHChi2Select * chi2Sel
Definition: BPHDecayGenericBuilder.h:76
BPHDecayToV0Builder::buildFromV0
void buildFromV0(const T *v0Collection, v0Type type)
Definition: BPHDecayToV0Builder.cc:127
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
cand
Definition: decayParser.h:32
newFWLiteAna.searchList
searchList
Definition: newFWLiteAna.py:119
BPHDecayToV0Builder::p2Collection
const BPHRecoBuilder::BPHGenericCollection * p2Collection
Definition: BPHDecayToV0Builder.h:95
BPHDecayToV0Builder::etaMax
double etaMax
Definition: BPHDecayToV0Builder.h:101
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
BPHDecayToV0Builder::vCollection
const std::vector< reco::VertexCompositeCandidate > * vCollection
Definition: BPHDecayToV0Builder.h:96
reco::Candidate
Definition: Candidate.h:27
BPHDecayToV0Builder::cList
std::vector< BPHPlusMinusConstCandPtr > cList
Definition: BPHDecayToV0Builder.h:89
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
BPHDecayGenericBuilder::BPHDecayGenericBuilder
BPHDecayGenericBuilder(const edm::EventSetup &es, BPHMassFitSelect *mfs=nullptr)
Definition: BPHDecayGenericBuilder.cc:29
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
BPHChi2Select::accept
bool accept(const BPHDecayVertex &cand) const override
select vertex
Definition: BPHChi2Select.h:48