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