/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Emc/EmcRecEventModel/EmcRecEventModel-01-01-18/EmcRecEventModel/RecEmcHit.h

Go to the documentation of this file.
00001 //
00002 //  Bes EMC Rec Hit
00003 //
00004 //  Created by Zhe Wang  2003, 10, 1
00005 //
00006 #ifndef REC_EMC_HIT_H
00007 #define REC_EMC_HIT_H
00008 
00009 #include <map>
00010 
00011 #include "GaudiKernel/ContainedObject.h"
00012 #include "GaudiKernel/ObjectVector.h"
00013 #include "EmcRecEventModel/RecEmcDataType.h"
00014 
00015 using namespace std;
00016 
00017 extern const CLID& CLID_RecEmcHit;
00018 
00019 class RecEmcHit : virtual public ContainedObject
00020 {
00021  public:
00022    
00023     virtual const CLID& clID()  const { return  RecEmcHit::classID();}
00024     static  const CLID& classID() { return CLID_RecEmcHit; }
00025 
00026    //Constructors and destructors
00027    RecEmcHit();
00028    RecEmcHit(const RecEmcID& CellId,
00029              const RecEmcEnergy& Energy,
00030              const RecEmcTime& Time);
00031    ~RecEmcHit();
00032 
00033    //Copy and assignment
00034    //RecEmcHit(const RecEmcHit& aHit);
00035    //RecEmcHit& operator=(const RecEmcHit& aHit);
00036 
00037    bool operator < (const RecEmcHit& aHit) const {
00038      return fEnergy < aHit.fEnergy;
00039    }
00040    
00041    bool operator > (const RecEmcHit& aHit) const {
00042      return fEnergy > aHit.fEnergy;
00043    }
00044 
00045    //Other methods
00046    //Read
00047    RecEmcID getCellId() const { return fCellId; }
00048    RecEmcEnergy getEnergy() const { return fEnergy; }
00049    RecEmcTime getTime() const { return fTime; }
00050    HepPoint3D getCenter() const;
00051    HepPoint3D getFrontCenter() const;
00052 
00053    //Write
00054    RecEmcID CellId(const RecEmcID& CellId);
00055    RecEmcEnergy Energy(const RecEmcEnergy& Energy);
00056    RecEmcTime Time(const RecEmcTime& Time);
00057 
00058    //Detector input
00059    void Assign(const RecEmcID& CellId,
00060                const RecEmcEnergy& Energy,
00061                const RecEmcTime& Time);
00062 
00063    //Dump out
00064    void Dump() const;
00065 
00066  protected:
00067    //Data members
00068    RecEmcID fCellId;
00069    RecEmcEnergy fEnergy;
00070    RecEmcTime fTime;
00071 };
00072 
00073 ostream& operator<<(ostream & os, const RecEmcHit& aHit);
00074 
00075 typedef map<RecEmcID,RecEmcHit,less<RecEmcID> > RecEmcHitMap;
00076 typedef ObjectVector<RecEmcHit> RecEmcHitCol;
00077 
00078 ostream& operator<<(ostream & os, const RecEmcHitMap& aHitMap); 
00079 
00080 #endif  /* REC_EMC_HIT_H */

Generated on Tue Nov 29 22:58:17 2016 for BOSS_7.0.2 by  doxygen 1.4.7