3 |
|
|
4 |
|
#include <string> |
5 |
|
#include <iostream> |
6 |
+ |
#include <vector> |
7 |
+ |
#include <map> |
8 |
+ |
#include <cmath> |
9 |
|
|
10 |
|
#include "Rtypes.h" |
11 |
|
#include "TObject.h" |
19 |
|
public: |
20 |
|
|
21 |
|
TRootEvent() : |
22 |
< |
nb_(0) |
23 |
< |
,passGlobalL1_(false) |
24 |
< |
,passGlobalHLT_(false) |
25 |
< |
,trigHLT_(0) |
26 |
< |
,csa07id_(0) |
27 |
< |
,csa07weight_(0.) |
28 |
< |
,csa07process_() |
29 |
< |
,nBasicClusters_() |
30 |
< |
,nSuperClusters_() |
31 |
< |
,primaryVertex_(0) |
32 |
< |
,metCalo_() |
33 |
< |
{;} |
22 |
> |
nb_(0) |
23 |
> |
,eventId_(-1) |
24 |
> |
,runId_(-1) |
25 |
> |
,passGlobalL1_(false) |
26 |
> |
,passGlobalHLT_(false) |
27 |
> |
,trigHLT_(0) |
28 |
> |
,csa07id_(-1) |
29 |
> |
,csa07weight_(-1.) |
30 |
> |
,csa07process_() |
31 |
> |
,nBasicClusters_() |
32 |
> |
,nSuperClusters_() |
33 |
> |
,primaryVertex_(0) |
34 |
> |
,idParton1_(-1) |
35 |
> |
,xParton1_(-1.) |
36 |
> |
,idParton2_(-1) |
37 |
> |
,xParton2_(-1.) |
38 |
> |
,factorizationScale_(-1.) |
39 |
> |
{;} |
40 |
|
|
41 |
|
~TRootEvent() {;} |
42 |
< |
|
42 |
> |
|
43 |
|
// Event number |
44 |
|
Int_t nb() const { return nb_; } |
45 |
< |
|
45 |
> |
Int_t eventId() const { return eventId_; } |
46 |
> |
Int_t runId() const { return runId_; } |
47 |
> |
|
48 |
|
// Trigger decision |
49 |
|
Int_t passGlobalL1() const { return passGlobalL1_; } |
50 |
|
Bool_t passGlobalHLT() const { return passGlobalHLT_; } |
97 |
|
Double_t primaryVertex_y(unsigned i) const { return (primaryVertex_.size()>i ? primaryVertex_.at(i).x() : 0. ); } |
98 |
|
Double_t primaryVertex_z(unsigned i) const { return (primaryVertex_.size()>i ? primaryVertex_.at(i).x() : 0. ); } |
99 |
|
|
100 |
< |
// Missing Et as 3-vector |
101 |
< |
TVector3 metCaloVect() const { return metCalo_; } |
102 |
< |
// Missing Et magnitude |
103 |
< |
Double_t metCalo() const { return sqrt(metCalo_.Perp2()); } |
104 |
< |
|
100 |
> |
// PDF infos |
101 |
> |
// flavour first incoming parton |
102 |
> |
Int_t idParton1() const { return idParton1_; } |
103 |
> |
// energy fraction carried by first incoming parton |
104 |
> |
Float_t xParton1() const { return xParton1_; } |
105 |
> |
// flavour first incoming parton |
106 |
> |
Int_t idParton2() const { return idParton2_; } |
107 |
> |
// energy fraction carried by first incoming parton |
108 |
> |
Float_t xParton2() const { return xParton2_; } |
109 |
> |
// Factorization Scale Q |
110 |
> |
Float_t factorizationScale() const { return factorizationScale_; } |
111 |
> |
|
112 |
> |
|
113 |
|
|
114 |
|
void setNb(Int_t nb) { nb_ = nb; } |
115 |
+ |
void setEventId(Int_t eventId) { eventId_ = eventId; } |
116 |
+ |
void setRunId(Int_t runId) { runId_ = runId; } |
117 |
|
void setGlobalL1(Int_t passGlobalL1) { passGlobalL1_ = passGlobalL1; } |
118 |
< |
void setGlobalHLT(Bool_t passGlobalHLT) { passGlobalHLT_ = passGlobalHLT_; } |
118 |
> |
void setGlobalHLT(Bool_t passGlobalHLT) { passGlobalHLT_ = passGlobalHLT; } |
119 |
|
void setTrigHLT(std::vector<Bool_t> trigHLT) |
120 |
|
{ |
121 |
|
trigHLT_.resize(trigHLT.size()); |
132 |
|
|
133 |
|
void addPrimaryVertex(TVector3 vertex) { primaryVertex_.push_back(vertex); } |
134 |
|
void clearPrimaryVertex(TVector3 vertex) { primaryVertex_.clear(); } |
135 |
< |
void setMetCaloVect(TVector3 metCaloVect) { metCalo_ = metCaloVect; } |
136 |
< |
|
135 |
> |
|
136 |
> |
void setIdParton1(Int_t idParton1) { idParton1_=idParton1; } |
137 |
> |
void setXParton1(Float_t xParton1) { xParton1_=xParton1; } |
138 |
> |
void setIdParton2(Int_t idParton2) { idParton2_=idParton2; } |
139 |
> |
void setXParton2(Float_t xParton2) { xParton2_=xParton2; } |
140 |
> |
void setFactorizationScale(Float_t factorizationScale) { factorizationScale_=factorizationScale; } |
141 |
> |
|
142 |
|
/* |
143 |
+ |
// FIXME |
144 |
|
friend std::ostream& operator<< (std::ostream& stream, const TRootEvent& event) { |
145 |
|
stream << "Event #"<< event.nb() <<" L1="<< event.trigL1() <<" HLT="<< event.trigHLT() |
146 |
< |
<< " Primary vertex x=" << event.primaryVertex_x() << " y=" << event.primaryVertex_y() << " z=" << event.primaryVertex_z() |
120 |
< |
<< " CaloMET=" << event.metCalo() << endl; |
146 |
> |
<< " Primary vertex x=" << event.primaryVertex_x() << " y=" << event.primaryVertex_y() << " z=" << event.primaryVertex_z(); |
147 |
|
return stream; |
148 |
|
}; |
149 |
|
*/ |
151 |
|
private: |
152 |
|
|
153 |
|
Int_t nb_; |
154 |
+ |
Int_t eventId_; |
155 |
+ |
Int_t runId_; |
156 |
+ |
|
157 |
+ |
// Trigger Infos |
158 |
|
Bool_t passGlobalL1_; |
159 |
|
Bool_t passGlobalHLT_; |
160 |
|
std::vector<Bool_t> trigHLT_; |
161 |
< |
|
161 |
> |
|
162 |
> |
// CSA07 Process ID and Weight |
163 |
|
Int_t csa07id_; |
164 |
|
Float_t csa07weight_; |
165 |
|
TString csa07process_; |
168 |
|
map<Int_t,Int_t> nSuperClusters_; |
169 |
|
std::vector<TVector3> primaryVertex_; |
170 |
|
|
171 |
< |
TVector3 metCalo_; |
172 |
< |
|
173 |
< |
ClassDef (TRootEvent,2); |
171 |
> |
// PDF infos |
172 |
> |
Int_t idParton1_; |
173 |
> |
Float_t xParton1_; |
174 |
> |
Int_t idParton2_; |
175 |
> |
Float_t xParton2_; |
176 |
> |
Float_t factorizationScale_; |
177 |
> |
|
178 |
> |
ClassDef (TRootEvent,1); |
179 |
|
}; |
180 |
|
|
181 |
|
#endif |