00001
00002
00003
00004
00005
00006
00007
00008 #include "AtlfastAlgs/Calorimeter.h"
00009 #include "AtlfastEvent/ITransportedParticle.h"
00010 #include "FastShowerUtils/ParticleInfo.h"
00011 #include "FastShowerUtils/Gridlet.h"
00012 #include "FastShowerUtils/GridletForger.h"
00013 #include "GaudiKernel/MsgStream.h"
00014 namespace Atlfast{
00015
00016 using FastShower::ParticleInfo;
00017 using FastShower::Gridlet;
00018 using FastShower::GridletForger;
00019
00020 TryToShower::TryToShower(Calorimeter* c):m_calorimeter(c){
00021 }
00022 bool TryToShower::operator()(const ITransportedParticle* tp){
00023
00024 const GridletForger* gf = m_calorimeter->gridletForger();
00025 if(gf == 0) return false;
00026
00027 const HepMC::GenParticle* particle = tp->particle();
00028
00029 ParticleInfo pi( tp->phi(),
00030 tp->eta(),
00031 tp->E(),
00032 particle->pdg_id()
00033 );
00034 Gridlet* gridlet = gf->makeGridlet(pi);
00035
00036 if(!gridlet) {
00037
00038 return false;
00039 }
00040
00041 m_calorimeter->addGridlet(gridlet);
00042
00043 return true;
00044 }
00045 }
00046
00047
00048
00049
00050
00051
00052