ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/src/GeneratorMod.cc
Revision: 1.44
Committed: Wed Jun 17 16:45:34 2009 UTC (15 years, 10 months ago) by ceballos
Content type: text/plain
Branch: MAIN
Changes since 1.43: +419 -126 lines
Log Message:
Full renaming of all histograms

File Contents

# User Rev Content
1 ceballos 1.44 // $Id: GeneratorMod.cc,v 1.43 2009/06/15 15:00: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 ceballos 1.32 fPrintDebug(kFALSE),
17 loizides 1.1 fMCPartName(Names::gkMCPartBrn),
18 ceballos 1.30 fMCMETName(ModNames::gkMCMETName),
19 loizides 1.8 fMCLeptonsName(ModNames::gkMCLeptonsName),
20     fMCAllLeptonsName(ModNames::gkMCAllLeptonsName),
21     fMCTausName(ModNames::gkMCTausName),
22     fMCNeutrinosName(ModNames::gkMCNeutrinosName),
23     fMCQuarksName(ModNames::gkMCQuarksName),
24     fMCqqHsName(ModNames::gkMCqqHsName),
25     fMCBosonsName(ModNames::gkMCBosonsName),
26 ceballos 1.10 fMCPhotonsName(ModNames::gkMCPhotonsName),
27 ceballos 1.32 fMCRadPhotonsName(ModNames::gkMCRadPhotonsName),
28     fMCISRPhotonsName(ModNames::gkMCISRPhotonsName),
29 ceballos 1.14 fPtLeptonMin(0.0),
30     fEtaLeptonMax(5.0),
31     fPtPhotonMin(0.0),
32 loizides 1.15 fEtaPhotonMax(5.0),
33 ceballos 1.32 fPtRadPhotonMin(0.0),
34     fEtaRadPhotonMax(5.0),
35 loizides 1.27 fPdgIdCut(0),
36     fMassMinCut(-FLT_MAX),
37     fMassMaxCut(FLT_MAX),
38 ceballos 1.34 fApplyISRFilter(kFALSE),
39 loizides 1.15 fParticles(0)
40 loizides 1.1 {
41 ceballos 1.42 // Constructor
42 loizides 1.1 }
43    
44     //--------------------------------------------------------------------------------------------------
45     void GeneratorMod::Process()
46     {
47 loizides 1.5 // Process entries of the tree.
48 loizides 1.1
49 loizides 1.5 // these arrays will be filled in the loop of particles
50 ceballos 1.30 MetOArr *GenMet = new MetOArr;
51     GenMet->SetName(fMCMETName);
52     GenMet->SetOwner(kTRUE);
53 loizides 1.9 MCParticleOArr *GenLeptons = new MCParticleOArr;
54 loizides 1.13 GenLeptons->SetName(fMCLeptonsName);
55 loizides 1.9 MCParticleOArr *GenAllLeptons = new MCParticleOArr;
56 loizides 1.13 GenAllLeptons->SetName(fMCAllLeptonsName);
57 loizides 1.9 MCParticleOArr *GenTaus = new MCParticleOArr;
58 loizides 1.13 GenTaus->SetName(fMCTausName);
59     GenTaus->SetOwner(kTRUE);
60 loizides 1.9 MCParticleOArr *GenNeutrinos = new MCParticleOArr;
61 loizides 1.13 GenNeutrinos->SetName(fMCNeutrinosName);
62 loizides 1.9 MCParticleOArr *GenQuarks = new MCParticleOArr;
63 loizides 1.13 GenQuarks->SetName(fMCQuarksName);
64 loizides 1.9 MCParticleOArr *GenqqHs = new MCParticleOArr;
65 loizides 1.13 GenqqHs->SetName(fMCqqHsName);
66 loizides 1.9 MCParticleOArr *GenBosons = new MCParticleOArr;
67 loizides 1.13 GenBosons->SetName(fMCBosonsName);
68 ceballos 1.10 MCParticleOArr *GenPhotons = new MCParticleOArr;
69 loizides 1.13 GenPhotons->SetName(fMCPhotonsName);
70 ceballos 1.32 MCParticleOArr *GenRadPhotons = new MCParticleOArr;
71     GenRadPhotons->SetName(fMCRadPhotonsName);
72     MCParticleOArr *GenISRPhotons = new MCParticleOArr;
73     GenISRPhotons->SetName(fMCISRPhotonsName);
74    
75 ceballos 1.42 MCParticleOArr *GenTempMG0 = new MCParticleOArr;
76    
77 loizides 1.40 if(fPrintDebug)
78     printf("\n************ Next Event ************\n\n");
79 loizides 1.1
80 loizides 1.5 // load MCParticle branch
81 loizides 1.41 LoadEventObject(fMCPartName, fParticles);
82 loizides 1.5
83 ceballos 1.42 Bool_t isOld = kFALSE;
84     Int_t sumV[2] = {0, 0}; // W, Z
85     Int_t sumVVFlavor[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
86 ceballos 1.30 Double_t totalMET[3] = {0.0, 0.0, 0.0};
87 loizides 1.6 Bool_t isqqH = kFALSE;
88 loizides 1.5 for (UInt_t i=0; i<fParticles->GetEntries(); ++i) {
89 loizides 1.7 const MCParticle *p = fParticles->At(i);
90 ceballos 1.32
91 loizides 1.40 if(fPrintDebug)
92     p->Print("l");
93 ceballos 1.32
94 loizides 1.40 // rad photons
95 ceballos 1.34 if(p->Is(MCParticle::kGamma) && p->HasMother() && p->Mother()->Status() == 3 &&
96 ceballos 1.33 (p->Mother()->Is(MCParticle::kEl) || p->Mother()->Is(MCParticle::kMu) ||
97 ceballos 1.34 p->Mother()->Is(MCParticle::kTau)) &&
98 ceballos 1.32 p->Pt() > fPtRadPhotonMin && p->AbsEta() < fEtaRadPhotonMax) {
99     GenRadPhotons->Add(p);
100     }
101    
102     // ISR photons
103     if(p->Is(MCParticle::kGamma) && p->HasMother() && p->Mother()->IsQuark()) {
104     GenISRPhotons->Add(p);
105     }
106    
107 ceballos 1.30 // MET computation at generation level
108     if (p->Status() == 1 && !p->IsNeutrino()) {
109     totalMET[0] = totalMET[0] + p->Px();
110     totalMET[1] = totalMET[1] + p->Py();
111     totalMET[2] = totalMET[2] + p->Pz();
112     }
113 loizides 1.5
114     if (!p->IsGenerated()) continue;
115    
116     // muons/electrons from W/Z decays
117 loizides 1.7 if ((p->Is(MCParticle::kEl) || p->Is(MCParticle::kMu)) && p->Status() == 1) {
118 ceballos 1.14 if (p->Pt() > fPtLeptonMin && p->AbsEta() < fEtaLeptonMax) {
119 loizides 1.5 GenAllLeptons->Add(p);
120     }
121 loizides 1.6 Bool_t isGoodLepton = kFALSE;
122 loizides 1.7 const MCParticle *pm = p;
123 loizides 1.5 while (pm->HasMother() && isGoodLepton == kFALSE) {
124 loizides 1.21 if (pm->PdgId() == 92) // string reached, terminate loop
125     break;
126 loizides 1.29 if (pm->Mother()->Is(MCParticle::kZ) || pm->Mother()->Is(MCParticle::kW) ||
127     pm->Mother()->Is(MCParticle::kZp) || pm->Mother()->Is(MCParticle::kWp) ||
128     pm->Mother()->Is(MCParticle::kH)) {
129 loizides 1.5 GenLeptons->Add(p);
130     isGoodLepton = kTRUE;
131 loizides 1.7 break;
132 loizides 1.8 } else if (pm->Mother()->Is(MCParticle::kPi0) || pm->Mother()->Is(MCParticle::kEta)) {
133 loizides 1.7 // this is fake, but it is a trick to get rid of these cases and abort the loop
134     break;
135     }
136     pm = pm->Mother();
137 loizides 1.1 }
138 loizides 1.5 }
139    
140 loizides 1.7 // hadronic taus
141     else if (p->Is(MCParticle::kTau) && p->Status() == 2) {
142     if (!p->HasDaughter(MCParticle::kEl) && !p->HasDaughter(MCParticle::kMu)) {
143     const MCParticle *tv = p->FindDaughter(MCParticle::kTauNu);
144     if (tv) {
145     MCParticle *pm_f = new MCParticle(*p);
146     pm_f->SetMom(p->Px()-tv->Px(), p->Py()-tv->Py(),
147     p->Pz()-tv->Pz(), p->E()-tv->E());
148     GenTaus->AddOwned(pm_f);
149     } else {
150 loizides 1.18 SendError(kWarning, "Process", "Could not find a tau neutrino!");
151 loizides 1.5 }
152 loizides 1.1 }
153 loizides 1.5 }
154 loizides 1.1
155 loizides 1.5 // neutrinos
156 loizides 1.7 else if (p->Status() == 1 && p->IsNeutrino()) {
157 loizides 1.5 GenNeutrinos->Add(p);
158     }
159 loizides 1.1
160 loizides 1.5 // quarks from W/Z decays or top particles
161 loizides 1.7 else if (p->IsQuark() && p->HasMother()) {
162     if (p->Mother()->Is(MCParticle::kZ) || p->Mother()->Is(MCParticle::kW) ||
163     p->Is(MCParticle::kTop) || p->Mother()->Is(MCParticle::kTop)) {
164 loizides 1.5 GenQuarks->Add(p);
165 loizides 1.1 }
166 loizides 1.5 }
167 loizides 1.1
168 loizides 1.5 // qqH, information about the forward jets
169 loizides 1.8 else if (isqqH == kFALSE && p->Is(MCParticle::kH)) {
170 loizides 1.5 isqqH = kTRUE;
171 loizides 1.17 const MCParticle *pq1 = fParticles->At(i-1);
172     const MCParticle *pq2 = fParticles->At(i-2);
173 loizides 1.7 if (!pq1 || !pq2) {
174     SendError(kWarning, "Process", "Could not find quark pair!");
175 loizides 1.8 } else if (pq1->IsQuark() && pq2->IsQuark() &&
176     pq1->HasMother() && pq2->HasMother() &&
177 ceballos 1.36 pq1->Mother() == pq2->Mother()) {
178 loizides 1.5 GenqqHs->Add(pq1);
179     GenqqHs->Add(pq2);
180 loizides 1.1 }
181 ceballos 1.23
182 loizides 1.7 if (p->Status() == 3)
183 loizides 1.24 GenBosons->Add(p); // take higgs boson in account here rather in next else if
184 loizides 1.5 }
185 loizides 1.1
186 loizides 1.5 // information about bosons: W, Z, h, Z', W', H0, A0, H+
187 loizides 1.7 else if (p->Status() == 3 &&
188     (p->Is(MCParticle::kZ) || p->Is(MCParticle::kW) || p->Is(MCParticle::kH) ||
189     p->Is(MCParticle::kZp) || p->Is(MCParticle::kZpp) ||
190     p->Is(MCParticle::kH0) || p->Is(MCParticle::kA0) || p->Is(MCParticle::kHp))) {
191 loizides 1.5 GenBosons->Add(p);
192 ceballos 1.42 if (p->Is(MCParticle::kW)) sumV[0]++;
193     else if(p->Is(MCParticle::kZ)) sumV[1]++;
194     if (p->Is(MCParticle::kW) && p->HasDaughter(MCParticle::kMu) && p->HasDaughter(MCParticle::kMuNu))
195     sumVVFlavor[0]++;
196     else if(p->Is(MCParticle::kW) && p->HasDaughter(MCParticle::kEl) && p->HasDaughter(MCParticle::kElNu))
197     sumVVFlavor[1]++;
198     else if(p->Is(MCParticle::kW) && p->HasDaughter(MCParticle::kTau) && p->HasDaughter(MCParticle::kTauNu))
199     sumVVFlavor[2]++;
200    
201     else if(p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kMu,kTRUE) && p->HasDaughter(-1*MCParticle::kMu,kTRUE))
202     sumVVFlavor[3]++;
203     else if(p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kEl,kTRUE) && p->HasDaughter(-1*MCParticle::kEl,kTRUE))
204     sumVVFlavor[4]++;
205     else if(p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kTau,kTRUE) && p->HasDaughter(-1*MCParticle::kTau,kTRUE))
206     sumVVFlavor[5]++;
207    
208     else if(p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kMuNu,kTRUE) && p->HasDaughter(-1*MCParticle::kMuNu,kTRUE))
209     sumVVFlavor[6]++;
210     else if(p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kElNu,kTRUE) && p->HasDaughter(-1*MCParticle::kElNu,kTRUE))
211     sumVVFlavor[7]++;
212     else if(p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kTauNu,kTRUE) && p->HasDaughter(-1*MCParticle::kTauNu,kTRUE))
213     sumVVFlavor[8]++;
214 loizides 1.1 }
215 ceballos 1.10
216 ceballos 1.14 // photons
217 ceballos 1.10 else if (p->Status() == 1 && p->Is(MCParticle::kGamma) &&
218 ceballos 1.14 p->Pt() > fPtPhotonMin && p->AbsEta() < fEtaPhotonMax) {
219 ceballos 1.10 GenPhotons->Add(p);
220     }
221    
222 loizides 1.18 // W/Z -> lnu for Madgraph
223 loizides 1.28 if (p->IsParton() && p->NDaughters() >= 2) {
224 ceballos 1.16 CompositeParticle *diBoson = new CompositeParticle();
225 loizides 1.18 if (p->HasDaughter(MCParticle::kMu) && p->HasDaughter(MCParticle::kMuNu)) {
226 ceballos 1.42 isOld = kFALSE;
227     for(UInt_t nl = 0; nl < GenTempMG0->GetEntries(); nl++){
228     if(p->FindDaughter(MCParticle::kMu) == GenTempMG0->At(nl)) {
229     isOld = kTRUE;
230     break;
231     }
232     }
233     if(isOld == kFALSE){
234     GenTempMG0->Add(p->FindDaughter(MCParticle::kMu));
235     diBoson->AddDaughter(p->FindDaughter(MCParticle::kMu));
236     diBoson->AddDaughter(p->FindDaughter(MCParticle::kMuNu));
237     sumV[0]++;
238     sumVVFlavor[0]++;
239     if (GetFillHist())
240     hDVMass[0]->Fill(TMath::Min(diBoson->Mass(),199.999));
241     const MCParticle *tmp_mu = p->FindDaughter(MCParticle::kMu);
242     while (tmp_mu->HasDaughter(MCParticle::kMu) &&
243     tmp_mu->FindDaughter(MCParticle::kMu)->IsGenerated())
244     tmp_mu = tmp_mu->FindDaughter(MCParticle::kMu);
245    
246     GenLeptons->Add(tmp_mu);
247     }
248     }
249     if (p->HasDaughter(MCParticle::kEl) && p->HasDaughter(MCParticle::kElNu)) {
250     isOld = kFALSE;
251     for(UInt_t nl = 0; nl < GenTempMG0->GetEntries(); nl++){
252     if(p->FindDaughter(MCParticle::kEl) == GenTempMG0->At(nl)) {
253     isOld = kTRUE;
254     break;
255     }
256     }
257     if(isOld == kFALSE){
258     GenTempMG0->Add(p->FindDaughter(MCParticle::kEl));
259     diBoson->AddDaughter(p->FindDaughter(MCParticle::kEl));
260     diBoson->AddDaughter(p->FindDaughter(MCParticle::kElNu));
261     sumV[0]++;
262     sumVVFlavor[1]++;
263     if (GetFillHist())
264     hDVMass[1]->Fill(TMath::Min(diBoson->Mass(),199.999));
265     const MCParticle *tmp_e = p->FindDaughter(MCParticle::kEl);
266     while (tmp_e->HasDaughter(MCParticle::kEl) &&
267     tmp_e->FindDaughter(MCParticle::kEl)->IsGenerated())
268     tmp_e = tmp_e->FindDaughter(MCParticle::kEl);
269     GenLeptons->Add(tmp_e);
270     }
271     }
272     if (p->HasDaughter(MCParticle::kTau) && p->HasDaughter(MCParticle::kTauNu)) {
273     isOld = kFALSE;
274     for(UInt_t nl = 0; nl < GenTempMG0->GetEntries(); nl++){
275     if(p->FindDaughter(MCParticle::kTau) == GenTempMG0->At(nl)) {
276     isOld = kTRUE;
277     break;
278     }
279     }
280     if(isOld == kFALSE){
281     GenTempMG0->Add(p->FindDaughter(MCParticle::kTau));
282     diBoson->AddDaughter(p->FindDaughter(MCParticle::kTau));
283     diBoson->AddDaughter(p->FindDaughter(MCParticle::kTauNu));
284     sumV[0]++;
285     sumVVFlavor[2]++;
286     if (GetFillHist())
287     hDVMass[2]->Fill(TMath::Min(diBoson->Mass(),199.999));
288     const MCParticle *tau = p->FindDaughter(MCParticle::kTau);
289     if (tau->HasDaughter(MCParticle::kMu))
290     GenLeptons->Add(tau->FindDaughter(MCParticle::kMu));
291     if (tau->HasDaughter(MCParticle::kEl))
292     GenLeptons->Add(tau->FindDaughter(MCParticle::kEl));
293     if (tau->HasDaughter(MCParticle::kTau)) {
294     const MCParticle *tau_second = tau->FindDaughter(MCParticle::kTau);
295     if (tau_second->HasDaughter(MCParticle::kMu))
296     GenLeptons->Add(tau_second->FindDaughter(MCParticle::kMu));
297     if (tau_second->HasDaughter(MCParticle::kEl))
298     GenLeptons->Add(tau_second->FindDaughter(MCParticle::kEl));
299     }
300     }
301     }
302     if (p->HasDaughter(MCParticle::kMu,kTRUE) && p->HasDaughter(-1*MCParticle::kMu,kTRUE)) {
303     isOld = kFALSE;
304     for(UInt_t nl = 0; nl < GenTempMG0->GetEntries(); nl++){
305     if(p->FindDaughter(MCParticle::kMu,kTRUE) == GenTempMG0->At(nl)) {
306     isOld = kTRUE;
307     break;
308     }
309     }
310     if(isOld == kFALSE){
311     GenTempMG0->Add(p->FindDaughter(MCParticle::kMu,kTRUE));
312     diBoson->AddDaughter(p->FindDaughter(MCParticle::kMu,kTRUE));
313     diBoson->AddDaughter(p->FindDaughter(-1*MCParticle::kMu,kTRUE));
314     sumV[1]++;
315     sumVVFlavor[3]++;
316     if (GetFillHist())
317     hDVMass[3]->Fill(TMath::Min(diBoson->Mass(),199.999));
318     const MCParticle *tmp_mu0 = p->FindDaughter(MCParticle::kMu,kTRUE);
319     while (tmp_mu0->HasDaughter(MCParticle::kMu) &&
320     tmp_mu0->FindDaughter(MCParticle::kMu)->IsGenerated())
321     tmp_mu0 = tmp_mu0->FindDaughter(MCParticle::kMu);
322     const MCParticle *tmp_mu1 = p->FindDaughter(-1*MCParticle::kMu,kTRUE);
323     while (tmp_mu1->HasDaughter(MCParticle::kMu) &&
324     tmp_mu1->FindDaughter(MCParticle::kMu)->IsGenerated())
325     tmp_mu1 = tmp_mu1->FindDaughter(MCParticle::kMu);
326     GenLeptons->Add(tmp_mu0);
327     GenLeptons->Add(tmp_mu1);
328     }
329     }
330     if (p->HasDaughter(MCParticle::kEl,kTRUE) && p->HasDaughter(-1*MCParticle::kEl,kTRUE)) {
331     isOld = kFALSE;
332     for(UInt_t nl = 0; nl < GenTempMG0->GetEntries(); nl++){
333     if(p->FindDaughter(MCParticle::kEl,kTRUE) == GenTempMG0->At(nl)) {
334     isOld = kTRUE;
335     break;
336     }
337     }
338     if(isOld == kFALSE){
339     GenTempMG0->Add(p->FindDaughter(MCParticle::kEl,kTRUE));
340     diBoson->AddDaughter(p->FindDaughter(MCParticle::kEl,kTRUE));
341     diBoson->AddDaughter(p->FindDaughter(-1*MCParticle::kEl,kTRUE));
342     sumV[1]++;
343     sumVVFlavor[4]++;
344     if (GetFillHist())
345     hDVMass[4]->Fill(TMath::Min(diBoson->Mass(),199.999));
346     const MCParticle *tmp_e0 = p->Daughter(0);
347     while (tmp_e0->HasDaughter(MCParticle::kEl) &&
348     tmp_e0->FindDaughter(MCParticle::kEl)->IsGenerated())
349     tmp_e0 = tmp_e0->FindDaughter(MCParticle::kEl);
350     const MCParticle *tmp_e1 = p->Daughter(1);
351     while (tmp_e1->HasDaughter(MCParticle::kEl) &&
352     tmp_e1->FindDaughter(MCParticle::kEl)->IsGenerated())
353     tmp_e1 = tmp_e1->FindDaughter(MCParticle::kEl);
354     GenLeptons->Add(tmp_e0);
355     GenLeptons->Add(tmp_e1);
356     }
357     }
358     if (p->HasDaughter(MCParticle::kTau,kTRUE) && p->HasDaughter(-1*MCParticle::kTau,kTRUE)) {
359     isOld = kFALSE;
360     for(UInt_t nl = 0; nl < GenTempMG0->GetEntries(); nl++){
361     if(p->FindDaughter(MCParticle::kTau,kTRUE) == GenTempMG0->At(nl)) {
362     isOld = kTRUE;
363     break;
364     }
365     }
366     if(isOld == kFALSE){
367     GenTempMG0->Add(p->FindDaughter(MCParticle::kTau,kTRUE));
368     diBoson->AddDaughter(p->FindDaughter(MCParticle::kTau,kTRUE));
369     diBoson->AddDaughter(p->FindDaughter(-1*MCParticle::kTau,kTRUE));
370     sumV[1]++;
371     sumVVFlavor[5]++;
372     if (GetFillHist())
373     hDVMass[5]->Fill(TMath::Min(diBoson->Mass(),199.999));
374     const MCParticle *tau0 = p->Daughter(0);
375     if (tau0->HasDaughter(MCParticle::kMu))
376     GenLeptons->Add(tau0->FindDaughter(MCParticle::kMu));
377     if (tau0->HasDaughter(MCParticle::kEl))
378     GenLeptons->Add(tau0->FindDaughter(MCParticle::kEl));
379     const MCParticle *tau1 = p->Daughter(1);
380     if (tau1->HasDaughter(MCParticle::kMu))
381     GenLeptons->Add(tau1->FindDaughter(MCParticle::kMu));
382     if (tau1->HasDaughter(MCParticle::kEl))
383     GenLeptons->Add(tau1->FindDaughter(MCParticle::kEl));
384     if (tau0->HasDaughter(MCParticle::kTau)) {
385     const MCParticle *tau0_second = tau0->FindDaughter(MCParticle::kTau);
386     if (tau0_second->HasDaughter(MCParticle::kMu))
387     GenLeptons->Add(tau0_second->FindDaughter(MCParticle::kMu));
388     if (tau0_second->HasDaughter(MCParticle::kEl))
389     GenLeptons->Add(tau0_second->FindDaughter(MCParticle::kEl));
390     }
391     if (tau1->HasDaughter(MCParticle::kTau)) {
392     const MCParticle *tau1_second = tau1->FindDaughter(MCParticle::kTau);
393     if (tau1_second->HasDaughter(MCParticle::kMu))
394     GenLeptons->Add(tau1_second->FindDaughter(MCParticle::kMu));
395     if (tau1_second->HasDaughter(MCParticle::kEl))
396     GenLeptons->Add(tau1_second->FindDaughter(MCParticle::kEl));
397     }
398     }
399 ceballos 1.16 }
400 ceballos 1.42 if (p->HasDaughter(MCParticle::kMuNu,kTRUE) && p->HasDaughter(-1*MCParticle::kMuNu,kTRUE)) {
401     isOld = kFALSE;
402     for(UInt_t nl = 0; nl < GenTempMG0->GetEntries(); nl++){
403     if(p->FindDaughter(MCParticle::kMuNu,kTRUE) == GenTempMG0->At(nl)) {
404     isOld = kTRUE;
405     break;
406     }
407     }
408     if(isOld == kFALSE){
409     GenTempMG0->Add(p->FindDaughter(MCParticle::kMuNu,kTRUE));
410     diBoson->AddDaughter(p->FindDaughter(MCParticle::kMuNu,kTRUE));
411     diBoson->AddDaughter(p->FindDaughter(-1*MCParticle::kMuNu,kTRUE));
412     sumV[1]++;
413     sumVVFlavor[6]++;
414     if (GetFillHist())
415     hDVMass[6]->Fill(TMath::Min(diBoson->Mass(),199.999));
416     }
417 ceballos 1.16 }
418 ceballos 1.42 if (p->HasDaughter(MCParticle::kElNu,kTRUE) && p->HasDaughter(-1*MCParticle::kElNu,kTRUE)) {
419     isOld = kFALSE;
420     for(UInt_t nl = 0; nl < GenTempMG0->GetEntries(); nl++){
421     if(p->FindDaughter(MCParticle::kElNu,kTRUE) == GenTempMG0->At(nl)) {
422     isOld = kTRUE;
423     break;
424     }
425     }
426     if(isOld == kFALSE){
427     GenTempMG0->Add(p->FindDaughter(MCParticle::kElNu,kTRUE));
428     diBoson->AddDaughter(p->FindDaughter(MCParticle::kElNu,kTRUE));
429     diBoson->AddDaughter(p->FindDaughter(-1*MCParticle::kElNu,kTRUE));
430     sumV[1]++;
431     sumVVFlavor[7]++;
432     if (GetFillHist())
433     hDVMass[7]->Fill(TMath::Min(diBoson->Mass(),199.999));
434     }
435 loizides 1.18 }
436 ceballos 1.42 if (p->HasDaughter(MCParticle::kTauNu,kTRUE) && p->HasDaughter(-1*MCParticle::kTauNu,kTRUE)) {
437     isOld = kFALSE;
438     for(UInt_t nl = 0; nl < GenTempMG0->GetEntries(); nl++){
439     if(p->FindDaughter(MCParticle::kTauNu,kTRUE) == GenTempMG0->At(nl)) {
440     isOld = kTRUE;
441     break;
442     }
443     }
444     if(isOld == kFALSE){
445     GenTempMG0->Add(p->FindDaughter(MCParticle::kTauNu,kTRUE));
446     diBoson->AddDaughter(p->FindDaughter(MCParticle::kTauNu,kTRUE));
447     diBoson->AddDaughter(p->FindDaughter(-1*MCParticle::kTauNu,kTRUE));
448     sumV[1]++;
449     sumVVFlavor[8]++;
450     if (GetFillHist())
451     hDVMass[8]->Fill(TMath::Min(diBoson->Mass(),199.999));
452     }
453 ceballos 1.16 }
454     delete diBoson;
455     }
456    
457 loizides 1.18 // t -> lnu for Madgraph
458     if (p->Is(MCParticle::kTop)) {
459 ceballos 1.16 CompositeParticle *diBoson = new CompositeParticle();
460 loizides 1.18 if (p->HasDaughter(MCParticle::kMu) && p->HasDaughter(MCParticle::kMuNu)) {
461 ceballos 1.16 diBoson->AddDaughter(p->FindDaughter(MCParticle::kMu));
462     diBoson->AddDaughter(p->FindDaughter(MCParticle::kMuNu));
463 loizides 1.20 if (GetFillHist())
464 ceballos 1.42 hDVMass[9]->Fill(TMath::Min(diBoson->Mass(),199.999));
465 ceballos 1.16 GenLeptons->Add(p->FindDaughter(MCParticle::kMu));
466     }
467 loizides 1.18 else if (p->HasDaughter(MCParticle::kEl) && p->HasDaughter(MCParticle::kElNu)) {
468 ceballos 1.16 diBoson->AddDaughter(p->FindDaughter(MCParticle::kEl));
469     diBoson->AddDaughter(p->FindDaughter(MCParticle::kElNu));
470 loizides 1.20 if (GetFillHist())
471 ceballos 1.42 hDVMass[10]->Fill(TMath::Min(diBoson->Mass(),199.999));
472 ceballos 1.16 GenLeptons->Add(p->FindDaughter(MCParticle::kEl));
473     }
474 loizides 1.18 else if (p->HasDaughter(MCParticle::kTau) && p->HasDaughter(MCParticle::kTauNu)) {
475 ceballos 1.16 diBoson->AddDaughter(p->FindDaughter(MCParticle::kTau));
476     diBoson->AddDaughter(p->FindDaughter(MCParticle::kTauNu));
477 loizides 1.20 if (GetFillHist())
478 ceballos 1.42 hDVMass[11]->Fill(TMath::Min(diBoson->Mass(),199.999));
479 loizides 1.18 const MCParticle *tau = p->FindDaughter(MCParticle::kTau);
480     if (tau->HasDaughter(MCParticle::kMu))
481     GenLeptons->Add(tau->FindDaughter(MCParticle::kMu));
482     if (tau->HasDaughter(MCParticle::kEl))
483     GenLeptons->Add(tau->FindDaughter(MCParticle::kEl));
484     }
485     else if (!p->HasDaughter(MCParticle::kW)) {
486     for(UInt_t nd=0; nd<p->NDaughters(); ++nd)
487     if (p->Daughter(nd)->IsNot(MCParticle::kBottom) &&
488     p->Daughter(nd)->IsNot(MCParticle::kGamma))
489     diBoson->AddDaughter(p->Daughter(nd));
490 loizides 1.20 if (GetFillHist())
491 ceballos 1.42 hDVMass[12]->Fill(TMath::Min(diBoson->Mass(),199.999));
492 ceballos 1.16 }
493     delete diBoson;
494     }
495 ceballos 1.26
496 loizides 1.27 // mass cut for given pid
497     if(fPdgIdCut && p->Is(fPdgIdCut) &&
498 ceballos 1.26 (p->Mass() < fMassMinCut || p->Mass() > fMassMaxCut)) {
499     SkipEvent();
500     return;
501 sixie 1.35 }
502 loizides 1.27 } // end loop of particles
503 loizides 1.1
504 ceballos 1.42 delete GenTempMG0;
505    
506 ceballos 1.44 // --------------------------------
507     // Begin special study about VVjets
508     // --------------------------------
509     if(sumV[0] + 4*sumV[1] == 2 || sumV[0] + 4*sumV[1] == 5 || sumV[0] + 4*sumV[1] == 8){
510     MCParticleOArr *GenTempMG1 = new MCParticleOArr;
511     Double_t diBosonMass[2] = {0., 0.};
512     for (UInt_t i=0; i<fParticles->GetEntries(); ++i) {
513     const MCParticle *p = fParticles->At(i);
514    
515     if (p->IsParton() && p->NDaughters() >= 2) {
516     CompositeParticle *diBoson = new CompositeParticle();
517     if (p->HasDaughter(MCParticle::kMu) && p->HasDaughter(MCParticle::kMuNu)) {
518     isOld = kFALSE;
519     for(UInt_t nl = 0; nl < GenTempMG1->GetEntries(); nl++){
520     if(p->FindDaughter(MCParticle::kMu) == GenTempMG1->At(nl)) {
521     isOld = kTRUE;
522     break;
523     }
524     }
525     if(isOld == kFALSE){
526     GenTempMG1->Add(p->FindDaughter(MCParticle::kMu));
527     diBoson->AddDaughter(p->FindDaughter(MCParticle::kMu));
528     diBoson->AddDaughter(p->FindDaughter(MCParticle::kMuNu));
529     if (GetFillHist() && sumV[0] + 4*sumV[1] == 2)
530     hDVVMass[0]->Fill(TMath::Min(diBoson->Mass(),199.999));
531     if (GetFillHist() && sumV[0] + 4*sumV[1] == 5)
532     hDVVMass[1]->Fill(TMath::Min(diBoson->Mass(),199.999));
533     }
534     }
535     if (p->HasDaughter(MCParticle::kEl) && p->HasDaughter(MCParticle::kElNu)) {
536     isOld = kFALSE;
537     for(UInt_t nl = 0; nl < GenTempMG1->GetEntries(); nl++){
538     if(p->FindDaughter(MCParticle::kEl) == GenTempMG1->At(nl)) {
539     isOld = kTRUE;
540     break;
541     }
542     }
543     if(isOld == kFALSE){
544     GenTempMG1->Add(p->FindDaughter(MCParticle::kEl));
545     diBoson->AddDaughter(p->FindDaughter(MCParticle::kEl));
546     diBoson->AddDaughter(p->FindDaughter(MCParticle::kElNu));
547     if (GetFillHist() && sumV[0] + 4*sumV[1] == 2)
548     hDVVMass[2]->Fill(TMath::Min(diBoson->Mass(),199.999));
549     if (GetFillHist() && sumV[0] + 4*sumV[1] == 5)
550     hDVVMass[3]->Fill(TMath::Min(diBoson->Mass(),199.999));
551     }
552     }
553     if (p->HasDaughter(MCParticle::kTau) && p->HasDaughter(MCParticle::kTauNu)) {
554     isOld = kFALSE;
555     for(UInt_t nl = 0; nl < GenTempMG1->GetEntries(); nl++){
556     if(p->FindDaughter(MCParticle::kTau) == GenTempMG1->At(nl)) {
557     isOld = kTRUE;
558     break;
559     }
560     }
561     if(isOld == kFALSE){
562     GenTempMG1->Add(p->FindDaughter(MCParticle::kTau));
563     diBoson->AddDaughter(p->FindDaughter(MCParticle::kTau));
564     diBoson->AddDaughter(p->FindDaughter(MCParticle::kTauNu));
565     if (GetFillHist() && sumV[0] + 4*sumV[1] == 2)
566     hDVVMass[4]->Fill(TMath::Min(diBoson->Mass(),199.999));
567     if (GetFillHist() && sumV[0] + 4*sumV[1] == 5)
568     hDVVMass[5]->Fill(TMath::Min(diBoson->Mass(),199.999));
569     }
570     }
571     if (p->HasDaughter(MCParticle::kMu,kTRUE) && p->HasDaughter(-1*MCParticle::kMu,kTRUE)) {
572     isOld = kFALSE;
573     for(UInt_t nl = 0; nl < GenTempMG1->GetEntries(); nl++){
574     if(p->FindDaughter(MCParticle::kMu,kTRUE) == GenTempMG1->At(nl)) {
575     isOld = kTRUE;
576     break;
577     }
578     }
579     if(isOld == kFALSE){
580     GenTempMG1->Add(p->FindDaughter(MCParticle::kMu,kTRUE));
581     diBoson->AddDaughter(p->FindDaughter(MCParticle::kMu,kTRUE));
582     diBoson->AddDaughter(p->FindDaughter(-1*MCParticle::kMu,kTRUE));
583     if (GetFillHist() && sumV[0] + 4*sumV[1] == 5)
584     hDVVMass[6]->Fill(TMath::Min(diBoson->Mass(),199.999));
585     if (GetFillHist() && sumV[0] + 4*sumV[1] == 8)
586     hDVVMass[7]->Fill(TMath::Min(diBoson->Mass(),199.999));
587     }
588     }
589     if (p->HasDaughter(MCParticle::kEl,kTRUE) && p->HasDaughter(-1*MCParticle::kEl,kTRUE)) {
590     isOld = kFALSE;
591     for(UInt_t nl = 0; nl < GenTempMG1->GetEntries(); nl++){
592     if(p->FindDaughter(MCParticle::kEl,kTRUE) == GenTempMG1->At(nl)) {
593     isOld = kTRUE;
594     break;
595     }
596     }
597     if(isOld == kFALSE){
598     GenTempMG1->Add(p->FindDaughter(MCParticle::kEl,kTRUE));
599     diBoson->AddDaughter(p->FindDaughter(MCParticle::kEl,kTRUE));
600     diBoson->AddDaughter(p->FindDaughter(-1*MCParticle::kEl,kTRUE));
601     if (GetFillHist() && sumV[0] + 4*sumV[1] == 5)
602     hDVVMass[8]->Fill(TMath::Min(diBoson->Mass(),199.999));
603     if (GetFillHist() && sumV[0] + 4*sumV[1] == 8)
604     hDVVMass[9]->Fill(TMath::Min(diBoson->Mass(),199.999));
605     }
606     }
607     if (p->HasDaughter(MCParticle::kTau,kTRUE) && p->HasDaughter(-1*MCParticle::kTau,kTRUE)) {
608     isOld = kFALSE;
609     for(UInt_t nl = 0; nl < GenTempMG1->GetEntries(); nl++){
610     if(p->FindDaughter(MCParticle::kTau,kTRUE) == GenTempMG1->At(nl)) {
611     isOld = kTRUE;
612     break;
613     }
614     }
615     if(isOld == kFALSE){
616     GenTempMG1->Add(p->FindDaughter(MCParticle::kTau,kTRUE));
617     diBoson->AddDaughter(p->FindDaughter(MCParticle::kTau,kTRUE));
618     diBoson->AddDaughter(p->FindDaughter(-1*MCParticle::kTau,kTRUE));
619     if (GetFillHist() && sumV[0] + 4*sumV[1] == 5)
620     hDVVMass[10]->Fill(TMath::Min(diBoson->Mass(),199.999));
621     if (GetFillHist() && sumV[0] + 4*sumV[1] == 8)
622     hDVVMass[11]->Fill(TMath::Min(diBoson->Mass(),199.999));
623     }
624     }
625     if (p->HasDaughter(MCParticle::kMuNu,kTRUE) && p->HasDaughter(-1*MCParticle::kMuNu,kTRUE)) {
626     isOld = kFALSE;
627     for(UInt_t nl = 0; nl < GenTempMG1->GetEntries(); nl++){
628     if(p->FindDaughter(MCParticle::kMuNu,kTRUE) == GenTempMG1->At(nl)) {
629     isOld = kTRUE;
630     break;
631     }
632     }
633     if(isOld == kFALSE){
634     GenTempMG1->Add(p->FindDaughter(MCParticle::kMuNu,kTRUE));
635     diBoson->AddDaughter(p->FindDaughter(MCParticle::kMuNu,kTRUE));
636     diBoson->AddDaughter(p->FindDaughter(-1*MCParticle::kMuNu,kTRUE));
637     if (GetFillHist() && sumV[0] + 4*sumV[1] == 5)
638     hDVVMass[12]->Fill(TMath::Min(diBoson->Mass(),199.999));
639     if (GetFillHist() && sumV[0] + 4*sumV[1] == 8)
640     hDVVMass[13]->Fill(TMath::Min(diBoson->Mass(),199.999));
641     }
642     }
643     if (p->HasDaughter(MCParticle::kElNu,kTRUE) && p->HasDaughter(-1*MCParticle::kElNu,kTRUE)) {
644     isOld = kFALSE;
645     for(UInt_t nl = 0; nl < GenTempMG1->GetEntries(); nl++){
646     if(p->FindDaughter(MCParticle::kElNu,kTRUE) == GenTempMG1->At(nl)) {
647     isOld = kTRUE;
648     break;
649     }
650     }
651     if(isOld == kFALSE){
652     GenTempMG1->Add(p->FindDaughter(MCParticle::kElNu,kTRUE));
653     diBoson->AddDaughter(p->FindDaughter(MCParticle::kElNu,kTRUE));
654     diBoson->AddDaughter(p->FindDaughter(-1*MCParticle::kElNu,kTRUE));
655     if (GetFillHist() && sumV[0] + 4*sumV[1] == 5)
656     hDVVMass[14]->Fill(TMath::Min(diBoson->Mass(),199.999));
657     if (GetFillHist() && sumV[0] + 4*sumV[1] == 8)
658     hDVVMass[15]->Fill(TMath::Min(diBoson->Mass(),199.999));
659     }
660     }
661     if (p->HasDaughter(MCParticle::kTauNu,kTRUE) && p->HasDaughter(-1*MCParticle::kTauNu,kTRUE)) {
662     isOld = kFALSE;
663     for(UInt_t nl = 0; nl < GenTempMG1->GetEntries(); nl++){
664     if(p->FindDaughter(MCParticle::kTauNu,kTRUE) == GenTempMG1->At(nl)) {
665     isOld = kTRUE;
666     break;
667     }
668     }
669     if(isOld == kFALSE){
670     GenTempMG1->Add(p->FindDaughter(MCParticle::kTauNu,kTRUE));
671     diBoson->AddDaughter(p->FindDaughter(MCParticle::kTauNu,kTRUE));
672     diBoson->AddDaughter(p->FindDaughter(-1*MCParticle::kTauNu,kTRUE));
673     if (GetFillHist() && sumV[0] + 4*sumV[1] == 5)
674     hDVVMass[16]->Fill(TMath::Min(diBoson->Mass(),199.999));
675     if (GetFillHist() && sumV[0] + 4*sumV[1] == 8)
676     hDVVMass[17]->Fill(TMath::Min(diBoson->Mass(),199.999));
677     }
678     }
679     if (diBoson && diBosonMass[0] <= 0) diBosonMass[0] = diBoson->Mass();
680     else if(diBoson && diBosonMass[1] <= 0) diBosonMass[1] = diBoson->Mass();
681     delete diBoson;
682     }
683     else if (p->Status() == 3 && (p->Is(MCParticle::kZ) || p->Is(MCParticle::kW))) {
684     if (diBosonMass[0] <= 0) diBosonMass[0] = p->Mass();
685     else if(diBosonMass[1] <= 0) diBosonMass[1] = p->Mass();
686     if (GetFillHist()) {
687     if (sumV[0] + 4*sumV[1] == 2 && p->Is(MCParticle::kW) && p->HasDaughter(MCParticle::kMu) && p->HasDaughter(MCParticle::kMuNu))
688     hDVVMass[0]->Fill(TMath::Min(p->Mass(),199.999));
689     else if(sumV[0] + 4*sumV[1] == 2 && p->Is(MCParticle::kW) && p->HasDaughter(MCParticle::kEl) && p->HasDaughter(MCParticle::kElNu))
690     hDVVMass[2]->Fill(TMath::Min(p->Mass(),199.999));
691     else if(sumV[0] + 4*sumV[1] == 2 && p->Is(MCParticle::kW) && p->HasDaughter(MCParticle::kTau) && p->HasDaughter(MCParticle::kTauNu))
692     hDVVMass[4]->Fill(TMath::Min(p->Mass(),199.999));
693    
694     else if(sumV[0] + 4*sumV[1] == 5 && p->Is(MCParticle::kW) && p->HasDaughter(MCParticle::kMu) && p->HasDaughter(MCParticle::kMuNu))
695     hDVVMass[1]->Fill(TMath::Min(p->Mass(),199.999));
696     else if(sumV[0] + 4*sumV[1] == 5 && p->Is(MCParticle::kW) && p->HasDaughter(MCParticle::kEl) && p->HasDaughter(MCParticle::kElNu))
697     hDVVMass[3]->Fill(TMath::Min(p->Mass(),199.999));
698     else if(sumV[0] + 4*sumV[1] == 5 && p->Is(MCParticle::kW) && p->HasDaughter(MCParticle::kTau) && p->HasDaughter(MCParticle::kTauNu))
699     hDVVMass[5]->Fill(TMath::Min(p->Mass(),199.999));
700    
701     else if(sumV[0] + 4*sumV[1] == 5 && p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kMu,kTRUE) && p->HasDaughter(-1*MCParticle::kMu,kTRUE))
702     hDVVMass[6]->Fill(TMath::Min(p->Mass(),199.999));
703     else if(sumV[0] + 4*sumV[1] == 5 && p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kEl,kTRUE) && p->HasDaughter(-1*MCParticle::kEl,kTRUE))
704     hDVVMass[8]->Fill(TMath::Min(p->Mass(),199.999));
705     else if(sumV[0] + 4*sumV[1] == 5 && p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kTau,kTRUE) && p->HasDaughter(-1*MCParticle::kTau,kTRUE))
706     hDVVMass[10]->Fill(TMath::Min(p->Mass(),199.999));
707    
708     else if(sumV[0] + 4*sumV[1] == 5 && p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kMuNu,kTRUE) && p->HasDaughter(-1*MCParticle::kMuNu,kTRUE))
709     hDVVMass[12]->Fill(TMath::Min(p->Mass(),199.999));
710     else if(sumV[0] + 4*sumV[1] == 5 && p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kElNu,kTRUE) && p->HasDaughter(-1*MCParticle::kElNu,kTRUE))
711     hDVVMass[14]->Fill(TMath::Min(p->Mass(),199.999));
712     else if(sumV[0] + 4*sumV[1] == 5 && p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kTauNu,kTRUE) && p->HasDaughter(-1*MCParticle::kTauNu,kTRUE))
713     hDVVMass[16]->Fill(TMath::Min(p->Mass(),199.999));
714    
715     else if(sumV[0] + 4*sumV[1] == 8 && p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kMu,kTRUE) && p->HasDaughter(-1*MCParticle::kMu,kTRUE))
716     hDVVMass[7]->Fill(TMath::Min(p->Mass(),199.999));
717     else if(sumV[0] + 4*sumV[1] == 8 && p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kEl,kTRUE) && p->HasDaughter(-1*MCParticle::kEl,kTRUE))
718     hDVVMass[9]->Fill(TMath::Min(p->Mass(),199.999));
719     else if(sumV[0] + 4*sumV[1] == 8 && p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kTau,kTRUE) && p->HasDaughter(-1*MCParticle::kTau,kTRUE))
720     hDVVMass[11]->Fill(TMath::Min(p->Mass(),199.999));
721    
722     else if(sumV[0] + 4*sumV[1] == 8 && p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kMuNu,kTRUE) && p->HasDaughter(-1*MCParticle::kMuNu,kTRUE))
723     hDVVMass[13]->Fill(TMath::Min(p->Mass(),199.999));
724     else if(sumV[0] + 4*sumV[1] == 8 && p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kElNu,kTRUE) && p->HasDaughter(-1*MCParticle::kElNu,kTRUE))
725     hDVVMass[15]->Fill(TMath::Min(p->Mass(),199.999));
726     else if(sumV[0] + 4*sumV[1] == 8 && p->Is(MCParticle::kZ) && p->HasDaughter(MCParticle::kTauNu,kTRUE) && p->HasDaughter(-1*MCParticle::kTauNu,kTRUE))
727     hDVVMass[17]->Fill(TMath::Min(p->Mass(),199.999));
728     }
729     }
730     } // end loop of particles
731     if(diBosonMass[0] > 70 && diBosonMass[0] < 110 && diBosonMass[1] > 70 && diBosonMass[1] < 110){
732     if(sumV[0] + 4*sumV[1] == 2){
733     if (sumVVFlavor[0] == 2) hDVVMass[18]->Fill(0.);
734     else if(sumVVFlavor[1] == 2) hDVVMass[18]->Fill(1.);
735     else if(sumVVFlavor[2] == 2) hDVVMass[18]->Fill(2.);
736     else if(sumVVFlavor[0] == 1 && sumVVFlavor[1] == 1) hDVVMass[18]->Fill(3.);
737     else if(sumVVFlavor[0] == 1 && sumVVFlavor[2] == 1) hDVVMass[18]->Fill(4.);
738     else if(sumVVFlavor[1] == 1 && sumVVFlavor[2] == 1) hDVVMass[18]->Fill(5.);
739     else hDVVMass[18]->Fill(6.);
740     }
741     if(sumV[0] + 4*sumV[1] == 5){
742     if (sumVVFlavor[3] == 1 && sumVVFlavor[0] == 1) hDVVMass[19]->Fill(0.);
743     else if(sumVVFlavor[3] == 1 && sumVVFlavor[1] == 1) hDVVMass[19]->Fill(1.);
744     else if(sumVVFlavor[3] == 1 && sumVVFlavor[2] == 1) hDVVMass[19]->Fill(2.);
745     else if(sumVVFlavor[4] == 1 && sumVVFlavor[0] == 1) hDVVMass[19]->Fill(3.);
746     else if(sumVVFlavor[4] == 1 && sumVVFlavor[1] == 1) hDVVMass[19]->Fill(4.);
747     else if(sumVVFlavor[4] == 1 && sumVVFlavor[2] == 1) hDVVMass[19]->Fill(5.);
748     else if(sumVVFlavor[5] == 1 && sumVVFlavor[0] == 1) hDVVMass[19]->Fill(6.);
749     else if(sumVVFlavor[5] == 1 && sumVVFlavor[1] == 1) hDVVMass[19]->Fill(7.);
750     else if(sumVVFlavor[5] == 1 && sumVVFlavor[2] == 1) hDVVMass[19]->Fill(8.);
751     else hDVVMass[19]->Fill(9.);
752     }
753     if(sumV[0] + 4*sumV[1] == 8 &&
754     sumVVFlavor[3] + sumVVFlavor[4] +sumVVFlavor[5] == 2){
755     if (sumVVFlavor[3] == 2) hDVVMass[20]->Fill(0.);
756     else if(sumVVFlavor[4] == 2) hDVVMass[20]->Fill(1.);
757     else if(sumVVFlavor[5] == 2) hDVVMass[20]->Fill(2.);
758     else if(sumVVFlavor[3] == 1 && sumVVFlavor[4] == 1) hDVVMass[20]->Fill(3.);
759     else if(sumVVFlavor[3] == 1 && sumVVFlavor[5] == 1) hDVVMass[20]->Fill(4.);
760     else if(sumVVFlavor[4] == 1 && sumVVFlavor[5] == 1) hDVVMass[20]->Fill(5.);
761     else hDVVMass[20]->Fill(6.);
762     }
763     else if(sumV[0] + 4*sumV[1] == 8){
764     if (sumVVFlavor[6] == 2) hDVVMass[21]->Fill(0.);
765     else if(sumVVFlavor[7] == 2) hDVVMass[21]->Fill(1.);
766     else if(sumVVFlavor[8] == 2) hDVVMass[21]->Fill(2.);
767     else if(sumVVFlavor[3] == 1 && sumVVFlavor[6] == 1) hDVVMass[21]->Fill(3.);
768     else if(sumVVFlavor[3] == 1 && sumVVFlavor[7] == 1) hDVVMass[21]->Fill(4.);
769     else if(sumVVFlavor[3] == 1 && sumVVFlavor[8] == 1) hDVVMass[21]->Fill(5.);
770     else if(sumVVFlavor[4] == 1 && sumVVFlavor[6] == 1) hDVVMass[21]->Fill(6.);
771     else if(sumVVFlavor[4] == 1 && sumVVFlavor[7] == 1) hDVVMass[21]->Fill(7.);
772     else if(sumVVFlavor[4] == 1 && sumVVFlavor[8] == 1) hDVVMass[21]->Fill(8.);
773     else if(sumVVFlavor[5] == 1 && sumVVFlavor[6] == 1) hDVVMass[21]->Fill(9.);
774     else if(sumVVFlavor[5] == 1 && sumVVFlavor[7] == 1) hDVVMass[21]->Fill(10.);
775     else if(sumVVFlavor[5] == 1 && sumVVFlavor[8] == 1) hDVVMass[21]->Fill(11.);
776     else if(sumVVFlavor[6] == 1 && sumVVFlavor[7] == 1) hDVVMass[21]->Fill(12.);
777     else if(sumVVFlavor[6] == 1 && sumVVFlavor[8] == 1) hDVVMass[21]->Fill(13.);
778     else if(sumVVFlavor[7] == 1 && sumVVFlavor[8] == 1) hDVVMass[21]->Fill(14.);
779     else hDVVMass[21]->Fill(15.);
780     }
781     } // 60<mV1/2<120
782     if(sumV[0] + 4*sumV[1] == 2) hDVVMass[22]->Fill(TMath::Min(TMath::Min(diBosonMass[0],diBosonMass[1]),199.999));
783     if(sumV[0] + 4*sumV[1] == 2) hDVVMass[23]->Fill(TMath::Min(TMath::Max(diBosonMass[0],diBosonMass[1]),199.999));
784     if(sumV[0] + 4*sumV[1] == 5) hDVVMass[24]->Fill(TMath::Min(TMath::Min(diBosonMass[0],diBosonMass[1]),199.999));
785     if(sumV[0] + 4*sumV[1] == 5) hDVVMass[25]->Fill(TMath::Min(TMath::Max(diBosonMass[0],diBosonMass[1]),199.999));
786     if(sumV[0] + 4*sumV[1] == 8) hDVVMass[26]->Fill(TMath::Min(TMath::Min(diBosonMass[0],diBosonMass[1]),199.999));
787     if(sumV[0] + 4*sumV[1] == 8) hDVVMass[27]->Fill(TMath::Min(TMath::Max(diBosonMass[0],diBosonMass[1]),199.999));
788     delete GenTempMG1;
789     } // WW, WZ or ZZ
790     // --------------------------------
791     // End special study about VVjets
792     // --------------------------------
793    
794 ceballos 1.30 Met *theMET = new Met(totalMET[0], totalMET[1]);
795     theMET->SetElongitudinal(totalMET[2]);
796     GenMet->AddOwned(theMET);
797    
798 loizides 1.19 // sort according to pt
799     GenLeptons->Sort();
800     GenAllLeptons->Sort();
801     GenTaus->Sort();
802     GenNeutrinos->Sort();
803     GenQuarks->Sort();
804     GenqqHs->Sort();
805     GenBosons->Sort();
806     GenPhotons->Sort();
807 ceballos 1.32 GenRadPhotons->Sort();
808     GenISRPhotons->Sort();
809 loizides 1.19
810 loizides 1.8 // add objects to this event for other modules to use
811 ceballos 1.30 AddObjThisEvt(GenMet);
812 loizides 1.13 AddObjThisEvt(GenLeptons);
813     AddObjThisEvt(GenAllLeptons);
814     AddObjThisEvt(GenTaus);
815     AddObjThisEvt(GenNeutrinos);
816     AddObjThisEvt(GenQuarks);
817     AddObjThisEvt(GenqqHs);
818     AddObjThisEvt(GenBosons);
819     AddObjThisEvt(GenPhotons);
820 ceballos 1.32 AddObjThisEvt(GenRadPhotons);
821     AddObjThisEvt(GenISRPhotons);
822    
823 loizides 1.5 // fill histograms if requested
824 loizides 1.20 if (GetFillHist()) {
825 loizides 1.5
826 ceballos 1.30 // MET
827     hDGenMet[0]->Fill(GenMet->At(0)->Pt());
828     hDGenMet[1]->Fill(GenMet->At(0)->Px());
829     hDGenMet[2]->Fill(GenMet->At(0)->Py());
830     hDGenMet[3]->Fill(GenMet->At(0)->Elongitudinal());
831    
832 loizides 1.6 // leptons
833 loizides 1.1 hDGenLeptons[0]->Fill(GenLeptons->GetEntries());
834 loizides 1.5 for(UInt_t i=0; i<GenLeptons->GetEntries(); i++) {
835 loizides 1.1 hDGenLeptons[1]->Fill(GenLeptons->At(i)->Pt());
836 loizides 1.5 hDGenLeptons[2]->Fill(TMath::Abs(GenLeptons->At(i)->Eta()));
837     hDGenLeptons[3]->Fill(GenLeptons->At(i)->PhiDeg());
838     for(UInt_t j=i+1; j<GenLeptons->GetEntries(); j++) {
839 loizides 1.1 CompositeParticle *dilepton = new CompositeParticle();
840     dilepton->AddDaughter(GenLeptons->At(i));
841     dilepton->AddDaughter(GenLeptons->At(j));
842     hDGenLeptons[4]->Fill(dilepton->Mass());
843     delete dilepton;
844     }
845 ceballos 1.22 }
846     // looking at events with two leptons
847     if (GenLeptons->GetEntries() == 2) {
848     hDGenLeptons[5]->Fill(TMath::Min(TMath::Max(TMath::Abs(GenLeptons->At(0)->Eta()),
849     TMath::Abs(GenLeptons->At(1)->Eta())),
850 loizides 1.5 4.999));
851 ceballos 1.22 hDGenLeptons[6]->Fill(TMath::Min(TMath::Min(TMath::Abs(GenLeptons->At(0)->Eta()),
852     TMath::Abs(GenLeptons->At(1)->Eta())),
853 loizides 1.5 4.999));
854 ceballos 1.22 if (TMath::Abs(GenLeptons->At(0)->Eta()) < 2.5 &&
855     TMath::Abs(GenLeptons->At(1)->Eta()) < 2.5) {
856     hDGenLeptons[7]->Fill(TMath::Min(GenLeptons->At(0)->Pt(),199.999));
857     if (GenLeptons->At(0)->Pt() > 20.0) {
858     hDGenLeptons[8]->Fill(TMath::Min(GenLeptons->At(1)->Pt(),199.999));
859     if (GenLeptons->At(1)->Pt() > 10.0) {
860 loizides 1.1 CompositeParticle *dilepton = new CompositeParticle();
861 ceballos 1.22 dilepton->AddDaughter(GenLeptons->At(0));
862     dilepton->AddDaughter(GenLeptons->At(1));
863 loizides 1.1 hDGenLeptons[9]->Fill(TMath::Min(dilepton->Mass(),999.999));
864 ceballos 1.22 if(dilepton->Mass() > 12.0){
865     hDGenLeptons[10]->Fill(MathUtils::DeltaPhi(GenLeptons->At(0)->Phi(),
866     GenLeptons->At(1)->Phi())
867     * 180./ TMath::Pi());
868 loizides 1.40 hDGenLeptons[11]->Fill(MathUtils::DeltaR(*GenLeptons->At(0),
869     *GenLeptons->At(1)));
870 ceballos 1.22 }
871 loizides 1.1 delete dilepton;
872     }
873     }
874     }
875     }
876 ceballos 1.22 // looking at events with three leptons
877     if (GenLeptons->GetEntries() == 3) {
878     if (TMath::Abs(GenLeptons->At(0)->Eta()) < 2.5 &&
879     TMath::Abs(GenLeptons->At(1)->Eta()) < 2.5 &&
880     TMath::Abs(GenLeptons->At(2)->Eta()) < 2.5) {
881     hDGenLeptons[12]->Fill(TMath::Min(GenLeptons->At(0)->Pt(),199.999));
882     if (GenLeptons->At(0)->Pt() > 20.0) {
883     hDGenLeptons[13]->Fill(TMath::Min(GenLeptons->At(1)->Pt(),199.999));
884     hDGenLeptons[14]->Fill(TMath::Min(GenLeptons->At(2)->Pt(),199.999));
885     if (GenLeptons->At(1)->Pt() > 10.0 && GenLeptons->At(2)->Pt() > 10.0) {
886     CompositeParticle *dilepton01 = new CompositeParticle();
887     dilepton01->AddDaughter(GenLeptons->At(0));
888     dilepton01->AddDaughter(GenLeptons->At(1));
889     CompositeParticle *dilepton02 = new CompositeParticle();
890     dilepton02->AddDaughter(GenLeptons->At(0));
891     dilepton02->AddDaughter(GenLeptons->At(2));
892     CompositeParticle *dilepton12 = new CompositeParticle();
893     dilepton12->AddDaughter(GenLeptons->At(1));
894     dilepton12->AddDaughter(GenLeptons->At(2));
895     hDGenLeptons[15]->Fill(TMath::Min(dilepton01->Mass(),999.999));
896     hDGenLeptons[15]->Fill(TMath::Min(dilepton02->Mass(),999.999));
897     hDGenLeptons[15]->Fill(TMath::Min(dilepton12->Mass(),999.999));
898     CompositeParticle *trilepton = new CompositeParticle();
899     trilepton->AddDaughter(GenLeptons->At(0));
900     trilepton->AddDaughter(GenLeptons->At(1));
901     trilepton->AddDaughter(GenLeptons->At(2));
902     hDGenLeptons[16]->Fill(TMath::Min(trilepton->Mass(),999.999));
903 loizides 1.40 Double_t deltaR[3] = {MathUtils::DeltaR(*GenLeptons->At(0),
904     *GenLeptons->At(1)),
905     MathUtils::DeltaR(*GenLeptons->At(0),
906     *GenLeptons->At(2)),
907     MathUtils::DeltaR(*GenLeptons->At(1),
908     *GenLeptons->At(2))};
909 loizides 1.27 Double_t deltaRMin = deltaR[0];
910 loizides 1.40 for(Int_t i=1; i<3; i++)
911     if(deltaRMin > deltaR[i])
912     deltaRMin = deltaR[i];
913 ceballos 1.22 hDGenLeptons[17]->Fill(deltaRMin);
914    
915     delete dilepton01;
916     delete dilepton02;
917     delete dilepton12;
918     delete trilepton;
919     }
920     }
921     }
922     }
923     // looking at events with four leptons
924     if (GenLeptons->GetEntries() == 4) {
925     if (TMath::Abs(GenLeptons->At(0)->Eta()) < 2.5 &&
926     TMath::Abs(GenLeptons->At(1)->Eta()) < 2.5 &&
927     TMath::Abs(GenLeptons->At(2)->Eta()) < 2.5 &&
928     TMath::Abs(GenLeptons->At(3)->Eta()) < 2.5) {
929     hDGenLeptons[18]->Fill(TMath::Min(GenLeptons->At(0)->Pt(),199.999));
930     if (GenLeptons->At(0)->Pt() > 20.0) {
931     hDGenLeptons[19]->Fill(TMath::Min(GenLeptons->At(1)->Pt(),199.999));
932     hDGenLeptons[20]->Fill(TMath::Min(GenLeptons->At(2)->Pt(),199.999));
933     hDGenLeptons[21]->Fill(TMath::Min(GenLeptons->At(3)->Pt(),199.999));
934     if (GenLeptons->At(1)->Pt() > 10.0 && GenLeptons->At(2)->Pt() > 10.0 &&
935     GenLeptons->At(3)->Pt() > 10.0) {
936     CompositeParticle *dilepton01 = new CompositeParticle();
937     dilepton01->AddDaughter(GenLeptons->At(0));
938     dilepton01->AddDaughter(GenLeptons->At(1));
939     CompositeParticle *dilepton02 = new CompositeParticle();
940     dilepton02->AddDaughter(GenLeptons->At(0));
941     dilepton02->AddDaughter(GenLeptons->At(2));
942     CompositeParticle *dilepton03 = new CompositeParticle();
943     dilepton03->AddDaughter(GenLeptons->At(0));
944     dilepton03->AddDaughter(GenLeptons->At(3));
945     CompositeParticle *dilepton12 = new CompositeParticle();
946     dilepton12->AddDaughter(GenLeptons->At(1));
947     dilepton12->AddDaughter(GenLeptons->At(2));
948     CompositeParticle *dilepton13 = new CompositeParticle();
949     dilepton13->AddDaughter(GenLeptons->At(1));
950     dilepton13->AddDaughter(GenLeptons->At(3));
951     CompositeParticle *dilepton23 = new CompositeParticle();
952     dilepton23->AddDaughter(GenLeptons->At(2));
953     dilepton23->AddDaughter(GenLeptons->At(3));
954     hDGenLeptons[22]->Fill(TMath::Min(dilepton01->Mass(),999.999));
955     hDGenLeptons[22]->Fill(TMath::Min(dilepton02->Mass(),999.999));
956     hDGenLeptons[22]->Fill(TMath::Min(dilepton03->Mass(),999.999));
957     hDGenLeptons[22]->Fill(TMath::Min(dilepton12->Mass(),999.999));
958     hDGenLeptons[22]->Fill(TMath::Min(dilepton13->Mass(),999.999));
959     hDGenLeptons[22]->Fill(TMath::Min(dilepton23->Mass(),999.999));
960     CompositeParticle *fourlepton = new CompositeParticle();
961     fourlepton->AddDaughter(GenLeptons->At(0));
962     fourlepton->AddDaughter(GenLeptons->At(1));
963     fourlepton->AddDaughter(GenLeptons->At(2));
964     fourlepton->AddDaughter(GenLeptons->At(3));
965     hDGenLeptons[23]->Fill(TMath::Min(fourlepton->Mass(),999.999));
966 loizides 1.40 Double_t deltaR[6] = {MathUtils::DeltaR(*GenLeptons->At(0),
967     *GenLeptons->At(1)),
968     MathUtils::DeltaR(*GenLeptons->At(0),
969     *GenLeptons->At(2)),
970     MathUtils::DeltaR(*GenLeptons->At(0),
971     *GenLeptons->At(3)),
972     MathUtils::DeltaR(*GenLeptons->At(1),
973     *GenLeptons->At(2)),
974     MathUtils::DeltaR(*GenLeptons->At(1),
975     *GenLeptons->At(3)),
976     MathUtils::DeltaR(*GenLeptons->At(2),
977     *GenLeptons->At(3))};
978 loizides 1.27 Double_t deltaRMin = deltaR[0];
979 loizides 1.40 for(Int_t i=1; i<6; i++)
980     if(deltaRMin > deltaR[i])
981     deltaRMin = deltaR[i];
982 ceballos 1.22 hDGenLeptons[24]->Fill(deltaRMin);
983    
984     delete dilepton01;
985     delete dilepton02;
986     delete dilepton03;
987     delete dilepton12;
988     delete dilepton13;
989     delete dilepton23;
990     delete fourlepton;
991     }
992     }
993     }
994     }
995 loizides 1.1
996 loizides 1.6 // all leptons
997 ceballos 1.3 hDGenAllLeptons[0]->Fill(GenAllLeptons->GetEntries());
998 loizides 1.5 for(UInt_t i=0; i<GenAllLeptons->GetEntries(); i++) {
999 ceballos 1.3 hDGenAllLeptons[1]->Fill(GenAllLeptons->At(i)->Pt());
1000     hDGenAllLeptons[2]->Fill(GenAllLeptons->At(i)->Eta());
1001 loizides 1.5 hDGenAllLeptons[3]->Fill(GenAllLeptons->At(i)->PhiDeg());
1002 ceballos 1.3 }
1003    
1004 loizides 1.6 // taus
1005 loizides 1.1 hDGenTaus[0]->Fill(GenTaus->GetEntries());
1006 loizides 1.5 for(UInt_t i=0; i<GenTaus->GetEntries(); i++) {
1007 loizides 1.1 hDGenTaus[1]->Fill(GenTaus->At(i)->Pt());
1008     hDGenTaus[2]->Fill(GenTaus->At(i)->Eta());
1009 loizides 1.5 hDGenTaus[3]->Fill(GenTaus->At(i)->PhiDeg());
1010 loizides 1.1 }
1011    
1012 loizides 1.6 // neutrinos
1013 loizides 1.1 hDGenNeutrinos[0]->Fill(GenNeutrinos->GetEntries());
1014     CompositeParticle *neutrinoTotal = new CompositeParticle();
1015 loizides 1.5 for(UInt_t i=0; i<GenNeutrinos->GetEntries(); i++) {
1016     if (GenNeutrinos->At(i)->HasMother())
1017 loizides 1.1 neutrinoTotal->AddDaughter(GenNeutrinos->At(i));
1018     }
1019 loizides 1.5 if (GenNeutrinos->GetEntries() > 0) {
1020 loizides 1.1 hDGenNeutrinos[1]->Fill(neutrinoTotal->Pt());
1021     hDGenNeutrinos[2]->Fill(neutrinoTotal->Eta());
1022 loizides 1.5 hDGenNeutrinos[3]->Fill(neutrinoTotal->PhiDeg());
1023 loizides 1.1 }
1024     delete neutrinoTotal;
1025    
1026 loizides 1.6 // quarks
1027 loizides 1.1 hDGenQuarks[0]->Fill(GenQuarks->GetEntries());
1028 loizides 1.5 for(UInt_t i=0; i<GenQuarks->GetEntries(); i++) {
1029     for(UInt_t j=i+1; j<GenQuarks->GetEntries(); j++) {
1030 loizides 1.1 CompositeParticle *dijet = new CompositeParticle();
1031     dijet->AddDaughter(GenQuarks->At(i));
1032     dijet->AddDaughter(GenQuarks->At(j));
1033     hDGenQuarks[1]->Fill(dijet->Pt());
1034     hDGenQuarks[2]->Fill(dijet->Mass());
1035 loizides 1.5 if (TMath::Abs(GenQuarks->At(i)->Eta()) < 2.5 &&
1036     TMath::Abs(GenQuarks->At(j)->Eta()) < 2.5) {
1037 loizides 1.1 hDGenQuarks[3]->Fill(dijet->Pt());
1038     hDGenQuarks[4]->Fill(dijet->Mass());
1039     }
1040     delete dijet;
1041     }
1042 ceballos 1.2 // b quark info
1043 loizides 1.5 if (GenQuarks->At(i)->AbsPdgId() == 5) {
1044 ceballos 1.2 hDGenQuarks[5]->Fill(GenQuarks->At(i)->Pt());
1045     hDGenQuarks[6]->Fill(GenQuarks->At(i)->Eta());
1046     hDGenQuarks[7]->Fill(GenQuarks->At(i)->Phi());
1047 ceballos 1.22 if (GenLeptons->GetEntries() >= 2 &&
1048     GenLeptons->At(0)->Pt() > 20 &&
1049     GenLeptons->At(1)->Pt() > 15) {
1050     if (TMath::Abs(GenLeptons->At(0)->Eta()) < 2.5 &&
1051     TMath::Abs(GenLeptons->At(1)->Eta()) < 2.5) {
1052 ceballos 1.2 hDGenQuarks[8]->Fill(GenQuarks->At(i)->Pt());
1053     hDGenQuarks[9]->Fill(GenQuarks->At(i)->Eta());
1054     hDGenQuarks[10]->Fill(GenQuarks->At(i)->Phi());
1055     }
1056     }
1057     }
1058     // t quark info
1059 loizides 1.5 else if (GenQuarks->At(i)->AbsPdgId() == 6) {
1060 ceballos 1.2 hDGenQuarks[11]->Fill(GenQuarks->At(i)->Pt());
1061     hDGenQuarks[12]->Fill(GenQuarks->At(i)->Eta());
1062     hDGenQuarks[13]->Fill(GenQuarks->At(i)->Phi());
1063     }
1064     // light quark info
1065     else {
1066     hDGenQuarks[14]->Fill(GenQuarks->At(i)->Pt());
1067     hDGenQuarks[15]->Fill(GenQuarks->At(i)->Eta());
1068     hDGenQuarks[16]->Fill(GenQuarks->At(i)->Phi());
1069     }
1070 loizides 1.1 }
1071    
1072 loizides 1.6 // wbf
1073 loizides 1.5 if (GenqqHs->GetEntries() == 2) {
1074 loizides 1.1 hDGenWBF[0]->Fill(MathUtils::DeltaPhi(GenqqHs->At(0)->Phi(),
1075     GenqqHs->At(1)->Phi()) * 180./ TMath::Pi());
1076 loizides 1.5 hDGenWBF[1]->Fill(TMath::Abs(GenqqHs->At(0)->Eta()-GenqqHs->At(1)->Eta()));
1077 loizides 1.1 hDGenWBF[2]->Fill(TMath::Max(GenqqHs->At(0)->Pt(),GenqqHs->At(1)->Pt()));
1078     hDGenWBF[3]->Fill(TMath::Min(GenqqHs->At(0)->Pt(),GenqqHs->At(1)->Pt()));
1079     CompositeParticle *diqq = new CompositeParticle();
1080     diqq->AddDaughter(GenqqHs->At(0));
1081     diqq->AddDaughter(GenqqHs->At(1));
1082     hDGenWBF[4]->Fill(diqq->Mass());
1083     delete diqq;
1084     }
1085    
1086 loizides 1.6 // bosons
1087 loizides 1.1 hDGenBosons[0]->Fill(GenBosons->GetEntries());
1088 loizides 1.5 for(UInt_t i=0; i<GenBosons->GetEntries(); i++) {
1089 loizides 1.1 hDGenBosons[1]->Fill(GenBosons->At(i)->Pt());
1090     hDGenBosons[2]->Fill(GenBosons->At(i)->Eta());
1091 ceballos 1.42 hDGenBosons[3]->Fill(TMath::Min(GenBosons->At(i)->Mass(),1999.999));
1092     hDGenBosons[4]->Fill(TMath::Min(GenBosons->At(i)->Mass(),199.999));
1093     if(GenBosons->At(i)->Is(MCParticle::kW))
1094     hDGenBosons[5]->Fill(TMath::Min(GenBosons->At(i)->Mass(),199.999));
1095     if(GenBosons->At(i)->Is(MCParticle::kZ))
1096     hDGenBosons[6]->Fill(TMath::Min(GenBosons->At(i)->Mass(),199.999));
1097     }
1098     if(sumV[0] >= 4) printf("More than 3 W bosons (%d)\n",sumV[0]);
1099     if(sumV[1] >= 4) printf("More than 3 Z bosons (%d)\n",sumV[1]);
1100     hDGenBosons[7]->Fill(TMath::Min((double)(sumV[0] + 4*sumV[1]),12.4999));
1101 ceballos 1.10
1102     // photons
1103     hDGenPhotons[0]->Fill(GenPhotons->GetEntries());
1104     for(UInt_t i=0; i<GenPhotons->GetEntries(); i++) {
1105     hDGenPhotons[1]->Fill(GenPhotons->At(i)->Pt());
1106     hDGenPhotons[2]->Fill(GenPhotons->At(i)->Eta());
1107     }
1108 ceballos 1.32
1109     // Rad photons
1110     hDGenRadPhotons[0]->Fill(GenRadPhotons->GetEntries());
1111     for(UInt_t i=0; i<GenRadPhotons->GetEntries(); i++) {
1112     hDGenRadPhotons[1]->Fill(TMath::Min(GenRadPhotons->At(i)->Pt(),199.999));
1113     hDGenRadPhotons[2]->Fill(TMath::Min(GenRadPhotons->At(i)->AbsEta(),4.999));
1114     hDGenRadPhotons[3]->Fill(TMath::Min((double)GenRadPhotons->At(i)->Mother()->Status(),19.499));
1115 loizides 1.40 hDGenRadPhotons[4]->Fill(GenRadPhotons->At(i)->IsGenerated() +
1116     2*GenRadPhotons->At(i)->IsSimulated());
1117 ceballos 1.32 hDGenRadPhotons[5]->Fill(TMath::Min(
1118 loizides 1.40 MathUtils::DeltaR(*GenRadPhotons->At(i),
1119     *GenRadPhotons->At(i)->Mother()),
1120     4.999));
1121 ceballos 1.32 Int_t Mother = 0;
1122     if(GenRadPhotons->At(i)->Mother()->Is(MCParticle::kMu)) Mother = 1;
1123     hDGenRadPhotons[6]->Fill(Mother);
1124     }
1125    
1126     // ISR photons
1127     hDGenISRPhotons[0]->Fill(GenISRPhotons->GetEntries());
1128     for(UInt_t i=0; i<GenISRPhotons->GetEntries(); i++) {
1129     hDGenISRPhotons[1]->Fill(TMath::Min(GenISRPhotons->At(i)->Pt(),199.999));
1130     hDGenISRPhotons[2]->Fill(TMath::Min(GenISRPhotons->At(i)->AbsEta(),4.999));
1131 loizides 1.40 hDGenISRPhotons[3]->Fill(TMath::Min((Double_t)GenISRPhotons->At(i)->Mother()->Status(),
1132     19.499));
1133     hDGenISRPhotons[4]->Fill(GenISRPhotons->At(i)->IsGenerated() +
1134     2*GenISRPhotons->At(i)->IsSimulated());
1135 ceballos 1.32 hDGenISRPhotons[5]->Fill(TMath::Min(
1136 loizides 1.40 MathUtils::DeltaR(*GenISRPhotons->At(i),
1137     *GenISRPhotons->At(i)->Mother()),4.999));
1138 ceballos 1.32 }
1139 loizides 1.1 }
1140 ceballos 1.34
1141     // Apply ISR filter (but filling all histograms)
1142 ceballos 1.37 if(fApplyISRFilter == kTRUE && GenISRPhotons->GetEntries() > 0 &&
1143 ceballos 1.38 GenISRPhotons->At(0)->Pt() > 15.0){
1144 ceballos 1.34 SkipEvent();
1145     }
1146 loizides 1.1 }
1147    
1148     //--------------------------------------------------------------------------------------------------
1149     void GeneratorMod::SlaveBegin()
1150     {
1151 loizides 1.5 // Book branch and histograms if wanted.
1152    
1153 loizides 1.41 ReqEventObject(fMCPartName, fParticles, kTRUE);
1154 loizides 1.1
1155 loizides 1.5 // fill histograms
1156 loizides 1.20 if (GetFillHist()) {
1157 ceballos 1.30 // MET
1158 ceballos 1.44 AddTH1(hDGenMet[0],"hDGenMet_0","Gen MET Pt;p_{t};#",200,0,200);
1159     AddTH1(hDGenMet[1],"hDGenMet_1","Gen MET Px;p_{x};#",400,-200,200);
1160     AddTH1(hDGenMet[2],"hDGenMet_2","Gen MET Py;p_{y};#",400,-200,200);
1161     AddTH1(hDGenMet[3],"hDGenMet_3","Gen MET Pz;p_{z};#",400,-1000,1000);
1162 ceballos 1.30
1163 loizides 1.6 // leptons from W
1164 ceballos 1.44 AddTH1(hDGenLeptons[0] ,"hDGenLeptons_0","Number of leptons from W/Z;N_{leptons};#",10,-0.5,9.5);
1165     AddTH1(hDGenLeptons[1] ,"hDGenLeptons_1","Pt leptons from W/Z;p_{t};#",100,0.0,200.0);
1166     AddTH1(hDGenLeptons[2] ,"hDGenLeptons_2","Eta leptons from W/Z;#eta;#",50,0.0,5.0);
1167     AddTH1(hDGenLeptons[3] ,"hDGenLeptons_3","Phi leptons from W/Z;#phi;#",90,0.0,180.0);
1168     AddTH1(hDGenLeptons[4] ,"hDGenLeptons_4","Dilepton mass from W/Z;m_{ll};#",1000,0.0,1000.0);
1169     AddTH1(hDGenLeptons[5] ,"hDGenLeptons_5","Eta Max for 2 lepton case;#eta;#",50,0.0,5.0);
1170     AddTH1(hDGenLeptons[6] ,"hDGenLeptons_6","Eta Min for 2 lepton case;#eta;#",50,0.0,5.0);
1171     AddTH1(hDGenLeptons[7] ,"hDGenLeptons_7","Pt Max for 2 lepton case;p_{t};#",100,0.0,200.0);
1172     AddTH1(hDGenLeptons[8] ,"hDGenLeptons_8","Pt Min for 2 lepton case;p_{t};#",100,0.0,200.0);
1173     AddTH1(hDGenLeptons[9] ,"hDGenLeptons_9","DiLepton mass for 2 lepton case;p_{t};#",1000,0.0,1000.0);
1174     AddTH1(hDGenLeptons[10],"hDGenLeptons_10","Delta Phi ll for 2 lepton case;#Delta#phi_{ll};#",90,0.0,180.0);
1175     AddTH1(hDGenLeptons[11],"hDGenLeptons_11","Delta R ll;#Delta R_{ll};#",100,0.0,5.0);
1176     AddTH1(hDGenLeptons[12],"hDGenLeptons_12","Pt Max for 3 lepton case;p_{t};#",100,0.0,200.0);
1177     AddTH1(hDGenLeptons[13],"hDGenLeptons_13","Pt 2nd for 3 lepton case;p_{t};#",100,0.0,200.0);
1178     AddTH1(hDGenLeptons[14],"hDGenLeptons_14","Pt Min for 3 lepton case;p_{t};#",100,0.0,200.0);
1179     AddTH1(hDGenLeptons[15],"hDGenLeptons_15","Dilepton mass for 3 lepton case;m_{ll};#",1000,0.0,1000.0);
1180     AddTH1(hDGenLeptons[16],"hDGenLeptons_16","Trilepton mass for 3 lepton case;m_{lll};#",1000,0.0,1000.0);
1181     AddTH1(hDGenLeptons[17],"hDGenLeptons_17","Delta R Minimum between leptons for 3 lepton case;#Delta R_{ll};#",100,0.0,5.0);
1182     AddTH1(hDGenLeptons[18],"hDGenLeptons_18","Pt Max for 4 lepton case;p_{t};#",100,0.0,200.0);
1183     AddTH1(hDGenLeptons[19],"hDGenLeptons_19","Pt 2nd for 4 lepton case;p_{t};#",100,0.0,200.0);
1184     AddTH1(hDGenLeptons[20],"hDGenLeptons_20","Pt 3rd for 4 lepton case;p_{t};#",100,0.0,200.0);
1185     AddTH1(hDGenLeptons[21],"hDGenLeptons_21","Pt 4th for 4 lepton case;#",100,0.0,200.0);
1186     AddTH1(hDGenLeptons[22],"hDGenLeptons_22","Dilepton mass for 4 lepton case;m_{ll};#",1000,0.0,1000.0);
1187     AddTH1(hDGenLeptons[23],"hDGenLeptons_23","Fourlepton mass for 3 lepton case;m_{llll};#",1000,0.0,1000.0);
1188     AddTH1(hDGenLeptons[24],"hDGenLeptons_24","Delta R Minimum between leptons for 4 lepton case;#Delta R_{ll}#",100,0.0,5.0);
1189 loizides 1.1
1190 loizides 1.6 // all leptons
1191 ceballos 1.44 AddTH1(hDGenAllLeptons[0] ,"hDGenAllLeptons_0","Number of all leptons;N_{leptons};#",10,-0.5,9.5);
1192     AddTH1(hDGenAllLeptons[1] ,"hDGenAllLeptons_1","Pt all leptons;p_{t};#",100,0.0,200.0);
1193     AddTH1(hDGenAllLeptons[2] ,"hDGenAllLeptons_2","Eta all leptons;#eta;#",50,0.0,5.0);
1194     AddTH1(hDGenAllLeptons[3] ,"hDGenAllLeptons_3","Phi all leptons;#phi;#",90,0.0,180.0);
1195 ceballos 1.3
1196 loizides 1.6 // taus
1197 ceballos 1.44 AddTH1(hDGenTaus[0] ,"hDGenTaus_0","Number of taus;N_{tau};#",10,-0.5,9.5);
1198     AddTH1(hDGenTaus[1] ,"hDGenTaus_1","Pt taus;p_{t};#",100,0.0,200.0);
1199     AddTH1(hDGenTaus[2] ,"hDGenTaus_2","Eta taus;#eta;#",50,0.0,5.0);
1200     AddTH1(hDGenTaus[3] ,"hDGenTaus_3","Phi taus;#phi;#",90,0.0,180.0);
1201 loizides 1.1
1202 loizides 1.6 // neutrinos
1203 ceballos 1.44 AddTH1(hDGenNeutrinos[0] ,"hDGenNeutrinos_0","Number of neutrinos;N_{#nu};#",10,-0.5,9.5);
1204     AddTH1(hDGenNeutrinos[1] ,"hDGenNeutrinos_1","Pt neutrinos;p_{t};#",100,0.0,200.0);
1205     AddTH1(hDGenNeutrinos[2] ,"hDGenNeutrinos_2","Eta neutrinos;#eta;#",100,-5.0,5.0);
1206     AddTH1(hDGenNeutrinos[3] ,"hDGenNeutrinos_3","Phi neutrinos;#phi;#",90,0.0,180.0);
1207 loizides 1.1
1208 loizides 1.6 // quarks
1209 ceballos 1.44 AddTH1(hDGenQuarks[0] ,"hDGenQuarks_0" ,"Number of quarks;N_{quarks};#",10,-0.5,9.5);
1210     AddTH1(hDGenQuarks[1] ,"hDGenQuarks_1" ,"dijet pt for quarks;p_{t};#",200,0.0,400.);
1211     AddTH1(hDGenQuarks[2] ,"hDGenQuarks_2" ,"dijet mass for quarks;m_{jj};#",2000,0.0,2000.);
1212     AddTH1(hDGenQuarks[3] ,"hDGenQuarks_3" ,"dijet pt for quarks with |eta|<2.5;p_{t};#",200,0.0,400.);
1213     AddTH1(hDGenQuarks[4] ,"hDGenQuarks_4" ,"dijet mass for quarks with |eta|<2.5;m_{jj};#",2000,0.0,2000.);
1214     AddTH1(hDGenQuarks[5] ,"hDGenQuarks_5" ,"Pt for b quarks;p_{t};#",200,0.0,400.);
1215     AddTH1(hDGenQuarks[6] ,"hDGenQuarks_6" ,"Eta for b quarks;#eta;#",200,-10.0,10.);
1216     AddTH1(hDGenQuarks[7] ,"hDGenQuarks_7" ,"Phi for b quarks;#Phi;#",200,-TMath::Pi(),TMath::Pi());
1217     AddTH1(hDGenQuarks[8] ,"hDGenQuarks_8" ,"Pt for b quarks with |eta|<2.5;p_{t};#",200,0.0,400.);
1218     AddTH1(hDGenQuarks[9] ,"hDGenQuarks_9" ,"Eta for b quarks with |eta|<2.5;#eta;#",200,-10.0,10.);
1219     AddTH1(hDGenQuarks[10],"hDGenQuarks_10","Phi for b quarks with |eta|<2.5;#Phi;#",200,-TMath::Pi(),TMath::Pi());
1220     AddTH1(hDGenQuarks[11],"hDGenQuarks_11","Pt for t quarks;p_{t};#",200,0.0,400.);
1221     AddTH1(hDGenQuarks[12],"hDGenQuarks_12","Eta for t quarks;#eta;#",200,-10.0,10.);
1222     AddTH1(hDGenQuarks[13],"hDGenQuarks_13","Phi for t quarks;#Phi;#",200,-TMath::Pi(),TMath::Pi());
1223     AddTH1(hDGenQuarks[14],"hDGenQuarks_14","Pt for light quarks;p_{t};#",200,0.0,400.);
1224     AddTH1(hDGenQuarks[15],"hDGenQuarks_15","Eta for light quarks;#eta;#",200,-10.0,10.);
1225     AddTH1(hDGenQuarks[16],"hDGenQuarks_16","Phi for light quarks;#Phi;#",200,-TMath::Pi(),TMath::Pi());
1226 loizides 1.1
1227     // qqH
1228 ceballos 1.44 AddTH1(hDGenWBF[0] ,"hDGenWBF_0" ,"Delta Phi jj for WBF quarks;#Delta Phi_{jj};#",90,0.0,180.);
1229     AddTH1(hDGenWBF[1] ,"hDGenWBF_1" ,"Delta Eta jj for WBF quarks;#Delta #eta_{jj};#",100,0.0,10.);
1230     AddTH1(hDGenWBF[2] ,"hDGenWBF_2" ,"Pt max for WBF quarks;p_{t};#",200,0.0,400.);
1231     AddTH1(hDGenWBF[3] ,"hDGenWBF_3" ,"Pt min for WBF quarks;p_{t};#",200,0.0,400.);
1232     AddTH1(hDGenWBF[4] ,"hDGenWBF_4" ,"dijet mass for WBF quarks;m_{jj};#",200,0.0,4000.);
1233 loizides 1.1
1234 loizides 1.6 // bosons
1235 ceballos 1.44 AddTH1(hDGenBosons[0] ,"hDGenBosons_0" ,"Number of bosons;N_{bosons};#",10,-0.5,9.5);
1236     AddTH1(hDGenBosons[1] ,"hDGenBosons_1" ,"Pt of bosons;p_{t};#",200,0.0,400.0);
1237     AddTH1(hDGenBosons[2] ,"hDGenBosons_2" ,"Eta of bosons;#eta;#",100,-5.0,5.0);
1238     AddTH1(hDGenBosons[3] ,"hDGenBosons_3" ,"Phi of bosons;#Phi;#",2000,0.0,2000.0);
1239     AddTH1(hDGenBosons[4] ,"hDGenBosons_4" ,"Mass of bosons;m_{V};#",200,0.0,200.0);
1240     AddTH1(hDGenBosons[5] ,"hDGenBosons_5" ,"Mass of W bosons;m_{W};#",200,0.0,200.0);
1241     AddTH1(hDGenBosons[6] ,"hDGenBosons_6" ,"Mass of Z bosons;m_{Z};#",200,0.0,200.0);
1242     AddTH1(hDGenBosons[7] ,"hDGenBosons_7" ,"Number of W bosons + 4 * Z bosons;Number;#",13,-0.5,12.5);
1243 ceballos 1.10
1244     // photons
1245 ceballos 1.44 AddTH1(hDGenPhotons[0] ,"hDGenPhotons_0" ,"Number of photons;N_{photons};#",10,-0.5,9.5);
1246     AddTH1(hDGenPhotons[1] ,"hDGenPhotons_1" ,"Pt of photons;p_{t};#",200,0.0,400.0);
1247     AddTH1(hDGenPhotons[2] ,"hDGenPhotons_2" ,"Eta of photons;#eta;#",100,-5.0,5.0);
1248 ceballos 1.16
1249 loizides 1.40 // rad photons
1250 ceballos 1.44 AddTH1(hDGenRadPhotons[0] ,"hDGenRadPhotons_0" ,"Number of radiative photons;N_{photons};#",10,-0.5,9.5);
1251     AddTH1(hDGenRadPhotons[1] ,"hDGenRadPhotons_1" ,"Pt of radiative photons;p_{t};#",400,0.0,200.0);
1252     AddTH1(hDGenRadPhotons[2] ,"hDGenRadPhotons_2" ,"Eta of radiative photons;#eta;#",100,0.0,5.0);
1253     AddTH1(hDGenRadPhotons[3] ,"hDGenRadPhotons_3" ,"Status of mother of radiative photons;#eta;#",20,-0.5,19.5);
1254     AddTH1(hDGenRadPhotons[4] ,"hDGenRadPhotons_4" ,"IsGenerated+2*IsSimulated of radiative photons;IsGenerated+2*IsSimulated;#",4,-0.5,3.5);
1255     AddTH1(hDGenRadPhotons[5] ,"hDGenRadPhotons_5" ,"Delta R between photon and mother of radiative photons;#Delta R;#",500,0.0,5.0);
1256     AddTH1(hDGenRadPhotons[6] ,"hDGenRadPhotons_6" ,"Number of radiative photon with muon as a mother;Status;#",2,-0.5,1.5);
1257 ceballos 1.32
1258     // ISR photons
1259 ceballos 1.44 AddTH1(hDGenISRPhotons[0] ,"hDGenISRPhotons_0" ,"Number of ISR photons;N_{photons};#",10,-0.5,9.5);
1260     AddTH1(hDGenISRPhotons[1] ,"hDGenISRPhotons_1" ,"Pt of ISR photons;p_{t};#",400,0.0,200.0);
1261     AddTH1(hDGenISRPhotons[2] ,"hDGenISRPhotons_2" ,"Eta of ISR photons;#eta;#",100,0.0,5.0);
1262     AddTH1(hDGenISRPhotons[3] ,"hDGenISRPhotons_3" ,"Status of mother of radiative photons;#eta;#",20,-0.5,19.5);
1263     AddTH1(hDGenISRPhotons[4] ,"hDGenISRPhotons_4" ,"IsGenerated+2*IsSimulated of radiative photons;IsGenerated+2*IsSimulated;#",4,-0.5,3.5);
1264     AddTH1(hDGenISRPhotons[5] ,"hDGenISRPhotons_5" ,"Delta R between photon and mother of ISR photons;#Delta R;#",500,0.0,5.0);
1265 ceballos 1.32
1266 ceballos 1.42 // auxiliar for MG studies
1267 ceballos 1.44 AddTH1(hDVMass[0] ,"hDVMass_0" ,"Mass of munu candidates ;Mass;#",200,0.,200.);
1268     AddTH1(hDVMass[1] ,"hDVMass_1" ,"Mass of elnu candidates ;Mass;#",200,0.,200.);
1269     AddTH1(hDVMass[2] ,"hDVMass_2" ,"Mass of taunu candidates ;Mass;#",200,0.,200.);
1270     AddTH1(hDVMass[3] ,"hDVMass_3" ,"Mass of mumu candidates ;Mass;#",200,0.,200.);
1271     AddTH1(hDVMass[4] ,"hDVMass_4" ,"Mass of ee candidates ;Mass;#",200,0.,200.);
1272     AddTH1(hDVMass[5] ,"hDVMass_5" ,"Mass of tautau candidates;Mass;#",200,0.,200.);
1273     AddTH1(hDVMass[6] ,"hDVMass_6" ,"Mass of numunumu candidates;Mass;#",200,0.,200.);
1274     AddTH1(hDVMass[7] ,"hDVMass_7" ,"Mass of nuenue candidates;Mass;#",200,0.,200.);
1275     AddTH1(hDVMass[8] ,"hDVMass_8" ,"Mass of nutaunutau candidates;Mass;#",200,0.,200.);
1276     AddTH1(hDVMass[9] ,"hDVMass_9" ,"Mass of munu candidates for t events ;Mass;#",200,0.,200.);
1277     AddTH1(hDVMass[10],"hDVMass_10","Mass of elnu candidates for t events ;Mass;#",200,0.,200.);
1278     AddTH1(hDVMass[11],"hDVMass_11","Mass of taunu candidates for t events;Mass;#",200,0.,200.);
1279     AddTH1(hDVMass[12],"hDVMass_12","Mass of qq candidates for t events;Mass;#",200,0.,200.);
1280    
1281     // Special study about VVjets
1282     AddTH1(hDVVMass[0] ,"hDVVMass_0" ,"Mass of munu for WW events;Mass;#",200,0.,200.);
1283     AddTH1(hDVVMass[1] ,"hDVVMass_1" ,"Mass of munu WZ events;Mass;#",200,0.,200.);
1284     AddTH1(hDVVMass[2] ,"hDVVMass_2" ,"Mass of elnu WW events;Mass;#",200,0.,200.);
1285     AddTH1(hDVVMass[3] ,"hDVVMass_3" ,"Mass of elnu WZ events;Mass;#",200,0.,200.);
1286     AddTH1(hDVVMass[4] ,"hDVVMass_4" ,"Mass of taunu WW events;Mass;#",200,0.,200.);
1287     AddTH1(hDVVMass[5] ,"hDVVMass_5" ,"Mass of taunu WZ events;Mass;#",200,0.,200.);
1288     AddTH1(hDVVMass[6] ,"hDVVMass_6" ,"Mass of mumu WZ events;Mass;#",200,0.,200.);
1289     AddTH1(hDVVMass[7] ,"hDVVMass_7" ,"Mass of mumu ZZ events;Mass;#",200,0.,200.);
1290     AddTH1(hDVVMass[8] ,"hDVVMass_8" ,"Mass of ee WZ events;Mass;#",200,0.,200.);
1291     AddTH1(hDVVMass[9] ,"hDVVMass_9" ,"Mass of ee ZZ events;Mass;#",200,0.,200.);
1292     AddTH1(hDVVMass[10],"hDVVMass_10","Mass of tautau WZ events;Mass;#",200,0.,200.);
1293     AddTH1(hDVVMass[11],"hDVVMass_11","Mass of tautau ZZ events;Mass;#",200,0.,200.);
1294     AddTH1(hDVVMass[12],"hDVVMass_12","Mass of numunumu WZ events;Mass;#",200,0.,200.);
1295     AddTH1(hDVVMass[13],"hDVVMass_13","Mass of numunumu ZZ events;Mass;#",200,0.,200.);
1296     AddTH1(hDVVMass[14],"hDVVMass_14","Mass of nuenue WZ events;Mass;#",200,0.,200.);
1297     AddTH1(hDVVMass[15],"hDVVMass_15","Mass of nuenue ZZ events;Mass;#",200,0.,200.);
1298     AddTH1(hDVVMass[16],"hDVVMass_16","Mass of nutaunutau WZ events;Mass;#",200,0.,200.);
1299     AddTH1(hDVVMass[17],"hDVVMass_17","Mass of nutaunutau ZZ events;Mass;#",200,0.,200.);
1300     AddTH1(hDVVMass[18],"hDVVMass_18","Ratios for WW events;Type;#",7,-0.5,6.5);
1301     AddTH1(hDVVMass[19],"hDVVMass_19","Ratios for WZ events;Type;#",10,-0.5,9.5);
1302     AddTH1(hDVVMass[20],"hDVVMass_20","Ratios for ZZ2l events;Type;#",7,-0.5,6.5);
1303     AddTH1(hDVVMass[21],"hDVVMass_21","Ratios for ZZ4l events;Type;#",16,-0.5,15.5);
1304     AddTH1(hDVVMass[22],"hDVVMass_22","Maximum mass for WW events;Mass;#",200,0.,200.);
1305     AddTH1(hDVVMass[23],"hDVVMass_23","Minimum mass for WW events;Mass;#",200,0.,200.);
1306     AddTH1(hDVVMass[24],"hDVVMass_24","Maximum mass for WZ events;Mass;#",200,0.,200.);
1307     AddTH1(hDVVMass[25],"hDVVMass_25","Minimum mass for WZ events;Mass;#",200,0.,200.);
1308     AddTH1(hDVVMass[26],"hDVVMass_26","Maximum mass for ZZ events;Mass;#",200,0.,200.);
1309     AddTH1(hDVVMass[27],"hDVVMass_27","Minimum mass for ZZ events;Mass;#",200,0.,200.);
1310 loizides 1.1 }
1311     }