15 |
|
#include "MitCommon/DataFormats/interface/Vect3C.h" |
16 |
|
#include "MitAna/DataTree/interface/DataObject.h" |
17 |
|
#include "MitAna/DataTree/interface/BasicCluster.h" |
18 |
+ |
#include "MitAna/DataTree/interface/CaloTower.h" |
19 |
|
#include "MitAna/DataCont/interface/RefArray.h" |
20 |
|
#include "MitAna/DataCont/interface/Ref.h" |
21 |
|
|
28 |
|
fPhiWidth(0), fRawEnergy(0) {} |
29 |
|
|
30 |
|
void AddCluster(const BasicCluster *c) { fClusters.Add(c); } |
31 |
+ |
void AddTower(const CaloTower *t) { fCaloTowers.Add(t); } |
32 |
|
const BasicCluster *Cluster(UInt_t i) const { return fClusters.At(i); } |
33 |
|
UInt_t ClusterSize() const { return fClusters.Entries(); } |
34 |
+ |
UInt_t NHits() const; |
35 |
|
Int_t Compare(const TObject *o) const; |
36 |
|
Double_t Energy() const { return fEnergy; } |
37 |
|
Double_t Et() const; |
38 |
|
Double_t Eta() const { return fPoint.Eta(); } |
39 |
+ |
Double_t AbsEta() const { return TMath::Abs(Eta()); } |
40 |
|
Double_t EtaWidth() const { return fEtaWidth; } |
41 |
+ |
Bool_t HasSeed() const { return fSeedRef.IsValid(); } |
42 |
+ |
Bool_t HasTower(const CaloTower *t) const { return fCaloTowers.HasObject(t); } |
43 |
|
Double_t HcalDepth1Energy() const { return fHcalDepth1Energy; } |
44 |
|
Double_t HcalDepth2Energy() const { return fHcalDepth2Energy; } |
45 |
|
Double_t HadDepth1OverEm() const { return fHcalDepth1Energy/fEnergy; } |
48 |
|
fHcalDepth2Energy)/fEnergy; } |
49 |
|
Bool_t IsSortable() const { return kTRUE; } |
50 |
|
EObjType ObjType() const { return kSuperCluster; } |
51 |
+ |
UInt_t NTowers() const { return fCaloTowers.Entries(); } |
52 |
|
Double_t Phi() const { return fPoint.Phi(); } |
53 |
|
Double_t PhiWidth() const { return fPhiWidth; } |
54 |
|
ThreeVectorC Point() const { return fPoint.V(); } |
56 |
|
Double_t PreshowerEnergy() const { return fPreshowerEnergy; } |
57 |
|
Double_t RawEnergy() const { return fRawEnergy; } |
58 |
|
Double_t Rho() const { return fPoint.Rho(); } |
59 |
+ |
Double_t R9() const { return fSeedRef.Obj()->E3x3()/fRawEnergy; } |
60 |
|
const BasicCluster *Seed() const { return fSeedRef.Obj(); } |
61 |
+ |
const CaloTower *Tower(UInt_t i) const { return fCaloTowers.At(i); } |
62 |
|
void SetEnergy(Double_t energy) { fEnergy = energy; } |
63 |
|
void SetEtaWidth(Double_t etaWidth) { fEtaWidth = etaWidth; } |
64 |
|
void SetPhiWidth(Double_t phiWidth) { fPhiWidth = phiWidth; } |
80 |
|
Double32_t fHcalDepth2Energy; //[0,0,14] hcal depth2 over ECAL energy |
81 |
|
RefArray<BasicCluster> fClusters; //assigned basic clusters |
82 |
|
Ref<BasicCluster> fSeedRef; //seed cluster |
83 |
+ |
RefArray<CaloTower> fCaloTowers; //calo towers (matched by detid) |
84 |
|
|
85 |
< |
ClassDef(SuperCluster, 2) // Super cluster class |
85 |
> |
ClassDef(SuperCluster, 3) // Super cluster class |
86 |
|
}; |
87 |
|
} |
88 |
|
|
89 |
|
//-------------------------------------------------------------------------------------------------- |
90 |
+ |
inline UInt_t mithep::SuperCluster::NHits() const |
91 |
+ |
{ |
92 |
+ |
// Return transverse energy. |
93 |
+ |
|
94 |
+ |
UInt_t nhits = 0; |
95 |
+ |
for (UInt_t i=0; i<fClusters.GetEntries(); ++i) { |
96 |
+ |
nhits += fClusters.At(i)->NHits(); |
97 |
+ |
} |
98 |
+ |
return nhits; |
99 |
+ |
} |
100 |
+ |
|
101 |
+ |
|
102 |
+ |
//-------------------------------------------------------------------------------------------------- |
103 |
|
inline Double_t mithep::SuperCluster::Et() const |
104 |
|
{ |
105 |
|
// Return transverse energy. |