Systematics skims
Contents
20.1. Systematics skims#
Skim list building functions for systematics studies
- class skim.WGs.systematics.Random(KeepPercentage=10, seed=None, **kwargs)[source]#
Note
Skim description: Random skim to select a fixed fraction of events.
Skim name: Random
Skim LFN code: 10000000
Category: systematics, random
Author: Phil Grace
Contact: Phil Grace
- ApplyHLTHadronCut = False#
If this property is set to True, then the HLT selection for
hlt_hadron
will be applied to the skim lists when the skim is added to the path.
- class skim.WGs.systematics.Resonance(*, OutputFileName=None, additionalDataDescription=None, udstOutput=True, validation=False, mc=True, analysisGlobaltag=None, pidGlobaltag=None)[source]#
Note
Skim description: (no description)
Skim name: Resonance
Skim LFN code: 10600400
Category: systematics
Authors: Sam Cunliffe, Torben Ferber, Ilya Komarov, Yuji Kato
Contact: (no contact listed)
Lists in this skim are those defined in
getDsList
,getDstarList
,getSigmacList
,getmumugList
,getBZeroList
, andgetBPlusList
.- ApplyHLTHadronCut = False#
If this property is set to True, then the HLT selection for
hlt_hadron
will be applied to the skim lists when the skim is added to the path.
- class skim.WGs.systematics.SystematicsBhabha(prescale=1, **kwargs)[source]#
Note
Skim description: Skim for Bhabha events for lepton ID study
Skim name: SystematicsBhabha
Skim LFN code: 10601200
Category: performance, leptonID
Author: Justin Skorupa
Contact: Marcel Hohmann
Skim for selecting Bhabha events for leptonID studies. In case the retention exceeds 10% a prescale can be added. The prescale is given in standard trigger terms (reciprocal).
- ApplyHLTHadronCut = False#
If this property is set to True, then the HLT selection for
hlt_hadron
will be applied to the skim lists when the skim is added to the path.
- class skim.WGs.systematics.SystematicsCombinedHadronic(prescale_kshort=4, mdstOutput=True, **kwargs)[source]#
Note
Skim description: Combined Skim of the systematic hadronic skims: Kshort, Jpsi, Dstar, Lambda.
Skim name: SystematicsCombinedHadronic
Skim LFN code: 10601300
Category: performance, leptonID
Author: Marcel Hohmann
Contact: Marcel Hohmann
- Combined systematics skim for the four hadronic channels:
SystematicsKshort, SystematicsJpsi, SystematicsDstar, SystemmaticsLambda.
This is required for technical (data production) reasons, as it keeps the number of files low. See the definitions of the individual skims for the details.
- produces_mdst_by_default = True#
Special property for combined systematics skims, which produce MDST output instead of uDST. This property is used by
b2skim-prod
to set theDataLevel
parameter in theDataDescription
block for this skim tomdst
instead ofudst
.
- class skim.WGs.systematics.SystematicsCombinedLowMulti(mdstOutput=True, **kwargs)[source]#
Note
Skim description: Combined Skim of the systematic low multi skims: FourLepton, Radmumu, Bhabha, TauThrust.
Skim name: SystematicsCombinedLowMulti
Skim LFN code: 10601400
Category: performance, leptonID
Author: Marcel Hohmann
Contact: Marcel Hohmann
- Combined systematics skim for the four low multi channels:
SystematicsFourLeptonFromHLTFlag, SystematicsRadmumuFromHLTFlag, SystematicsBhabha, TauThrust.
This is required for technical (data production) reasons, as it keeps the number of files low. See the definitions of the individual skims for the details.
- produces_mdst_by_default = True#
Special property for combined systematics skims, which produce MDST output instead of uDST. This property is used by
b2skim-prod
to set theDataLevel
parameter in theDataDescription
block for this skim tomdst
instead ofudst
.
- class skim.WGs.systematics.SystematicsDstar(*, OutputFileName=None, additionalDataDescription=None, udstOutput=True, validation=False, mc=True, analysisGlobaltag=None, pidGlobaltag=None)[source]#
Note
Skim description: (no description)
Skim name: SystematicsDstar
Skim LFN code: 10601500
Category: systematics
Authors: Sam Cunliffe, Torben Ferber, Ilya Komarov, Yuji Kato, Racha Cheaib
Contact: (no contact listed)
This skim includes a selection on the HLT flag
hlt_hadron
.Primarily used for hadron and lepton ID studies. Lists in this skim are those defined in
PiKFromDstarList
.- ApplyHLTHadronCut = True#
If this property is set to True, then the HLT selection for
hlt_hadron
will be applied to the skim lists when the skim is added to the path.
- TestSampleProcess = 'ccbar'#
MC process of test file.
BaseSkim.TestFiles
passes this property toskim.utils.testfiles.get_test_file
to retrieve an appropriate file location. Defaults to a \(B^{0}\overline{B^{0}}\) sample.
- class skim.WGs.systematics.SystematicsEELL(*, OutputFileName=None, additionalDataDescription=None, udstOutput=True, validation=False, mc=True, analysisGlobaltag=None, pidGlobaltag=None)[source]#
Note
Skim description: Systematics skim of \(ee\to ee\ell\ell\)
Skim name: SystematicsEELL
Skim LFN code: 10600600
Category: systematics, lepton ID
Author: Ilya Komarov
Contact: (no contact listed)
- ApplyHLTHadronCut = False#
If this property is set to True, then the HLT selection for
hlt_hadron
will be applied to the skim lists when the skim is added to the path.
- class skim.WGs.systematics.SystematicsFourLeptonFromHLTFlag(*, OutputFileName=None, additionalDataDescription=None, udstOutput=True, validation=False, mc=True, analysisGlobaltag=None, pidGlobaltag=None)[source]#
Note
Skim description: Skim to select all events that pass the HLT Four Lepton skim for lepton ID studies
Skim name: SystematicsFourLeptonFromHLTFlag
Skim LFN code: 10600800
Category: systematics, leptonID
Author: Marcel Hohmann
Contact: Marcel Hohmann
- ApplyHLTHadronCut = False#
If this property is set to True, then the HLT selection for
hlt_hadron
will be applied to the skim lists when the skim is added to the path.
- class skim.WGs.systematics.SystematicsJpsi(*, OutputFileName=None, additionalDataDescription=None, udstOutput=True, validation=False, mc=True, analysisGlobaltag=None, pidGlobaltag=None)[source]#
Note
Skim description: (no description)
Skim name: SystematicsJpsi
Skim LFN code: 10611000
Category: systematics, leptonID
Authors: Sam Cunliffe, Torben Ferber, Ilya Komarov, Yuji Kato, Racha Cheaib, Marcel Hohmann
Contact: Marcel Hohmann
This skim includes a selection on the HLT flag
hlt_hadron
.J/psi skim for lepton ID systematics studies. Lists in this skim are those defined in
JpsimumuTagProbe
,JpsieeTagProbe
.- ApplyHLTHadronCut = True#
If this property is set to True, then the HLT selection for
hlt_hadron
will be applied to the skim lists when the skim is added to the path.
- TestSampleProcess = 'ccbar'#
MC process of test file.
BaseSkim.TestFiles
passes this property toskim.utils.testfiles.get_test_file
to retrieve an appropriate file location. Defaults to a \(B^{0}\overline{B^{0}}\) sample.
- class skim.WGs.systematics.SystematicsKshort(prescale=4, **kwargs)[source]#
Note
Skim description: Skim for K-short events for performance studies
Skim name: SystematicsKshort
Skim LFN code: 10611100
Category: performance, leptonID
Author: Marcel Hohmann
Contact: Marcel Hohmann
This skim includes a selection on the HLT flag
hlt_hadron
.K-short skim for hadron and lepton ID systematics studies. As K-short candidates are abundant this skim has a high retention. To meet the retention criteria a prescale is added. The prescale is given in standard trigger terms (reciprocal). A prescale of 50 will keep 2% of events, etc.
- ApplyHLTHadronCut = True#
If this property is set to True, then the HLT selection for
hlt_hadron
will be applied to the skim lists when the skim is added to the path.
- class skim.WGs.systematics.SystematicsLambda(*, OutputFileName=None, additionalDataDescription=None, udstOutput=True, validation=False, mc=True, analysisGlobaltag=None, pidGlobaltag=None)[source]#
Note
Skim description: (no description)
Skim name: SystematicsLambda
Skim LFN code: 10620200
Category: systematics
Authors: Sam Cunliffe, Torben Ferber, Ilya Komarov, Yuji Kato, Jake Bennett
Contact: (no contact listed)
This skim includes a selection on the HLT flag
hlt_hadron
.- ApplyHLTHadronCut = True#
If this property is set to True, then the HLT selection for
hlt_hadron
will be applied to the skim lists when the skim is added to the path.
- class skim.WGs.systematics.SystematicsPhiGamma(*, OutputFileName=None, additionalDataDescription=None, udstOutput=True, validation=False, mc=True, analysisGlobaltag=None, pidGlobaltag=None)[source]#
Note
Skim description: Skim for ISR - phi gamma analyses, \(e^+ e^- \to \phi \gamma \)phi` decays into two charged tracks (\(K^+K^-\) or \(K_S K_L\) with \(K_S\to \pi^+\pi^-\))
Skim name: SystematicsPhiGamma
Skim LFN code: 11640100
Category: systematics
Authors: Giuseppe Finocchiaro, Benjamin Oberhof
Contact: Giuseppe Finocchiaro
Uses the
gamma:loose
list and a cut on the number of tracks.Cuts applied:
\(E_{\gamma}> 3\,\text{GeV}\) AND
\(E_{\gamma}< 8\,\text{GeV}\)
\(n_{\text{tracks}} \geq 2\) AND \(n_{\text{tracks}} \leq 4\)
at least 1 candidate in the K_S0:merged or in the phi->K+:all K-:all lists
- ApplyHLTHadronCut = False#
If this property is set to True, then the HLT selection for
hlt_hadron
will be applied to the skim lists when the skim is added to the path.
- TestSampleProcess = 'ccbar'#
MC process of test file.
BaseSkim.TestFiles
passes this property toskim.utils.testfiles.get_test_file
to retrieve an appropriate file location. Defaults to a \(B^{0}\overline{B^{0}}\) sample.
- validation_sample = 'mdst14.root'#
MDST sample to use for validation histograms. Must be a valid location of a validation dataset (see documentation for
basf2.find_file
).
- class skim.WGs.systematics.SystematicsRadEE(prescale_all=1, prescale_fwd_electron=1, **kwargs)[source]#
Note
Skim description: Radiative electron pairs for photon systematics
Skim name: SystematicsRadEE
Skim LFN code: 10600700
Category: systematics, photon calibration
Author: Sam Cunliffe
Contact: (no contact listed)
Constructed skim list contains radiative electron pairs for photon systematics. In particular this is for the endcaps where we have no track triggers, we require one cluster-matched electron (the other is not required to match a cluster). No selection on the photon as the sample must be unbiased.
As this retains a lot of bhabha events (by construction) we allow for prescaling (and prefer prescaled rather than a biased sampe by requiring any selection on the photon or too much of a cut on the recoil momentum).
Prescales are given in standard trigger terms (reciprocal), so prescale of 100 is 1% of events kept, etc.
- ApplyHLTHadronCut = False#
If this property is set to True, then the HLT selection for
hlt_hadron
will be applied to the skim lists when the skim is added to the path.
- class skim.WGs.systematics.SystematicsRadMuMu(*, OutputFileName=None, additionalDataDescription=None, udstOutput=True, validation=False, mc=True, analysisGlobaltag=None, pidGlobaltag=None)[source]#
Note
Skim description: Skim of radiative muon pairs (\(ee\to\mu\mu(\gamma)\)) for photon systematics.
Skim name: SystematicsRadMuMu
Skim LFN code: 10600500
Category: systematics, photon calibration
Author: Torben Ferber
Contact: (no contact listed)
We require one cluster-matched electron (the other is not required to match a cluster). No selection on the photon as the sample must be unbiased.
- ApplyHLTHadronCut = False#
If this property is set to True, then the HLT selection for
hlt_hadron
will be applied to the skim lists when the skim is added to the path.
- class skim.WGs.systematics.SystematicsRadMuMuFromHLTFlag(*, OutputFileName=None, additionalDataDescription=None, udstOutput=True, validation=False, mc=True, analysisGlobaltag=None, pidGlobaltag=None)[source]#
Note
Skim description: Skim to select all events that pass the HLT RadMuMu skim for lepton ID studies
Skim name: SystematicsRadMuMuFromHLTFlag
Skim LFN code: 10600900
Category: systematics, leptonID
Author: Marcel Hohmann
Contact: Marcel Hohmann
- ApplyHLTHadronCut = False#
If this property is set to True, then the HLT selection for
hlt_hadron
will be applied to the skim lists when the skim is added to the path.
- class skim.WGs.systematics.SystematicsTracking(*, OutputFileName=None, additionalDataDescription=None, udstOutput=True, validation=False, mc=True, analysisGlobaltag=None, pidGlobaltag=None)[source]#
Note
Skim description: (no description)
Skim name: SystematicsTracking
Skim LFN code: 10600300
Category: systematics
Authors: Sam Cunliffe, Torben Ferber, Ilya Komarov, Yuji Kato
Contact: (no contact listed)
Lists in this skim are those defined in
BtoDStarPiList
andDstarToD0PiPartList
.- ApplyHLTHadronCut = False#
If this property is set to True, then the HLT selection for
hlt_hadron
will be applied to the skim lists when the skim is added to the path.
20.1.1. Using SystematicsCombined
skims#
The SystematicsCombinedHadronic
and SystematicsCombinedLowMulti
skims are a bit special, as they contain events passing a logical OR
of individual skim classes, and no pre-defined ParticleList
objects.
In order to select events of a given skim class in the combination, one has to filter events based on the desired flag first (eg. SystematicsKshort
) via modularAnalysis.applyEventCuts()
, like in the following example:
import basf2 as b2
import modularAnalysis as ma
import variables.utils as vu
import variables.collections as vc
import stdCharged as stdc
path = b2.Path()
input_file = "/PATH/TO/INPUT/SKIM/FILE.root"
ma.inputMdst(filename=input_file, path=path)
ma.applyEventCuts("eventExtraInfo(passes_SystematicsKshort)", path=path)
# From now on, it's just a standard analysis!
# Note that you need to build all the particle lists yourself,
# as the SystematicsCombined skims do not contain pre-defined lists.
stdc.stdPi(listtype="all", path=path)
ma.cutAndCopyList("pi+:good", "pi+:all", f"abs(dr) < 2.0 and abs(dz) < 5.0 and p > 0.1", path=path)
ma.reconstructDecay("K_S0:sig -> pi+:good pi-:good", "0.45 < M < 0.55", path=path)
ks_aliases = vu.create_aliases_for_selected(vc.kinematics, "^K_S0 -> pi+ pi-", prefix="K_S0")
pi_aliases = vu.create_aliases_for_selected(vc.kinematics+vc.pid, "K_S0 -> ^pi+ ^pi-", prefix=["pi_p", "pi_m"])
ma.variablesToNtuple(decayString="K_S0:sig",
variables=ks_aliases+pi_aliases,
treename="kspipi",
filename="output.root",
path=path)
b2.process(path)
Note
Occasionally, the SystematicsCombinedHadronic
and SystematicsCombinedLowMulti
skims are produced in cDST (“rawFormat”) format to enable low-level performance studies.
In such an occurrence, one has to modify the above code snippet slightly to account for the different input data level and the post-tracking reconstruction:
from reconstruction import prepare_cdst_analysis
path.add_module("RootInput", inputFileName=input_file)
ma.applyEventCuts("eventExtraInfo(passes_SystematicsKshort)", path=path)
# Run the post-tracking reco.
prepare_cdst_analysis(path, mc=False) # mc=True if input is MC.