15 |
|
#include "MitAna/DataTree/interface/DataObject.h" |
16 |
|
#include "MitAna/DataTree/interface/BasicCluster.h" |
17 |
|
#include "MitAna/DataCont/interface/RefArray.h" |
18 |
+ |
#include "MitAna/DataCont/interface/Ref.h" |
19 |
|
|
20 |
|
namespace mithep |
21 |
|
{ |
24 |
|
public: |
25 |
|
SuperCluster() : fEnergy(0), fEtaWidth(0), fPreshowerEnergy(0), |
26 |
|
fPhiWidth(0), fRawEnergy(0) {} |
26 |
– |
~SuperCluster() {} |
27 |
|
|
28 |
|
const BasicCluster *Cluster(UInt_t i) const { return fClusters.At(i); } |
29 |
|
UInt_t ClusterSize() const { return fClusters.GetEntries(); } |
36 |
|
void Print(Option_t *opt="") const; |
37 |
|
Double_t PreshowerEnergy() const { return fPreshowerEnergy; } |
38 |
|
Double_t RawEnergy() const { return fRawEnergy; } |
39 |
< |
const BasicCluster *Seed() const; |
39 |
> |
const BasicCluster *Seed() const { return fSeedRef.Obj(); } |
40 |
|
Double_t X() const { return fPoint.X(); } |
41 |
|
Double_t Y() const { return fPoint.Y(); } |
42 |
|
Double_t Z() const { return fPoint.Z(); } |
46 |
|
void SetPhiWidth(Double_t phiWidth) { fPhiWidth = phiWidth; } |
47 |
|
void SetPreshowerEnergy(Double_t e) { fPreshowerEnergy = e; } |
48 |
|
void SetRawEnergy(Double_t rawEnergy) { fRawEnergy = rawEnergy; } |
49 |
< |
void SetSeed(const BasicCluster *s) |
50 |
< |
{ fSeedRef = const_cast<BasicCluster*>(s); } |
49 |
> |
void SetSeed(const BasicCluster *s) { fSeedRef = s; } |
50 |
|
void SetXYZ(Double_t x, Double_t y, Double_t z) { fPoint.SetXYZ(x,y,z); } |
51 |
|
|
52 |
|
protected: |
57 |
|
Double32_t fPhiWidth; //width in Phi |
58 |
|
Double32_t fRawEnergy; //super cluster raw energy |
59 |
|
RefArray<BasicCluster,1024> fClusters; //assigned basic clusters |
60 |
< |
TRef fSeedRef; //seed cluster |
60 |
> |
Ref<BasicCluster> fSeedRef; //seed cluster |
61 |
|
|
62 |
|
ClassDef(SuperCluster, 1) // Super cluster class |
63 |
|
}; |
64 |
|
} |
65 |
|
|
67 |
– |
//-------------------------------------------------------------------------------------------------- |
68 |
– |
inline const mithep::BasicCluster *mithep::SuperCluster::Seed() const |
69 |
– |
{ |
70 |
– |
// Return basic cluster seed. |
71 |
– |
|
72 |
– |
return static_cast<const BasicCluster*>(fSeedRef.GetObject()); |
73 |
– |
} |
66 |
|
#endif |