/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Private Attributes
DsPushKine Class Reference

Push kinematics into GiGa. More...

#include <DsPushKine.h>

Collaboration diagram for DsPushKine:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DsPushKine (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~DsPushKine ()
virtual StatusCode initialize ()
virtual StatusCode execute ()
virtual StatusCode finalize ()

Private Attributes

std::string m_location
std::string m_converterName
IGiGaSvc * m_giga
IHepMCtoG4m_converter

Detailed Description

Push kinematics into GiGa.

HepMCEvents are taken from the TES location given by the property "Location" and, one by one, converted into a G4PrimaryVertex and fed into GiGa.

The tool to convert from HepMC::GenEvent to G4PrimaryVertex can be set with the property "Converter" which defaults to "HepMCtoG4"

bv@bnl.gov Thu Jan 3 15:43:58 2008

Definition at line 27 of file DsPushKine.h.


Constructor & Destructor Documentation

DsPushKine::DsPushKine ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 11 of file DsPushKine.cc.

    : GaudiAlgorithm(name,pSvcLocator)
    , m_giga(0)
    , m_converter(0)
{
    declareProperty("Location",m_location=DayaBay::GenHeaderLocation::Default,
                    "Location in the TES to get HepMCEvents");
    declareProperty("Converter",m_converterName="HepMCtoG4",
                    "Name of tool to convert HepMCEvents to G4PrimaryVertex");
}
DsPushKine::~DsPushKine ( ) [virtual]

Definition at line 22 of file DsPushKine.cc.

{
}

Member Function Documentation

StatusCode DsPushKine::initialize ( ) [virtual]

Definition at line 26 of file DsPushKine.cc.

{
    this->GaudiAlgorithm::initialize();

    m_giga = svc<IGiGaSvc>("GiGa",true);
    try {
        m_converter = tool<IHepMCtoG4>(m_converterName);
    }
    catch (const GaudiException& gex) {
        fatal() << "Failed to get converter tool \"" 
                << m_converterName << "\"" << endreq;
        return StatusCode::FAILURE;
    }
    
    return StatusCode::SUCCESS;
}
StatusCode DsPushKine::execute ( ) [virtual]

Definition at line 43 of file DsPushKine.cc.

{
    DayaBay::GenHeader* gen_header = get<DayaBay::GenHeader>(m_location);
    
    HepMC::GenEvent* genevt = gen_header->event();
    std::vector<G4PrimaryVertex*> g4verts;
    m_converter->convert(*genevt,g4verts);

    debug() << "Got " << g4verts.size() << " primary vertices" << endreq;

    for (size_t ind=0; ind < g4verts.size(); ++ind) {
        
        *m_giga << g4verts[ind];

    }
    
    debug() << "Pushed " << gen_header->generatorName()   
           << " to giga" << endreq;

    return StatusCode::SUCCESS;
}
StatusCode DsPushKine::finalize ( ) [virtual]

Definition at line 65 of file DsPushKine.cc.

{

    return this->GaudiAlgorithm::finalize();
}

Member Data Documentation

std::string DsPushKine::m_location [private]

Definition at line 40 of file DsPushKine.h.

std::string DsPushKine::m_converterName [private]

Definition at line 41 of file DsPushKine.h.

IGiGaSvc* DsPushKine::m_giga [private]

Definition at line 43 of file DsPushKine.h.

Definition at line 44 of file DsPushKine.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:17:58 for DetSim by doxygen 1.7.4