ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
McVtxFilter Class Reference

McVtxFilter allows to select HepMC::GenParticle based on the decay pattern. More...

#include <McVtxFilter.h>

Inheritance diagram for McVtxFilter:
Collaboration diagram for McVtxFilter:

Public Member Functions

 McVtxFilter ()
 Default constructor: More...
 
 McVtxFilter (const McVtxFilter &rhs)
 Copy constructor: More...
 
 McVtxFilter (const std::string &decayPattern, const bool matchSign=false, const bool matchBranches=false)
 Constructor with parameters: More...
 
 McVtxFilter (const bool matchSign, const bool matchBranches)
 Constructor with parameters: More...
 
virtual ~McVtxFilter ()
 Destructor: More...
 
McVtxFilteroperator= (const McVtxFilter &rhs)
 Assignment operator: More...
 
virtual bool isAccepted (HepMC::ConstGenVertexPtr vtx) const
 Main filter method. More...
 
void dump (std::ostream &out=std::cout) const
 Dump to std::ostream (default = std::cout) the decay pattern the filter one is looking for. More...
 
bool isFullVtx () const
 returns true if the vertex filter requires a parent AND a child list ie: returns false if the filter looks only for a lonely particle (eg: a photon or an electron, see TruthParticleAlgs for a concrete example) More...
 
bool matchSign () const
 return true if the filter discriminates the sign of the particles More...
 
bool matchBranches () const
 return true if the filter strictly matchs the number of output particles eg: a vertex t->Wbgg won't be selected if matchBranches == true and decay pattern = "#id 6[24,5]" More...
 
const std::string & decayPattern () const
 return the decay pattern used by this filter More...
 
const DataVector< const ParticleCandidateList > & parentList () const
 return the list of particle candidates for the input particles (parent) More...
 
const DataVector< const ParticleCandidateList > & childList () const
 return the list of particle candidates for the output particles (child) More...
 
virtual void setFilter (const IFilterCuts *filter)
 Set filter cut options. More...
 
void setMatchSign (const bool matchSign)
 Set if one wants to discriminate the sign of the particles. More...
 
void setMatchBranches (const bool matchVtxBranches)
 Set if one wants to strictly match the number of output particles. More...
 
void setDecayPattern (const std::string &decayPattern)
 Set the decay pattern to look for : it correctly setups the parent and children according to the LaTeX-like string which is given as argument. More...
 
bool msgLvl (const MSG::Level lvl) const
 Test the output level. More...
 
MsgStream & msg () const
 The standard message stream. More...
 
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream. More...
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

Protected Member Functions

bool checkParentBranch (HepMC::ConstGenVertexPtr vtx) const
 Check if the parent branch fulfills the requirements. More...
 
bool checkChildBranch (HepMC::ConstGenVertexPtr vtx) const
 Check if the child branch fulfills the requirements. More...
 
bool checkTwoBodyDecay (HepMC::ConstGenVertexPtr vtx) const
 Check the branches for the special case of a 1->2 body decay (there is some room for optimisation in that particular case) More...
 

Protected Attributes

bool m_matchSign
 Discrimination between particles and conjugates. More...
 
bool m_matchBranches
 Tell if one wants a strict vertex branches matching. More...
 
std::string m_decayPattern
 The decay pattern one looks for. More...
 
DataVector< const ParticleCandidateListm_parentList
 The list of the matching particles Ids : each item in DataVector stands for an entering branch to the vertex. More...
 
DataVector< const ParticleCandidateListm_childList
 The list of the matching particles Ids : each item in DataVector stands for an out-going branch to the vertex. More...
 

Private Member Functions

void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Private Attributes

std::string m_nm
 Message source name. More...
 
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels) More...
 
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer. More...
 
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level. More...
 
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging) More...
 

Detailed Description

McVtxFilter allows to select HepMC::GenParticle based on the decay pattern.

Hopefully one will be able to also select the particles by pt (in a coming patch). It uses internally the DecayPattern class to build the filtering decision The basic modus operandi is to loop on HepMC::GenVertex (of a given HepMC::GenEvent) to select the ones which are of interest (and fulfill the decay pattern).

Definition at line 44 of file McVtxFilter.h.

Constructor & Destructor Documentation

