14 Skim list building functions for EWP inclusive skims:
15 B->Xgamma, B->Xll, B->Xll (LFV modes)
20 import modularAnalysis
as ma
21 from skim
import BaseSkim, fancy_skim_header
22 from stdCharged
import stdE, stdK, stdMu, stdPi
23 from stdPhotons
import stdPhotons
24 from variables
import variables
as vm
26 __liaison__ =
"Rahul Tiwary <rahul.tiwary@tifr.res.in>"
27 _VALIDATION_SAMPLE =
"mdst14.root"
33 Reconstructed decay modes:
35 * :math:`B^+ \\to X\\gamma` inclusive
39 * :math:`\\text{foxWolframR2} < 0.7` constructed using tracks with
40 :math:`p_T>0.1\\,\\text{GeV}` and clusters with :math:`E>0.1\\,\\text{GeV}`.
41 * :math:`n_{\\text{tracks}} \\geq 3`
45 * :math:`\\text{clusterE9E21}>0.9`
46 * :math:`1.4\\,\\text{GeV}<\\E_{\\gamma}<3.4\\,\\text{GeV}` in CMS frame
49 __authors__ = [
"Trevor Shillington"]
50 __description__ =
":math:`B\\to X\\gamma` inclusive skim."
51 __contact__ = __liaison__
52 __category__ =
"physics, electroweak penguins, radiative decays"
54 validation_sample = _VALIDATION_SAMPLE
57 stdPi(
"all", path=path)
58 stdPhotons(
"loose", path=path, loadPhotonBeamBackgroundMVA=
False)
61 """Build the skim list for :math:`B \\to X\\gamma` decays."""
63 ma.fillParticleList(decayString=
'pi+:BtoXgamma_eventshape', cut=
'pt > 0.1', path=path)
64 ma.fillParticleList(decayString=
'gamma:BtoXgamma_eventshape', cut=
'E > 0.1', path=path,
65 loadPhotonBeamBackgroundMVA=
False)
67 ma.buildEventShape(inputListNames=[
'pi+:BtoXgamma_eventshape',
'gamma:BtoXgamma_eventshape'],
70 harmonicMoments=
False,
76 checkForDuplicates=
False,
80 path = self.
skim_event_cutsskim_event_cuts(
'foxWolframR2 < 0.7 and nTracks >= 3', path=path)
83 ma.cutAndCopyList(
'gamma:ewp',
'gamma:loose',
'clusterE9E21 > 0.9 and 1.4 < useCMSFrame(E) < 3.4', path=path)
85 ma.reconstructDecay(
'B+:gamma -> gamma:ewp',
'', path=path, allowChargeViolation=
True)
94 histogram_filename = f
'{self}_Validation.root'
96 stdK(
'all', path=path)
97 stdPhotons(
'cdc', path=path, loadPhotonBeamBackgroundMVA=
False)
98 ma.cutAndCopyList(
'gamma:sig',
'gamma:cdc',
'clusterNHits > 1.5 and E > 1.5',
True, path)
100 ma.reconstructDecay(
'K*0:sig -> K+:all pi-:all',
'0.6 < M < 1.6', path=path)
101 ma.reconstructDecay(
'B0:sig -> K*0:sig gamma:sig',
'5.22 < Mbc < 5.3 and abs(deltaE)< .5', path=path)
104 create_validation_histograms(
105 rootfile=histogram_filename,
106 particlelist=
'B0:sig',
108 (
'Mbc', 100, 5.2, 5.3,
'Signal B0 Mbc', __liaison__,
109 'Mbc of the signal B0',
'',
'Mbc [GeV/c^2]',
'Candidates'),
110 (
'deltaE', 100, -1, 1,
'Signal B0 deltaE', __liaison__,
111 'deltaE of the signal B0',
'',
'deltaE [GeV]',
'Candidates')
120 Reconstructed decay modes:
122 * :math:`B^+ \\to X e^+ e^-`
123 * :math:`B^+ \\to X e^+ e^+`
124 * :math:`B^+ \\to X \\mu^+ \\mu^-`
125 * :math:`B^+ \\to X \\mu^+ \\mu^+`
130 * :math:`\\text{foxWolframR2} < 0.7` constructed using tracks with
131 :math:`p_T>0.1\\,\\text{GeV}` and clusters with :math:`E>0.1\\,\\text{GeV}`.
132 * :math:`n_{\\text{tracks}} \\geq 3`
136 * :math:`\\text{electronID} > 0.1`
137 * :math:`p > 0.395\\,\\text{GeV}` in lab frame
138 * :math:`dr<0.5 and abs(dz)<2`
142 * :math:`\\text{muonID} > 0.5`
143 * :math:`p > 0.395\\,\\text{GeV}` in lab frame
144 * :math:`dr<0.5 and abs(dz)<2`
147 Cut on dilepton energy:
149 * :math:`E_{\\ell\\ell}>1.5\\,\\text{GeV}` in CMS frame.
152 __authors__ = [
"Trevor Shillington"]
153 __description__ =
":math:`B\\to X\\ell\\ell` (no LFV modes) inclusive skim."
154 __contact__ = __liaison__
155 __category__ =
"physics, electroweak penguins, radiative decays"
157 validation_sample = _VALIDATION_SAMPLE
160 stdE(
"all", path=path)
161 stdMu(
"all", path=path)
162 stdPi(
"all", path=path)
163 stdPhotons(
"all", path=path, loadPhotonBeamBackgroundMVA=
False)
166 """Build the skim list for :math:`B \\to X\\ell\\ell` non-LFV decays."""
169 ma.fillParticleList(decayString=
'pi+:BtoXll_eventshape', cut=
'pt > 0.1', path=path)
170 ma.fillParticleList(decayString=
'gamma:BtoXll_eventshape', cut=
'E > 0.1', path=path)
172 ma.buildEventShape(inputListNames=[
'pi+:BtoXll_eventshape',
'gamma:BtoXll_eventshape'],
175 harmonicMoments=
False,
181 checkForDuplicates=
False,
185 path = self.
skim_event_cutsskim_event_cuts(
'foxWolframR2 < 0.7 and nTracks >= 3', path=path)
189 fairTrack =
'dr < 0.5 and abs(dz) < 2'
191 ma.cutAndCopyList(
'e+:ewp',
'e+:all',
'p > 0.395 and electronID_noTOP > 0.1 and ' + fairTrack, path=path)
192 ma.cutAndCopyList(
'mu+:ewp',
'mu+:all',
'p > 0.395 and muonID > 0.5 and ' + fairTrack, path=path)
195 E_dilep_cut =
'formula(daughter(0, useCMSFrame(E))+daughter(1, useCMSFrame(E))) > 1.5'
199 ma.reconstructDecay(
'B+:ch1 -> e+:ewp e-:ewp', E_dilep_cut, dmID=1, path=path, allowChargeViolation=
True)
200 ma.reconstructDecay(
'B+:ch2 -> mu+:ewp mu-:ewp', E_dilep_cut, dmID=2, path=path, allowChargeViolation=
True)
202 ma.reconstructDecay(
'B+:ch3 -> e+:ewp e+:ewp', E_dilep_cut, dmID=3, path=path, allowChargeViolation=
True)
203 ma.reconstructDecay(
'B+:ch4 -> mu+:ewp mu+:ewp', E_dilep_cut, dmID=4, path=path, allowChargeViolation=
True)
205 ma.copyLists(
'B+:xll', [
'B+:ch1',
'B+:ch2',
'B+:ch3',
'B+:ch4'], path=path)
214 histogram_filename = f
'{self}_Validation.root'
216 stdK(listtype=
'good', path=path)
217 stdMu(listtype=
'good', path=path)
218 ma.reconstructDecay(
"B+:signal -> K+:good mu+:good mu-:good",
"Mbc > 5.2 and deltaE < 0.5 and deltaE > -0.5", path=path)
220 create_validation_histograms(
221 rootfile=histogram_filename,
222 particlelist=
'B+:signal',
224 (
'deltaE', 100, -0.5, 0.5,
'Signal B deltaE', __liaison__,
225 'deltaE of the Signal B',
'',
'deltaE [GeV]',
'Candidates'),
226 (
'Mbc', 100, 5.2, 5.3,
'Signal B Mbc', __liaison__,
227 'Mbc of the signal B',
'',
'Mbc [GeV/c^2]',
'Candidates')],
235 Reconstructed decay modes:
237 * :math:`B^+ \\to X e^+ \\mu^-`
238 * :math:`B^+ \\to X \\mu^+ e^-`
239 * :math:`B^+ \\to X e^+ \\mu^+`
244 * :math:`\\text{foxWolframR2} < 0.7` constructed using tracks with
245 :math:`p_T>0.1\\,\\text{GeV}` and clusters with :math:`E>0.1\\,\\text{GeV}`.
246 * :math:`n_{\\text{tracks}} \\geq 3`
250 * :math:`\\text{electronID} > 0.1`
251 * :math:`p > 0.395\\,\\text{GeV}` in lab frame
252 * :math:`dr<0.5 and abs(dz)<2`
256 * :math:`\\text{muonID} > 0.5`
257 * :math:`p > 0.395\\,\\text{GeV}` in lab frame
258 * :math:`dr<0.5 and abs(dz)<2`
261 Cut on dilepton energy:
263 * :math:`E_{\\ell\\ell}>1.5\\,\\text{GeV}` in CMS frame.
266 __authors__ = [
"Trevor Shillington"]
267 __description__ =
":math:`B\\to X\\ell\\ell` (LFV modes only) inclusive skim."
268 __contact__ = __liaison__
269 __category__ =
"physics, electroweak penguins, radiative decays"
272 stdE(
"all", path=path)
273 stdMu(
"all", path=path)
274 stdPi(
"all", path=path)
275 stdPhotons(
"all", path=path, loadPhotonBeamBackgroundMVA=
False)
278 """Build the skim list for :math:`B \\to X\\ell\\ell` LFV decays."""
280 ma.cutAndCopyList(
'pi+:BtoXllLFV_eventshape',
'pi+:all',
'pt> 0.1', path=path)
281 ma.cutAndCopyList(
'gamma:BtoXllLFV_eventshape',
'gamma:all',
'E > 0.1', path=path)
284 ma.buildEventShape(inputListNames=[
'pi+:BtoXllLFV_eventshape',
'gamma:BtoXllLFV_eventshape'],
287 harmonicMoments=
False,
293 checkForDuplicates=
False,
297 path = self.
skim_event_cutsskim_event_cuts(
'foxWolframR2 < 0.7 and nTracks >= 3', path=path)
301 fairTrack =
'dr < 0.5 and abs(dz) < 2'
303 ma.cutAndCopyList(
'e+:ewp',
'e+:all',
'p > 0.395 and electronID_noTOP > 0.1 and ' + fairTrack, path=path)
304 ma.cutAndCopyList(
'mu+:ewp',
'mu+:all',
'p > 0.395 and muonID > 0.5 and ' + fairTrack, path=path)
307 E_dilep_cut =
'formula(daughter(0, useCMSFrame(E))+daughter(1, useCMSFrame(E))) > 1.5'
311 ma.reconstructDecay(
'B+:lfvch1 -> e+:ewp mu-:ewp', E_dilep_cut, dmID=1, path=path, allowChargeViolation=
True)
312 ma.reconstructDecay(
'B+:lfvch2 -> mu+:ewp e-:ewp', E_dilep_cut, dmID=2, path=path, allowChargeViolation=
True)
314 ma.reconstructDecay(
'B+:lfvch3 -> e+:ewp mu+:ewp', E_dilep_cut, dmID=3, path=path, allowChargeViolation=
True)
316 ma.copyLists(
'B+:lfv', [
'B+:lfvch1',
'B+:lfvch2',
'B+:lfvch3'], path=path)
323 Reconstructed decay modes:
325 * :math:`B^+ \\to K\\nu\\nu` inclusive
329 * :math:`thetaInCDCAcceptance`
330 * :math:`dr<0.5 and abs(dz)<3.0`
333 * :math:`3 < nCleanedTracks < 11`
336 * :math:`track cleanup + event cleanup + nPXDHits > 0`
338 * :math:`kaonID>0.01`
341 * mva_identifier: MVAFastBDT_InclusiveBplusToKplusNuNu_Skim
342 * Global Tag: mva_inclusiveBplusToKplusNuNu
343 * :math:`mva\\_identifier > 0.5`
346 __authors__ = [
"Cyrille Praz"]
347 __description__ =
"Inclusive skim for :math:`B\\to K\\nu\\nu` analysis"
348 __contact__ = __liaison__
349 __category__ =
"physics, electroweak penguins, radiative decays"
351 NoisyModules = [
"ParticleCombiner"]
352 validation_sample = _VALIDATION_SAMPLE
357 track_cleanup =
'pt > 0.1'
358 track_cleanup +=
' and thetaInCDCAcceptance'
359 track_cleanup +=
' and abs(dz) < 3.0'
360 track_cleanup +=
' and dr < 0.5'
363 event_cleanup =
'nCleanedTracks({}) > 3'.format(track_cleanup)
364 event_cleanup +=
' and nCleanedTracks({}) < 11'.format(track_cleanup)
367 total_cleanup = track_cleanup +
' and ' + event_cleanup +
' and ' +
'nPXDHits>0'
368 ma.fillParticleList(
'K+:inclusiveBplusToKplusNuNu', cut=total_cleanup, path=path)
369 ma.rankByHighest(
'K+:inclusiveBplusToKplusNuNu',
'pt', path=path)
370 ma.applyCuts(
'K+:inclusiveBplusToKplusNuNu',
'extraInfo(pt_rank)==1', path=path)
371 ma.applyCuts(
'K+:inclusiveBplusToKplusNuNu',
'kaonID>1e-2', path=path)
372 ma.reconstructDecay(decayString=
'B+:inclusiveBplusToKplusNuNu -> K+:inclusiveBplusToKplusNuNu', cut=
'', path=path)
375 ma.buildEventShape(inputListNames=[],
376 default_cleanup=
True,
381 harmonicMoments=
True,
385 checkForDuplicates=
False,
389 mva_identifier =
'MVAFastBDT_InclusiveBplusToKplusNuNu_Skim'
390 b2.conditions.append_globaltag(
'mva_inclusiveBplusToKplusNuNu')
391 path.add_module(
'MVAExpert', listNames=[
'B+:inclusiveBplusToKplusNuNu'],
392 extraInfoName=mva_identifier, identifier=mva_identifier)
393 vm.addAlias(mva_identifier, f
'extraInfo({mva_identifier})')
394 ma.applyCuts(
'B+:inclusiveBplusToKplusNuNu', mva_identifier +
'>0.5', path=path)
396 return [
'B+:inclusiveBplusToKplusNuNu']
403 histogram_filename = f
'{self}_Validation.root'
405 track_cleanup =
'pt > 0.1'
406 track_cleanup +=
' and thetaInCDCAcceptance'
407 track_cleanup +=
' and abs(dz) < 3.0'
408 track_cleanup +=
' and abs(dr) < 0.5'
411 vm.addAlias(
'kaon_pt',
'daughter(0,pt)')
412 vm.addAlias(
'nCleanedTracks_simple_cleanup',
'nCleanedTracks({})'.format(track_cleanup))
415 create_validation_histograms(
416 rootfile=histogram_filename,
417 particlelist=
'B+:inclusiveBplusToKplusNuNu',
425 'Transverse momentum of the kaon candidate',
426 'Maximum between 1.5 and 2 GeV/c',
429 (
'nCleanedTracks_simple_cleanup',
433 'Number of cleaned tracks',
435 'Number of cleaned tracks in the event',
436 'Should be between 4 and 10, with two local maxima at 4 and 6',
437 'Number of cleaned tracks',
445 'Sphericity computed by ma.buildEventShape',
446 'Maximum around 0.3',
def build_lists(self, path)
def validation_histograms(self, path)
def load_standard_lists(self, path)
def build_lists(self, path)
def load_standard_lists(self, path)
def build_lists(self, path)
def validation_histograms(self, path)
def load_standard_lists(self, path)
def build_lists(self, path)
def validation_histograms(self, path)
def skim_event_cuts(self, cut, *path)