61 const vector<BPHRecoConstCandPtr>* cCollection = *
compCollectList.begin();
71 const vector<const reco::Candidate*>&
73 const string&
list ) {
90 map<string,int>::const_iterator iter =
sourceId.find(
name );
91 if ( iter ==
sourceId.end() )
return;
100 map<string,int>::const_iterator iter =
srCompId.find(
name );
101 if ( iter ==
sourceId.end() )
return;
110 map<string,int>::const_iterator iter =
srCompId.find(
name );
111 if ( iter ==
sourceId.end() )
return;
120 map<string,int>::const_iterator iter =
srCompId.find(
name );
121 if ( iter ==
sourceId.end() )
return;
150 for ( i = 0; i <
n; ++
i ) {
154 for ( i = 0; i <
n; ++
i ) {
158 for ( i = 0; i <
n; ++
i ) {
174 vector<ComponentSet> candList;
176 build( candList, compSet,
190 double minPDifference ) {
195 if ( ( lrcTrack !=
nullptr ) &&
196 ( ( lrcTrack == rrcTrack ) ||
197 ( lrcTrack == rpfTrack ) ) )
return true;
198 if ( ( lpfTrack !=
nullptr ) &&
199 ( ( lpfTrack == rrcTrack ) ||
200 ( lpfTrack == rpfTrack ) ) )
return true;
205 double pDMod = pDiff.mag2();
206 double pMMod = pMean.mag2();
207 if ( ( ( pDMod / pMMod ) < minPDifference ) &&
220 <<
"BPHRecoBuilder::add: " 221 <<
"Decay product already inserted with name " <<
name 238 const vector<BPHRecoConstCandPtr>& collection ) {
242 <<
"BPHRecoBuilder::add: " 243 <<
"Decay product already inserted with name " <<
name 258 vector<BPHRecoSource*>::const_iterator r_iter,
259 vector<BPHRecoSource*>::const_iterator r_iend,
260 vector<BPHCompSource*>::const_iterator c_iter,
261 vector<BPHCompSource*>::const_iterator c_iend )
const {
262 if ( r_iter == r_iend ) {
263 if ( c_iter == c_iend ) {
265 compList.push_back( compSet );
270 vector<BPHRecoConstCandPtr>* collection = source->
collection;
271 vector<const BPHMomentumSelect*> momSelector = source->
momSelector;
272 vector<const BPHVertexSelect*> vtxSelector = source->
vtxSelector;
273 vector<const BPHFitSelect*> fitSelector = source->
fitSelector;
276 int n = collection->size();
279 for ( i = 0; i <
n; ++
i ) {
282 if (
contained( compSet, cand ) )
continue;
283 m = momSelector.size();
284 for ( j = 0; j <
m; ++j ) {
285 if ( !momSelector[j]->
accept( *cand ) ) skip =
true;
287 m = vtxSelector.size();
288 for ( j = 0; j <
m; ++j ) {
289 if ( !vtxSelector[j]->
accept( *cand ) ) skip =
true;
291 m = fitSelector.size();
292 for ( j = 0; j <
m; ++j ) {
293 if ( !fitSelector[j]->
accept( *cand ) ) skip =
true;
295 if ( skip )
continue;
297 build( compList, compSet,
306 vector<const BPHRecoSelect*>& selector = source->
selector;
309 int n = collection->
size();
310 int m = selector.size();
312 for ( i = 0; i <
n; ++
i ) {
314 if (
contained( compSet, &cand ) )
continue;
316 for ( j = 0; j <
m; ++j ) {
317 if ( !selector[j]->
accept( cand,
this ) ) skip =
true;
319 if ( skip )
continue;
327 build( compList, compSet,
339 map<string,BPHDecayMomentum::Component>& dMap = compSet.
daugMap;
340 map<string,BPHDecayMomentum::Component>::const_iterator d_iter;
341 map<string,BPHDecayMomentum::Component>::const_iterator d_iend = dMap.end();
342 for ( d_iter = dMap.begin(); d_iter != d_iend; ++d_iter ) {
344 if ( cand == cChk )
return true;
345 if (
sameTrack( cand, cChk ) )
return true;
355 map<string,BPHRecoConstCandPtr>::const_iterator c_iter;
356 map<string,BPHRecoConstCandPtr>::const_iterator c_iend =
compMap.end();
357 const vector<const reco::Candidate*>& dCand = cCand->daughFull();
359 int m = dCand.size();
362 for ( j = 0; j <
m; ++j ) {
365 map<string,BPHDecayMomentum::Component>& dMap = compSet.
daugMap;
366 map<string,BPHDecayMomentum::Component>::const_iterator d_iter;
367 map<string,BPHDecayMomentum::Component>::const_iterator d_iend = dMap.end();
368 for ( d_iter = dMap.begin(); d_iter != d_iend; ++d_iter ) {
370 if ( cand == cChk )
return true;
371 if (
sameTrack( cand, cChk ) )
return true;
374 for ( c_iter =
compMap.begin(); c_iter != c_iend; ++c_iter ) {
375 const pair<string,BPHRecoConstCandPtr>&
entry = *c_iter;
377 const vector<const reco::Candidate*>& dCChk = cCChk->daughFull();
379 for ( k = 0; k <
l; ++
k ) {
381 if ( cand == cChk )
return true;
382 if (
sameTrack( cand, cChk ) )
return true;
std::vector< const BPHRecoSelect * > selector
const reco::Candidate * cand
static bool sameTrack(const reco::Candidate *lCand, const reco::Candidate *rCand, double minPDifference)
void setMinPDiffererence(double pMin)
static const reco::Track * getFromPF(const reco::Candidate &rc)
auto_ptr< ClusterSequence > cs
std::vector< const BPHVertexSelect * > vsList
math::XYZVector Vector
point in the space
BPHGenericPtr< const BPHRecoCandidate >::type BPHRecoConstCandPtr
std::map< std::string, BPHRecoConstCandPtr > compMap
virtual ~BPHRecoBuilder()
std::vector< ComponentSet > build() const
build a set of combinations of particles fulfilling the selections
const std::vector< BPHRecoConstCandPtr > * collection
std::map< std::string, int > sourceId
const edm::EventSetup * evSetup
bool accept(const BPHRecoCandidate &cand) const
std::vector< BPHCompSource * > srCompList
std::vector< const BPHFitSelect * > fsList
const BPHGenericCollection * collection
const edm::EventSetup * eventSetup() const
get the EventSetup set in the constructor
static BPHGenericCollection * createCollection(const edm::Handle< T > &collection, const std::string &list="cfhpmig")
static const reco::Track * getFromRC(const reco::Candidate &rc)
std::vector< const BPHFitSelect * > fitSelector
std::vector< const BPHVertexSelect * > vtxSelector
std::map< std::string, const reco::Candidate * > daugMap
std::vector< BPHRecoSource * > sourceList
void add(const std::string &name, const BPHGenericCollection *collection, double mass=-1.0, double msig=-1.0)
std::map< std::string, BPHDecayMomentum::Component > daugMap
const std::string & searchList() const
std::vector< const BPHMomentumSelect * > momSelector
virtual Vector momentum() const =0
spatial momentum vector
std::map< std::string, int > srCompId
virtual const reco::Candidate & get(int i) const =0
virtual int charge() const =0
electric charge
void filter(const std::string &name, const BPHRecoSelect &sel) const
std::vector< const BPHMomentumSelect * > msList
bool contained(ComponentSet &compSet, const reco::Candidate *cand) const
std::set< const std::vector< BPHRecoConstCandPtr > * > compCollectList
BPHRecoBuilder(const edm::EventSetup &es)
virtual int size() const =0
std::map< std::string, BPHRecoConstCandPtr > compMap
static std::string const source
T get(const Candidate &c)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run