14 |
|
{ |
15 |
|
|
16 |
|
public: |
17 |
< |
//TRootEvent() : nb_(0), trigL1_(-999), trigHLT_(-999), primaryVertex_(), metCalo_() {;} |
18 |
< |
TRootEvent() : nb_(0), trigL1_(-999), trigHLT_(-999), nBasicClusters_(), nSuperClusters_(), primaryVertex_(), metCalo_() {;} |
17 |
> |
|
18 |
> |
TRootEvent() : |
19 |
> |
nb_(0) |
20 |
> |
,passGlobalL1_(false) |
21 |
> |
,passGlobalHLT_(false) |
22 |
> |
,trigHLT_(0) |
23 |
> |
,nBasicClusters_() |
24 |
> |
,nSuperClusters_() |
25 |
> |
,primaryVertex_(0) |
26 |
> |
,metCalo_() |
27 |
> |
{;} |
28 |
> |
|
29 |
|
~TRootEvent() {;} |
30 |
|
|
31 |
|
// Event number |
32 |
< |
Int_t nb() { return nb_; } |
32 |
> |
Int_t nb() const { return nb_; } |
33 |
|
|
34 |
|
// Trigger decision |
35 |
< |
Int_t trigL1() { return trigL1_; } |
36 |
< |
Int_t trigHLT() { return trigHLT_; } |
35 |
> |
Int_t passGlobalL1() const { return passGlobalL1_; } |
36 |
> |
Bool_t passGlobalHLT() const { return passGlobalHLT_; } |
37 |
> |
unsigned int nHLTPaths() const { return trigHLT_.size(); } |
38 |
> |
std::vector<Bool_t> trigHLT() const { return trigHLT_; } |
39 |
> |
Bool_t trigHLT(unsigned int i) const |
40 |
> |
{ |
41 |
> |
if (trigHLT_.size()>i) |
42 |
> |
{ |
43 |
> |
return trigHLT_.at(i); |
44 |
> |
} |
45 |
> |
else |
46 |
> |
{ |
47 |
> |
cout << "HLT path " << i << " not found" << endl; |
48 |
> |
return false; |
49 |
> |
} |
50 |
> |
} |
51 |
|
|
52 |
|
// Nb of primary vertices |
53 |
< |
unsigned nPrimaryVertices() { return primaryVertex_.size(); } |
53 |
> |
unsigned nPrimaryVertices() const { return primaryVertex_.size(); } |
54 |
|
|
55 |
|
// Nb of BasicClusters of a given type |
56 |
|
Int_t nBasicClusters(Int_t type) |
68 |
|
|
69 |
|
|
70 |
|
// Primary Vertex as 3-vector |
71 |
< |
TVector3 primaryVertex() { return (primaryVertex_.size()>=0 ? primaryVertex_[0] : TVector3(0.,0.,0.) ); } |
72 |
< |
TVector3 primaryVertex(unsigned i) { return (primaryVertex_.size()>=i ? primaryVertex_[i] : TVector3(0.,0.,0.) ); } |
71 |
> |
TVector3 primaryVertex() const { return (primaryVertex_.size()>0 ? primaryVertex_.at(0) : TVector3(0.,0.,0.) ); } |
72 |
> |
TVector3 primaryVertex(unsigned i) const { return (primaryVertex_.size()>i ? primaryVertex_.at(i) : TVector3(0.,0.,0.) ); } |
73 |
|
// x, y, z of Primary Vertex |
74 |
< |
Double_t primaryVertex_x() { return (primaryVertex_.size()>=0 ? primaryVertex_[0].x() : 0. ); } |
75 |
< |
Double_t primaryVertex_y() { return (primaryVertex_.size()>=0 ? primaryVertex_[0].y() : 0. ); } |
76 |
< |
Double_t primaryVertex_z() { return (primaryVertex_.size()>=0 ? primaryVertex_[0].z() : 0. ); } |
77 |
< |
Double_t primaryVertex_x(unsigned i) { return (primaryVertex_.size()>=i ? primaryVertex_[i].x() : 0. ); } |
78 |
< |
Double_t primaryVertex_y(unsigned i) { return (primaryVertex_.size()>=i ? primaryVertex_[i].x() : 0. ); } |
79 |
< |
Double_t primaryVertex_z(unsigned i) { return (primaryVertex_.size()>=i ? primaryVertex_[i].x() : 0. ); } |
74 |
> |
Double_t primaryVertex_x() const { return (primaryVertex_.size()>0 ? primaryVertex_.at(0).x() : 0. ); } |
75 |
> |
Double_t primaryVertex_y() const { return (primaryVertex_.size()>0 ? primaryVertex_.at(0).y() : 0. ); } |
76 |
> |
Double_t primaryVertex_z() const { return (primaryVertex_.size()>0 ? primaryVertex_.at(0).z() : 0. ); } |
77 |
> |
Double_t primaryVertex_x(unsigned i) const { return (primaryVertex_.size()>i ? primaryVertex_.at(i).x() : 0. ); } |
78 |
> |
Double_t primaryVertex_y(unsigned i) const { return (primaryVertex_.size()>i ? primaryVertex_.at(i).x() : 0. ); } |
79 |
> |
Double_t primaryVertex_z(unsigned i) const { return (primaryVertex_.size()>i ? primaryVertex_.at(i).x() : 0. ); } |
80 |
|
|
81 |
|
// Missing Et as 3-vector |
82 |
< |
TVector3 metCaloVect() { return metCalo_; } |
82 |
> |
TVector3 metCaloVect() const { return metCalo_; } |
83 |
|
// Missing Et magnitude |
84 |
< |
Double_t metCalo() { return sqrt(metCalo_.Perp2()); } |
84 |
> |
Double_t metCalo() const { return sqrt(metCalo_.Perp2()); } |
85 |
|
|
86 |
|
|
87 |
|
void setNb(Int_t nb) { nb_ = nb; } |
88 |
< |
void setTrigL1(Int_t trigL1) { trigL1_ = trigL1; } |
89 |
< |
void setTrigHLT(Int_t trigHLT) { trigHLT_ = trigHLT; } |
88 |
> |
void setGlobalL1(Int_t passGlobalL1) { passGlobalL1_ = passGlobalL1; } |
89 |
> |
void setGlobalHLT(Bool_t passGlobalHLT) { passGlobalHLT_ = passGlobalHLT_; } |
90 |
> |
void setTrigHLT(std::vector<Bool_t> trigHLT) |
91 |
> |
{ |
92 |
> |
trigHLT_.resize(trigHLT.size()); |
93 |
> |
for (unsigned int i=0; i!=trigHLT.size(); ++i) trigHLT_[i]=trigHLT[i]; |
94 |
> |
} |
95 |
> |
|
96 |
> |
|
97 |
|
|
98 |
|
void setNBasicClusters(Int_t type,Int_t nBC) { nBasicClusters_[type]=nBC; } |
99 |
|
void setNSuperClusters(Int_t type,Int_t nSC) { nSuperClusters_[type]=nSC; } |
100 |
|
|
101 |
|
void addPrimaryVertex(TVector3 vertex) { primaryVertex_.push_back(vertex); } |
102 |
|
void clearPrimaryVertex(TVector3 vertex) { primaryVertex_.clear(); } |
72 |
– |
//void setPrimaryVertexVect(TVector3 primaryVertex) { primaryVertex_ = primaryVertex; } |
103 |
|
void setMetCaloVect(TVector3 metCaloVect) { metCalo_ = metCaloVect; } |
104 |
|
|
105 |
|
/* |
114 |
|
private: |
115 |
|
|
116 |
|
Int_t nb_; |
117 |
< |
Int_t trigL1_; |
118 |
< |
Int_t trigHLT_; |
117 |
> |
Bool_t passGlobalL1_; |
118 |
> |
Bool_t passGlobalHLT_; |
119 |
> |
std::vector<Bool_t> trigHLT_; |
120 |
|
|
121 |
|
map<Int_t,Int_t> nBasicClusters_; |
122 |
|
map<Int_t,Int_t> nSuperClusters_; |
123 |
|
std::vector<TVector3> primaryVertex_; |
93 |
– |
//TVector3 primaryVertex_; |
124 |
|
|
95 |
– |
|
125 |
|
TVector3 metCalo_; |
97 |
– |
// TODO - Add Global variables: Sphericity, F-W momenta.... |
126 |
|
|
127 |
< |
ClassDef (TRootEvent,1); |
127 |
> |
ClassDef (TRootEvent,2); |
128 |
|
}; |
129 |
|
|
130 |
|
#endif |