Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Atlfast::TryToShower Class Reference

#include <TryToShower.h>

Collaboration diagram for Atlfast::TryToShower:

Collaboration graph
[legend]
List of all members.

Public Methods

 TryToShower (Calorimeter *c)
bool operator() (const TransportedParticle *)

Private Attributes

Calorimeterm_calorimeter

Constructor & Destructor Documentation

Atlfast::TryToShower::TryToShower Calorimeter   c
 

Definition at line 19 of file TryToShower.cxx.

00019                                         :m_calorimeter(c){
00020   }

Member Function Documentation

bool Atlfast::TryToShower::operator() const TransportedParticle  
 

Definition at line 21 of file TryToShower.cxx.

References Atlfast::Calorimeter::addEelements(), Atlfast::Calorimeter::addHelements(), Atlfast::Calorimeter::gridletForger(), m_calorimeter, Atlfast::Calorimeter::msgStream(), Atlfast::TransportedParticle::particle(), and Atlfast::TransportedParticle::phi().

00021                                                            {
00022    
00023     MsgStream& log = m_calorimeter->msgStream();
00024 
00025     const GridletForger* gf = m_calorimeter->gridletForger();
00026     if(gf == 0) return false;
00027     
00028     const HepMC::GenParticle* particle = tp->particle();
00029     ParticleInfo pi( tp->phi(),
00030                      particle->momentum().pseudoRapidity(),
00031                      particle->momentum().e(),
00032                      particle->pdg_id()
00033                      );
00034     Gridlet* gridlet = gf->makeGridlet(pi);
00035 
00036     if(!gridlet) {
00037       //      log<<MSG::DEBUG<<"Particle refused by Showerer "<<endl;
00038       return false;
00039     }
00040     //    else{
00041       //      log<<MSG::DEBUG<<"Particle accepted by Showerer : gridlet:"<<endl;
00042       //      log<<MSG::DEBUG<<gridlet<<endl;
00043     //    }
00044 
00045     std::vector<GridletElement*> e = gridlet->eElements();
00046     m_calorimeter->addEelements( e.begin(), e.end() );
00047     std::vector<GridletElement*> h = gridlet->hElements();
00048     m_calorimeter->addHelements( h.begin(), h.end() );
00049 
00050     return true;
00051   }  

Member Data Documentation

Calorimeter* Atlfast::TryToShower::m_calorimeter [private]
 

Definition at line 21 of file TryToShower.h.

Referenced by operator()().


The documentation for this class was generated from the following files:
Generated on Tue Mar 18 11:19:01 2003 for AtlfastAlgs by doxygen1.3-rc1