#ifndef L3_BEAM_SPOT #define L3_BEAM_SPOT /* ************************************************************************* */ /* provides BeamSpot position uniformly for use in L3 modules */ /* Author: Fedor Ratnikov (CDF/Rutgers) */ /* Date: 11/15/2001 */ /* Supported algorithms: */ /* 0 - trivial case (0,0,0) position */ /* $Id: L3BeamSpot.hh,v 1.1 2003/12/10 20:50:53 dldecker Exp $ */ /* ************************************************************************* */ #include #include class EventRecord; class CotBeam; class L3BeamSpot { public: enum Algorithm { STATIC_0_0 = 0, CALIB_DB = 1, PREVIOUS_RUN = 2, SVX = 3, SVDD = 4, LAST = 4 }; L3BeamSpot (); ~L3BeamSpot (); void setAlgorithm (Algorithm fAlgorithm) {_mAlgoritm = fAlgorithm;} Algorithm algorithm () const {return _mAlgoritm;} HepPoint3D position (double fZ = 0.) const; bool isValid () const {return _mIsSet;} // reset position every run bool beginRun (const EventRecord* fEvent); // reset position every event bool event (const EventRecord* fEvent); static const std::string description (); const std::string status () const; static const char* algorithmName (int fAlgorithm); protected: HepPoint3D _mBeamPosition; Algorithm _mAlgoritm; CotBeam* _mCotBeam; bool _mIsSet; double _mDxDz; double _mDyDz; }; #endif