#ifndef _SOURCE_HEPG_HERWIG_PARTONS_HH_ #define _SOURCE_HEPG_HERWIG_PARTONS_HH_ #ifdef USE_CDFEDM2 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Component: SourceHEPGHerwigPartons.hh // // Purpose: This is a concrete class that uses the HEPG bank to fill the EnergyData object. This class inherits from InputSource. // It selects partons before hadronization from a HERWIG 2->2 QCD event. // // Created: 25/11/2002 Matthias Toennesmann // // History: // //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #include #include #include #include "BaBar/Cdf.hh" #include "Edm/Id.hh" #include "Calor/InputSource.hh" #include "SimulationObjects/HEPG_StorableBank.hh" class AbsEvent; // namespace calor { class SourceHEPGHerwigPartons : public InputSource { public: // // Memory management // // Constructor will fetch a HEPG object SourceHEPGHerwigPartons(); // Default copy constructor and assignment operator do the right thing. // Destructor // ~SourceHEPGHerwigPartons(); // // Testing // // // Manipulation and access // Id initEvent(AbsEvent* anEvent); Id initEvent(AbsEvent* anEvent, Id objectId); // Access methods std::string sourceName() const; EnergyData* next(); bool done() const; private: int _iter; int _end; size_t _ietaCount; size_t _iphiCount; std::string _sourceName; ConstHandle _dataHandle; }; inline std::string SourceHEPGHerwigPartons::sourceName() const{return _sourceName;} inline bool SourceHEPGHerwigPartons::done() const {return (_iter == _end);} // } // namespace calor #endif // USE_CDFEDM2 #endif // _SOURCE_HEPG_HERWIG_PARTONS_HH_