◆ McVtxFilter() [1/4]

McVtxFilter::McVtxFilter ( )

Default constructor:

Public methods:

Constructors

Definition at line 32 of file McVtxFilter.cxx.

32  :
33  IFilterCuts(),
34  AthMessaging ( "McVtxFilter" ),
35  m_matchSign( false ),
36  m_matchBranches( false ),
37  m_decayPattern( "" ),
38  m_parentList(),
39  m_childList()
40 {}

◆ McVtxFilter() [2/4]

McVtxFilter::McVtxFilter ( const McVtxFilter rhs)

Copy constructor:

Definition at line 67 of file McVtxFilter.cxx.

67  :
68  IFilterCuts ( rhs ),
69  AthMessaging ( "McVtxFilter" ),
70  m_matchSign ( rhs.m_matchSign ),
73  m_parentList(),
74  m_childList()
75 {
76  // deep copy of the parent branch
79  rhs.m_parentList.begin();
80  itr != rhs.m_parentList.end();
81  ++itr ) {
83  }
84 
85  // deep copy of the child branch
88  rhs.m_childList.begin();
89  itr != rhs.m_childList.end();
90  ++itr ) {
92  }
93 }

◆ McVtxFilter() [3/4]

McVtxFilter::McVtxFilter ( const std::string &  decayPattern,
const bool  matchSign = false,
const bool  matchBranches = false 
)

Constructor with parameters:

Definition at line 42 of file McVtxFilter.cxx.

44  :
45  IFilterCuts(),
46  AthMessaging ( "McVtxFilter" ),
50  m_parentList(),
51  m_childList()
52 {
54 }

◆ McVtxFilter() [4/4]

McVtxFilter::McVtxFilter ( const bool  matchSign,
const bool  matchBranches 
)

Constructor with parameters:

Definition at line 56 of file McVtxFilter.cxx.

57  :
58  IFilterCuts(),
59  AthMessaging ( "McVtxFilter" ),
62  m_decayPattern( "" ),
63  m_parentList(),
64  m_childList()
65 {}

◆ ~McVtxFilter()

McVtxFilter::~McVtxFilter ( )
inlinevirtual

Destructor:

Definition at line 199 of file McVtxFilter.h.

199 {}

Member Function Documentation

◆ checkChildBranch()

bool McVtxFilter::checkChildBranch ( HepMC::ConstGenVertexPtr  vtx) const
protected

Check if the child branch fulfills the requirements.

Check we aren't in the "any particle" case

Check there is enough outgoing particles in the current vertex

Definition at line 369 of file McVtxFilter.cxx.

370 {
371  ATH_MSG_VERBOSE("In checkChildBranch...");
372 
373  if ( msgLvl(MSG::VERBOSE) ) {
374  HepMC::Print::line(std::cout,vtx);
375  }
376 
378  if ( m_childList.empty() ) {
379  return true;
380  }
381 
383  if ( static_cast<unsigned int>(vtx->particles_out_size()) < m_childList.size() ) return false;
384  ATH_MSG_VERBOSE("Number of list of children : " << m_childList.size());
385 
386  std::vector<int> childIds;
387  for ( auto Part: *vtx) {
388  childIds.push_back( Part->pdg_id() );
389  }
390 
392  std::vector<int> children;
393 
394  bool accepted = false;
395  while ( permute.get(children) && !accepted ) {
396  accepted = true;
397  const unsigned int iMax = std::min( m_childList.size(), childIds.size() );
398  for ( unsigned int i = 0; i != iMax; ++i ) {
399  const bool hasInList = m_childList[i]->hasInList( children[i], m_matchSign );
400  if ( !hasInList ) {
401  // this permutation is not suiting, going to the next one (if any)
402  accepted = false;
403  break;
404  }
405  }
406  }
407 
408  ATH_MSG_VERBOSE(">>> CheckChildBranch is DONE : "
409  << ( accepted ? "accept" : "reject" )
410  << " vtx= " << vtx);
411  return accepted;
412 }

◆ checkParentBranch()

bool McVtxFilter::checkParentBranch ( HepMC::ConstGenVertexPtr  vtx) const
protected

Check if the parent branch fulfills the requirements.

Protected methods:

Check we aren't in the "any particle" case

