1 |
mlethuil |
1.1 |
#ifndef TRootCluster_h
|
2 |
|
|
#define TRootCluster_h
|
3 |
|
|
|
4 |
|
|
/************************************************************************************************************************************
|
5 |
|
|
Cluster Type: ijk
|
6 |
lethuill |
1.2 |
i = algo => 1=Island , 2=Hybrid, 3=multi5x5
|
7 |
mlethuil |
1.1 |
j = detector => 1=ECAL Barrel , 2=ECAL Endcap
|
8 |
lethuill |
1.2 |
k = corrections => 0=nopreshower / uncorrected , 1=no preshower / standard CMSSW corections
|
9 |
|
|
2=preshower / standard CMSSW corections , 3= preshower / uncorrected
|
10 |
mlethuil |
1.1 |
|
11 |
|
|
BasicClusters
|
12 |
|
|
110 => Island Barrel BasicClusters
|
13 |
|
|
120 => Island Endcap BasicClusters
|
14 |
|
|
210 => hybrid Barrel BasicClusters
|
15 |
lethuill |
1.2 |
320 => multi5x5 Endcap BasicClusters
|
16 |
mlethuil |
1.1 |
|
17 |
|
|
SuperClusters
|
18 |
|
|
110 => Island Barrel SuperClusters
|
19 |
|
|
120 => Island Endcap SuperClusters
|
20 |
|
|
121 => Corrected Island Endcap SuperClusters (standard CMSSW corrections)
|
21 |
|
|
122 => Corrected Island Endcap SuperClusters with Preshower (standard CMSSW corrections)
|
22 |
|
|
210 => Hybrid Barrel SuperClusters
|
23 |
|
|
211 => Corrected Hybrid Barrel SuperClusters (standard CMSSW corrections)
|
24 |
lethuill |
1.2 |
320 => Multi5x5 Endcap SuperClusters
|
25 |
|
|
322 => Corrected Multi5x5 Endcap SuperClusters with Preshower (standard CMSSW corrections)
|
26 |
|
|
323 => Multi5x5 Endcap SuperClusters with Preshower
|
27 |
|
|
|
28 |
mlethuil |
1.1 |
Shapes variables (e3x3, e5x5, eMax, e2nd) are not modified by CMSSW energy corrections
|
29 |
|
|
Shapes variables for SuperClusters correspond to shapes variables of the seed BasicCluster
|
30 |
|
|
|
31 |
|
|
************************************************************************************************************************************/
|
32 |
|
|
|
33 |
|
|
#include <string>
|
34 |
|
|
#include <iostream>
|
35 |
|
|
|
36 |
|
|
#include "Rtypes.h"
|
37 |
|
|
#include "TVector3.h"
|
38 |
lethuill |
1.2 |
#include "TMath.h"
|
39 |
mlethuil |
1.1 |
|
40 |
|
|
using namespace std;
|
41 |
|
|
|
42 |
|
|
class TRootCluster : public TVector3
|
43 |
|
|
{
|
44 |
|
|
|
45 |
|
|
public:
|
46 |
|
|
|
47 |
|
|
TRootCluster() : TVector3(), position_(), det_(-1), e3x3_(0.), e5x5_(0.), eMax_(0.), e2nd_(0.), nXtals_(0), uid_(0) {;}
|
48 |
|
|
TRootCluster(const TRootCluster& cluster) : TVector3(cluster), position_(cluster.position_), det_(cluster.det_),
|
49 |
|
|
e3x3_(cluster.e3x3_), e5x5_(cluster.e5x5_), eMax_(cluster.eMax_), e2nd_(cluster.e2nd_), nXtals_(cluster.nXtals_), uid_(cluster.uid_) {;}
|
50 |
|
|
TRootCluster(Double_t energy, Double_t eta, Double_t phi) : position_(), det_(-1), e3x3_(0.), e5x5_(0.), eMax_(0.), e2nd_(0.), nXtals_(0), uid_(0)
|
51 |
|
|
{
|
52 |
|
|
this->SetPtEtaPhi(energy*TMath::Sin(2.0*TMath::ATan(TMath::Exp(-eta))), eta, phi);
|
53 |
|
|
}
|
54 |
|
|
|
55 |
|
|
TRootCluster(Double_t energy, Double_t eta, Double_t phi, Double_t x, Double_t y, Double_t z) :
|
56 |
|
|
position_(x,y,z), det_(-1), e3x3_(0.), e5x5_(0.), eMax_(0.), e2nd_(0.), nXtals_(0), uid_(0)
|
57 |
|
|
{
|
58 |
|
|
this->SetPtEtaPhi(energy*TMath::Sin(2.0*TMath::ATan(TMath::Exp(-eta))), eta, phi);
|
59 |
|
|
}
|
60 |
|
|
|
61 |
|
|
TRootCluster(Double_t energy, Double_t eta, Double_t phi, Double_t x, Double_t y, Double_t z, Int_t det) :
|
62 |
|
|
position_(x,y,z), det_(det), e3x3_(0.), e5x5_(0.), eMax_(0.), e2nd_(0.), nXtals_(0), uid_(0)
|
63 |
|
|
{
|
64 |
|
|
this->SetPtEtaPhi(energy*TMath::Sin(2.0*TMath::ATan(TMath::Exp(-eta))), eta, phi);
|
65 |
|
|
}
|
66 |
|
|
|
67 |
|
|
TRootCluster(const TVector3 &momentum) : TVector3(momentum), position_(), det_(-1), e3x3_(0.), e5x5_(0.), eMax_(0.), e2nd_(0.), nXtals_(0), uid_(0) {;}
|
68 |
|
|
TRootCluster(const TVector3 &momentum, const TVector3 &position, Int_t det) : TVector3(momentum), position_(position), det_(det), e3x3_(0.), e5x5_(0.), eMax_(0.), e2nd_(0.), nXtals_(0), uid_(0) {;}
|
69 |
|
|
~TRootCluster() {;}
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
Double_t calX() const { return position_.x(); }
|
73 |
|
|
Double_t calY() const { return position_.y(); }
|
74 |
|
|
Double_t calZ() const { return position_.z(); }
|
75 |
|
|
Int_t det() const { return det_; }
|
76 |
|
|
Int_t type() const { return det_; }
|
77 |
|
|
Double_t e3x3() const { return e3x3_; }
|
78 |
|
|
Double_t e5x5() const { return e5x5_; }
|
79 |
|
|
Double_t eMax() const { return eMax_; }
|
80 |
|
|
Double_t e2nd() const { return e2nd_; }
|
81 |
|
|
Int_t nXtals() const { return nXtals_; }
|
82 |
|
|
Int_t uid() const { return uid_; }
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
void setCalX(Double_t x) { position_.SetX(x); }
|
86 |
|
|
void setCalY(Double_t y) { position_.SetY(y); }
|
87 |
|
|
void setCalZ(Double_t z) { position_.SetZ(z); }
|
88 |
|
|
void setDet(Int_t det) { det_ = det; }
|
89 |
|
|
void setType(Int_t det) { det_ = det; }
|
90 |
|
|
void setE3x3(Double_t e3x3) { e3x3_ = e3x3; }
|
91 |
|
|
void setE5x5(Double_t e5x5) { e5x5_ = e5x5; }
|
92 |
|
|
void setEmax(Double_t eMax) { eMax_ = eMax; }
|
93 |
|
|
void setE2nd(Double_t e2nd) { e2nd_ = e2nd; }
|
94 |
|
|
void setNxtals(Int_t nXtals) { nXtals_ = nXtals; }
|
95 |
|
|
void setUid(Int_t uid) { uid_ = uid; }
|
96 |
|
|
|
97 |
|
|
|
98 |
|
|
friend std::ostream& operator<< (std::ostream& stream, const TRootCluster& clus) {
|
99 |
|
|
stream << "TRootCluster - Type=" << clus.det() << " (E,Et,eta,phi)=(" << clus.Mag() <<"," << clus.Pt() <<"," << clus.Eta() <<"," << clus.Phi() << ")"
|
100 |
|
|
<< " Calo position (x,y,z)=(" << clus.calX() << "," << clus.calY() << "," << clus.calZ() << ")"
|
101 |
|
|
<< " e3x3=" << clus.e3x3() << " e5x5=" << clus.e5x5() << " eMax=" << clus.eMax()<< " e2nd=" << clus.e2nd() << " nXtals=" << clus.nXtals();
|
102 |
|
|
return stream;
|
103 |
|
|
};
|
104 |
|
|
|
105 |
|
|
|
106 |
|
|
|
107 |
|
|
protected:
|
108 |
|
|
|
109 |
|
|
TVector3 position_;
|
110 |
|
|
Int_t det_;
|
111 |
|
|
Double_t e3x3_;
|
112 |
|
|
Double_t e5x5_;
|
113 |
|
|
Double_t eMax_;
|
114 |
|
|
Double_t e2nd_;
|
115 |
|
|
Int_t nXtals_;
|
116 |
|
|
Int_t uid_;
|
117 |
|
|
|
118 |
|
|
|
119 |
lethuill |
1.2 |
ClassDef (TRootCluster,2);
|
120 |
mlethuil |
1.1 |
};
|
121 |
|
|
|
122 |
|
|
#endif
|