#ifndef _CALOR_ALG_HH_ #define _CALOR_ALG_HH_ /****************************************************************************** * Calor Algorithm classes header file * * * * Author: Bob Wagner, Argonne CDF Group * * Phone 630-252-6321 (Argonne) 630-840-8436 (Fermilab) * * * * Description: Algorithms for manipulation of objects provided by * * calorimetry * * * * Revision History: * * 18-Jan-2001 Bob Wagner Initial creation with TowerDataFromTowerKey * * 23-Mar-2001 Bob Wagner Add TowerKeyFromTrack and * * ExtrapolateToShowerMax * * 16-Oct-2004 Bob Wagner Add ExtrapolateToPreShower * * * *****************************************************************************/ //--------------- // C++ Headers -- //--------------- #include #include //------------------------------- // Collaborating Class Headers -- //------------------------------- #include "CalorGeometry/TowerKey.hh" #include "CalorObjects/CalData.hh" #include "CalorObjects/PhysicsTowerData.hh" //---------------------------------- // Forward Declaration of Classes -- //---------------------------------- class TowerGeometry; class CdfTrack; class SimpleExtrapolatedTrack; namespace calor_alg { class CalTowerFromTowerKey; class PhysicsTowerFromTowerKey; class TowerKeyFromTrack; class ExtrapolateToShowerMax; class ExtrapolateToPreShower; } //***************************************************************************** // Class Declarations //***************************************************************************** /*=====================================*\ * PhysicsTowerFromTowerKey algorithm * \*=====================================*/ class calor_alg::PhysicsTowerFromTowerKey { public: PhysicsTowerFromTowerKey( void ); PhysicsTowerFromTowerKey(const PhysicsTowerFromTowerKey& rhs); ~PhysicsTowerFromTowerKey() { } // Provides the PhysicsTower corresponding to the passed TowerKey. const PhysicsTower* operator ()( const TowerKey& ) const; private: PhysicsTowerData_ch _towers; }; /*=====================================*\ * CalTowerFromTowerKey algorithm * \*=====================================*/ class calor_alg::CalTowerFromTowerKey { public: CalTowerFromTowerKey( void ); CalTowerFromTowerKey(const CalTowerFromTowerKey& rhs); ~CalTowerFromTowerKey() { } // Provides the CalTower corresponding to the passed TowerKey. const CalTower* operator ()( const TowerKey& ) const; private: CalData_ch _towers; }; /*=====================================*\ * TowerKeyFromTrack algorithm * \*=====================================*/ class calor_alg::TowerKeyFromTrack : public std::unary_function { public: TowerKeyFromTrack( void ); TowerKeyFromTrack(const TowerKeyFromTrack& rhs); ~TowerKeyFromTrack() { } // Provides the TowerKey of tower containing track extrapolated to shower max // If operator call with SimpleExtrapolatedTrack argument, argument is // updated with extrapolated track values at shower max of calorimeter hit TowerKey operator()(const CdfTrack&) const; TowerKey operator()(const CdfTrack*) const; static TowerKey getTower(const CdfTrack&); static TowerKey getTower(const CdfTrack*); static TowerKey getTower(const CdfTrack&, SimpleExtrapolatedTrack&); static TowerKey getTower(const CdfTrack*, SimpleExtrapolatedTrack&); private: const TowerGeometry* _towerGeometry; }; /*=====================================*\ * ExtrapolateToShowerMax algorithm * \*=====================================*/ class calor_alg::ExtrapolateToShowerMax : public std::binary_function { public: ExtrapolateToShowerMax( void ); ExtrapolateToShowerMax(const ExtrapolateToShowerMax& rhs); ~ExtrapolateToShowerMax() { } bool operator()(const CdfTrack&, SimpleExtrapolatedTrack&) const; bool operator()(const CdfTrack*, SimpleExtrapolatedTrack&) const; static bool extrapolate(const CdfTrack&, SimpleExtrapolatedTrack&); static bool extrapolate(const CdfTrack*, SimpleExtrapolatedTrack&); private: const TowerGeometry* _towerGeometry; }; /*=====================================*\ * ExtrapolateToPreShower algorithm * \*=====================================*/ class calor_alg::ExtrapolateToPreShower : public std::binary_function { public: ExtrapolateToPreShower( void ); ExtrapolateToPreShower(const ExtrapolateToPreShower& rhs); ~ExtrapolateToPreShower() { } bool operator()(const CdfTrack&, SimpleExtrapolatedTrack&) const; bool operator()(const CdfTrack*, SimpleExtrapolatedTrack&) const; static bool extrapolate(const CdfTrack&, SimpleExtrapolatedTrack&); static bool extrapolate(const CdfTrack*, SimpleExtrapolatedTrack&); private: const TowerGeometry* _towerGeometry; }; /*===========================================================================*\ * Inline functions * \*===========================================================================*/ #include "Calor/calor_alg.icc" /****************************************************************************** * ALL DONE * *****************************************************************************/ #endif // _CALOR_ALG_HH_