Check if number of parents is OK

Definition at line 302 of file McVtxFilter.cxx.

303 {
304  ATH_MSG_VERBOSE("In checkParentBranch...");
305 
307  if ( m_parentList.empty() ) {
308  return true;
309  }
310 
311  if ( msgLvl(MSG::VERBOSE) ) {
312  HepMC::Print::line(std::cout,vtx);
313  }
314 
316  if ( static_cast<unsigned int>(vtx->particles_in_size()) < m_parentList.size() ){
317  return false;
318  }
319 
320  if ( msgLvl(MSG::VERBOSE) ) {
321  msg() << MSG::VERBOSE
322  << "Number of list of parents : "
323  << m_parentList.size()
324  << endmsg;
326  }
327 
328  std::vector<int> parentIds;
329 #ifdef HEPMC3
330  for ( const auto& Part: vtx->particles_in() ) {
331  parentIds.push_back( Part->pdg_id() );
332  }
333 #else
334  for ( HepMC::GenVertex::particles_in_const_iterator itrPart = vtx->particles_in_const_begin();
335  itrPart != vtx->particles_in_const_end();
336  ++itrPart ) {
337  parentIds.push_back( (*itrPart)->pdg_id() );
338  }
339 #endif
340 
342  std::vector<int> parents;
343 
344  bool accepted = false;
345  while ( permute.get(parents) && !accepted ) {
346  accepted = true;
347  const unsigned int iMax = std::min( m_parentList.size(), parentIds.size() );
348  for ( unsigned int i = 0; i != iMax; ++i ) {
349  const bool hasInList = m_parentList[i]->hasInList( parents[i],m_matchSign );
350  if ( !hasInList ) {
351  // this permutation is not suiting, going to the next one (if any)
352  accepted = false;
353  break;
354  }
355  }
356 
357  // everything went fine for this permutation !
358  if ( accepted ) {
359  break;
360  }
361  }
362 
363  ATH_MSG_VERBOSE(">>> CheckParentBranch is DONE : "
364  << ( accepted ? "accept" : "reject" )
365  << " vtx= " << vtx);
366  return accepted;
367 }

◆ checkTwoBodyDecay()

bool McVtxFilter::checkTwoBodyDecay ( HepMC::ConstGenVertexPtr  vtx) const
protected

Check the branches for the special case of a 1->2 body decay (there is some room for optimisation in that particular case)

First check the parent branch matching decision if it doesn't fulfil our requirements, it is not worth continuing the process

Now, handle the child branch

Cache the 2 particle candidate lists

Cache the id of the outgoing particles of the vertex being analysed

Loop over candidates for the 1st child

Loop over candidate for the 2nd child

If the strict match sign has been required, we check if the PDG ids are matching

if we are in a loose sign request, we check only that the absolute values of the pdg IDs are matching

If we are here, then the vertex candidate didn't fulfil the requirements we have setup

Definition at line 414 of file McVtxFilter.cxx.

415 {
416  ATH_MSG_VERBOSE("In checkTwoBodyDecay...");
417 
421  const bool parentTree = checkParentBranch( vtx );
422  if ( parentTree == false ) {
423  return false;
424  }
425 
427  ATH_MSG_VERBOSE(">>> Check child branch");
428 
430  const ParticleCandidateList * children1 = m_childList[0];
431  const ParticleCandidateList * children2 = m_childList[1];
432 
434 //AV It would be a very good idea to have a chack of the number of output particles here.
435 #ifdef HEPMC3
436  const int pdgId1= vtx->particles_out().at(0)->pdg_id();
437  const int pdgId2= vtx->particles_out().at(1)->pdg_id();
438 #else
439  HepMC::GenVertex::particles_out_const_iterator itrPart = vtx->particles_out_const_begin();
440  const int pdgId1 = (*itrPart)->pdg_id();
441  ++itrPart;
442  const int pdgId2 = (*itrPart)->pdg_id();
443 #endif
444 
446  for( ParticleCandidateList::const_iterator itr1 = children1->begin();
447  itr1 != children1->end();
448  ++itr1 ) {
450  for( ParticleCandidateList::const_iterator itr2 = children2->begin();
451  itr2 != children2->end();
452  ++itr2 ) {
453  ATH_MSG_VERBOSE("Checking the pair : " << (*itr1) << "/" << (*itr2));
454 
457  if ( m_matchSign &&
458  ( ( (*itr1) == pdgId1 && (*itr2) == pdgId2 ) ||
459  ( (*itr1) == pdgId2 && (*itr2) == pdgId1 ) ) ) {
460  ATH_MSG_VERBOSE("Strict sign matching found !");
461  return true;
464  } else if ( ( std::abs(*itr1) == std::abs(pdgId1) &&
465  std::abs(*itr2) == std::abs(pdgId2) ) ||
466  ( std::abs(*itr1) == std::abs(pdgId2) &&
467  std::abs(*itr2) == std::abs(pdgId1) ) ) {
468  ATH_MSG_VERBOSE("Loose sign matching found !");
469  return true;
470  }
471  ATH_MSG_VERBOSE("Checking next pair");
472  }//> loop over 2nd child's candidates
473  }//> loop over 1st child's candidates
474 
477  ATH_MSG_VERBOSE(">>> CheckTwoBodyDecay is DONE.");
478  return false;
479 }

