ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/src/GeneratorMod.cc
Revision: 1.31
Committed: Sat Apr 4 09:40:35 2009 UTC (16 years, 1 month ago) by ceballos
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_009
Changes since 1.30: +0 -0 lines
Log Message:
minor update

File Contents

# User Rev Content
1 ceballos 1.30 // $Id: GeneratorMod.cc,v 1.29 2009/03/30 12:40:05 loizides Exp $
2 loizides 1.1
3     #include "MitPhysics/Mods/interface/GeneratorMod.h"
4     #include "MitCommon/MathTools/interface/MathUtils.h"
5 loizides 1.8 #include "MitPhysics/Init/interface/ModNames.h"
6 loizides 1.1 #include <TH1D.h>
7     #include <TH2D.h>
8    
9     using namespace mithep;
10    
11     ClassImp(mithep::GeneratorMod)
12    
13     //--------------------------------------------------------------------------------------------------
14 loizides 1.8 GeneratorMod::GeneratorMod(const char *name, const char *title) :
15 loizides 1.1 BaseMod(name,title),
16     fMCPartName(Names::gkMCPartBrn),
17 ceballos 1.30 fMCMETName(ModNames::gkMCMETName),
18 loizides 1.8 fMCLeptonsName(ModNames::gkMCLeptonsName),
19     fMCAllLeptonsName(ModNames::gkMCAllLeptonsName),
20     fMCTausName(ModNames::gkMCTausName),
21     fMCNeutrinosName(ModNames::gkMCNeutrinosName),
22     fMCQuarksName(ModNames::gkMCQuarksName),
23     fMCqqHsName(ModNames::gkMCqqHsName),
24     fMCBosonsName(ModNames::gkMCBosonsName),
25 ceballos 1.10 fMCPhotonsName(ModNames::gkMCPhotonsName),
26 ceballos 1.14 fPtLeptonMin(0.0),
27     fEtaLeptonMax(5.0),
28     fPtPhotonMin(0.0),
29 loizides 1.15 fEtaPhotonMax(5.0),
30 loizides 1.27 fPdgIdCut(0),
31     fMassMinCut(-FLT_MAX),
32     fMassMaxCut(FLT_MAX),
33 loizides 1.15 fParticles(0)
34 loizides 1.1 {
35     // Constructor.
36     }
37    
38     //--------------------------------------------------------------------------------------------------
39     void GeneratorMod::Process()
40     {
41 loizides 1.5 // Process entries of the tree.
42 loizides 1.1
43 loizides 1.5 // these arrays will be filled in the loop of particles
44 ceballos 1.30 MetOArr *GenMet = new MetOArr;
45     GenMet->SetName(fMCMETName);
46     GenMet->SetOwner(kTRUE);
47 loizides 1.9 MCParticleOArr *GenLeptons = new MCParticleOArr;
48 loizides 1.13 GenLeptons->SetName(fMCLeptonsName);
49 loizides 1.9 MCParticleOArr *GenAllLeptons = new MCParticleOArr;
50 loizides 1.13 GenAllLeptons->SetName(fMCAllLeptonsName);
51 loizides 1.9 MCParticleOArr *GenTaus = new MCParticleOArr;
52 loizides 1.13 GenTaus->SetName(fMCTausName);
53     GenTaus->SetOwner(kTRUE);
54 loizides 1.9 MCParticleOArr *GenNeutrinos = new MCParticleOArr;
55 loizides 1.13 GenNeutrinos->SetName(fMCNeutrinosName);
56 loizides 1.9 MCParticleOArr *GenQuarks = new MCParticleOArr;
57 loizides 1.13 GenQuarks->SetName(fMCQuarksName);
58 loizides 1.9 MCParticleOArr *GenqqHs = new MCParticleOArr;
59 loizides 1.13 GenqqHs->SetName(fMCqqHsName);
60 loizides 1.9 MCParticleOArr *GenBosons = new MCParticleOArr;
61 loizides 1.13 GenBosons->SetName(fMCBosonsName);
62 ceballos 1.10 MCParticleOArr *GenPhotons = new MCParticleOArr;
63 loizides 1.13 GenPhotons->SetName(fMCPhotonsName);
64 loizides 1.1
65 loizides 1.5 // load MCParticle branch
66     LoadBranch(fMCPartName);
67    
68 ceballos 1.30 Double_t totalMET[3] = {0.0, 0.0, 0.0};
69 loizides 1.6 Bool_t isqqH = kFALSE;
70 loizides 1.5 for (UInt_t i=0; i<fParticles->GetEntries(); ++i) {
71 loizides 1.7 const MCParticle *p = fParticles->At(i);
72 ceballos 1.30
73     // MET computation at generation level
74     if (p->Status() == 1 && !p->IsNeutrino()) {
75     totalMET[0] = totalMET[0] + p->Px();
76     totalMET[1] = totalMET[1] + p->Py();
77     totalMET[2] = totalMET[2] + p->Pz();
78     }
79 loizides 1.5
80     if (!p->IsGenerated()) continue;
81    
82     // muons/electrons from W/Z decays
83 loizides 1.7 if ((p->Is(MCParticle::kEl) || p->Is(MCParticle::kMu)) && p->Status() == 1) {
84 ceballos 1.14 if (p->Pt() > fPtLeptonMin && p->AbsEta() < fEtaLeptonMax) {
85 loizides 1.5 GenAllLeptons->Add(p);
86     }
87 loizides 1.6 Bool_t isGoodLepton = kFALSE;
88 loizides 1.7 const MCParticle *pm = p;
89 loizides 1.5 while (pm->HasMother() && isGoodLepton == kFALSE) {
90 loizides 1.21 if (pm->PdgId() == 92) // string reached, terminate loop
91     break;
92 loizides 1.29 if (pm->Mother()->Is(MCParticle::kZ) || pm->Mother()->Is(MCParticle::kW) ||
93     pm->Mother()->Is(MCParticle::kZp) || pm->Mother()->Is(MCParticle::kWp) ||
94     pm->Mother()->Is(MCParticle::kH)) {
95 loizides 1.5 GenLeptons->Add(p);
96     isGoodLepton = kTRUE;
97 loizides 1.7 break;
98 loizides 1.8 } else if (pm->Mother()->Is(MCParticle::kPi0) || pm->Mother()->Is(MCParticle::kEta)) {
99 loizides 1.7 // this is fake, but it is a trick to get rid of these cases and abort the loop
100     break;
101     }
102     pm = pm->Mother();
103 loizides 1.1 }
104 loizides 1.5 }
105    
106 loizides 1.7 // hadronic taus
107     else if (p->Is(MCParticle::kTau) && p->Status() == 2) {
108     if (!p->HasDaughter(MCParticle::kEl) && !p->HasDaughter(MCParticle::kMu)) {
109     const MCParticle *tv = p->FindDaughter(MCParticle::kTauNu);
110     if (tv) {
111     MCParticle *pm_f = new MCParticle(*p);
112     pm_f->SetMom(p->Px()-tv->Px(), p->Py()-tv->Py(),
113     p->Pz()-tv->Pz(), p->E()-tv->E());
114     GenTaus->AddOwned(pm_f);
115     } else {
116 loizides 1.18 SendError(kWarning, "Process", "Could not find a tau neutrino!");
117 loizides 1.5 }
118 loizides 1.1 }
119 loizides 1.5 }
120 loizides 1.1
121 loizides 1.5 // neutrinos
122 loizides 1.7 else if (p->Status() == 1 && p->IsNeutrino()) {
123 loizides 1.5 GenNeutrinos->Add(p);
124     }
125 loizides 1.1
126 loizides 1.5 // quarks from W/Z decays or top particles
127 loizides 1.7 else if (p->IsQuark() && p->HasMother()) {
128     if (p->Mother()->Is(MCParticle::kZ) || p->Mother()->Is(MCParticle::kW) ||
129     p->Is(MCParticle::kTop) || p->Mother()->Is(MCParticle::kTop)) {
130 loizides 1.5 GenQuarks->Add(p);
131 loizides 1.1 }
132 loizides 1.5 }
133 loizides 1.1
134 loizides 1.5 // qqH, information about the forward jets
135 loizides 1.8 else if (isqqH == kFALSE && p->Is(MCParticle::kH)) {
136 loizides 1.5 isqqH = kTRUE;
137 loizides 1.17 const MCParticle *pq1 = fParticles->At(i-1);
138     const MCParticle *pq2 = fParticles->At(i-2);
139 loizides 1.7 if (!pq1 || !pq2) {
140     SendError(kWarning, "Process", "Could not find quark pair!");
141 loizides 1.8 } else if (pq1->IsQuark() && pq2->IsQuark() &&
142     pq1->HasMother() && pq2->HasMother() &&
143 ceballos 1.25 pq1->Mother() == pq2->Mother() &&
144     pq1->Mother() != p->Mother() &&
145     pq1->Mother() != p->Mother()) {
146 loizides 1.5 GenqqHs->Add(pq1);
147     GenqqHs->Add(pq2);
148 loizides 1.1 }
149 ceballos 1.23
150 loizides 1.7 if (p->Status() == 3)
151 loizides 1.24 GenBosons->Add(p); // take higgs boson in account here rather in next else if
152 loizides 1.5 }
153 loizides 1.1
154 loizides 1.5 // information about bosons: W, Z, h, Z', W', H0, A0, H+
155 loizides 1.7 else if (p->Status() == 3 &&
156     (p->Is(MCParticle::kZ) || p->Is(MCParticle::kW) || p->Is(MCParticle::kH) ||
157     p->Is(MCParticle::kZp) || p->Is(MCParticle::kZpp) ||
158     p->Is(MCParticle::kH0) || p->Is(MCParticle::kA0) || p->Is(MCParticle::kHp))) {
159 loizides 1.5 GenBosons->Add(p);
160 loizides 1.1 }
161 ceballos 1.10
162 ceballos 1.14 // photons
163 ceballos 1.10 else if (p->Status() == 1 && p->Is(MCParticle::kGamma) &&
164 ceballos 1.14 p->Pt() > fPtPhotonMin && p->AbsEta() < fEtaPhotonMax) {
165 ceballos 1.10 GenPhotons->Add(p);
166     }
167    
168 loizides 1.18 // W/Z -> lnu for Madgraph
169 loizides 1.28 if (p->IsParton() && p->NDaughters() >= 2) {
170 ceballos 1.16 CompositeParticle *diBoson = new CompositeParticle();
171     diBoson->AddDaughter(p->Daughter(0));
172     diBoson->AddDaughter(p->Daughter(1));
173 loizides 1.18 if (p->HasDaughter(MCParticle::kMu) && p->HasDaughter(MCParticle::kMuNu)) {
174 loizides 1.20 if (GetFillHist())
175 loizides 1.18 hDVMass[0]->Fill(TMath::Min(diBoson->Mass(),199.999));
176 loizides 1.28 const MCParticle *tmp_mu = p->FindDaughter(MCParticle::kMu);
177     while (tmp_mu->HasDaughter(MCParticle::kMu) &&
178     tmp_mu->FindDaughter(MCParticle::kMu)->IsGenerated())
179     tmp_mu = tmp_mu->FindDaughter(MCParticle::kMu);
180     GenLeptons->Add(tmp_mu);
181 ceballos 1.16 }
182 loizides 1.18 else if (p->HasDaughter(MCParticle::kEl) && p->HasDaughter(MCParticle::kElNu)) {
183 loizides 1.20 if (GetFillHist())
184 loizides 1.18 hDVMass[1]->Fill(TMath::Min(diBoson->Mass(),199.999));
185 loizides 1.28 const MCParticle *tmp_e = p->FindDaughter(MCParticle::kEl);
186     while (tmp_e->HasDaughter(MCParticle::kEl) &&
187     tmp_e->FindDaughter(MCParticle::kEl)->IsGenerated())
188     tmp_e = tmp_e->FindDaughter(MCParticle::kEl);
189     GenLeptons->Add(tmp_e);
190 ceballos 1.16 }
191 loizides 1.18 else if (p->HasDaughter(MCParticle::kTau) && p->HasDaughter(MCParticle::kTauNu)) {
192 loizides 1.20 if (GetFillHist())
193 loizides 1.18 hDVMass[2]->Fill(TMath::Min(diBoson->Mass(),199.999));
194     const MCParticle *tau = p->FindDaughter(MCParticle::kTau);
195     if (tau->HasDaughter(MCParticle::kMu))
196     GenLeptons->Add(tau->FindDaughter(MCParticle::kMu));
197     if (tau->HasDaughter(MCParticle::kEl))
198     GenLeptons->Add(tau->FindDaughter(MCParticle::kEl));
199 loizides 1.28 if (tau->HasDaughter(MCParticle::kTau)) {
200     const MCParticle *tau_second = tau->FindDaughter(MCParticle::kTau);
201     if (tau_second->HasDaughter(MCParticle::kMu))
202     GenLeptons->Add(tau_second->FindDaughter(MCParticle::kMu));
203     if (tau_second->HasDaughter(MCParticle::kEl))
204     GenLeptons->Add(tau_second->FindDaughter(MCParticle::kEl));
205     }
206 loizides 1.18 }
207     else if (p->Daughter(0)->Is(MCParticle::kMu) && p->Daughter(1)->Is(MCParticle::kMu)) {
208 loizides 1.20 if (GetFillHist())
209 loizides 1.18 hDVMass[3]->Fill(TMath::Min(diBoson->Mass(),199.999));
210 ceballos 1.16 GenLeptons->Add(p->Daughter(0));
211     GenLeptons->Add(p->Daughter(1));
212     }
213 loizides 1.18 else if (p->Daughter(0)->Is(MCParticle::kEl) && p->Daughter(1)->Is(MCParticle::kEl)) {
214 loizides 1.20 if (GetFillHist())
215 loizides 1.18 hDVMass[4]->Fill(TMath::Min(diBoson->Mass(),199.999));
216 ceballos 1.16 GenLeptons->Add(p->Daughter(0));
217     GenLeptons->Add(p->Daughter(1));
218     }
219 loizides 1.18 else if (p->Daughter(0)->Is(MCParticle::kTau) && p->Daughter(1)->Is(MCParticle::kTau)) {
220 loizides 1.20 if (GetFillHist())
221 loizides 1.18 hDVMass[5]->Fill(TMath::Min(diBoson->Mass(),199.999));
222     const MCParticle *tau0 = p->Daughter(0);
223     if (tau0->HasDaughter(MCParticle::kMu))
224     GenLeptons->Add(tau0->FindDaughter(MCParticle::kMu));
225     if (tau0->HasDaughter(MCParticle::kEl))
226     GenLeptons->Add(tau0->FindDaughter(MCParticle::kEl));
227     const MCParticle *tau1 = p->Daughter(1);
228     if (tau1->HasDaughter(MCParticle::kMu))
229     GenLeptons->Add(tau1->FindDaughter(MCParticle::kMu));
230     if (tau1->HasDaughter(MCParticle::kEl))
231     GenLeptons->Add(tau1->FindDaughter(MCParticle::kEl));
232 ceballos 1.16 }
233     delete diBoson;
234     }
235    
236 loizides 1.18 // t -> lnu for Madgraph
237     if (p->Is(MCParticle::kTop)) {
238 ceballos 1.16 CompositeParticle *diBoson = new CompositeParticle();
239 loizides 1.18 if (p->HasDaughter(MCParticle::kMu) && p->HasDaughter(MCParticle::kMuNu)) {
240 ceballos 1.16 diBoson->AddDaughter(p->FindDaughter(MCParticle::kMu));
241     diBoson->AddDaughter(p->FindDaughter(MCParticle::kMuNu));
242 loizides 1.20 if (GetFillHist())
243 loizides 1.18 hDVMass[6]->Fill(TMath::Min(diBoson->Mass(),199.999));
244 ceballos 1.16 GenLeptons->Add(p->FindDaughter(MCParticle::kMu));
245     }
246 loizides 1.18 else if (p->HasDaughter(MCParticle::kEl) && p->HasDaughter(MCParticle::kElNu)) {
247 ceballos 1.16 diBoson->AddDaughter(p->FindDaughter(MCParticle::kEl));
248     diBoson->AddDaughter(p->FindDaughter(MCParticle::kElNu));
249 loizides 1.20 if (GetFillHist())
250 loizides 1.18 hDVMass[7]->Fill(TMath::Min(diBoson->Mass(),199.999));
251 ceballos 1.16 GenLeptons->Add(p->FindDaughter(MCParticle::kEl));
252     }
253 loizides 1.18 else if (p->HasDaughter(MCParticle::kTau) && p->HasDaughter(MCParticle::kTauNu)) {
254 ceballos 1.16 diBoson->AddDaughter(p->FindDaughter(MCParticle::kTau));
255     diBoson->AddDaughter(p->FindDaughter(MCParticle::kTauNu));
256 loizides 1.20 if (GetFillHist())
257 loizides 1.18 hDVMass[8]->Fill(TMath::Min(diBoson->Mass(),199.999));
258     const MCParticle *tau = p->FindDaughter(MCParticle::kTau);
259     if (tau->HasDaughter(MCParticle::kMu))
260     GenLeptons->Add(tau->FindDaughter(MCParticle::kMu));
261     if (tau->HasDaughter(MCParticle::kEl))
262     GenLeptons->Add(tau->FindDaughter(MCParticle::kEl));
263     }
264     else if (!p->HasDaughter(MCParticle::kW)) {
265     for(UInt_t nd=0; nd<p->NDaughters(); ++nd)
266     if (p->Daughter(nd)->IsNot(MCParticle::kBottom) &&
267     p->Daughter(nd)->IsNot(MCParticle::kGamma))
268     diBoson->AddDaughter(p->Daughter(nd));
269 loizides 1.20 if (GetFillHist())
270 loizides 1.18 hDVMass[9]->Fill(TMath::Min(diBoson->Mass(),199.999));
271 ceballos 1.16 }
272     delete diBoson;
273     }
274 ceballos 1.26
275 loizides 1.27 // mass cut for given pid
276     if(fPdgIdCut && p->Is(fPdgIdCut) &&
277 ceballos 1.26 (p->Mass() < fMassMinCut || p->Mass() > fMassMaxCut)) {
278     SkipEvent();
279     return;
280     }
281    
282 loizides 1.27 } // end loop of particles
283 loizides 1.1
284 ceballos 1.30 Met *theMET = new Met(totalMET[0], totalMET[1]);
285     theMET->SetElongitudinal(totalMET[2]);
286     GenMet->AddOwned(theMET);
287    
288 loizides 1.19 // sort according to pt
289     GenLeptons->Sort();
290     GenAllLeptons->Sort();
291     GenTaus->Sort();
292     GenNeutrinos->Sort();
293     GenQuarks->Sort();
294     GenqqHs->Sort();
295     GenBosons->Sort();
296     GenPhotons->Sort();
297    
298 loizides 1.8 // add objects to this event for other modules to use
299 ceballos 1.30 AddObjThisEvt(GenMet);
300 loizides 1.13 AddObjThisEvt(GenLeptons);
301     AddObjThisEvt(GenAllLeptons);
302     AddObjThisEvt(GenTaus);
303     AddObjThisEvt(GenNeutrinos);
304     AddObjThisEvt(GenQuarks);
305     AddObjThisEvt(GenqqHs);
306     AddObjThisEvt(GenBosons);
307     AddObjThisEvt(GenPhotons);
308 ceballos 1.16
309 loizides 1.5 // fill histograms if requested
310 loizides 1.20 if (GetFillHist()) {
311 loizides 1.5
312 ceballos 1.30 // MET
313     hDGenMet[0]->Fill(GenMet->At(0)->Pt());
314     hDGenMet[1]->Fill(GenMet->At(0)->Px());
315     hDGenMet[2]->Fill(GenMet->At(0)->Py());
316     hDGenMet[3]->Fill(GenMet->At(0)->Elongitudinal());
317    
318 loizides 1.6 // leptons
319 loizides 1.1 hDGenLeptons[0]->Fill(GenLeptons->GetEntries());
320 loizides 1.5 for(UInt_t i=0; i<GenLeptons->GetEntries(); i++) {
321 loizides 1.1 hDGenLeptons[1]->Fill(GenLeptons->At(i)->Pt());
322 loizides 1.5 hDGenLeptons[2]->Fill(TMath::Abs(GenLeptons->At(i)->Eta()));
323     hDGenLeptons[3]->Fill(GenLeptons->At(i)->PhiDeg());
324     for(UInt_t j=i+1; j<GenLeptons->GetEntries(); j++) {
325 loizides 1.1 CompositeParticle *dilepton = new CompositeParticle();
326     dilepton->AddDaughter(GenLeptons->At(i));
327     dilepton->AddDaughter(GenLeptons->At(j));
328     hDGenLeptons[4]->Fill(dilepton->Mass());
329     delete dilepton;
330     }
331 ceballos 1.22 }
332     // looking at events with two leptons
333     if (GenLeptons->GetEntries() == 2) {
334     hDGenLeptons[5]->Fill(TMath::Min(TMath::Max(TMath::Abs(GenLeptons->At(0)->Eta()),
335     TMath::Abs(GenLeptons->At(1)->Eta())),
336 loizides 1.5 4.999));
337 ceballos 1.22 hDGenLeptons[6]->Fill(TMath::Min(TMath::Min(TMath::Abs(GenLeptons->At(0)->Eta()),
338     TMath::Abs(GenLeptons->At(1)->Eta())),
339 loizides 1.5 4.999));
340 ceballos 1.22 if (TMath::Abs(GenLeptons->At(0)->Eta()) < 2.5 &&
341     TMath::Abs(GenLeptons->At(1)->Eta()) < 2.5) {
342     hDGenLeptons[7]->Fill(TMath::Min(GenLeptons->At(0)->Pt(),199.999));
343     if (GenLeptons->At(0)->Pt() > 20.0) {
344     hDGenLeptons[8]->Fill(TMath::Min(GenLeptons->At(1)->Pt(),199.999));
345     if (GenLeptons->At(1)->Pt() > 10.0) {
346 loizides 1.1 CompositeParticle *dilepton = new CompositeParticle();
347 ceballos 1.22 dilepton->AddDaughter(GenLeptons->At(0));
348     dilepton->AddDaughter(GenLeptons->At(1));
349 loizides 1.1 hDGenLeptons[9]->Fill(TMath::Min(dilepton->Mass(),999.999));
350 ceballos 1.22 if(dilepton->Mass() > 12.0){
351     hDGenLeptons[10]->Fill(MathUtils::DeltaPhi(GenLeptons->At(0)->Phi(),
352     GenLeptons->At(1)->Phi())
353     * 180./ TMath::Pi());
354     hDGenLeptons[11]->Fill(MathUtils::DeltaR(GenLeptons->At(0)->Eta(), GenLeptons->At(0)->Phi(),
355     GenLeptons->At(1)->Eta(), GenLeptons->At(1)->Phi()));
356     }
357 loizides 1.1 delete dilepton;
358     }
359     }
360     }
361     }
362 ceballos 1.22 // looking at events with three leptons
363     if (GenLeptons->GetEntries() == 3) {
364     if (TMath::Abs(GenLeptons->At(0)->Eta()) < 2.5 &&
365     TMath::Abs(GenLeptons->At(1)->Eta()) < 2.5 &&
366     TMath::Abs(GenLeptons->At(2)->Eta()) < 2.5) {
367     hDGenLeptons[12]->Fill(TMath::Min(GenLeptons->At(0)->Pt(),199.999));
368     if (GenLeptons->At(0)->Pt() > 20.0) {
369     hDGenLeptons[13]->Fill(TMath::Min(GenLeptons->At(1)->Pt(),199.999));
370     hDGenLeptons[14]->Fill(TMath::Min(GenLeptons->At(2)->Pt(),199.999));
371     if (GenLeptons->At(1)->Pt() > 10.0 && GenLeptons->At(2)->Pt() > 10.0) {
372     CompositeParticle *dilepton01 = new CompositeParticle();
373     dilepton01->AddDaughter(GenLeptons->At(0));
374     dilepton01->AddDaughter(GenLeptons->At(1));
375     CompositeParticle *dilepton02 = new CompositeParticle();
376     dilepton02->AddDaughter(GenLeptons->At(0));
377     dilepton02->AddDaughter(GenLeptons->At(2));
378     CompositeParticle *dilepton12 = new CompositeParticle();
379     dilepton12->AddDaughter(GenLeptons->At(1));
380     dilepton12->AddDaughter(GenLeptons->At(2));
381     hDGenLeptons[15]->Fill(TMath::Min(dilepton01->Mass(),999.999));
382     hDGenLeptons[15]->Fill(TMath::Min(dilepton02->Mass(),999.999));
383     hDGenLeptons[15]->Fill(TMath::Min(dilepton12->Mass(),999.999));
384     CompositeParticle *trilepton = new CompositeParticle();
385     trilepton->AddDaughter(GenLeptons->At(0));
386     trilepton->AddDaughter(GenLeptons->At(1));
387     trilepton->AddDaughter(GenLeptons->At(2));
388     hDGenLeptons[16]->Fill(TMath::Min(trilepton->Mass(),999.999));
389 loizides 1.27 Double_t deltaR[3] = {MathUtils::DeltaR(GenLeptons->At(0)->Eta(),
390     GenLeptons->At(0)->Phi(),
391     GenLeptons->At(1)->Eta(),
392     GenLeptons->At(1)->Phi()),
393     MathUtils::DeltaR(GenLeptons->At(0)->Eta(),
394     GenLeptons->At(0)->Phi(),
395     GenLeptons->At(2)->Eta(),
396     GenLeptons->At(2)->Phi()),
397     MathUtils::DeltaR(GenLeptons->At(1)->Eta(),
398     GenLeptons->At(1)->Phi(),
399     GenLeptons->At(2)->Eta(),
400     GenLeptons->At(2)->Phi())};
401     Double_t deltaRMin = deltaR[0];
402     for(Int_t i=1; i<3; i++) if(deltaRMin > deltaR[i]) deltaRMin = deltaR[i];
403 ceballos 1.22 hDGenLeptons[17]->Fill(deltaRMin);
404    
405     delete dilepton01;
406     delete dilepton02;
407     delete dilepton12;
408     delete trilepton;
409     }
410     }
411     }
412     }
413     // looking at events with four leptons
414     if (GenLeptons->GetEntries() == 4) {
415     if (TMath::Abs(GenLeptons->At(0)->Eta()) < 2.5 &&
416     TMath::Abs(GenLeptons->At(1)->Eta()) < 2.5 &&
417     TMath::Abs(GenLeptons->At(2)->Eta()) < 2.5 &&
418     TMath::Abs(GenLeptons->At(3)->Eta()) < 2.5) {
419     hDGenLeptons[18]->Fill(TMath::Min(GenLeptons->At(0)->Pt(),199.999));
420     if (GenLeptons->At(0)->Pt() > 20.0) {
421     hDGenLeptons[19]->Fill(TMath::Min(GenLeptons->At(1)->Pt(),199.999));
422     hDGenLeptons[20]->Fill(TMath::Min(GenLeptons->At(2)->Pt(),199.999));
423     hDGenLeptons[21]->Fill(TMath::Min(GenLeptons->At(3)->Pt(),199.999));
424     if (GenLeptons->At(1)->Pt() > 10.0 && GenLeptons->At(2)->Pt() > 10.0 &&
425     GenLeptons->At(3)->Pt() > 10.0) {
426     CompositeParticle *dilepton01 = new CompositeParticle();
427     dilepton01->AddDaughter(GenLeptons->At(0));
428     dilepton01->AddDaughter(GenLeptons->At(1));
429     CompositeParticle *dilepton02 = new CompositeParticle();
430     dilepton02->AddDaughter(GenLeptons->At(0));
431     dilepton02->AddDaughter(GenLeptons->At(2));
432     CompositeParticle *dilepton03 = new CompositeParticle();
433     dilepton03->AddDaughter(GenLeptons->At(0));
434     dilepton03->AddDaughter(GenLeptons->At(3));
435     CompositeParticle *dilepton12 = new CompositeParticle();
436     dilepton12->AddDaughter(GenLeptons->At(1));
437     dilepton12->AddDaughter(GenLeptons->At(2));
438     CompositeParticle *dilepton13 = new CompositeParticle();
439     dilepton13->AddDaughter(GenLeptons->At(1));
440     dilepton13->AddDaughter(GenLeptons->At(3));
441     CompositeParticle *dilepton23 = new CompositeParticle();
442     dilepton23->AddDaughter(GenLeptons->At(2));
443     dilepton23->AddDaughter(GenLeptons->At(3));
444     hDGenLeptons[22]->Fill(TMath::Min(dilepton01->Mass(),999.999));
445     hDGenLeptons[22]->Fill(TMath::Min(dilepton02->Mass(),999.999));
446     hDGenLeptons[22]->Fill(TMath::Min(dilepton03->Mass(),999.999));
447     hDGenLeptons[22]->Fill(TMath::Min(dilepton12->Mass(),999.999));
448     hDGenLeptons[22]->Fill(TMath::Min(dilepton13->Mass(),999.999));
449     hDGenLeptons[22]->Fill(TMath::Min(dilepton23->Mass(),999.999));
450     CompositeParticle *fourlepton = new CompositeParticle();
451     fourlepton->AddDaughter(GenLeptons->At(0));
452     fourlepton->AddDaughter(GenLeptons->At(1));
453     fourlepton->AddDaughter(GenLeptons->At(2));
454     fourlepton->AddDaughter(GenLeptons->At(3));
455     hDGenLeptons[23]->Fill(TMath::Min(fourlepton->Mass(),999.999));
456 loizides 1.27 Double_t deltaR[6] = {MathUtils::DeltaR(GenLeptons->At(0)->Eta(),
457     GenLeptons->At(0)->Phi(),
458     GenLeptons->At(1)->Eta(),
459     GenLeptons->At(1)->Phi()),
460     MathUtils::DeltaR(GenLeptons->At(0)->Eta(),
461     GenLeptons->At(0)->Phi(),
462     GenLeptons->At(2)->Eta(),
463     GenLeptons->At(2)->Phi()),
464     MathUtils::DeltaR(GenLeptons->At(0)->Eta(),
465     GenLeptons->At(0)->Phi(),
466     GenLeptons->At(3)->Eta(),
467     GenLeptons->At(3)->Phi()),
468     MathUtils::DeltaR(GenLeptons->At(1)->Eta(),
469     GenLeptons->At(1)->Phi(),
470     GenLeptons->At(2)->Eta(),
471     GenLeptons->At(2)->Phi()),
472     MathUtils::DeltaR(GenLeptons->At(1)->Eta(),
473     GenLeptons->At(1)->Phi(),
474     GenLeptons->At(3)->Eta(),
475     GenLeptons->At(3)->Phi()),
476     MathUtils::DeltaR(GenLeptons->At(2)->Eta(),
477     GenLeptons->At(2)->Phi(),
478     GenLeptons->At(3)->Eta(),
479     GenLeptons->At(3)->Phi())};
480     Double_t deltaRMin = deltaR[0];
481     for(Int_t i=1; i<6; i++) if(deltaRMin > deltaR[i]) deltaRMin = deltaR[i];
482 ceballos 1.22 hDGenLeptons[24]->Fill(deltaRMin);
483    
484     delete dilepton01;
485     delete dilepton02;
486     delete dilepton03;
487     delete dilepton12;
488     delete dilepton13;
489     delete dilepton23;
490     delete fourlepton;
491     }
492     }
493     }
494     }
495 loizides 1.1
496 loizides 1.6 // all leptons
497 ceballos 1.3 hDGenAllLeptons[0]->Fill(GenAllLeptons->GetEntries());
498 loizides 1.5 for(UInt_t i=0; i<GenAllLeptons->GetEntries(); i++) {
499 ceballos 1.3 hDGenAllLeptons[1]->Fill(GenAllLeptons->At(i)->Pt());
500     hDGenAllLeptons[2]->Fill(GenAllLeptons->At(i)->Eta());
501 loizides 1.5 hDGenAllLeptons[3]->Fill(GenAllLeptons->At(i)->PhiDeg());
502 ceballos 1.3 }
503    
504 loizides 1.6 // taus
505 loizides 1.1 hDGenTaus[0]->Fill(GenTaus->GetEntries());
506 loizides 1.5 for(UInt_t i=0; i<GenTaus->GetEntries(); i++) {
507 loizides 1.1 hDGenTaus[1]->Fill(GenTaus->At(i)->Pt());
508     hDGenTaus[2]->Fill(GenTaus->At(i)->Eta());
509 loizides 1.5 hDGenTaus[3]->Fill(GenTaus->At(i)->PhiDeg());
510 loizides 1.1 }
511    
512 loizides 1.6 // neutrinos
513 loizides 1.1 hDGenNeutrinos[0]->Fill(GenNeutrinos->GetEntries());
514     CompositeParticle *neutrinoTotal = new CompositeParticle();
515 loizides 1.5 for(UInt_t i=0; i<GenNeutrinos->GetEntries(); i++) {
516     if (GenNeutrinos->At(i)->HasMother())
517 loizides 1.1 neutrinoTotal->AddDaughter(GenNeutrinos->At(i));
518     }
519 loizides 1.5 if (GenNeutrinos->GetEntries() > 0) {
520 loizides 1.1 hDGenNeutrinos[1]->Fill(neutrinoTotal->Pt());
521     hDGenNeutrinos[2]->Fill(neutrinoTotal->Eta());
522 loizides 1.5 hDGenNeutrinos[3]->Fill(neutrinoTotal->PhiDeg());
523 loizides 1.1 }
524     delete neutrinoTotal;
525    
526 loizides 1.6 // quarks
527 loizides 1.1 hDGenQuarks[0]->Fill(GenQuarks->GetEntries());
528 loizides 1.5 for(UInt_t i=0; i<GenQuarks->GetEntries(); i++) {
529     for(UInt_t j=i+1; j<GenQuarks->GetEntries(); j++) {
530 loizides 1.1 CompositeParticle *dijet = new CompositeParticle();
531     dijet->AddDaughter(GenQuarks->At(i));
532     dijet->AddDaughter(GenQuarks->At(j));
533     hDGenQuarks[1]->Fill(dijet->Pt());
534     hDGenQuarks[2]->Fill(dijet->Mass());
535 loizides 1.5 if (TMath::Abs(GenQuarks->At(i)->Eta()) < 2.5 &&
536     TMath::Abs(GenQuarks->At(j)->Eta()) < 2.5) {
537 loizides 1.1 hDGenQuarks[3]->Fill(dijet->Pt());
538     hDGenQuarks[4]->Fill(dijet->Mass());
539     }
540     delete dijet;
541     }
542 ceballos 1.2 // b quark info
543 loizides 1.5 if (GenQuarks->At(i)->AbsPdgId() == 5) {
544 ceballos 1.2 hDGenQuarks[5]->Fill(GenQuarks->At(i)->Pt());
545     hDGenQuarks[6]->Fill(GenQuarks->At(i)->Eta());
546     hDGenQuarks[7]->Fill(GenQuarks->At(i)->Phi());
547 ceballos 1.22 if (GenLeptons->GetEntries() >= 2 &&
548     GenLeptons->At(0)->Pt() > 20 &&
549     GenLeptons->At(1)->Pt() > 15) {
550     if (TMath::Abs(GenLeptons->At(0)->Eta()) < 2.5 &&
551     TMath::Abs(GenLeptons->At(1)->Eta()) < 2.5) {
552 ceballos 1.2 hDGenQuarks[8]->Fill(GenQuarks->At(i)->Pt());
553     hDGenQuarks[9]->Fill(GenQuarks->At(i)->Eta());
554     hDGenQuarks[10]->Fill(GenQuarks->At(i)->Phi());
555     }
556     }
557     }
558     // t quark info
559 loizides 1.5 else if (GenQuarks->At(i)->AbsPdgId() == 6) {
560 ceballos 1.2 hDGenQuarks[11]->Fill(GenQuarks->At(i)->Pt());
561     hDGenQuarks[12]->Fill(GenQuarks->At(i)->Eta());
562     hDGenQuarks[13]->Fill(GenQuarks->At(i)->Phi());
563     }
564     // light quark info
565     else {
566     hDGenQuarks[14]->Fill(GenQuarks->At(i)->Pt());
567     hDGenQuarks[15]->Fill(GenQuarks->At(i)->Eta());
568     hDGenQuarks[16]->Fill(GenQuarks->At(i)->Phi());
569     }
570 loizides 1.1 }
571    
572 loizides 1.6 // wbf
573 loizides 1.5 if (GenqqHs->GetEntries() == 2) {
574 loizides 1.1 hDGenWBF[0]->Fill(MathUtils::DeltaPhi(GenqqHs->At(0)->Phi(),
575     GenqqHs->At(1)->Phi()) * 180./ TMath::Pi());
576 loizides 1.5 hDGenWBF[1]->Fill(TMath::Abs(GenqqHs->At(0)->Eta()-GenqqHs->At(1)->Eta()));
577 loizides 1.1 hDGenWBF[2]->Fill(TMath::Max(GenqqHs->At(0)->Pt(),GenqqHs->At(1)->Pt()));
578     hDGenWBF[3]->Fill(TMath::Min(GenqqHs->At(0)->Pt(),GenqqHs->At(1)->Pt()));
579     CompositeParticle *diqq = new CompositeParticle();
580     diqq->AddDaughter(GenqqHs->At(0));
581     diqq->AddDaughter(GenqqHs->At(1));
582     hDGenWBF[4]->Fill(diqq->Mass());
583     delete diqq;
584     }
585    
586 loizides 1.6 // bosons
587 loizides 1.1 hDGenBosons[0]->Fill(GenBosons->GetEntries());
588 loizides 1.5 for(UInt_t i=0; i<GenBosons->GetEntries(); i++) {
589 loizides 1.1 hDGenBosons[1]->Fill(GenBosons->At(i)->Pt());
590     hDGenBosons[2]->Fill(GenBosons->At(i)->Eta());
591     hDGenBosons[3]->Fill(GenBosons->At(i)->Mass());
592     }
593 ceballos 1.10
594     // photons
595     hDGenPhotons[0]->Fill(GenPhotons->GetEntries());
596     for(UInt_t i=0; i<GenPhotons->GetEntries(); i++) {
597     hDGenPhotons[1]->Fill(GenPhotons->At(i)->Pt());
598     hDGenPhotons[2]->Fill(GenPhotons->At(i)->Eta());
599     }
600 loizides 1.1 }
601     }
602    
603     //--------------------------------------------------------------------------------------------------
604     void GeneratorMod::SlaveBegin()
605     {
606 loizides 1.5 // Book branch and histograms if wanted.
607    
608 loizides 1.1 ReqBranch(fMCPartName, fParticles);
609    
610 loizides 1.5 // fill histograms
611 loizides 1.20 if (GetFillHist()) {
612 loizides 1.5 char sb[1024];
613 ceballos 1.30 // MET
614     sprintf(sb,"hDGenMet_%d", 0); hDGenMet[0] = new TH1D(sb,sb,200,0,200);
615     sprintf(sb,"hDGenMet_%d", 1); hDGenMet[1] = new TH1D(sb,sb,400,-200,200);
616     sprintf(sb,"hDGenMet_%d", 2); hDGenMet[2] = new TH1D(sb,sb,400,-200,200);
617     sprintf(sb,"hDGenMet_%d", 3); hDGenMet[3] = new TH1D(sb,sb,400,-1000,1000);
618     for(Int_t i=0; i<4; i++) AddOutput(hDGenMet[i]);
619    
620 loizides 1.6 // leptons from W
621 loizides 1.1 sprintf(sb,"hDGenLeptons_%d", 0); hDGenLeptons[0] = new TH1D(sb,sb,10,-0.5,9.5);
622     sprintf(sb,"hDGenLeptons_%d", 1); hDGenLeptons[1] = new TH1D(sb,sb,100,0.0,200.0);
623     sprintf(sb,"hDGenLeptons_%d", 2); hDGenLeptons[2] = new TH1D(sb,sb,50,0.0,5.0);
624     sprintf(sb,"hDGenLeptons_%d", 3); hDGenLeptons[3] = new TH1D(sb,sb,90,0.0,180.0);
625     sprintf(sb,"hDGenLeptons_%d", 4); hDGenLeptons[4] = new TH1D(sb,sb,1000,0.0,1000.0);
626     sprintf(sb,"hDGenLeptons_%d", 5); hDGenLeptons[5] = new TH1D(sb,sb,50,0.0,5.0);
627     sprintf(sb,"hDGenLeptons_%d", 6); hDGenLeptons[6] = new TH1D(sb,sb,50,0.0,5.0);
628     sprintf(sb,"hDGenLeptons_%d", 7); hDGenLeptons[7] = new TH1D(sb,sb,100,0.0,200.0);
629     sprintf(sb,"hDGenLeptons_%d", 8); hDGenLeptons[8] = new TH1D(sb,sb,100,0.0,200.0);
630     sprintf(sb,"hDGenLeptons_%d", 9); hDGenLeptons[9] = new TH1D(sb,sb,1000,0.0,1000.0);
631     sprintf(sb,"hDGenLeptons_%d",10); hDGenLeptons[10] = new TH1D(sb,sb,90,0.0,180.0);
632 ceballos 1.22 sprintf(sb,"hDGenLeptons_%d",11); hDGenLeptons[11] = new TH1D(sb,sb,100,0.0,5.0);
633     sprintf(sb,"hDGenLeptons_%d",12); hDGenLeptons[12] = new TH1D(sb,sb,100,0.0,200.0);
634     sprintf(sb,"hDGenLeptons_%d",13); hDGenLeptons[13] = new TH1D(sb,sb,100,0.0,200.0);
635     sprintf(sb,"hDGenLeptons_%d",14); hDGenLeptons[14] = new TH1D(sb,sb,100,0.0,200.0);
636     sprintf(sb,"hDGenLeptons_%d",15); hDGenLeptons[15] = new TH1D(sb,sb,1000,0.0,1000.0);
637     sprintf(sb,"hDGenLeptons_%d",16); hDGenLeptons[16] = new TH1D(sb,sb,1000,0.0,1000.0);
638     sprintf(sb,"hDGenLeptons_%d",17); hDGenLeptons[17] = new TH1D(sb,sb,100,0.0,5.0);
639     sprintf(sb,"hDGenLeptons_%d",18); hDGenLeptons[18] = new TH1D(sb,sb,100,0.0,200.0);
640     sprintf(sb,"hDGenLeptons_%d",19); hDGenLeptons[19] = new TH1D(sb,sb,100,0.0,200.0);
641     sprintf(sb,"hDGenLeptons_%d",20); hDGenLeptons[20] = new TH1D(sb,sb,100,0.0,200.0);
642     sprintf(sb,"hDGenLeptons_%d",21); hDGenLeptons[21] = new TH1D(sb,sb,100,0.0,200.0);
643     sprintf(sb,"hDGenLeptons_%d",22); hDGenLeptons[22] = new TH1D(sb,sb,1000,0.0,1000.0);
644     sprintf(sb,"hDGenLeptons_%d",23); hDGenLeptons[23] = new TH1D(sb,sb,1000,0.0,1000.0);
645     sprintf(sb,"hDGenLeptons_%d",24); hDGenLeptons[24] = new TH1D(sb,sb,100,0.0,5.0);
646     for(Int_t i=0; i<25; i++) AddOutput(hDGenLeptons[i]);
647 loizides 1.1
648 loizides 1.6 // all leptons
649 ceballos 1.3 sprintf(sb,"hDGenAllLeptons_%d", 0); hDGenAllLeptons[0] = new TH1D(sb,sb,10,-0.5,9.5);
650     sprintf(sb,"hDGenAllLeptons_%d", 1); hDGenAllLeptons[1] = new TH1D(sb,sb,100,0.0,200.0);
651 ceballos 1.14 sprintf(sb,"hDGenAllLeptons_%d", 2); hDGenAllLeptons[2] = new TH1D(sb,sb,100,-5.0,5.0);
652 ceballos 1.3 sprintf(sb,"hDGenAllLeptons_%d", 3); hDGenAllLeptons[3] = new TH1D(sb,sb,90,0.0,180.0);
653 loizides 1.5 for(Int_t i=0; i<4; i++) AddOutput(hDGenAllLeptons[i]);
654 ceballos 1.3
655 loizides 1.6 // taus
656 loizides 1.1 sprintf(sb,"hDGenTaus_%d", 0); hDGenTaus[0] = new TH1D(sb,sb,10,-0.5,9.5);
657     sprintf(sb,"hDGenTaus_%d", 1); hDGenTaus[1] = new TH1D(sb,sb,100,0.0,200.0);
658     sprintf(sb,"hDGenTaus_%d", 2); hDGenTaus[2] = new TH1D(sb,sb,100,-5.0,5.0);
659     sprintf(sb,"hDGenTaus_%d", 3); hDGenTaus[3] = new TH1D(sb,sb,90,0.0,180.0);
660 loizides 1.5 for(Int_t i=0; i<4; i++) AddOutput(hDGenTaus[i]);
661 loizides 1.1
662 loizides 1.6 // neutrinos
663 loizides 1.1 sprintf(sb,"hDGenNeutrinos_%d", 0); hDGenNeutrinos[0] = new TH1D(sb,sb,10,-0.5,9.5);
664     sprintf(sb,"hDGenNeutrinos_%d", 1); hDGenNeutrinos[1] = new TH1D(sb,sb,100,0.0,200.0);
665     sprintf(sb,"hDGenNeutrinos_%d", 2); hDGenNeutrinos[2] = new TH1D(sb,sb,100,-5.0,5.0);
666     sprintf(sb,"hDGenNeutrinos_%d", 3); hDGenNeutrinos[3] = new TH1D(sb,sb,90,0.0,180.0);
667 loizides 1.5 for(Int_t i=0; i<4; i++) AddOutput(hDGenNeutrinos[i]);
668 loizides 1.1
669 loizides 1.6 // quarks
670 loizides 1.1 sprintf(sb,"hDGenQuarks_%d", 0); hDGenQuarks[0] = new TH1D(sb,sb,10,-0.5,9.5);
671     sprintf(sb,"hDGenQuarks_%d", 1); hDGenQuarks[1] = new TH1D(sb,sb,200,0.0,400.);
672     sprintf(sb,"hDGenQuarks_%d", 2); hDGenQuarks[2] = new TH1D(sb,sb,2000,0.0,2000.);
673     sprintf(sb,"hDGenQuarks_%d", 3); hDGenQuarks[3] = new TH1D(sb,sb,200,0.0,400.);
674     sprintf(sb,"hDGenQuarks_%d", 4); hDGenQuarks[4] = new TH1D(sb,sb,2000,0.0,2000.);
675 ceballos 1.2 sprintf(sb,"hDGenQuarks_%d", 5); hDGenQuarks[5] = new TH1D(sb,sb,200,0.0,400.);
676     sprintf(sb,"hDGenQuarks_%d", 6); hDGenQuarks[6] = new TH1D(sb,sb,200,-10.0,10.);
677 loizides 1.5 sprintf(sb,"hDGenQuarks_%d", 7); hDGenQuarks[7] = new TH1D(sb,sb,200,-TMath::Pi(),
678     TMath::Pi());
679 ceballos 1.2 sprintf(sb,"hDGenQuarks_%d", 8); hDGenQuarks[8] = new TH1D(sb,sb,200,0.0,400.);
680     sprintf(sb,"hDGenQuarks_%d", 9); hDGenQuarks[9] = new TH1D(sb,sb,200,-10.0,10.);
681 loizides 1.5 sprintf(sb,"hDGenQuarks_%d",10); hDGenQuarks[10] = new TH1D(sb,sb,200,-TMath::Pi(),
682     TMath::Pi());
683 ceballos 1.2 sprintf(sb,"hDGenQuarks_%d",11); hDGenQuarks[11] = new TH1D(sb,sb,200,0.0,400.);
684     sprintf(sb,"hDGenQuarks_%d",12); hDGenQuarks[12] = new TH1D(sb,sb,200,-10.0,10.);
685 loizides 1.5 sprintf(sb,"hDGenQuarks_%d",13); hDGenQuarks[13] = new TH1D(sb,sb,200,-TMath::Pi(),
686     TMath::Pi());
687 ceballos 1.2 sprintf(sb,"hDGenQuarks_%d",14); hDGenQuarks[14] = new TH1D(sb,sb,200,0.0,400.);
688     sprintf(sb,"hDGenQuarks_%d",15); hDGenQuarks[15] = new TH1D(sb,sb,200,-10.0,10.);
689 loizides 1.5 sprintf(sb,"hDGenQuarks_%d",16); hDGenQuarks[16] = new TH1D(sb,sb,200,-TMath::Pi(),
690     TMath::Pi());
691     for(Int_t i=0; i<17; i++) AddOutput(hDGenQuarks[i]);
692 loizides 1.1
693     // qqH
694     sprintf(sb,"hDGenWBF_%d", 0); hDGenWBF[0] = new TH1D(sb,sb,90,0.0,180.);
695     sprintf(sb,"hDGenWBF_%d", 1); hDGenWBF[1] = new TH1D(sb,sb,100,0.0,10.);
696     sprintf(sb,"hDGenWBF_%d", 2); hDGenWBF[2] = new TH1D(sb,sb,200,0.0,400.);
697     sprintf(sb,"hDGenWBF_%d", 3); hDGenWBF[3] = new TH1D(sb,sb,200,0.0,400.);
698     sprintf(sb,"hDGenWBF_%d", 4); hDGenWBF[4] = new TH1D(sb,sb,200,0.0,4000.);
699 loizides 1.5 for(Int_t i=0; i<5; i++) AddOutput(hDGenWBF[i]);
700 loizides 1.1
701 loizides 1.6 // bosons
702 loizides 1.1 sprintf(sb,"hDGenBosons_%d", 0); hDGenBosons[0] = new TH1D(sb,sb,10,-0.5,9.5);
703     sprintf(sb,"hDGenBosons_%d", 1); hDGenBosons[1] = new TH1D(sb,sb,200,0.0,400.0);
704     sprintf(sb,"hDGenBosons_%d", 2); hDGenBosons[2] = new TH1D(sb,sb,100,-5.0,5.0);
705     sprintf(sb,"hDGenBosons_%d", 3); hDGenBosons[3] = new TH1D(sb,sb,2000,0.0,2000.0);
706 loizides 1.5 for(Int_t i=0; i<4; i++) AddOutput(hDGenBosons[i]);
707 ceballos 1.10
708     // photons
709     sprintf(sb,"hDGenPhotons_%d", 0); hDGenPhotons[0] = new TH1D(sb,sb,10,-0.5,9.5);
710     sprintf(sb,"hDGenPhotons_%d", 1); hDGenPhotons[1] = new TH1D(sb,sb,200,0.0,400.0);
711 ceballos 1.14 sprintf(sb,"hDGenPhotons_%d", 2); hDGenPhotons[2] = new TH1D(sb,sb,100,-5.0,5.0);
712 ceballos 1.10 for(Int_t i=0; i<3; i++) AddOutput(hDGenPhotons[i]);
713 ceballos 1.16
714     // auxiliar
715     sprintf(sb,"hDVMass_%d", 0); hDVMass[0] = new TH1D(sb,sb,200,0.,200.);
716     sprintf(sb,"hDVMass_%d", 1); hDVMass[1] = new TH1D(sb,sb,200,0.,200.);
717     sprintf(sb,"hDVMass_%d", 2); hDVMass[2] = new TH1D(sb,sb,200,0.,200.);
718     sprintf(sb,"hDVMass_%d", 3); hDVMass[3] = new TH1D(sb,sb,200,0.,200.);
719     sprintf(sb,"hDVMass_%d", 4); hDVMass[4] = new TH1D(sb,sb,200,0.,200.);
720     sprintf(sb,"hDVMass_%d", 5); hDVMass[5] = new TH1D(sb,sb,200,0.,200.);
721     sprintf(sb,"hDVMass_%d", 6); hDVMass[6] = new TH1D(sb,sb,200,0.,200.);
722     sprintf(sb,"hDVMass_%d", 7); hDVMass[7] = new TH1D(sb,sb,200,0.,200.);
723     sprintf(sb,"hDVMass_%d", 8); hDVMass[8] = new TH1D(sb,sb,200,0.,200.);
724     sprintf(sb,"hDVMass_%d", 9); hDVMass[9] = new TH1D(sb,sb,200,0.,200.);
725     for(Int_t i=0; i<10; i++) AddOutput(hDVMass[i]);
726 loizides 1.1 }
727     }