4 """ Skim list building functions for the dark sector physics working group """
17 import modularAnalysis
as ma
19 from skimExpertFunctions
import BaseSkim, fancy_skim_header, get_test_file
20 from stdCharged
import stdE, stdMu
21 from stdPhotons
import stdPhotons
22 import vertex
as vertex
24 __liaison__ =
"Sascha Dreyer <sascha.dreyer@desy.de>"
30 **Physics channel**: ee → A'γ; A' → invisible
32 Skim list contains single photon candidates for the dark photon to invisible final
35 __authors__ = [
"Sam Cunliffe",
"Chris Hearty"]
36 __contact__ = __liaison__
37 __description__ =
"Single photon skim list for the dark photon analysis."
38 __category__ =
"physics, dark sector"
46 in_tracking_acceptance =
"0.296706 < theta < 2.61799"
48 "gamma:singlePhoton",
"gamma:all",
49 f
"useCMSFrame(E) > 0.5 and {in_tracking_acceptance}", path=path)
53 region_dependent =
" [clusterTheta < 1.65457213 and clusterTheta > 0.77143553] or "
54 region_dependent +=
"[clusterReg == 2 and useCMSFrame(E) > 1.0] or "
55 region_dependent +=
"[clusterReg == 1 and useCMSFrame(E) > 2.0] or "
56 region_dependent +=
"[clusterReg == 3 and useCMSFrame(E) > 2.0] or "
57 region_dependent +=
"[clusterReg == 11 and useCMSFrame(E) > 2.0] or "
58 region_dependent +=
"[clusterReg == 13 and useCMSFrame(E) > 2.0]"
59 ma.applyCuts(
"gamma:singlePhoton", region_dependent, path=path)
62 good_tracks =
'abs(dz) < 2.0 and abs(dr) < 0.5 and pt > 0.15'
64 f
"nParticlesInList(gamma:singlePhoton) == 1 and nCleanedTracks({good_tracks}) == 0",
72 not_in_signal_list =
"isInList(gamma:singlePhoton) < 1"
73 in_time =
"maxWeightedDistanceFromAverageECLTime < 1"
74 ma.cutAndCopyList(
"gamma:to_veto",
"gamma:all",
75 f
"E > 0.55 and {not_in_signal_list}", path=path)
76 ma.rankByHighest(
"gamma:to_veto",
"E", numBest=1, path=path)
77 ma.reconstructDecay(
"vpho:veto -> gamma:singlePhoton gamma:to_veto",
79 veto_additional_in_time_cluster =
'nParticlesInList(vpho:veto) < 1'
85 ma.applyCuts(
"gamma:singlePhoton", veto_additional_in_time_cluster, path=path)
91 __authors__ = [
"Michael De Nuccio"]
93 "Neutral dark sector skim list for the ALP 3-photon analysis: "
94 ":math:`ee\\to a(\\to\\gamma\\gamma)\\gamma`"
96 __contact__ = __liaison__
97 __category__ =
"physics, dark sector"
100 """Adds the ALP codes to the basf2 pdg instance """
106 An list builder function for the ALP decays. Part of the `ALP3Gamma` skim.
109 path (basf2.Path): the path to add the skim
112 list name of the ALP decays candidates
119 'gamma:cdcAndMinimumEnergy',
120 'E >= 0.1 and theta >= 0.297 and theta <= 2.618',
125 ALPchannels = [
'gamma:cdcAndMinimumEnergy gamma:cdcAndMinimumEnergy']
129 for chID, channel
in enumerate(ALPchannels):
130 mode =
'ALP:' + str(chID) +
' -> ' + channel
132 ma.reconstructDecay(mode, ALPcuts, chID, path=path)
134 ALPList.append(
'ALP:' + str(chID))
144 beamcuts =
"InvM >= formula(0.8 * Ecms) and InvM <= formula(1.05 * Ecms) and maxWeightedDistanceFromAverageECLTime <= 2"
149 ma.fillParticleList(
"gamma:minimumEnergy",
"E >= 0.1",
True, path=path)
154 for chID, channel
in enumerate(ALPList):
155 mode =
"beam:" + str(chID) +
" -> gamma:minimumEnergy " + channel
157 ma.reconstructDecay(mode, beamcuts, chID, path=path)
158 beamList.append(
"beam:" + str(chID))
165 **Physics channel**: :math:`e^{+}e^{-} \\to \\mu^{+}\\mu^{-} \\, +` missing energy.
167 __authors__ = [
"Giacomo De Pietro"]
169 "Dimuon + missing energy skim, needed for :math:`e^{+}e^{-} \\to \\mu^{+}\\mu^{-}"
170 "Z^{\\prime}; \\, Z^{\\prime} \\to \\mathrm{invisible}` and other searches."
172 __contact__ = __liaison__
173 __category__ =
"physics, dark sector"
176 stdMu(
"all", path=path)
180 skim_label =
"forDimuonMissingEnergySkim"
181 dimuon_name =
"Z0:" + skim_label
184 fromIP_cut =
"[abs(dz) < 5.0] and [abs(dr) < 2.0]"
185 muonID_cut =
"[muonID > 0.3]"
187 dimuon_cut =
"[nCleanedTracks(" + fromIP_cut +
") < 4]"
189 dimuon_cut +=
" and [useCMSFrame(pt) > 0.2]"
192 ma.cutAndCopyList(
"mu+:" + skim_label,
"mu+:all", fromIP_cut +
" and " + muonID_cut, path=path)
193 ma.reconstructDecay(dimuon_name +
" -> mu+:" + skim_label +
" mu-:" + skim_label, dimuon_cut, path=path)
196 dimuon_list.append(dimuon_name)
202 __authors__ = [
"Giacomo De Pietro"]
204 "Electron-muon pair + missing energy skim, needed for :math:`e^{+}e^{-} \\to "
205 "e^{\\pm}\\mu^{\\mp} Z^{\\prime}; \\, Z^{\\prime} \\to \\mathrm{invisible}` and other "
208 __contact__ = __liaison__
209 __category__ =
"physics, dark sector"
212 stdE(
"all", path=path)
213 stdMu(
"all", path=path)
217 **Physics channel**: :math:`e^{+}e^{-} \\to e^{\\pm}\\mu^{\\mp} \\, +` missing energy
220 skim_label =
"forElectronMuonMissingEnergySkim"
221 emu_name =
"Z0:" + skim_label
224 fromIP_cut =
"[abs(dz) < 5.0] and [abs(dr) < 2.0]"
225 electronID_cut =
"[electronID > 0.3]"
226 muonID_cut =
"[muonID > 0.3]"
228 theta_cut =
"[0.387 < theta < 2.421]"
230 emu_cut =
"[nCleanedTracks(" + fromIP_cut +
") < 4]"
232 emu_cut +=
" and [useCMSFrame(pt) > 0.2]"
235 ma.cutAndCopyList(
"e+:" + skim_label,
"e+:all", fromIP_cut +
" and " + electronID_cut +
" and " + theta_cut, path=path)
236 ma.cutAndCopyList(
"mu+:" + skim_label,
"mu+:all", fromIP_cut +
" and " + muonID_cut, path=path)
237 ma.reconstructDecay(emu_name +
" -> e+:" + skim_label +
" mu-:" + skim_label, emu_cut, path=path)
240 emu_list.append(emu_name)
246 __authors__ = [
"Ilya Komarov"]
247 __description__ =
"Lepton flavour violating Z' skim, Z' to visible FS."
248 __contact__ = __liaison__
249 __category__ =
"physics, dark sector"
252 stdE(
"all", path=path)
253 stdE(
"loose", path=path)
257 **Physics channel**: ee --> e mu Z'; Z' --> e mu
262 track_cuts =
"abs(dz) < 2.0 and abs(dr) < 0.5"
263 Event_cuts_vis =
"nCleanedTracks(abs(dz) < 2.0 and abs(dr) < 0.5) == 4"
265 ma.cutAndCopyList(
"e+:lfvzp",
"e+:all", track_cuts, path=path)
268 LFVZpVisChannel =
"e+:lfvzp e+:lfvzp e-:lfvzp e-:lfvzp"
270 ma.reconstructDecay(
"vpho:vislfvzp -> " + LFVZpVisChannel, Event_cuts_vis, path=path)
272 lfvzp_list.append(
"vpho:vislfvzp")
275 LFVZpVisChannel =
"e+:lfvzp e+:lfvzp e-:lfvzp"
276 Event_cuts_vis =
"nCleanedTracks(abs(dz) < 2.0 and abs(dr) < 0.5) == 3"
278 ma.reconstructDecay(
"vpho:3tr_vislfvzp -> " + LFVZpVisChannel, Event_cuts_vis, path=path, allowChargeViolation=
True)
280 lfvzp_list.append(
"vpho:3tr_vislfvzp")
283 LFVZpVisChannel =
"e+:lfvzp e+:lfvzp"
284 Event_cuts_vis =
"nCleanedTracks(abs(dz) < 2.0 and abs(dr) < 0.5) == 2"
285 ma.reconstructDecay(
"vpho:2tr_vislfvzp -> " + LFVZpVisChannel, Event_cuts_vis, path=path, allowChargeViolation=
True)
287 lfvzp_list.append(
"vpho:2tr_vislfvzp")
295 **Physics channel**: ee → eγ
298 __authors__ = [
"Sam Cunliffe",
"Torben Ferber"]
300 "Electron-gamma skim list for study of the ee backgrounds at high dark "
301 "photon mass, as part of the dark photon analysis"
303 __contact__ = __liaison__
304 __category__ =
"physics, dark sector, control-channel"
308 stdE(
"all", path=path)
313 internal_skim_label =
"forEGammaSkim"
314 skim_output_label =
"EGammaControl"
318 phys_perf_good_track =
'abs(dr) < 1 and abs(dz) < 3 and pt > 0.15'
319 one_good_track = f
'[nCleanedTracks({phys_perf_good_track}) == 1]'
322 photon_energy_cut =
'0.45'
323 good_photon =
'theta > 0.296706 and theta < 2.61799' +\
324 f
' and useCMSFrame(E) > {photon_energy_cut}'
325 ma.cutAndCopyList(f
'gamma:{internal_skim_label}',
'gamma:all', good_photon, path=path)
326 one_good_photon = f
'[eventCached(nParticlesInList(gamma:{internal_skim_label})) == 1]'
329 event_cuts = f
'{one_good_photon} and {one_good_track}'
333 good_track_w_hie_cluster_match =
'%s and clusterE > 2.0' % phys_perf_good_track
334 ma.cutAndCopyList(f
'e+:{internal_skim_label}',
'e+:all', good_track_w_hie_cluster_match, path=path)
338 f
'vpho:{skim_output_label} -> e+:{internal_skim_label} gamma:{internal_skim_label}',
339 '', 1, allowChargeViolation=
True, path=path)
340 self.
SkimLists = [f
"vpho:{skim_output_label}"]
346 **Physics channel**: ee → γγ
349 This skim can retain a lot of γγ events.
350 In case this becomes unacceptable, we provide prescale parameters.
351 Prescales are given in standard trigger convention (reciprocal),
352 so prescale of 100 is 1% of events kept, etc.
355 To prescale the higher-energy probe photons by 10%:
357 >>> from skim.dark import GammaGammaControlKLMDark
358 >>> Skim = GammaGammaControlKLMDark(prescale_high=10)
359 >>> Skim(path) # Add list-building function and uDST output module to path
363 __authors__ = [
"Sam Cunliffe",
"Miho Wakai"]
365 "Gamma gamma skim list for study of the KLM efficiency as part of "
366 "the dark photon analysis"
368 __contact__ = __liaison__
369 __category__ =
"physics, dark sector, control-channel"
374 TestFiles = [get_test_file(
"MC13_ggBGx1")]
376 def __init__(self, prescale_high=1, prescale_low=1, **kwargs):
379 prescale_high (int): the prescale for more energetic probe photon
380 prescale_low (int): the prescale for a less energetic probe photon
381 **kwargs: Passed to constructor of `BaseSkim`.
392 if (prescale_high, prescale_low)
is not (1, 1):
394 "GammaGammaControlKLMDarkList is prescaled. "
395 f
"prescale_high={prescale_high}, prescale_low={prescale_low}"
397 prescale_high = str(float(1.0 / prescale_high))
398 prescale_low = str(float(1.0 / prescale_low))
401 good_tracks =
"abs(dz) < 2.0 and abs(dr) < 0.5 and pt > 0.2"
402 no_good_tracks = f
"nCleanedTracks({good_tracks}) < 1"
407 "gamma:controlKLM",
"gamma:all",
"0.1 < useCMSFrame(clusterE) < 7", path=path)
408 ma.rankByHighest(
"gamma:controlKLM",
"useCMSFrame(clusterE)", numBest=2, path=path)
414 tag_daughter =
"daughterHighest(useCMSFrame(clusterE)) > 4.5"
420 probe_high = f
"[daughterLowest(useCMSFrame(clusterE)) > 4.5] and [eventRandom < {prescale_high}]"
421 probe_low = f
"[daughterLowest(useCMSFrame(clusterE)) < 4.5] and [eventRandom < {prescale_low}]"
422 prescale = f
"[ {probe_high} ] or [ {probe_low} ]"
425 delta_phi_cut =
"abs(daughterDiffOfPhiCMS(0, 1)) > 3.1066860685499065"
428 sum_th =
"daughterSumOf(useCMSFrame(theta))"
429 sum_th_cut = f
"3.1066860685499065 < {sum_th} < 3.1764992386296798"
432 cuts = [no_good_tracks, tag_daughter, prescale, delta_phi_cut, sum_th_cut]
433 cuts =
" and ".join([f
"[ {cut} ]" for cut
in cuts])
436 "vpho:singlePhotonControlKLM -> gamma:controlKLM gamma:controlKLM",
438 self.
SkimLists = [
"vpho:singlePhotonControlKLM"]
444 **Physics channel**: :math:`e^{+}e^{-} \\to e^{+}e^{-}`
447 This skim is currently deactivated, since the retention rate is too high.
450 __authors__ =
"Giacomo De Pietro"
452 "Dielectron skim, needed for :math:`e^{+}e^{-} \\to A^{\\prime} h^{\\prime};`"
453 ":math:`A^{\\prime} \\to e^{+}e^{-}; \\, h^{\\prime} \\to \\mathrm{invisible}` and other searches."
455 __contact__ = __liaison__
456 __category__ =
"physics, dark sector"
459 stdE(
"all", path=path)
461 TestFiles = [get_test_file(
"MC13_mumuBGx1")]
465 skim_label =
"forDielectronMissingEnergySkim"
466 dielectron_name = f
"Z0:{skim_label}"
469 fromIP_cut =
"[abs(dz) < 5.0] and [abs(dr) < 2.0]"
470 electronID_cut =
"[electronID > 0.2]"
472 theta_cut =
"[0.387 < theta < 2.421]"
474 dielectron_cut = f
"[nCleanedTracks({fromIP_cut}) == 2]"
476 dielectron_cut +=
" and [useCMSFrame(pt) > 0.2]"
479 electron_cuts =
" and ".join([fromIP_cut, electronID_cut, theta_cut])
480 ma.cutAndCopyList(f
"e+:{skim_label}",
"e+:all", electron_cuts, path=path)
481 ma.reconstructDecay(f
"{dielectron_name} -> e+:{skim_label} e-:{skim_label}", dielectron_cut, path=path)
484 dielectron_list.append(dielectron_name)
492 Control sample: :math:`e^{+}e^{-} \\to e^{+}e^{-}V^{0};`"
495 __authors__ =
"Savino Longo"
497 "iDM control sample skim. :math:`e^{+}e^{-} \\to e^{+}e^{-}V^{0};`"
499 __contact__ = __liaison__
500 __category__ =
"physics, dark sector"
504 stdE(
"all", path=path)
509 BhabhaTrackCuts =
'abs(dr)<0.5 and abs(dz)<2 and pt>0.2 and 0.8<clusterEoP<1.2 and p>1.0 and clusterReg==2 and nCDCHits>4'
510 BhabhaSystemCuts =
'4<M<10 and 0.5<pRecoilTheta<2.25'
511 V0TrackCuts =
'nCDCHits>4 and p<3.0'
513 PhotonVetoCuts =
'p>1.0'
515 ma.cutAndCopyList(
"gamma:HighEGammaVeto",
"gamma:all", PhotonVetoCuts, path=path)
516 ma.cutAndCopyList(
"e+:BhabhaTrack",
"e+:all", BhabhaTrackCuts, path=path)
517 ma.cutAndCopyList(
"e+:V0Track",
"e+:all", V0TrackCuts, path=path)
519 ma.reconstructDecay(
"vpho:BhabhaSysyem -> e+:BhabhaTrack e-:BhabhaTrack", BhabhaSystemCuts, path=path)
521 ma.reconstructDecay(
"vpho:V0System -> e+:V0Track e-:V0Track",
'', path=path)
523 ma.applyCuts(
'vpho:V0System', V0Cuts, path=path)
525 ma.reconstructDecay(
'vpho:Total -> vpho:BhabhaSysyem vpho:V0System',
'', path=path)
527 eventCuts = (
'nParticlesInList(gamma:HighEGammaVeto)<1 and '
528 'nParticlesInList(vpho:Total)>0')
538 Skim list contains events with no tracks from IP, no high E tracks and only one high E photon.
540 __authors__ = [
"Savino Longo"]
541 __contact__ = __liaison__
542 __description__ =
"iDM list for the iDM analysis."
543 __category__ =
"physics, dark sector"
547 stdE(
"all", path=path)
551 IPtrack =
'abs(dr) < 0.05'
552 HighEtrack =
'useCMSFrame(p)>3.0'
553 ma.cutAndCopyList(
"e+:TrackFromIP",
"e+:all", IPtrack, path=path)
554 ma.cutAndCopyList(
"e+:HighEnergyTrack",
"e+:all", HighEtrack, path=path)
556 signalPhoton =
"[clusterReg==2 and useCMSFrame(E) > 1.0] or "
557 signalPhoton +=
"[clusterReg == 1 and useCMSFrame(E) > 2.0] or "
558 signalPhoton +=
"[clusterReg == 3 and useCMSFrame(E) > 2.0] or "
559 signalPhoton +=
"[clusterReg == 11 and useCMSFrame(E) > 2.0] or "
560 signalPhoton +=
"[clusterReg == 13 and useCMSFrame(E) > 2.0] "
562 photonVetoHE1 =
'useCMSFrame(p) > 0.6'
563 photonVetoHE3 =
'p>0.5'
565 ma.cutAndCopyList(
"gamma:ISR",
"gamma:all", signalPhoton, path=path)
566 ma.cutAndCopyList(
"gamma:HighEnergyPhotons",
"gamma:all", photonVetoHE1, path=path)
567 ma.cutAndCopyList(
"gamma:MediumEnergyPhotons",
"gamma:all", photonVetoHE3, path=path)
569 idmEventCuts = (
'nParticlesInList(gamma:ISR)==1 and '
570 'nParticlesInList(e+:TrackFromIP)==0 and '
571 'nParticlesInList(e+:HighEnergyTrack) == 0 and '
572 'nParticlesInList(gamma:HighEnergyPhotons) == 1 and '
573 'nParticlesInList(gamma:MediumEnergyPhotons) < 4 and '
574 'HighLevelTrigger == 1')