3 |
|
|
4 |
|
/************************************************************************************************************************************ |
5 |
|
SuperCluster Type: ijk |
6 |
< |
i = algo => 1=Island , 2=Hybrid |
6 |
> |
i = algo => 1=Island , 2=Hybrid, 3=multi5x5 |
7 |
|
j = detector => 1=ECAL Barrel , 2=ECAL Endcap |
8 |
< |
k = corrections => 0=uncorrected , 1=standard CMSSW corections , 2=standard CMSSW corections + Preshower |
8 |
> |
k = corrections => 0=nopreshower / uncorrected , 1=no preshower / standard CMSSW corections |
9 |
> |
2=preshower / standard CMSSW corections , 3= preshower / uncorrected |
10 |
|
|
11 |
|
110 => Island Barrel SuperClusters |
12 |
|
120 => Island Endcap SuperClusters |
14 |
|
122 => Corrected Island Endcap SuperClusters with Preshower (standard CMSSW corrections) |
15 |
|
210 => Hybrid Barrel SuperClusters |
16 |
|
211 => Corrected Hybrid Barrel SuperClusters (standard CMSSW corrections) |
17 |
< |
|
17 |
> |
320 => Multi5x5 Endcap SuperClusters |
18 |
> |
322 => Corrected Multi5x5 Endcap SuperClusters with Preshower (standard CMSSW corrections) |
19 |
> |
323 => Multi5x5 Endcap SuperClusters with Preshower |
20 |
> |
|
21 |
|
************************************************************************************************************************************/ |
22 |
|
|
23 |
|
#include <string> |
24 |
|
#include <iostream> |
25 |
+ |
#include <vector> |
26 |
|
|
27 |
|
#include "Rtypes.h" |
28 |
|
|
35 |
|
|
36 |
|
public: |
37 |
|
|
38 |
< |
TRootSuperCluster() : TRootCluster(), nBasicClusters_(0), subClusterUID_(), subClusterIndex_() {;} |
39 |
< |
TRootSuperCluster(const TRootSuperCluster& cluster) : TRootCluster(cluster), nBasicClusters_(cluster.nBasicClusters_), subClusterUID_(cluster.subClusterUID_), subClusterIndex_(cluster.subClusterIndex_) {;} |
40 |
< |
TRootSuperCluster(Double_t energy, Double_t eta, Double_t phi) : TRootCluster(energy, eta, phi), nBasicClusters_(0), subClusterUID_(), subClusterIndex_() {;} |
41 |
< |
TRootSuperCluster(Double_t energy, Double_t eta, Double_t phi, Double_t x, Double_t y, Double_t z) : TRootCluster(energy, eta, phi, x, y, z), nBasicClusters_(0), subClusterUID_(), subClusterIndex_() {;} |
42 |
< |
TRootSuperCluster(Double_t energy, Double_t eta, Double_t phi, Double_t x, Double_t y, Double_t z, Int_t det) : TRootCluster(energy, eta, phi, x, y, z, det), nBasicClusters_(0), subClusterUID_(), subClusterIndex_() {;} |
38 |
> |
TRootSuperCluster() : |
39 |
> |
TRootCluster() |
40 |
> |
,nBasicClusters_(0) |
41 |
> |
,subClusterUID_() |
42 |
> |
,subClusterIndex_() |
43 |
> |
,preshowerEnergy_(0.) |
44 |
> |
,rawEnergy_(0.) |
45 |
> |
,photon_() |
46 |
> |
,electron_() |
47 |
> |
{;} |
48 |
> |
|
49 |
> |
TRootSuperCluster(const TRootSuperCluster& cluster) : |
50 |
> |
TRootCluster(cluster) |
51 |
> |
,nBasicClusters_(cluster.nBasicClusters_) |
52 |
> |
,subClusterUID_(cluster.subClusterUID_) |
53 |
> |
,subClusterIndex_(cluster.subClusterIndex_) |
54 |
> |
,preshowerEnergy_(cluster.preshowerEnergy_) |
55 |
> |
,rawEnergy_(cluster.rawEnergy_) |
56 |
> |
,photon_(cluster.photon_) |
57 |
> |
,electron_(cluster.photon_) |
58 |
> |
{;} |
59 |
> |
|
60 |
> |
TRootSuperCluster(Double_t energy, Double_t eta, Double_t phi) : |
61 |
> |
TRootCluster(energy, eta, phi) |
62 |
> |
,nBasicClusters_(0) |
63 |
> |
,subClusterUID_() |
64 |
> |
,subClusterIndex_() |
65 |
> |
,preshowerEnergy_(0.) |
66 |
> |
,rawEnergy_(0.) |
67 |
> |
,photon_() |
68 |
> |
,electron_() |
69 |
> |
{;} |
70 |
> |
|
71 |
> |
TRootSuperCluster(Double_t energy, Double_t eta, Double_t phi, Double_t x, Double_t y, Double_t z) : |
72 |
> |
TRootCluster(energy, eta, phi, x, y, z) |
73 |
> |
,nBasicClusters_(0) |
74 |
> |
,subClusterUID_() |
75 |
> |
,subClusterIndex_() |
76 |
> |
,preshowerEnergy_(0.) |
77 |
> |
,rawEnergy_(0.) |
78 |
> |
,photon_() |
79 |
> |
,electron_() |
80 |
> |
{;} |
81 |
> |
|
82 |
> |
TRootSuperCluster(Double_t energy, Double_t eta, Double_t phi, Double_t x, Double_t y, Double_t z, Int_t det) : |
83 |
> |
TRootCluster(energy, eta, phi, x, y, z, det) |
84 |
> |
,nBasicClusters_(0) |
85 |
> |
,subClusterUID_() |
86 |
> |
,subClusterIndex_() |
87 |
> |
,preshowerEnergy_(0.) |
88 |
> |
,rawEnergy_(0.) |
89 |
> |
,photon_() |
90 |
> |
,electron_() |
91 |
> |
{;} |
92 |
> |
|
93 |
|
~TRootSuperCluster() {;} |
94 |
|
|
95 |
|
|
109 |
|
} |
110 |
|
} |
111 |
|
|
112 |
+ |
Float_t preshowerEnergy() const { return preshowerEnergy_; } |
113 |
+ |
Float_t rawEnergy() const { return rawEnergy_; } |
114 |
+ |
TObject* photon() const { return photon_.GetObject();} |
115 |
+ |
TObject* electron() const { return electron_.GetObject();} |
116 |
+ |
Bool_t isPhoton() const { return ( photon_.GetObject() == 0 ? false : true); } |
117 |
+ |
Bool_t isElectron() const { return ( electron_.GetObject() == 0 ? false : true); } |
118 |
+ |
|
119 |
|
void setNBasicClusters(Int_t nBasicClusters) { nBasicClusters_ = nBasicClusters; } |
120 |
|
void addSubClusterUID(Int_t uid) { subClusterUID_.push_back(uid); } |
121 |
|
void clearSubClusterUID() { subClusterUID_.clear(); } |
122 |
|
void addSubClusterIndex(Int_t idx) { subClusterIndex_.push_back(idx); } |
123 |
|
void clearSubClusterIndex() { subClusterIndex_.clear(); } |
124 |
+ |
void setPreshowerEnergy(Float_t preshowerEnergy) { preshowerEnergy_ = preshowerEnergy; } |
125 |
+ |
void setRawEnergy(Float_t rawEnergy) { rawEnergy_ = rawEnergy; } |
126 |
+ |
void setPhoton(TObject* photon) { photon_ = photon; } |
127 |
+ |
void setElectron(TObject* electron) { electron_ = electron; } |
128 |
|
|
129 |
|
|
130 |
|
friend std::ostream& operator<< (std::ostream& stream, const TRootSuperCluster& clus) { |
131 |
|
stream << "TRootSuperCluster - Type=" << clus.det_ << " (E,Et,eta,phi)=(" << clus.Mag() <<"," << clus.Pt() <<"," << clus.Eta() <<"," << clus.Phi() << ")" |
132 |
|
<< " Calo position (x,y,z)=(" << clus.calX() << "," << clus.calY() << "," << clus.calZ() << ")" |
133 |
< |
<< " nBasicClusters=" << clus.nBasicClusters() << " e3x3=" << clus.e3x3() << " e5x5=" << clus.e5x5() << " eMax=" << clus.eMax()<< " e2nd=" << clus.e2nd() << " nXtals=" << clus.nXtals(); |
133 |
> |
<< " nBasicClusters=" << clus.nBasicClusters() << " e3x3=" << clus.e3x3() << " e5x5=" << clus.e5x5() << " eMax=" << clus.eMax()<< " e2nd=" << clus.e2nd() |
134 |
> |
<< " nXtals=" << clus.nXtals() << " preshowerEnergy=" << clus.preshowerEnergy() << " rawEnergy=" << clus.rawEnergy(); |
135 |
|
return stream; |
136 |
|
}; |
137 |
|
|
142 |
|
Int_t nBasicClusters_; |
143 |
|
std::vector<Int_t> subClusterUID_; |
144 |
|
std::vector<Int_t> subClusterIndex_; |
145 |
+ |
Float_t preshowerEnergy_; |
146 |
+ |
Float_t rawEnergy_; |
147 |
+ |
TRef photon_; |
148 |
+ |
TRef electron_; |
149 |
|
|
150 |
|
|
151 |
< |
ClassDef (TRootSuperCluster,1); |
151 |
> |
ClassDef (TRootSuperCluster,4); |
152 |
|
}; |
153 |
|
|
154 |
|
#endif |