◆ childList()

const DataVector< const ParticleCandidateList > & McVtxFilter::childList ( ) const
inline

return the list of particle candidates for the output particles (child)

Definition at line 236 of file McVtxFilter.h.

237 {
238  return m_childList;
239 }

◆ decayPattern()

const std::string & McVtxFilter::decayPattern ( ) const
inline

return the decay pattern used by this filter

Definition at line 224 of file McVtxFilter.h.

225 {
226  return m_decayPattern;
227 }

◆ dump()

void McVtxFilter::dump ( std::ostream &  out = std::cout) const

Dump to std::ostream (default = std::cout) the decay pattern the filter one is looking for.

Definition at line 201 of file McVtxFilter.cxx.

202 {
203  out << ">>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<" << std::endl;
204  out << ">>> Parents : " << std::endl;
206  itr != m_parentList.end();
207  ++itr ) {
208  out << "\nList for : " << *itr
209  << " (" << (*itr)->size() << ")" << std::endl;
210  (*itr)->dropList();
211  }
212 
213  out << ">>> Children : " << std::endl;
215  itr != m_childList.end();
216  ++itr ) {
217  out << "\nList for : " << *itr
218  << " (" << (*itr)->size() << ")" << std::endl;
219  (*itr)->dropList();
220  }
221  out << ">>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<" << std::endl;
222 
223  return;
224 }

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40 {
42  m_lvl = m_imsg ?
43  static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
44  MSG::INFO;
45 }

◆ isAccepted()

bool McVtxFilter::isAccepted ( HepMC::ConstGenVertexPtr  vtx) const
virtual

Main filter method.

Const methods:

This method takes the decision whether or not the filter has to accept the vertex. It checks if the vertex has the required number of ingoing particles the required number of outgoing particles. Then for each branch (parent child) it checks if the particle can match an asked for particle.

First handle special case where the filter has only 1 child and no parent : one is looking for a stable particle with no end_vertex

Skip vertices which don't match the number of branches we are looking for : check if number of parents and of children is OK

Then handle the case we are looking for a 1->2 body decay

Handle other generic cases

Definition at line 128 of file McVtxFilter.cxx.

