ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/src/GeneratorMod.cc
Revision: 1.29
Committed: Mon Mar 30 12:40:05 2009 UTC (16 years, 1 month ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.28: +4 -2 lines
Log Message:
Take good leptons also from H->tautau and include zprime and wprime as well.

File Contents

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