1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
#ifndef CastorReco_CastorEgamma_h
#define CastorReco_CastorEgamma_h
/** \class reco::CastorEgamma CastorEgamma.h DataFormats/CastorReco/CastorEgamma.h
*
* Class for Castor electrons/photons
*
* \author Hans Van Haevermaet, University of Antwerp
*
*
*/
#include <vector>
#include "DataFormats/Math/interface/Point3D.h"
#include "DataFormats/CastorReco/interface/CastorCluster.h"
namespace reco {
class CastorEgamma : public CastorCluster {
public:
/// default constructor. Sets energy to zero
CastorEgamma() : energycal_(0.) {}
/// constructor from values
CastorEgamma(const double energycal, const CastorClusterRef& usedCluster);
/// destructor
~CastorEgamma() override;
/// Egamma energy
double energy() const { return (*usedCluster_).energy(); }
/// Egamma energycal
double energycal() const { return energycal_; }
/// Egamma centroid position
ROOT::Math::XYZPoint position() const { return (*usedCluster_).position(); }
/// vector of used Clusters
CastorClusterRef getUsedCluster() const { return usedCluster_; }
/// comparison >= operator
bool operator>=(const CastorEgamma& rhs) const { return (energycal_ >= rhs.energycal_); }
/// comparison > operator
bool operator>(const CastorEgamma& rhs) const { return (energycal_ > rhs.energycal_); }
/// comparison <= operator
bool operator<=(const CastorEgamma& rhs) const { return (energycal_ <= rhs.energycal_); }
/// comparison <= operator
bool operator<(const CastorEgamma& rhs) const { return (energycal_ < rhs.energycal_); }
/// Egamma em energy
double emEnergy() const { return (*usedCluster_).emEnergy(); }
/// Egamma had energy
double hadEnergy() const { return (*usedCluster_).hadEnergy(); }
/// Egamma em/tot ratio
double fem() const { return (*usedCluster_).fem(); }
/// Egamma width in phi
double width() const { return (*usedCluster_).width(); }
/// Egamma depth in z
double depth() const { return (*usedCluster_).depth(); }
/// Egamma hotcell/tot ratio
double fhot() const { return (*usedCluster_).fhot(); }
/// Egamma sigma z
double sigmaz() const { return (*usedCluster_).sigmaz(); }
/// pseudorapidity of Egamma centroid
double eta() const { return (*usedCluster_).eta(); }
/// azimuthal angle of Egamma centroid
double phi() const { return (*usedCluster_).phi(); }
/// x of Egamma centroid
double x() const { return (*usedCluster_).x(); }
/// y of Egamma centroid
double y() const { return (*usedCluster_).y(); }
/// rho of Egamma centroid
double rho() const { return (*usedCluster_).rho(); }
private:
/// Egamma energycal
double energycal_;
/// used CastorClusters
CastorClusterRef usedCluster_;
};
// define CastorEgammaCollection
typedef std::vector<CastorEgamma> CastorEgammaCollection;
} // namespace reco
#endif
|