129 {
130  ATH_MSG_VERBOSE("In McVtxFilter::isAccepted(...)");
131 //AV TODO: add here a check to prevent null pointer dereference
132  unsigned int number_particles_out = vtx->particles_out_size();
133  unsigned int number_particles_in = vtx->particles_in_size();
138  if ( m_childList.size() == static_cast<unsigned int>( 1 ) &&
139  m_parentList.size() == static_cast<unsigned int>( 0 ) &&
140  number_particles_out == static_cast<unsigned int>( 1 ) ) {
141 #ifdef HEPMC3
142  const HepMC::ConstGenParticlePtr& part = vtx->particles_out().front();
143 #else
144  HepMC::ConstGenParticlePtr part = *(vtx->particles_out_const_begin());
145 #endif
146  const ParticleCandidateList * item = *( m_childList.begin() );
147  if ( item->hasInList( part->pdg_id(), m_matchSign ) ) {
148  return true;
149  } else {
150  return false;
151  }
152  }
153 
157  if ( !m_matchBranches ) {
158 
159  //
160  // Test only if there is enough *output* branches to match for
161  //
162  if ( number_particles_in < m_parentList.size() ||
163  number_particles_out < m_childList.size() ) {
164  return false;
165  }
166 
167  } else {
168  //
169  // Strict match of output branches
170  //
171  if ( number_particles_in != m_parentList.size() ||
172  number_particles_out != m_childList.size() ) {
173  return false;
174  }
175  }
176 
180  if ( m_matchBranches &&
181  m_parentList.size() == static_cast<unsigned int>(1) &&
182  m_childList.size() == static_cast<unsigned int>(2) &&
183  number_particles_out >= 2 ) {
184  return checkTwoBodyDecay( vtx );
185  } //> two-body decay
186 
187 
191  ATH_MSG_VERBOSE("trying checkParentBranch(...)");
192  if ( checkParentBranch( vtx ) == false ) return false;
193 
194  ATH_MSG_VERBOSE("trying checkChildBranch(...)");
195  if ( checkChildBranch ( vtx ) == false ) return false;
196 
197  ATH_MSG_VERBOSE("McVtxFilter::isAccepted(...) => DONE");
198  return true;
199 }

◆ isFullVtx()

bool McVtxFilter::isFullVtx ( ) const
inline

returns true if the vertex filter requires a parent AND a child list ie: returns false if the filter looks only for a lonely particle (eg: a photon or an electron, see TruthParticleAlgs for a concrete example)

Definition at line 205 of file McVtxFilter.h.

206 {
207  if ( m_parentList.empty() || m_childList.empty() ) {
208  return false;
209  } else {
210  return true;
211  }
212 }

◆ matchBranches()

bool McVtxFilter::matchBranches ( ) const
inline

return true if the filter strictly matchs the number of output particles eg: a vertex t->Wbgg won't be selected if matchBranches == true and decay pattern = "#id 6[24,5]"

Definition at line 219 of file McVtxFilter.h.

220 {
221  return m_matchBranches;
222 }

◆ matchSign()

bool McVtxFilter::matchSign ( ) const
inline

return true if the filter discriminates the sign of the particles

Definition at line 214 of file McVtxFilter.h.

215 {
216  return m_matchSign;
217 }

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 164 of file AthMessaging.h.

165 {
166  MsgStream* ms = m_msg_tls.get();
167  if (!ms) {
168  if (!m_initialized.test_and_set()) initMessaging();
169  ms = new MsgStream(m_imsg,m_nm);
170  m_msg_tls.reset( ms );
171  }
172 
173  ms->setLevel (m_lvl);
174  return *ms;
175 }

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level  lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 179 of file AthMessaging.h.

180 { return msg() << lvl; }

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152 {
153  if (!m_initialized.test_and_set()) initMessaging();
154  if (m_lvl <= lvl) {
155  msg() << lvl;
156  return true;
157  } else {
158  return false;
159  }
160 }

◆ operator=()

McVtxFilter & McVtxFilter::operator= ( const McVtxFilter rhs)

Assignment operator:

Definition at line 95 of file McVtxFilter.cxx.

96 {
97  if ( this != &rhs ) {
102 
103  // deep copy of the parent branch
106  rhs.m_parentList.begin();
107  itr != rhs.m_parentList.end();
108  ++itr ) {
110  }
111 
112  // deep copy of the child branch
115  rhs.m_childList.begin();
116  itr != rhs.m_childList.end();
117  ++itr ) {
119  }
120  }
121  return *this;
122 }

◆ parentList()

const DataVector< const ParticleCandidateList > & McVtxFilter::parentList ( ) const
inline

return the list of particle candidates for the input particles (parent)

Definition at line 230 of file McVtxFilter.h.

231 {
232  return m_parentList;
233 }

◆ setDecayPattern()

void McVtxFilter::setDecayPattern ( const std::string &  decayPattern)

Set the decay pattern to look for : it correctly setups the parent and children according to the LaTeX-like string which is given as argument.

Set the filter from a decay pattern.

Definition at line 247 of file McVtxFilter.cxx.

