4 """ Skim list building functions for systematics studies """
14 import modularAnalysis
as ma
15 import variables
as va
17 from skimExpertFunctions
import BaseSkim, CombinedSkim, fancy_skim_header, get_test_file
18 from stdCharged
import stdE, stdK, stdMu, stdPi, stdPr
19 from stdPhotons
import stdPhotons
20 from stdPi0s
import stdPi0s
21 from stdV0s
import stdKshorts, stdLambdas
25 __liaison_leptonID__ =
"Marcel Hohmann"
31 Primarily used for hadron and lepton ID studies.
32 Lists in this skim are those defined in `PiKFromDstarList`.
34 __authors__ = [
"Sam Cunliffe",
"Torben Ferber",
"Ilya Komarov",
"Yuji Kato",
"Racha Cheaib"]
36 __contact__ = __liaison__
37 __category__ =
"systematics"
40 stdK(
"all", path=path)
41 stdPi(
"all", path=path)
43 TestFiles = [get_test_file(
"MC13_ccbarBGx1")]
51 self.
SkimLists = [s
for li
in lists
for s
in li]
54 """Build PiKFromDstarList lists for systematics skims."""
55 D0Cuts =
"1.75 < M < 2.0"
56 DstarCuts =
"massDifference(0)<0.16 and useCMSFrame(p) > 1.5"
58 ma.cutAndCopyList(
"K-:syst",
"K-:all",
"dr<2 and abs(dz)<4", path=path)
59 ma.cutAndCopyList(
"pi+:syst",
"pi+:all",
"dr<2 and abs(dz)<4", path=path)
61 D0Channel = [
"K-:syst pi+:syst"]
64 for chID, channel
in enumerate(D0Channel):
65 ma.reconstructDecay(f
"D0:syst{chID} -> {channel}", D0Cuts, chID, path=path)
66 D0List.append(f
"D0:syst{chID}")
69 for channel
in D0List:
70 DstarChannel.append(f
"{channel} pi+:syst")
73 for chID, channel
in enumerate(DstarChannel):
74 ma.reconstructDecay(f
"D*+:syst{chID} -> {channel}", DstarCuts, chID, path=path)
75 DstarList.append(f
"D*+:syst{chID}")
83 Lists in this skim are those defined in `BtoDStarPiList` and `DstarToD0PiPartList`.
85 __authors__ = [
"Sam Cunliffe",
"Torben Ferber",
"Ilya Komarov",
"Yuji Kato"]
87 __contact__ = __liaison__
88 __category__ =
"systematics"
91 stdK(
"loose", path=path)
92 stdPi(
"loose", path=path)
93 stdPi0s(
"eff40_Jan2020", path=path)
102 self.
SkimLists = [s
for li
in lists
for s
in li]
105 """Build BtoDStarPiList lists for systematics skims."""
106 D0Cuts =
"1.835 < M < 1.895"
107 DstarCuts =
"massDifference(0)<0.16"
108 B0Cuts =
"Mbc > 5.2 and abs(deltaE) < 0.3"
111 D0Channel = [
"K+:loose pi-:loose",
"K+:loose pi-:loose pi-:loose pi+:loose",
"K+:loose pi-:loose pi0:eff40_Jan2020"]
114 for chID, channel
in enumerate(D0Channel):
115 resonanceName =
"anti-D0:loose" + str(chID)
116 ma.reconstructDecay(resonanceName +
" -> " + channel, D0Cuts, chID, path=path)
118 ma.matchMCTruth(resonanceName, path=path)
119 ma.copyLists(
"anti-D0:loose", [
"anti-D0:loose0",
"anti-D0:loose1",
"anti-D0:loose2"], path=path)
120 D0List.append(
"anti-D0:loose")
124 for channel
in D0List:
125 DstarChannel.append(channel +
" pi-:loose")
128 for chID, channel
in enumerate(DstarChannel):
129 resonanceName =
"D*-:loose" + str(chID)
130 ma.reconstructDecay(resonanceName +
" -> " + channel, DstarCuts, chID, path=path)
132 DstarList.append(resonanceName)
133 ma.matchMCTruth(resonanceName, path=path)
137 for channel
in DstarList:
138 B0Channel.append(channel +
" pi+:loose")
141 for chID, channel
in enumerate(B0Channel):
142 resonanceName =
"B0:sys" + str(chID)
143 ma.reconstructDecay(resonanceName +
" -> " + channel, B0Cuts, chID, path=path)
144 B0List.append(resonanceName)
146 ma.matchMCTruth(resonanceName, path=path)
151 """Build DstarToD0PiPartList lists for systematics skims."""
152 ma.fillParticleList(
"pi+:fromks",
"chiProb > 0.001 and pionID > 0.1 and d0 > 0.1", path=path)
155 DminusCuts =
"1.0 < M < 1.75"
156 DminusChannel = [
"pi-:fromks pi+:loose pi-:loose"]
158 for chID, channel
in enumerate(DminusChannel):
159 resonanceName =
"D-:loose" + str(chID)
160 ma.reconstructDecay(resonanceName +
" -> " + channel, DminusCuts, chID, path=path)
163 DstarCuts =
"massDifference(0)<0.2 and useCMSFrame(p) > 2.0"
165 DstarChannel.append(
"D-:loose0" +
" pi+:loose")
168 for chID, channel
in enumerate(DstarChannel):
169 resonanceName =
"D*0:loose" + str(chID)
170 ma.reconstructDecay(resonanceName +
" -> " + channel, DstarCuts, chID, path=path)
171 DstarList.append(resonanceName)
172 ma.matchMCTruth(resonanceName, path=path)
180 Lists in this skim are those defined in `getDsList`, `getDstarList`,
181 `getSigmacList`, `getmumugList`, `getBZeroList`, and `getBPlusList`.
183 __authors__ = [
"Sam Cunliffe",
"Torben Ferber",
"Ilya Komarov",
"Yuji Kato"]
185 __contact__ = __liaison__
186 __category__ =
"systematics"
189 stdK(
"loose", path=path)
190 stdMu(
"loose", path=path)
191 stdPi(
"loose", path=path)
192 stdPr(
"loose", path=path)
193 stdPi0s(
"eff40_Jan2020Fit", path=path)
206 self.
SkimLists = [s
for li
in lists
for s
in li]
209 """Build Ds list for systematics skims."""
210 DsCuts =
"1.90 < M < 2.04"
212 ma.reconstructDecay(
"phi:res -> K+:loose K-:loose",
"1.01 < M < 1.03", path=path)
213 ma.reconstructDecay(
"K*0:res -> K+:loose pi-:loose",
"0.7 < M < 1.1", path=path)
215 DsChannel = [
"phi:res pi+:loose"]
217 for chID, channel
in enumerate(DsChannel):
218 particlename =
"D_s+:Resonance%d" % (chID)
219 ma.reconstructDecay(particlename +
" -> " + channel, DsCuts, chID, path=path)
220 ma.matchMCTruth(particlename, path)
221 DsList.append(particlename)
226 """Build Dstar list for systematics skims."""
227 DplusCuts =
"1.8 < M < 1.93"
228 DstarCuts =
"massDifference(0)<0.16 and useCMSFrame(p)>2.0"
230 DplusChannel = [
"K-:loose pi+:loose pi+:loose"]
233 for chID, channel
in enumerate(DplusChannel):
234 ma.reconstructDecay(
"D+:resonance" + str(chID) +
" -> " + channel, DplusCuts, chID, path=path)
236 DplusList.append(
"D+:resonance" + str(chID))
239 for channel
in DplusList:
240 DstarChannel.append(channel +
" pi0:eff40_Jan2020")
243 for chID, channel
in enumerate(DstarChannel):
244 ma.reconstructDecay(
"D*+:resonance" + str(chID) +
" -> " + channel, DstarCuts, chID, path=path)
245 DstarList.append(
"D*+:resonance" + str(chID))
246 ma.matchMCTruth(
"D*+:resonance0", path=path)
251 """Build Sigmac list for systematics skims."""
252 LambdacCuts =
"2.24 < M < 2.33"
253 SigmacCuts =
"massDifference(0)<0.28 and useCMSFrame(p) > 2.5"
255 LambdacChannel = [
"p+:loose K-:loose pi+:loose"]
257 for chID, channel
in enumerate(LambdacChannel):
258 ma.reconstructDecay(
"Lambda_c+:resonance" + str(chID) +
" -> " + channel, LambdacCuts, chID, path=path)
260 LambdacList.append(
"Lambda_c+:resonance" + str(chID))
263 SigmacPlusChannel = []
265 for channel
in LambdacList:
266 SigmacPlusChannel.append(channel +
" pi+:loose")
268 for chID, channel
in enumerate(SigmacPlusChannel):
269 ma.reconstructDecay(
"Sigma_c++:resonance" + str(chID) +
" -> " + channel, SigmacCuts, chID, path=path)
270 SigmacList.append(
"Sigma_c++:resonance" + str(chID))
271 ma.matchMCTruth(
"Sigma_c++:resonance0", path=path)
275 for channel
in LambdacList:
276 Sigmac0Channel.append(channel +
" pi-:loose")
279 for chID, channel
in enumerate(Sigmac0Channel):
280 ma.reconstructDecay(
"Sigma_c0:resonance" + str(chID) +
" -> " + channel, SigmacCuts, chID, path=path)
281 Sigmac0List.append(
"Sigma_c0:resonance" + str(chID))
282 ma.matchMCTruth(
"Sigma_c0:resonance0", path=path)
287 """Build mumug list for systematics skims."""
288 vphoChannel = [
"mu+:loose mu-:loose"]
291 for chID, channel
in enumerate(vphoChannel):
292 resonanceName =
"vpho:resonance" + str(chID)
293 ma.reconstructDecay(
"vpho:resonance" + str(chID) +
" -> " + channel, vphocuts, chID, path=path)
294 ma.applyCuts(resonanceName,
"nTracks == 2 and M < formula(Ecms*0.9877)", path=path)
295 ma.matchMCTruth(resonanceName, path=path)
297 ma.applyCuts(resonanceName,
"M < formula(Ecms*0.9877)", path=path)
298 vphoList.append(resonanceName)
303 """Build BZero list for systematics skims."""
304 BZeroCuts =
"Mbc > 5.2 and abs(deltaE) < 0.3"
305 BZeroChannel = [
"D-:resonance0 pi+:loose"]
308 for chID, channel
in enumerate(BZeroChannel):
309 resonanceName =
"B0:resonance" + str(chID)
310 ma.reconstructDecay(resonanceName +
" -> " + channel, BZeroCuts, chID, path=path)
311 BZeroList.append(resonanceName)
312 ma.matchMCTruth(resonanceName, path=path)
317 """Build Bplus list for systematics skims."""
318 antiDZeroCut =
"1.82 < M < 1.90"
319 antiDZeroChannel = [
"K+:loose pi-:loose"]
322 for chID, channel
in enumerate(antiDZeroChannel):
323 resonanceName =
"anti-D0:resonance" + str(chID)
324 ma.reconstructDecay(resonanceName +
" -> " + channel, antiDZeroCut, chID, path=path)
326 antiDZeroList.append(resonanceName)
329 for channel
in antiDZeroList:
330 BPlusChannel.append(channel +
" pi+:loose")
332 BPlusCuts =
"Mbc > 5.2 and abs(deltaE) < 0.3"
334 for chID, channel
in enumerate(BPlusChannel):
335 ma.reconstructDecay(
"B+:resonance" + str(chID) +
" -> " + channel, BPlusCuts, chID, path=path)
336 BPlusList.append(
"B+:resonance" + str(chID))
337 ma.matchMCTruth(
"B+:resonance" + str(chID), path=path)
345 We require one cluster-matched electron (the other is not required to match a
346 cluster). No selection on the photon as the sample must be unbiased.
348 __authors__ = [
"Torben Ferber"]
350 "Skim of radiative muon pairs (:math:`ee\\to\\mu\\mu(\\gamma)`) "
351 "for photon systematics."
353 __contact__ = __liaison__
354 __category__ =
"systematics, photon calibration"
357 stdMu(
"all", path=path)
361 MuonTightSelection = (
"abs(dz) < 2.0 and abs(dr) < 0.5 and nCDCHits > 0 and "
362 "clusterE > 0.0 and clusterE < 1.0")
363 ma.cutAndCopyList(
"mu+:skimtight",
"mu+:all", MuonTightSelection, path=path)
368 MuonLooseSelection =
"abs(dz) < 2.0 and abs(dr) < 0.5 and nCDCHits > 0 and clusterE < 1.0"
369 ma.cutAndCopyList(
"mu+:skimloose",
"mu+:all", MuonLooseSelection, path=path)
377 RadMuMuSelection =
"pRecoil > 0.075 and pRecoilTheta > 0.296706 and pRecoilTheta < 2.61799"
378 RadMuMuPairChannel =
"mu+:skimtight mu-:skimloose"
380 ma.reconstructDecay(
"vpho:radmumu" + str(chID) +
" -> " + RadMuMuPairChannel,
381 RadMuMuSelection, chID, path=path)
382 eventCuts =
"nCleanedTracks(abs(dz) < 2.0 and abs(dr) < 0.5) == 2"
383 ma.applyCuts(
"vpho:radmumu" + str(chID), eventCuts, path=path)
384 radmumulist.append(
"vpho:radmumu" + str(chID))
394 __authors__ = [
"Ilya Komarov"]
395 __description__ =
"Systematics skim of :math:`ee\\to ee\\ell\\ell`"
396 __contact__ = __liaison__
397 __category__ =
"systematics, lepton ID"
400 stdE(
"all", path=path)
405 eLooseSelection =
"abs(dz) < 2.0 and abs(dr) < 0.5 and p > 0.3"
406 ma.cutAndCopyList(
"e+:skimloose",
"e+:all", eLooseSelection, path=path)
412 EELLSelection =
"useCMSFrame(pt)<0.3"
413 eventCuts =
"nCleanedTracks(abs(dz) < 2.0 and abs(dr) < 0.5) < 4"
414 ma.reconstructDecay(
"gamma:eell -> e+:skimloose e-:skimloose",
415 EELLSelection +
" and " + eventCuts, path=path)
416 eelllist.append(
"gamma:eell")
424 Constructed skim list contains radiative electron pairs for photon systematics. In
425 particular this is for the endcaps where we have no track triggers, we require one
426 cluster-matched electron (the other is not required to match a cluster). No
427 selection on the photon as the sample must be unbiased.
429 As this retains a lot of bhabha events (by construction) we allow for prescaling
430 (and prefer prescaled rather than a biased sampe by requiring any selection on the
431 photon or too much of a cut on the recoil momentum).
433 Prescales are given in standard trigger terms (reciprocal), so prescale of 100 is 1%
434 of events kept, *etc*.
437 __authors__ = [
"Sam Cunliffe"]
438 __description__ =
"Radiative electron pairs for photon systematics"
439 __contact__ = __liaison__
440 __category__ =
"systematics, photon calibration"
443 stdE(
"all", path=path)
445 def __init__(self, prescale_all=1, prescale_fwd_electron=1, **kwargs):
448 prescale_all (int): the global prescale for this skim
449 prescale_fwd_electron (int): the prescale electrons (e-) in
451 **kwargs: Passed to constructor of `BaseSkim`.
465 goodtrack =
"abs(dz) < 2.0 and abs(dr) < 0.5 and nCDCHits > 0"
466 goodtrackwithcluster =
"%s and clusterE > 3.0" % goodtrack
467 ma.cutAndCopyList(
"e+:skimtight",
"e+:all", goodtrackwithcluster, path=path)
468 ma.cutAndCopyList(
"e+:skimloose",
"e+:all", goodtrack, path=path)
472 recoil =
"pRecoil > 0.075 and 0.296706 < pRecoilTheta < 2.61799"
473 ma.reconstructDecay(
"vpho:radee -> e+:skimtight e-:skimloose", recoil, path=path)
477 event_cuts =
"[nCleanedTracks(abs(dz) < 2.0 and abs(dr) < 0.5) == 2]"
478 event_cuts +=
" and [eventRandom <= %s]" % prescale_all
482 fwd_encap_border =
"0.5480334"
483 electron_is_first =
"daughter(0, charge) < 0"
484 first_in_fwd_endcap =
"daughter(0, theta) < %s" % fwd_encap_border
485 first_not_in_fwd_endcap =
"daughter(0, theta) > %s" % fwd_encap_border
486 electron_is_second =
"daughter(1, charge) < 0"
487 second_in_fwd_endcap =
"daughter(1, theta) < %s" % fwd_encap_border
488 second_not_in_fwd_endcap =
"daughter(1, theta) > %s" % fwd_encap_border
489 passes_prescale =
"eventRandom <= %s" % prescale_fwd_electron
493 prescale_logic =
"[%s and %s and %s]" \
494 % (electron_is_first, first_in_fwd_endcap, passes_prescale)
496 prescale_logic +=
" or [%s and %s and %s]" \
497 % (electron_is_second, second_in_fwd_endcap, passes_prescale)
499 prescale_logic +=
" or [%s and %s]" % (electron_is_first, first_not_in_fwd_endcap)
501 prescale_logic +=
" or [%s and %s]" % (electron_is_second, second_not_in_fwd_endcap)
504 prescale_logic =
"[%s]" % prescale_logic
505 ma.applyCuts(
"vpho:radee", event_cuts +
" and " + prescale_logic, path=path)
512 __authors__ = [
"Sam Cunliffe",
"Torben Ferber",
"Ilya Komarov",
"Yuji Kato",
"Jake Bennett"]
514 __contact__ = __liaison__
515 __category__ =
"systematics"
518 stdLambdas(path=path)
521 va.variables.addAlias(
"fsig",
"formula(flightDistance/flightDistanceErr)")
522 va.variables.addAlias(
"pMom",
"daughter(0,p)")
523 va.variables.addAlias(
"piMom",
"daughter(1,p)")
524 va.variables.addAlias(
"daughtersPAsym",
"formula((pMom-piMom)/(pMom+piMom))")
527 ma.cutAndCopyList(
"Lambda0:syst0",
"Lambda0:merged",
"fsig>10 and daughtersPAsym>0.41", path=path)
528 LambdaList.append(
"Lambda0:syst0")
536 Uses the ``gamma:loose`` list and a cut on the number of tracks.
540 * :math:`E_{\\gamma}> 3\\,\\text{GeV}` AND
541 * :math:`E_{\\gamma}< 8\\,\\text{GeV}`
542 * :math:`n_{\\text{tracks}} \\geq 2` AND :math:`n_{\\text{tracks}} \\leq 4`
543 * at least 1 candidate in the K_S0:merged or in the phi->K+:all K-:all lists
545 __authors__ = [
"Giuseppe Finocchiaro",
"Benjamin Oberhof"]
547 "Skim for ISR - phi gamma analyses, "
548 ":math:`e^+ e^- \\to \\phi \\gamma ` and "
549 ":math:`\\phi` decays into two charged tracks "
550 "(:math: `K^+K^-` or :math:`K_S K_L` with :math:`K_S\\to \\pi^+\\pi^-`)"
552 __contact__ = __liaison__
553 __category__ =
"systematics"
557 stdK(
"all", path=path)
558 stdKshorts(path=path)
560 TestFiles = [get_test_file(
"phigamma_neutral")]
564 "[nTracks>=2] and [nTracks<=4]",
565 "[nParticlesInList(gamma:PhiSystematics) > 0]",
566 "[[nParticlesInList(phi:charged) > 0] or [nParticlesInList(K_S0:PhiSystematics) > 0]]"
569 ma.cutAndCopyList(
"gamma:PhiSystematics",
"gamma:loose",
"3 < E < 8", writeOut=
True, path=path)
570 ma.reconstructDecay(
'phi:charged -> K+:all K-:all',
'0.9 < M < 1.2', path=path)
571 ma.copyList(
'K_S0:PhiSystematics',
'K_S0:merged', writeOut=
True, path=path)
574 self.
SkimLists = [
"gamma:PhiSystematics"]
579 __authors__ =
"Phil Grace"
580 __contact__ =
"Phil Grace <philip.grace@adelaide.edu.au>"
581 __description__ =
"Random skim to select a fixed fraction of events."
582 __category__ =
"systematics, random"
584 def __init__(self, KeepPercentage=10, seed=None, **kwargs):
587 KeepPercentage (float): Percentage of events to be kept.
588 seed (int): Set random seed to given number. If this argument is not given,
589 this skim will not alter the random seed.
590 **kwargs: Passed to constructor of `BaseSkim`.
597 if self.
seed is not None:
598 b2.set_random_seed(int(self.
seed))
601 stdPi(
"all", path=path)
608 ma.copyList(f
"pi+:{label}",
"pi+:all", path=path)
609 ma.copyList(f
"gamma:{label}",
"gamma:all", path=path)
610 ma.applyRandomCandidateSelection(f
"pi+:{label}", path=path)
611 ma.applyRandomCandidateSelection(f
"gamma:{label}", path=path)
615 f
"eventRandom <= {self.KeepPercentage/100}", path=path
618 self.
SkimLists = [f
"pi+:{label}", f
"gamma:{label}"]
623 __authors__ =
"Marcel Hohmann"
624 __contact__ = __liaison_leptonID__
625 __description__ =
"Skim to select all events that pass the HLT Four Lepton skim for lepton ID studies"
626 __category__ =
"systematics, leptonID"
627 ApplyHLTHadronCut =
False
630 stdPi(
"all", path=path)
633 label =
"FourLeptonHLT"
634 ma.copyList(f
"pi+:{label}",
"pi+:all", path=path)
635 ma.rankByLowest(f
"pi+:{label}",
"random", 1,
"systematicsFourLeptonHLT_randomRank", path=path)
638 f
"SoftwareTriggerResult(software_trigger_cut&skim&accept_fourlep) == 1", path=path
646 __authors__ =
"Marcel Hohmann"
647 __contact__ = __liaison_leptonID__
648 __description__ =
"Skim to select all events that pass the HLT RadMuMu skim for lepton ID studies"
649 __category__ =
"systematics, leptonID"
650 ApplyHLTHadronCut =
False
653 stdPi(
"all", path=path)
656 label =
"RadMuMuLeptonID"
657 ma.copyList(f
"pi+:{label}",
"pi+:all", path=path)
658 ma.rankByLowest(f
"pi+:{label}",
"random", 1,
"systematicsRadMuMuLeptonID_randomRank", path=path)
661 f
"SoftwareTriggerResult(software_trigger_cut&skim&accept_radmumu) == 1", path=path
669 J/psi skim for lepton ID systematics studies. Lists in this skim are those defined in `JpsimumuTagProbe`, `JpsieeTagProbe`.
671 __authors__ = [
"Sam Cunliffe",
"Torben Ferber",
"Ilya Komarov",
"Yuji Kato",
"Racha Cheaib",
"Marcel Hohmann"]
673 __contact__ = __liaison_leptonID__
674 __category__ =
"systematics, leptonID"
677 stdMu(
"all", path=path)
678 stdE(
"all", path=path)
681 TestFiles = [get_test_file(
"MC13_ccbarBGx1")]
682 ApplyHLTHadronCut =
True
691 """Build JpsimumuTagProbe lists for systematics skims."""
692 Cuts =
"2.7 < M < 3.4"
694 "J/psi:systematics_mumu -> mu+:all mu-:all",
695 f
'{Cuts} and [daughter(0,muonID)>0.1 or daughter(1,muonID)>0.1]',
697 return "J/psi:systematics_mumu"
700 """Build JpsieeTagProbe lists for systematics skims."""
702 Cuts =
"2.7 < M < 3.4"
703 ma.cutAndCopyList(
'gamma:brems',
'gamma:all',
'E<1', path=path)
704 ma.correctBrems(
'e+:brems_corrected',
'e+:all',
'gamma:brems', path=path)
706 "J/psi:systematics_ee -> e+:brems_corrected e-:brems_corrected",
707 f
'{Cuts} and [daughter(0,electronID_noTOP)>0.1 or daughter(1,electronID_noTOP)>0.1]',
709 return "J/psi:systematics_ee"
715 K-short skim for hadron and lepton ID systematics studies.
716 As K-short candidates are abundant this skim has a high retention.
717 To meet the retention criteria a prescale is added. The prescale is given in standard trigger terms (reciprocal).
718 A prescale of 50 will keep 2% of events, etc.
720 __authors__ = [
"Marcel Hohmann"]
721 __description__ =
"Skim for K-short events for performance studies"
722 __contact__ = __liaison_leptonID__
723 __category__ =
"performance, leptonID"
725 ApplyHLTHadronCut =
True
730 prescale (int): the global prescale for this skim.
731 **kwargs: Passed to constructor of `BaseSkim`.
737 stdPi(
"all", path=path)
742 'K_S0:reco -> pi+:all pi-:all',
747 ma.applyCuts(
'K_S0:reco',
'0.4 < M < 0.6', path=path)
749 ma.fillParticleList(
'K_S0:V0 -> pi+ pi-',
754 ma.applyCuts(
'K_S0:V0',
'0.4 < M < 0.6', path=path)
756 ma.mergeListsWithBestDuplicate(
'K_S0:merged', [
'K_S0:V0',
'K_S0:reco'],
757 variable=
'particleSource', preferLowest=
True, path=path)
759 KS_cut =
'[[cosAngleBetweenMomentumAndVertexVector>0.998] or '\
760 ' [formula(flightDistance/flightDistanceErr)>11] or '\
761 ' [flightTime>0.007]]'
764 ma.cutAndCopyList(
"K_S0:skim",
"K_S0:merged", KS_cut, path=path)
765 path = self.
skim_event_cuts(f
'eventRandom < {(1/self.prescale):.6f}', path=path)
772 Skim for selecting Bhabha events for leptonID studies.
773 In case the retention exceeds 10% a prescale can be added.
774 The prescale is given in standard trigger terms (reciprocal).
776 __authors__ = [
"Justin Skorupa"]
777 __description__ =
"Skim for Bhabha events for lepton ID study"
778 __contact__ = __liaison_leptonID__
779 __category__ =
"performance, leptonID"
781 ApplyHLTHadronCut =
False
786 prescale (int): the global prescale for this skim.
787 **kwargs: Passed to constructor of `BaseSkim`.
793 stdE(
"all", path=path)
796 goodtrack =
"abs(dz) < 5 and abs(dr) < 2"
797 goodtrackwithPID = f
"{goodtrack} and electronID_noTOP > 0.95 and clusterTheta > 0.59"\
798 " and clusterTheta < 2.15 and useCMSFrame(clusterE) > 2"
799 ma.cutAndCopyList(
"e+:tight",
"e+:all", goodtrackwithPID, path=path)
800 ma.cutAndCopyList(
"e+:loose",
"e+:all", goodtrack, path=path)
803 "vpho:bhabha -> e+:tight e-:loose",
"", path=path)
805 event_cuts =
"[nCleanedTracks(abs(dz) < 5 and abs(dr) < 2) == 2]"\
806 f
" and eventRandom < {(1/self.prescale):.6f}"
808 ma.applyCuts(
"vpho:bhabha", event_cuts, path=path)
816 Combined systematics skim for the four hadronic channels:
822 This is required for technical (data production) reasons, as it keeps the number of files low.
823 See the definitions of the individual skims for the details.
825 __authors__ = [
"Marcel Hohmann"]
826 __description__ =
"Combined Skim of the systematic hadronic skims: Kshort, Jpsi, Dstar, Lambda."
827 __contact__ = __liaison_leptonID__
828 __category__ =
"performance, leptonID"
829 __name__ =
"SystematicsCombinedHadronic"
831 def __init__(self, prescale_kshort=1, mdstOutput=True, **kwargs):
835 prescale_kshort (Optional[int]): offline prescale factor for KS skim.
836 **kwargs: key-worded arguments. See CombinedSkim.__init__()
839 kwargs.update(mdstOutput=mdstOutput, CombinedSkimName=self.
__name__)
840 kwargs.setdefault(
'udstOutput',
False)
843 super().
__init__(*skims_list, **kwargs)
849 Combined systematics skim for the four low multi channels:
850 SystematicsFourLeptonFromHLTFlag,
851 SystematicsRadmumuFromHLTFlag,
855 This is required for technical (data production) reasons, as it keeps the number of files low.
856 See the definitions of the individual skims for the details.
858 __authors__ = [
"Marcel Hohmann"]
859 __description__ =
"Combined Skim of the systematic low multi skims: FourLepton, Radmumu, Bhabha, TauThrust."
860 __contact__ = __liaison_leptonID__
861 __category__ =
"performance, leptonID"
862 __name__ =
"SystematicsCombinedLowMulti"
864 def __init__(self, prescale_kshort=1, mdstOutput=True, **kwargs):
868 **kwargs: key-worded arguments. See CombinedSkim.__init__()
871 kwargs.update(mdstOutput=mdstOutput, CombinedSkimName=self.
__name__)
872 kwargs.setdefault(
'udstOutput',
False)
876 super().
__init__(*skims_list, **kwargs)