BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Emc/EmcRecEventModel/include/EmcRecEventModel/RecEmcFraction.h
Go to the documentation of this file.
1//
2// Bes EMC Rec Shower Fraction
3// (a fraction of a hit)
4//
5// Created by Wang.Zhe 2003, 10, 1
6//
7#ifndef REC_EMC_FRACTION_H
8#define REC_EMC_FRACTION_H
9
10#include <map>
11
12#include "EmcRecEventModel/RecEmcDataType.h"
13#include "EmcRecEventModel/RecEmcHit.h"
14
15using namespace std;
16
17class RecEmcFraction : public RecEmcHit {
18public:
19 // Constructors and destructors
21 RecEmcFraction( const RecEmcHit& aHit );
23
24 // Copy and assignment
25 // RecEmcFraction(const RecEmcFraction& aFraction);
26 // RecEmcFraction& operator=(const RecEmcFraction& aFraction);
27
28 bool operator<( const RecEmcFraction& aFraction ) const {
29 return fEnergy * fFraction < aFraction.fEnergy * aFraction.fFraction;
30 }
31
32 bool operator>( const RecEmcFraction& aFraction ) const {
33 return fEnergy * fFraction > aFraction.fEnergy * aFraction.fFraction;
34 }
35
36 // Other methods
37 // Read
38 RecEmcFrac getFraction() const;
39
40 // Write
42
43 // Distance to another frac
44 double Distance( const RecEmcID id ) const;
45
46 // others
47 void Dump() const;
48
49protected:
51};
52
53ostream& operator<<( ostream& os, const RecEmcFraction& aFraction );
54
55typedef map<RecEmcID, RecEmcFraction, less<RecEmcID>> RecEmcFractionMap;
56
57#endif /* REC_EMC_FRACTION_H */
ostream & operator<<(ostream &os, const RecEmcFraction &aFraction)
map< RecEmcID, RecEmcFraction, less< RecEmcID > > RecEmcFractionMap
void Dump() const
RecEmcFrac Fraction(const RecEmcFrac &Fraction)
bool operator>(const RecEmcFraction &aFraction) const
bool operator<(const RecEmcFraction &aFraction) const
double Distance(const RecEmcID id) const
RecEmcFrac getFraction() const