248 {
249  // clear parent and child candidates
251  m_childList.clear();
252 
254 
256 
257  std::vector<std::vector<std::string> > parents = parser.getParents();
258  for(std::vector<std::vector<std::string> >::const_iterator itr = parents.begin();
259  itr != parents.end();
260  ++itr ) {
262  const std::vector<std::string>::const_iterator candEnd = itr->end();
263  for( std::vector<std::string>::const_iterator candidate = itr->begin();
264  candidate != candEnd;
265  ++candidate ) {
266  int pdgID = parser.pdgId( *candidate );
267  list->push_back( pdgID );
268  }
269  if ( ! list->empty() ) {
271  } else {
272  delete list;
273  }
274  }
275  std::vector<std::vector<std::string> > children = parser.getChildren();
276  for(std::vector<std::vector<std::string> >::const_iterator itr = children.begin();
277  itr != children.end();
278  ++itr ) {
280  const std::vector<std::string>::const_iterator candEnd = itr->end();
281  for( std::vector<std::string>::const_iterator candidate = itr->begin();
282  candidate != candEnd;
283  ++candidate ) {
284  int pdgID = parser.pdgId( *candidate );
285  list->push_back( pdgID );
286  }
287  if ( ! list->empty() ) {
289  } else {
290  delete list;
291  }
292  }
293 
294  return;
295 }

◆ setFilter()

void McVtxFilter::setFilter ( const IFilterCuts filter)
virtual

Set filter cut options.

Non-const methods:

Set filter cut options

Implements IFilterCuts.

Definition at line 232 of file McVtxFilter.cxx.

233 {
234  if ( filter ) {
235  const McVtxFilter * vtxFilter =
236  dynamic_cast<const McVtxFilter*>(filter);
237 
238  if ( vtxFilter ) {
239  operator=(*vtxFilter);
240  } else {
241  ATH_MSG_ERROR("Can't dynamic_cast " << typeid(filter).name() << " to a McVtxFilter");
242  }
243  } //> filter is a valid pointer
244 }

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level  lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29 {
30  m_lvl = lvl;
31 }

◆ setMatchBranches()

void McVtxFilter::setMatchBranches ( const bool  matchVtxBranches)
inline

Set if one wants to strictly match the number of output particles.

Definition at line 250 of file McVtxFilter.h.

251 {
253 }

◆ setMatchSign()

void McVtxFilter::setMatchSign ( const bool  matchSign)
inline

Set if one wants to discriminate the sign of the particles.

Definition at line 245 of file McVtxFilter.h.

