1 |
ceballos |
1.3 |
// $Id: GeneratorMod.cc,v 1.2 2008/10/23 12:23:44 ceballos Exp $
|
2 |
loizides |
1.1 |
|
3 |
|
|
#include "MitPhysics/Mods/interface/GeneratorMod.h"
|
4 |
|
|
#include "MitAna/DataTree/interface/Names.h"
|
5 |
|
|
#include "MitAna/DataCont/interface/ObjArray.h"
|
6 |
|
|
#include "MitCommon/MathTools/interface/MathUtils.h"
|
7 |
|
|
#include <TH1D.h>
|
8 |
|
|
#include <TH2D.h>
|
9 |
|
|
|
10 |
|
|
|
11 |
|
|
using namespace mithep;
|
12 |
|
|
|
13 |
|
|
ClassImp(mithep::GeneratorMod)
|
14 |
|
|
|
15 |
|
|
//--------------------------------------------------------------------------------------------------
|
16 |
|
|
GeneratorMod::GeneratorMod(const char *name, const char *title) :
|
17 |
|
|
BaseMod(name,title),
|
18 |
|
|
fPrintDebug(false),
|
19 |
|
|
fFillHist(false),
|
20 |
|
|
fIsMC(true),
|
21 |
|
|
fMCPartName(Names::gkMCPartBrn),
|
22 |
|
|
fMCLeptonsName(Names::gkMCLeptonsName),
|
23 |
ceballos |
1.3 |
fMCAllLeptonsName(Names::gkMCAllLeptonsName),
|
24 |
loizides |
1.1 |
fMCTausName(Names::gkMCTausName),
|
25 |
|
|
fMCNeutrinosName(Names::gkMCNeutrinosName),
|
26 |
|
|
fMCQuarksName(Names::gkMCQuarksName),
|
27 |
|
|
fMCqqHsName(Names::gkMCqqHsName),
|
28 |
|
|
fMCBosonsName(Names::gkMCBosonsName),
|
29 |
|
|
fParticles(0),
|
30 |
|
|
fNEventsProcessed(0)
|
31 |
|
|
{
|
32 |
|
|
// Constructor.
|
33 |
|
|
}
|
34 |
|
|
|
35 |
|
|
//--------------------------------------------------------------------------------------------------
|
36 |
|
|
void GeneratorMod::Begin()
|
37 |
|
|
{
|
38 |
|
|
// Run startup code on the client machine. For this module, we dont do
|
39 |
|
|
// anything here.
|
40 |
|
|
}
|
41 |
|
|
|
42 |
|
|
//--------------------------------------------------------------------------------------------------
|
43 |
|
|
void GeneratorMod::Process()
|
44 |
|
|
{
|
45 |
|
|
// Process entries of the tree
|
46 |
|
|
fNEventsProcessed++;
|
47 |
|
|
|
48 |
|
|
if (fNEventsProcessed % 1000 == 0 || fPrintDebug) {
|
49 |
|
|
time_t systime;
|
50 |
|
|
systime = time(NULL);
|
51 |
|
|
cerr << endl << "GeneratorMod : Process Event " << fNEventsProcessed << " Time: "
|
52 |
|
|
<< ctime(&systime) << endl;
|
53 |
|
|
}
|
54 |
|
|
|
55 |
|
|
// These arrays will be filled in the loop of particles
|
56 |
ceballos |
1.3 |
ObjArray<MCParticle> *GenLeptons = new ObjArray<MCParticle>;
|
57 |
|
|
ObjArray<MCParticle> *GenAllLeptons = new ObjArray<MCParticle>;
|
58 |
|
|
ObjArray<MCParticle> *GenTaus = new ObjArray<MCParticle>; GenTaus->SetOwner(true);
|
59 |
|
|
ObjArray<MCParticle> *GenNeutrinos = new ObjArray<MCParticle>;
|
60 |
|
|
ObjArray<MCParticle> *GenQuarks = new ObjArray<MCParticle>;
|
61 |
|
|
ObjArray<MCParticle> *GenqqHs = new ObjArray<MCParticle>;
|
62 |
|
|
ObjArray<MCParticle> *GenBosons = new ObjArray<MCParticle>;
|
63 |
loizides |
1.1 |
|
64 |
|
|
if(fIsMC == true){
|
65 |
|
|
// Get Generator Level information branch
|
66 |
|
|
LoadBranch(fMCPartName);
|
67 |
|
|
bool isqqH = false;
|
68 |
|
|
for (UInt_t i=0; i<fParticles->GetEntries(); ++i) {
|
69 |
|
|
MCParticle* p = fParticles->At(i);
|
70 |
|
|
|
71 |
|
|
if(!p->IsGenerated()) continue;
|
72 |
|
|
|
73 |
|
|
// muons/electrons from W/Z decays
|
74 |
|
|
if((p->AbsPdgId() == 11 || p->AbsPdgId() == 13) && p->Status() == 1){
|
75 |
ceballos |
1.3 |
if(p->Pt() > 3.0 && fabs(p->Eta()) < 3.0){
|
76 |
|
|
GenAllLeptons->Add(p);
|
77 |
|
|
}
|
78 |
loizides |
1.1 |
bool isGoodLepton = false;
|
79 |
|
|
MCParticle* pm = p;
|
80 |
|
|
while (pm->HasMother() && isGoodLepton == false){
|
81 |
|
|
if (pm->Mother()->AbsPdgId() == 23 || pm->Mother()->AbsPdgId() == 24){
|
82 |
|
|
GenLeptons->Add(p);
|
83 |
|
|
isGoodLepton = true;
|
84 |
|
|
}
|
85 |
|
|
else if(pm->Mother()->AbsPdgId() == 111 || pm->Mother()->AbsPdgId() == 221){
|
86 |
|
|
// This is fake, but it is a trick to get rid of these cases
|
87 |
|
|
isGoodLepton = true;
|
88 |
|
|
}
|
89 |
|
|
else {
|
90 |
|
|
pm = (MCParticle *)pm->Mother();
|
91 |
|
|
}
|
92 |
|
|
}
|
93 |
|
|
}
|
94 |
|
|
|
95 |
|
|
// taus
|
96 |
|
|
else if(p->AbsPdgId() == 16 && p->Status() == 1){
|
97 |
|
|
if(p->DistinctMother()){
|
98 |
|
|
MCParticle* pm = (mithep::MCParticle*)p->DistinctMother();
|
99 |
|
|
if(pm->AbsPdgId() == 15){
|
100 |
|
|
MCParticle* pm_f = new MCParticle(*pm);
|
101 |
|
|
pm_f->SetMom(pm->Px()-p->Px(), pm->Py()-p->Py(),
|
102 |
|
|
pm->Pz()-p->Pz(), pm->E()-p->E());
|
103 |
|
|
GenTaus->Add(pm_f);
|
104 |
|
|
}
|
105 |
|
|
}
|
106 |
|
|
}
|
107 |
|
|
|
108 |
|
|
// neutrinos
|
109 |
|
|
else if(p->Status() == 1 &&
|
110 |
|
|
(p->AbsPdgId() == 12 || p->AbsPdgId() == 14 || p->AbsPdgId() == 16)){
|
111 |
|
|
GenNeutrinos->Add(p);
|
112 |
|
|
}
|
113 |
|
|
|
114 |
|
|
// quarks from W/Z decays or top particles
|
115 |
|
|
else if(p->AbsPdgId() >=1 && p->AbsPdgId() <=6 && p->HasMother()){
|
116 |
|
|
if(p->Mother()->AbsPdgId() == 23 || p->Mother()->AbsPdgId() == 24 ||
|
117 |
|
|
p->AbsPdgId() == 6 || p->Mother()->AbsPdgId() == 6){
|
118 |
|
|
GenQuarks->Add(p);
|
119 |
|
|
}
|
120 |
|
|
}
|
121 |
|
|
|
122 |
|
|
// qqH, information about the forward jets
|
123 |
|
|
else if(isqqH == false && p->AbsPdgId() == 25){
|
124 |
|
|
isqqH = true;
|
125 |
|
|
MCParticle* pq1 = fParticles->At(i-1);
|
126 |
|
|
MCParticle* pq2 = fParticles->At(i-2);
|
127 |
|
|
|
128 |
|
|
if(pq1->HasMother() && pq2->HasMother() &&
|
129 |
|
|
pq1->Mother()->PdgId() == p->Mother()->PdgId() &&
|
130 |
|
|
pq2->Mother()->PdgId() == p->Mother()->PdgId() &&
|
131 |
|
|
pq1->AbsPdgId() < 7 && pq2->AbsPdgId() < 7 &&
|
132 |
|
|
pq1->AbsPdgId() > 0 && pq2->AbsPdgId() > 0){
|
133 |
|
|
GenqqHs->Add(pq1);
|
134 |
|
|
GenqqHs->Add(pq2);
|
135 |
|
|
}
|
136 |
|
|
}
|
137 |
|
|
|
138 |
|
|
// information about bosons: W, Z, h, Z', W', H0, A0, H+
|
139 |
|
|
else if(p->Status() == 2 &&
|
140 |
|
|
(p->AbsPdgId() == 23 || p->AbsPdgId() == 24 || p->AbsPdgId() == 25 ||
|
141 |
|
|
p->AbsPdgId() == 32 || p->AbsPdgId() == 34 ||
|
142 |
|
|
p->AbsPdgId() == 35 || p->AbsPdgId() == 36 || p->AbsPdgId() == 37)){
|
143 |
|
|
GenBosons->Add(p);
|
144 |
|
|
}
|
145 |
|
|
}
|
146 |
|
|
} // IsMC?
|
147 |
|
|
|
148 |
|
|
//Save Objects for Other Modules to use
|
149 |
ceballos |
1.3 |
AddObjThisEvt(GenLeptons, fMCLeptonsName.Data());
|
150 |
|
|
AddObjThisEvt(GenAllLeptons,fMCAllLeptonsName.Data());
|
151 |
|
|
AddObjThisEvt(GenTaus, fMCTausName.Data());
|
152 |
|
|
AddObjThisEvt(GenNeutrinos, fMCNeutrinosName.Data());
|
153 |
|
|
AddObjThisEvt(GenQuarks, fMCQuarksName.Data());
|
154 |
|
|
AddObjThisEvt(GenqqHs, fMCqqHsName.Data());
|
155 |
|
|
AddObjThisEvt(GenBosons, fMCBosonsName.Data());
|
156 |
loizides |
1.1 |
|
157 |
|
|
// Fill histograms
|
158 |
|
|
if(fFillHist == true){
|
159 |
|
|
// Leptons
|
160 |
|
|
hDGenLeptons[0]->Fill(GenLeptons->GetEntries());
|
161 |
|
|
int idxMaxLep[2] = {-1, -1};
|
162 |
|
|
double ptMaxLep[2] = {-1.0, -1.0};
|
163 |
|
|
for(UInt_t i=0; i<GenLeptons->GetEntries(); i++){
|
164 |
|
|
hDGenLeptons[1]->Fill(GenLeptons->At(i)->Pt());
|
165 |
|
|
hDGenLeptons[2]->Fill(fabs(GenLeptons->At(i)->Eta()));
|
166 |
|
|
hDGenLeptons[3]->Fill(GenLeptons->At(i)->Phi() * 180. / TMath::Pi());
|
167 |
|
|
for(UInt_t j=i+1; j<GenLeptons->GetEntries(); j++){
|
168 |
|
|
CompositeParticle *dilepton = new CompositeParticle();
|
169 |
|
|
dilepton->AddDaughter(GenLeptons->At(i));
|
170 |
|
|
dilepton->AddDaughter(GenLeptons->At(j));
|
171 |
|
|
hDGenLeptons[4]->Fill(dilepton->Mass());
|
172 |
|
|
delete dilepton;
|
173 |
|
|
}
|
174 |
|
|
// Selecting the two highest Pt leptons
|
175 |
|
|
if (GenLeptons->At(i)->Pt() > ptMaxLep[0]){
|
176 |
|
|
ptMaxLep[1] = ptMaxLep[0];
|
177 |
|
|
idxMaxLep[1] = idxMaxLep[0];
|
178 |
|
|
ptMaxLep[0] = GenLeptons->At(i)->Pt();
|
179 |
|
|
idxMaxLep[0] = i;
|
180 |
|
|
}
|
181 |
|
|
else if(GenLeptons->At(i)->Pt() > ptMaxLep[1]){
|
182 |
|
|
ptMaxLep[1] = GenLeptons->At(i)->Pt();
|
183 |
|
|
idxMaxLep[1] = i;
|
184 |
|
|
}
|
185 |
|
|
}
|
186 |
|
|
// Looking at events with at least two leptons
|
187 |
|
|
if(ptMaxLep[0] > 0 && ptMaxLep[1] > 0){
|
188 |
|
|
hDGenLeptons[5]->Fill(TMath::Min(TMath::Max(fabs(GenLeptons->At(idxMaxLep[0])->Eta()),
|
189 |
|
|
fabs(GenLeptons->At(idxMaxLep[1])->Eta())),4.999));
|
190 |
|
|
hDGenLeptons[6]->Fill(TMath::Min(TMath::Min(fabs(GenLeptons->At(idxMaxLep[0])->Eta()),
|
191 |
|
|
fabs(GenLeptons->At(idxMaxLep[1])->Eta())),4.999));
|
192 |
|
|
if(fabs(GenLeptons->At(idxMaxLep[0])->Eta()) < 2.5 &&
|
193 |
|
|
fabs(GenLeptons->At(idxMaxLep[1])->Eta()) < 2.5){
|
194 |
|
|
hDGenLeptons[7]->Fill(TMath::Min(GenLeptons->At(idxMaxLep[0])->Pt(),199.999));
|
195 |
|
|
if(GenLeptons->At(idxMaxLep[0])->Pt() > 20.0){
|
196 |
|
|
hDGenLeptons[8]->Fill(TMath::Min(GenLeptons->At(idxMaxLep[1])->Pt(),199.999));
|
197 |
|
|
if(GenLeptons->At(idxMaxLep[1])->Pt() > 10.0){
|
198 |
|
|
CompositeParticle *dilepton = new CompositeParticle();
|
199 |
|
|
dilepton->AddDaughter(GenLeptons->At(idxMaxLep[0]));
|
200 |
|
|
dilepton->AddDaughter(GenLeptons->At(idxMaxLep[1]));
|
201 |
|
|
hDGenLeptons[9]->Fill(TMath::Min(dilepton->Mass(),999.999));
|
202 |
|
|
hDGenLeptons[10]->Fill(MathUtils::DeltaPhi(GenLeptons->At(idxMaxLep[0])->Phi(),
|
203 |
|
|
GenLeptons->At(idxMaxLep[1])->Phi())
|
204 |
|
|
* 180./ TMath::Pi());
|
205 |
|
|
delete dilepton;
|
206 |
|
|
}
|
207 |
|
|
}
|
208 |
|
|
}
|
209 |
|
|
}
|
210 |
|
|
|
211 |
ceballos |
1.3 |
// All Leptons
|
212 |
|
|
hDGenAllLeptons[0]->Fill(GenAllLeptons->GetEntries());
|
213 |
|
|
for(UInt_t i=0; i<GenAllLeptons->GetEntries(); i++){
|
214 |
|
|
hDGenAllLeptons[1]->Fill(GenAllLeptons->At(i)->Pt());
|
215 |
|
|
hDGenAllLeptons[2]->Fill(GenAllLeptons->At(i)->Eta());
|
216 |
|
|
hDGenAllLeptons[3]->Fill(GenAllLeptons->At(i)->Phi() * 180. / TMath::Pi());
|
217 |
|
|
}
|
218 |
|
|
|
219 |
loizides |
1.1 |
// Taus
|
220 |
|
|
hDGenTaus[0]->Fill(GenTaus->GetEntries());
|
221 |
|
|
for(UInt_t i=0; i<GenTaus->GetEntries(); i++){
|
222 |
|
|
hDGenTaus[1]->Fill(GenTaus->At(i)->Pt());
|
223 |
|
|
hDGenTaus[2]->Fill(GenTaus->At(i)->Eta());
|
224 |
|
|
hDGenTaus[3]->Fill(GenTaus->At(i)->Phi() * 180. / TMath::Pi());
|
225 |
|
|
}
|
226 |
|
|
|
227 |
|
|
// Neutrinos
|
228 |
|
|
hDGenNeutrinos[0]->Fill(GenNeutrinos->GetEntries());
|
229 |
|
|
CompositeParticle *neutrinoTotal = new CompositeParticle();
|
230 |
|
|
for(UInt_t i=0; i<GenNeutrinos->GetEntries(); i++){
|
231 |
|
|
if(GenNeutrinos->At(i)->HasMother())
|
232 |
|
|
neutrinoTotal->AddDaughter(GenNeutrinos->At(i));
|
233 |
|
|
}
|
234 |
|
|
if(GenNeutrinos->GetEntries() > 0){
|
235 |
|
|
hDGenNeutrinos[1]->Fill(neutrinoTotal->Pt());
|
236 |
|
|
hDGenNeutrinos[2]->Fill(neutrinoTotal->Eta());
|
237 |
|
|
hDGenNeutrinos[3]->Fill(neutrinoTotal->Phi() * 180./ TMath::Pi());
|
238 |
|
|
}
|
239 |
|
|
delete neutrinoTotal;
|
240 |
|
|
|
241 |
|
|
// Quarks
|
242 |
|
|
hDGenQuarks[0]->Fill(GenQuarks->GetEntries());
|
243 |
|
|
for(UInt_t i=0; i<GenQuarks->GetEntries(); i++){
|
244 |
|
|
for(UInt_t j=i+1; j<GenQuarks->GetEntries(); j++){
|
245 |
|
|
CompositeParticle *dijet = new CompositeParticle();
|
246 |
|
|
dijet->AddDaughter(GenQuarks->At(i));
|
247 |
|
|
dijet->AddDaughter(GenQuarks->At(j));
|
248 |
|
|
hDGenQuarks[1]->Fill(dijet->Pt());
|
249 |
|
|
hDGenQuarks[2]->Fill(dijet->Mass());
|
250 |
|
|
if(fabs(GenQuarks->At(i)->Eta()) < 2.5 && fabs(GenQuarks->At(j)->Eta()) < 2.5){
|
251 |
|
|
hDGenQuarks[3]->Fill(dijet->Pt());
|
252 |
|
|
hDGenQuarks[4]->Fill(dijet->Mass());
|
253 |
|
|
}
|
254 |
|
|
delete dijet;
|
255 |
|
|
}
|
256 |
ceballos |
1.2 |
// b quark info
|
257 |
|
|
if (GenQuarks->At(i)->AbsPdgId() == 5){
|
258 |
|
|
hDGenQuarks[5]->Fill(GenQuarks->At(i)->Pt());
|
259 |
|
|
hDGenQuarks[6]->Fill(GenQuarks->At(i)->Eta());
|
260 |
|
|
hDGenQuarks[7]->Fill(GenQuarks->At(i)->Phi());
|
261 |
|
|
if(ptMaxLep[0] > 20 && ptMaxLep[1] > 15){
|
262 |
|
|
if(fabs(GenLeptons->At(idxMaxLep[0])->Eta()) < 2.5 &&
|
263 |
|
|
fabs(GenLeptons->At(idxMaxLep[1])->Eta()) < 2.5){
|
264 |
|
|
hDGenQuarks[8]->Fill(GenQuarks->At(i)->Pt());
|
265 |
|
|
hDGenQuarks[9]->Fill(GenQuarks->At(i)->Eta());
|
266 |
|
|
hDGenQuarks[10]->Fill(GenQuarks->At(i)->Phi());
|
267 |
|
|
}
|
268 |
|
|
}
|
269 |
|
|
}
|
270 |
|
|
// t quark info
|
271 |
|
|
else if(GenQuarks->At(i)->AbsPdgId() == 6){
|
272 |
|
|
hDGenQuarks[11]->Fill(GenQuarks->At(i)->Pt());
|
273 |
|
|
hDGenQuarks[12]->Fill(GenQuarks->At(i)->Eta());
|
274 |
|
|
hDGenQuarks[13]->Fill(GenQuarks->At(i)->Phi());
|
275 |
|
|
}
|
276 |
|
|
// light quark info
|
277 |
|
|
else {
|
278 |
|
|
hDGenQuarks[14]->Fill(GenQuarks->At(i)->Pt());
|
279 |
|
|
hDGenQuarks[15]->Fill(GenQuarks->At(i)->Eta());
|
280 |
|
|
hDGenQuarks[16]->Fill(GenQuarks->At(i)->Phi());
|
281 |
|
|
}
|
282 |
loizides |
1.1 |
}
|
283 |
|
|
|
284 |
|
|
// WBF
|
285 |
|
|
if(GenqqHs->GetEntries() == 2){
|
286 |
|
|
hDGenWBF[0]->Fill(MathUtils::DeltaPhi(GenqqHs->At(0)->Phi(),
|
287 |
|
|
GenqqHs->At(1)->Phi()) * 180./ TMath::Pi());
|
288 |
|
|
hDGenWBF[1]->Fill(fabs(GenqqHs->At(0)->Eta()-GenqqHs->At(1)->Eta()));
|
289 |
|
|
hDGenWBF[2]->Fill(TMath::Max(GenqqHs->At(0)->Pt(),GenqqHs->At(1)->Pt()));
|
290 |
|
|
hDGenWBF[3]->Fill(TMath::Min(GenqqHs->At(0)->Pt(),GenqqHs->At(1)->Pt()));
|
291 |
|
|
CompositeParticle *diqq = new CompositeParticle();
|
292 |
|
|
diqq->AddDaughter(GenqqHs->At(0));
|
293 |
|
|
diqq->AddDaughter(GenqqHs->At(1));
|
294 |
|
|
hDGenWBF[4]->Fill(diqq->Mass());
|
295 |
|
|
delete diqq;
|
296 |
|
|
}
|
297 |
|
|
|
298 |
|
|
// Bosons
|
299 |
|
|
hDGenBosons[0]->Fill(GenBosons->GetEntries());
|
300 |
|
|
for(UInt_t i=0; i<GenBosons->GetEntries(); i++){
|
301 |
|
|
hDGenBosons[1]->Fill(GenBosons->At(i)->Pt());
|
302 |
|
|
hDGenBosons[2]->Fill(GenBosons->At(i)->Eta());
|
303 |
|
|
hDGenBosons[3]->Fill(GenBosons->At(i)->Mass());
|
304 |
|
|
}
|
305 |
|
|
}
|
306 |
|
|
|
307 |
|
|
}
|
308 |
|
|
|
309 |
|
|
//--------------------------------------------------------------------------------------------------
|
310 |
|
|
void GeneratorMod::SlaveBegin()
|
311 |
|
|
{
|
312 |
|
|
// Run startup code on the computer (slave) doing the actual analysis. Here,
|
313 |
|
|
// we typically initialize histograms and other analysis objects and request
|
314 |
|
|
// branches. For this module, we request a branch of the MitTree.
|
315 |
|
|
ReqBranch(fMCPartName, fParticles);
|
316 |
|
|
|
317 |
|
|
// Fill histograms
|
318 |
|
|
if(fFillHist == true){
|
319 |
|
|
char sb[200];
|
320 |
ceballos |
1.3 |
// Leptons
|
321 |
loizides |
1.1 |
sprintf(sb,"hDGenLeptons_%d", 0); hDGenLeptons[0] = new TH1D(sb,sb,10,-0.5,9.5);
|
322 |
|
|
sprintf(sb,"hDGenLeptons_%d", 1); hDGenLeptons[1] = new TH1D(sb,sb,100,0.0,200.0);
|
323 |
|
|
sprintf(sb,"hDGenLeptons_%d", 2); hDGenLeptons[2] = new TH1D(sb,sb,50,0.0,5.0);
|
324 |
|
|
sprintf(sb,"hDGenLeptons_%d", 3); hDGenLeptons[3] = new TH1D(sb,sb,90,0.0,180.0);
|
325 |
|
|
sprintf(sb,"hDGenLeptons_%d", 4); hDGenLeptons[4] = new TH1D(sb,sb,1000,0.0,1000.0);
|
326 |
|
|
sprintf(sb,"hDGenLeptons_%d", 5); hDGenLeptons[5] = new TH1D(sb,sb,50,0.0,5.0);
|
327 |
|
|
sprintf(sb,"hDGenLeptons_%d", 6); hDGenLeptons[6] = new TH1D(sb,sb,50,0.0,5.0);
|
328 |
|
|
sprintf(sb,"hDGenLeptons_%d", 7); hDGenLeptons[7] = new TH1D(sb,sb,100,0.0,200.0);
|
329 |
|
|
sprintf(sb,"hDGenLeptons_%d", 8); hDGenLeptons[8] = new TH1D(sb,sb,100,0.0,200.0);
|
330 |
|
|
sprintf(sb,"hDGenLeptons_%d", 9); hDGenLeptons[9] = new TH1D(sb,sb,1000,0.0,1000.0);
|
331 |
|
|
sprintf(sb,"hDGenLeptons_%d",10); hDGenLeptons[10] = new TH1D(sb,sb,90,0.0,180.0);
|
332 |
|
|
for(int i=0; i<11; i++) AddOutput(hDGenLeptons[i]);
|
333 |
|
|
|
334 |
ceballos |
1.3 |
// AllLeptons
|
335 |
|
|
sprintf(sb,"hDGenAllLeptons_%d", 0); hDGenAllLeptons[0] = new TH1D(sb,sb,10,-0.5,9.5);
|
336 |
|
|
sprintf(sb,"hDGenAllLeptons_%d", 1); hDGenAllLeptons[1] = new TH1D(sb,sb,100,0.0,200.0);
|
337 |
|
|
sprintf(sb,"hDGenAllLeptons_%d", 2); hDGenAllLeptons[2] = new TH1D(sb,sb,60,-3.0,3.0);
|
338 |
|
|
sprintf(sb,"hDGenAllLeptons_%d", 3); hDGenAllLeptons[3] = new TH1D(sb,sb,90,0.0,180.0);
|
339 |
|
|
for(int i=0; i<4; i++) AddOutput(hDGenAllLeptons[i]);
|
340 |
|
|
|
341 |
loizides |
1.1 |
// Taus
|
342 |
|
|
sprintf(sb,"hDGenTaus_%d", 0); hDGenTaus[0] = new TH1D(sb,sb,10,-0.5,9.5);
|
343 |
|
|
sprintf(sb,"hDGenTaus_%d", 1); hDGenTaus[1] = new TH1D(sb,sb,100,0.0,200.0);
|
344 |
|
|
sprintf(sb,"hDGenTaus_%d", 2); hDGenTaus[2] = new TH1D(sb,sb,100,-5.0,5.0);
|
345 |
|
|
sprintf(sb,"hDGenTaus_%d", 3); hDGenTaus[3] = new TH1D(sb,sb,90,0.0,180.0);
|
346 |
|
|
for(int i=0; i<4; i++) AddOutput(hDGenTaus[i]);
|
347 |
|
|
|
348 |
|
|
// Neutrinos
|
349 |
|
|
sprintf(sb,"hDGenNeutrinos_%d", 0); hDGenNeutrinos[0] = new TH1D(sb,sb,10,-0.5,9.5);
|
350 |
|
|
sprintf(sb,"hDGenNeutrinos_%d", 1); hDGenNeutrinos[1] = new TH1D(sb,sb,100,0.0,200.0);
|
351 |
|
|
sprintf(sb,"hDGenNeutrinos_%d", 2); hDGenNeutrinos[2] = new TH1D(sb,sb,100,-5.0,5.0);
|
352 |
|
|
sprintf(sb,"hDGenNeutrinos_%d", 3); hDGenNeutrinos[3] = new TH1D(sb,sb,90,0.0,180.0);
|
353 |
|
|
for(int i=0; i<4; i++) AddOutput(hDGenNeutrinos[i]);
|
354 |
|
|
|
355 |
|
|
// Quarks
|
356 |
|
|
sprintf(sb,"hDGenQuarks_%d", 0); hDGenQuarks[0] = new TH1D(sb,sb,10,-0.5,9.5);
|
357 |
|
|
sprintf(sb,"hDGenQuarks_%d", 1); hDGenQuarks[1] = new TH1D(sb,sb,200,0.0,400.);
|
358 |
|
|
sprintf(sb,"hDGenQuarks_%d", 2); hDGenQuarks[2] = new TH1D(sb,sb,2000,0.0,2000.);
|
359 |
|
|
sprintf(sb,"hDGenQuarks_%d", 3); hDGenQuarks[3] = new TH1D(sb,sb,200,0.0,400.);
|
360 |
|
|
sprintf(sb,"hDGenQuarks_%d", 4); hDGenQuarks[4] = new TH1D(sb,sb,2000,0.0,2000.);
|
361 |
ceballos |
1.2 |
sprintf(sb,"hDGenQuarks_%d", 5); hDGenQuarks[5] = new TH1D(sb,sb,200,0.0,400.);
|
362 |
|
|
sprintf(sb,"hDGenQuarks_%d", 6); hDGenQuarks[6] = new TH1D(sb,sb,200,-10.0,10.);
|
363 |
|
|
sprintf(sb,"hDGenQuarks_%d", 7); hDGenQuarks[7] = new TH1D(sb,sb,200,-TMath::Pi(),TMath::Pi());
|
364 |
|
|
sprintf(sb,"hDGenQuarks_%d", 8); hDGenQuarks[8] = new TH1D(sb,sb,200,0.0,400.);
|
365 |
|
|
sprintf(sb,"hDGenQuarks_%d", 9); hDGenQuarks[9] = new TH1D(sb,sb,200,-10.0,10.);
|
366 |
|
|
sprintf(sb,"hDGenQuarks_%d",10); hDGenQuarks[10] = new TH1D(sb,sb,200,-TMath::Pi(),TMath::Pi());
|
367 |
|
|
sprintf(sb,"hDGenQuarks_%d",11); hDGenQuarks[11] = new TH1D(sb,sb,200,0.0,400.);
|
368 |
|
|
sprintf(sb,"hDGenQuarks_%d",12); hDGenQuarks[12] = new TH1D(sb,sb,200,-10.0,10.);
|
369 |
|
|
sprintf(sb,"hDGenQuarks_%d",13); hDGenQuarks[13] = new TH1D(sb,sb,200,-TMath::Pi(),TMath::Pi());
|
370 |
|
|
sprintf(sb,"hDGenQuarks_%d",14); hDGenQuarks[14] = new TH1D(sb,sb,200,0.0,400.);
|
371 |
|
|
sprintf(sb,"hDGenQuarks_%d",15); hDGenQuarks[15] = new TH1D(sb,sb,200,-10.0,10.);
|
372 |
|
|
sprintf(sb,"hDGenQuarks_%d",16); hDGenQuarks[16] = new TH1D(sb,sb,200,-TMath::Pi(),TMath::Pi());
|
373 |
|
|
for(int i=0; i<17; i++) AddOutput(hDGenQuarks[i]);
|
374 |
loizides |
1.1 |
|
375 |
|
|
// qqH
|
376 |
|
|
sprintf(sb,"hDGenWBF_%d", 0); hDGenWBF[0] = new TH1D(sb,sb,90,0.0,180.);
|
377 |
|
|
sprintf(sb,"hDGenWBF_%d", 1); hDGenWBF[1] = new TH1D(sb,sb,100,0.0,10.);
|
378 |
|
|
sprintf(sb,"hDGenWBF_%d", 2); hDGenWBF[2] = new TH1D(sb,sb,200,0.0,400.);
|
379 |
|
|
sprintf(sb,"hDGenWBF_%d", 3); hDGenWBF[3] = new TH1D(sb,sb,200,0.0,400.);
|
380 |
|
|
sprintf(sb,"hDGenWBF_%d", 4); hDGenWBF[4] = new TH1D(sb,sb,200,0.0,4000.);
|
381 |
|
|
for(int i=0; i<5; i++) AddOutput(hDGenWBF[i]);
|
382 |
|
|
|
383 |
|
|
// Bosons
|
384 |
|
|
sprintf(sb,"hDGenBosons_%d", 0); hDGenBosons[0] = new TH1D(sb,sb,10,-0.5,9.5);
|
385 |
|
|
sprintf(sb,"hDGenBosons_%d", 1); hDGenBosons[1] = new TH1D(sb,sb,200,0.0,400.0);
|
386 |
|
|
sprintf(sb,"hDGenBosons_%d", 2); hDGenBosons[2] = new TH1D(sb,sb,100,-5.0,5.0);
|
387 |
|
|
sprintf(sb,"hDGenBosons_%d", 3); hDGenBosons[3] = new TH1D(sb,sb,2000,0.0,2000.0);
|
388 |
|
|
for(int i=0; i<4; i++) AddOutput(hDGenBosons[i]);
|
389 |
|
|
}
|
390 |
|
|
}
|
391 |
|
|
|
392 |
|
|
//--------------------------------------------------------------------------------------------------
|
393 |
|
|
void GeneratorMod::SlaveTerminate()
|
394 |
|
|
{
|
395 |
|
|
// Run finishing code on the computer (slave) that did the analysis. For this
|
396 |
|
|
// module, we dont do anything here.
|
397 |
|
|
|
398 |
ceballos |
1.2 |
cout << "Total Number of Processed Events: " << fNEventsProcessed << endl;
|
399 |
|
|
|
400 |
loizides |
1.1 |
}
|
401 |
|
|
|
402 |
|
|
//--------------------------------------------------------------------------------------------------
|
403 |
|
|
void GeneratorMod::Terminate()
|
404 |
|
|
{
|
405 |
|
|
// Run finishing code on the client computer. For this module, we dont do
|
406 |
|
|
// anything here.
|
407 |
|
|
}
|