  | 
  
    ATLAS Offline Software
    
   | 
 
 
 
 
Go to the documentation of this file.
   25 #include "GaudiKernel/IPartPropSvc.h" 
   28 #include "HepPDT/ParticleDataTable.hh" 
   32     class Interactions_pair {
 
   52     m_partPropSvc( 
"PartPropSvc", 
n ),
 
   53     m_removeInTimePileUp(false),
 
   54     m_removeHardScattering(false)
 
   58     declareProperty( 
"PartPropSvc", 
m_partPropSvc, 
"Handle to the particle property service" );
 
   69     return StatusCode::SUCCESS;
 
   77     std::vector<Amg::Vector3D> seeds = 
findMultiSeeds (perigeeList, constraint);
 
   89     std::vector<Amg::Vector3D> seeds = 
findMultiSeeds (vectorTrk, constraint);
 
   99     std::vector<Amg::Vector3D> seeds;
 
  110     std::vector<Amg::Vector3D> seeds;
 
  124     if ( !mcEventCollection.
isValid() ) {
 
  127       return StatusCode::FAILURE;
 
  130     interactions.clear();    
 
  131     std::vector<Interactions_pair> interactionsColl;
 
  133     for ( ; itr != mcEventCollection->
end(); ++itr ) {
 
  134       const HepMC::GenEvent* myEvent=(*itr);
 
  135       if(!
pass( myEvent, mcEventCollection.
cptr())) 
continue; 
 
  140       for (
const auto& 
part: *myEvent) {
 
  142     sum_pt2 += 
part->momentum().perp2();
 
  149       auto Vert = myEvent->vertices().begin();
 
  151       HepMC::GenEvent::vertex_const_iterator Vert = myEvent->vertices_begin();
 
  153       msg(
MSG::DEBUG) << 
"Retrieved position  x: " << (*Vert)->position().x()  << 
 
  154     " y: " << (*Vert)->position().y() << 
 
  155     " z: " << (*Vert)->position().z() << 
endmsg;
 
  157                   (*Vert)->position().y(),
 
  158                   (*Vert)->position().z());
 
  161       interactionsColl.emplace_back(sum_pt2, vtxPosition );
 
  165     std::sort(interactionsColl.begin(), interactionsColl.end());
 
  168     for (; itIp < interactionsColl.end(); ++itIp) {
 
  169       interactions.push_back(itIp->second);
 
  170       ATH_MSG_DEBUG(
"(" << itIp->second.x() << 
", " << itIp->second.y() << 
", "  
  171             << itIp->second.z() << 
"), SumPt2 = " << itIp->first);
 
  174     ATH_MSG_DEBUG(
"New interactions info stored successfully: " << interactions.size() << 
" interactions found.");
 
  175     return StatusCode::SUCCESS;
 
  185     bool isEmpty = ( 
evt->particles_size() == 0 );
 
  186     bool isDummy = ( ( 
evt->event_number() == -1 ) &&
 
  188     if( isDummy ) isEmpty = 
false;
 
  190     if( isEmpty ) 
return false;
 
  191     if( isDummy ) 
return false;
 
  194     if( ! coll ) 
return true;
 
  206       if( ( ( ( *iter )->event_number() == -1 ) &&
 
  214     if( gotzero == 2 ) 
return false; 
 
  215     if( gotzero == 3 ) 
return false; 
 
  216     if( gotzero == 4 ) 
return false; 
 
  225     if( ! 
pass( 
part->parent_event(), coll ) ) 
return false;
 
  234     int pdg = 
part->pdg_id();
 
  237     if( std::abs(pdg) < 7 || std::abs(pdg) == 21 ) 
return false;
 
  239     const HepPDT::ParticleData* 
pd = 
m_partPropSvc->PDT()->particle( std::abs( pdg ) );
 
  247     return std::abs( 
charge ) >= 1
E-5;
 
  
JetConstituentVector::iterator iterator
 
bool operator<(const DataVector< T > &a, const DataVector< T > &b)
Vector ordering relation.
 
Const iterator class for DataVector/DataList.
 
virtual ~MCTrueSeedFinder()
 
const_pointer_type cptr()
Dereference the pointer.
 
int signal_process_id(const GenEvent &e)
 
virtual std::vector< Amg::Vector3D > findMultiSeeds(const std::vector< const Trk::Track * > &vectorTrk, const xAOD::Vertex *constraint=0) const override final
Finds full vector of linearization points from a vector of tracks and returns it as an Amg::Vector3D ...
 
SG::ReadHandleKey< McEventCollection > m_mcEventCollectionKey
 
const std::string & key() const
Return the StoreGate ID for the referenced object.
 
bool isGenStable(const T &p)
Determine if the particle is stable at the generator (not det-sim) level,.
 
virtual StatusCode initialize() override
 
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
 
::StatusCode StatusCode
StatusCode definition for legacy code.
 
bool pass(const HepMC::GenEvent *evt, const McEventCollection *coll=0) const
Function selecting GenEvent objects.
 
ServiceHandle< IPartPropSvc > m_partPropSvc
Get particle properties.
 
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
 
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
 
virtual bool isValid() override final
Can the handle be successfully dereferenced?
 
const GenParticle * ConstGenParticlePtr
 
bool operator>(const DataVector< T > &a, const DataVector< T > &b)
Based on operator<.
 
Ensure that the ATLAS eigen extensions are properly loaded.
 
bool m_removeInTimePileUp
Flag to consider in-time pile-up interactions.
 
bool m_removeHardScattering
Flag to consider hard-scattering interaction.
 
MCTrueSeedFinder(const std::string &t, const std::string &n, const IInterface *p)
 
double charge(const T &p)
 
Eigen::Matrix< double, 3, 1 > Vector3D
 
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
 
virtual Amg::Vector3D findSeed(const std::vector< const Trk::Track * > &vectorTrk, const xAOD::Vertex *constraint=0) const override final
Finds a linearization point out of a vector of tracks and returns it as an Amg::Vector3D object.
 
Class describing a Vertex.
 
StatusCode retrieveInteractionsInfo(std::vector< Amg::Vector3D > &interactions) const
 
bool isSimInteracting(const T &p)
Identify if the particle could interact with the detector during the simulation, e....
 
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.