246 {
248 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_childList

DataVector<const ParticleCandidateList> McVtxFilter::m_childList
protected

The list of the matching particles Ids : each item in DataVector stands for an out-going branch to the vertex.

Definition at line 186 of file McVtxFilter.h.

◆ m_decayPattern

std::string McVtxFilter::m_decayPattern
protected

The decay pattern one looks for.

Ex: 23 -> -11 + 11 to model a Z0 -> e+ e- decay

Definition at line 178 of file McVtxFilter.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

◆ m_matchBranches

bool McVtxFilter::m_matchBranches
protected

Tell if one wants a strict vertex branches matching.

This is to cope with radiations in the output branches If true then a decay t->Wbggg will not be kept if one asked for a top into W+b decay... Default : false

Definition at line 174 of file McVtxFilter.h.

◆ m_matchSign

bool McVtxFilter::m_matchSign
protected

Discrimination between particles and conjugates.

Definition at line 167 of file McVtxFilter.h.

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_parentList

DataVector<const ParticleCandidateList> McVtxFilter::m_parentList
protected

The list of the matching particles Ids : each item in DataVector stands for an entering branch to the vertex.

Definition at line 182 of file McVtxFilter.h.


The documentation for this class was generated from the following files:
DataVector::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
ParticleCandidateList::begin
const_iterator begin() const
Definition: ParticleCandidateList.h:145
python.CaloScaleNoiseConfig.parser
parser
Definition: CaloScaleNoiseConfig.py:75
McVtxFilter::m_matchBranches
bool m_matchBranches
Tell if one wants a strict vertex branches matching.
Definition: McVtxFilter.h:174
McVtxFilter::m_parentList
DataVector< const ParticleCandidateList > m_parentList
The list of the matching particles Ids : each item in DataVector stands for an entering branch to the...
Definition: McVtxFilter.h:182
python.DecayParser.parents
parents
print ("==> buf:",buf)
Definition: DecayParser.py:31
ParticleCandidateList::dropList
void dropList() const
Definition: ParticleCandidateList.cxx:59
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
McVtxFilter::checkParentBranch
bool checkParentBranch(HepMC::ConstGenVertexPtr vtx) const
Check if the parent branch fulfills the requirements.
Definition: McVtxFilter.cxx:302
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
HepMC::Print::line
void line(std::ostream &os, const GenEvent &e)
Definition: GenEvent.h:676
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
McVtxFilter::checkTwoBodyDecay
bool checkTwoBodyDecay(HepMC::ConstGenVertexPtr vtx) const
Check the branches for the special case of a 1->2 body decay (there is some room for optimisation in ...
Definition: McVtxFilter.cxx:414
covarianceTool.filter
filter
Definition: covarianceTool.py:514
McVtxFilter
McVtxFilter allows to select HepMC::GenParticle based on the decay pattern.
Definition: McVtxFilter.h:45
AthMessaging::AthMessaging
AthMessaging()
Default constructor:
McVtxFilter::decayPattern
const std::string & decayPattern() const
return the decay pattern used by this filter
Definition: McVtxFilter.h:224
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthMessaging::msgLvl
bool msgLvl(const MSG::Level lvl) const
Test the output level.
Definition: AthMessaging.h:151
McVtxFilter::m_decayPattern
std::string m_decayPattern
The decay pattern one looks for.
Definition: McVtxFilter.h:178
AnalysisUtils::Permutation
permutation
Definition: AnalysisPermutation.h:24
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
McVtxFilter::setDecayPattern
void setDecayPattern(const std::string &decayPattern)
Set the decay pattern to look for : it correctly setups the parent and children according to the LaTe...
Definition: McVtxFilter.cxx:247
DataVector::front
const T * front() const
Access the first element in the collection as an rvalue.
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
McVtxFilter::checkChildBranch
bool checkChildBranch(HepMC::ConstGenVertexPtr vtx) const
Check if the child branch fulfills the requirements.
Definition: McVtxFilter.cxx:369
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
DataVector::clear
void clear()
Erase all the elements in the collection.
min
#define min(a, b)
Definition: cfImp.cxx:40
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
McVtxFilter::matchBranches
bool matchBranches() const
return true if the filter strictly matchs the number of output particles eg: a vertex t->Wbgg won't b...
Definition: McVtxFilter.h:219
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
IFilterCuts::IFilterCuts
IFilterCuts()
Default constructor:
Definition: IFilterCuts.h:69
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
item
Definition: ItemListSvc.h:43
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
ParticleCandidateList::end
const_iterator end() const
Definition: ParticleCandidateList.h:150
DetType::Part
Part
Definition: DetType.h:14
IFilterCuts::operator=
IFilterCuts & operator=(const IFilterCuts &rhs)
Assignment operator:
Definition: IFilterCuts.h:78
python.DecayParser.children
children
Definition: DecayParser.py:32
ParticleCandidateList::const_iterator
std::list< int >::const_iterator const_iterator
Definition: ParticleCandidateList.h:41
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
AthMessaging::initMessaging
void initMessaging() const
Initialize our message level and MessageSvc.
Definition: AthMessaging.cxx:39
ParticleCandidateList
A simple wrapper for std::list<int> to model a list of particle identity candidates.
Definition: ParticleCandidateList.h:31
McVtxFilter::m_matchSign
bool m_matchSign
Discrimination between particles and conjugates.
Definition: McVtxFilter.h:167
AthMessaging::m_msg_tls
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
Definition: AthMessaging.h:132
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
McVtxFilter::m_childList
DataVector< const ParticleCandidateList > m_childList
The list of the matching particles Ids : each item in DataVector stands for an out-going branch to th...
Definition: McVtxFilter.h:186
McVtxFilter::operator=
McVtxFilter & operator=(const McVtxFilter &rhs)
Assignment operator:
Definition: McVtxFilter.cxx:95
McVtxFilter::matchSign
bool matchSign() const
return true if the filter discriminates the sign of the particles
Definition: McVtxFilter.h:214
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
DecayParser
Definition: DecayParser.h:34