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 |
|
{ |
37 |
|
void Print(Option_t *opt="") const; |
38 |
|
Double_t PreshowerEnergy() const { return fPreshowerEnergy; } |
39 |
|
Double_t RawEnergy() const { return fRawEnergy; } |
40 |
< |
const BasicCluster *Seed() const; |
40 |
> |
const BasicCluster *Seed() const { return fSeedRef.Obj(); } |
41 |
|
Double_t X() const { return fPoint.X(); } |
42 |
|
Double_t Y() const { return fPoint.Y(); } |
43 |
|
Double_t Z() const { return fPoint.Z(); } |
47 |
|
void SetPhiWidth(Double_t phiWidth) { fPhiWidth = phiWidth; } |
48 |
|
void SetPreshowerEnergy(Double_t e) { fPreshowerEnergy = e; } |
49 |
|
void SetRawEnergy(Double_t rawEnergy) { fRawEnergy = rawEnergy; } |
50 |
< |
void SetSeed(const BasicCluster *s) |
50 |
< |
{ fSeedRef = const_cast<BasicCluster*>(s); } |
50 |
> |
void SetSeed(const BasicCluster *s) { fSeedRef = s; } |
51 |
|
void SetXYZ(Double_t x, Double_t y, Double_t z) { fPoint.SetXYZ(x,y,z); } |
52 |
|
|
53 |
|
protected: |
58 |
|
Double32_t fPhiWidth; //width in Phi |
59 |
|
Double32_t fRawEnergy; //super cluster raw energy |
60 |
|
RefArray<BasicCluster,1024> fClusters; //assigned basic clusters |
61 |
< |
TRef fSeedRef; //seed cluster |
61 |
> |
Ref<BasicCluster> fSeedRef; //seed cluster |
62 |
|
|
63 |
|
ClassDef(SuperCluster, 1) // Super cluster class |
64 |
|
}; |
65 |
|
} |
66 |
|
|
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 |
– |
} |
67 |
|
#endif |