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

Go to the documentation of this file.
00001 //
00002 //  Bes EMC Rec Shower Fraction
00003 //  (a fraction of a hit)
00004 //
00005 //  Created by Wang.Zhe  2003, 10, 1
00006 //
00007 #ifndef REC_EMC_FRACTION_H
00008 #define REC_EMC_FRACTION_H
00009 
00010 #include <map>
00011 
00012 #include "EmcRecEventModel/RecEmcDataType.h"
00013 #include "EmcRecEventModel/RecEmcHit.h"
00014 
00015 using namespace std;
00016 
00017 class RecEmcFraction: public RecEmcHit
00018 {
00019  public:
00020    //Constructors and destructors
00021    RecEmcFraction();
00022    RecEmcFraction(const RecEmcHit& aHit);
00023    ~RecEmcFraction();
00024    
00025    //Copy and assignment
00026    //RecEmcFraction(const RecEmcFraction& aFraction);
00027    //RecEmcFraction& operator=(const RecEmcFraction& aFraction);
00028    
00029    bool operator < (const RecEmcFraction& aFraction) const {
00030      return fEnergy*fFraction < aFraction.fEnergy*aFraction.fFraction;
00031    }
00032    
00033    bool operator > (const RecEmcFraction& aFraction) const {
00034      return fEnergy*fFraction > aFraction.fEnergy*aFraction.fFraction;
00035    }
00036    
00037    //Other methods
00038    //Read
00039    RecEmcFrac getFraction() const;
00040    
00041    //Write
00042    RecEmcFrac Fraction(const RecEmcFrac& Fraction);
00043 
00044    //Distance to another frac
00045    double Distance(const RecEmcID id) const;
00046 
00047    //others
00048    void Dump() const;
00049 
00050  protected:
00051    RecEmcFrac fFraction;
00052 };
00053 
00054 ostream& operator<<(ostream & os, const RecEmcFraction& aFraction);
00055 
00056 typedef map<RecEmcID,RecEmcFraction,less<RecEmcID> > RecEmcFractionMap;
00057 
00058 #endif  /* REC_EMC_FRACTION_H */

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