Skip to content
Snippets Groups Projects

Reinstate pi0/eta -> e+ e- gamma lines, preserving brem photons

Merged Daniel Johnson requested to merge QEE_DiEWithBremPhotons_2018-patches into QEE_2018-patches
Files
2
#!/usr/bin/env python
###############################################################################
# (c) Copyright 2000-2019 CERN for the benefit of the LHCb Collaboration #
# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration #
# #
# This software is distributed under the terms of the GNU General Public #
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". #
@@ -24,7 +24,9 @@ Hlt2ExoticaDisplDiMuonNoPoint
Hlt2ExoticaPrmptDiMuonTurbo
Hlt2ExoticaPrmptDiMuonSSTurbo
Hlt2ExoticaPrmptDiMuonHighMass
Hlt2ExoticaDisplDiELowMass
Hlt2ExoticaPi0ToDiEGamma
Hlt2ExoticaEtaToDiEGamma
"""
from GaudiKernel.SystemOfUnits import MeV, GeV, mm, picosecond
@@ -55,6 +57,11 @@ default_config = {
'StrippingExoticaDisplDiELine',
'StrippingExoticaDisplDiEHighMassLine',
],
'Leptonic': [
'StrippingExoticaDisplDiELowMassMicroLine',
'StrippingExoticaPi0ToDiEGammaMicroLine',
'StrippingExoticaEtaToDiEGammaMicroLine'
],
'Dimuon': [
'StrippingExoticaDisplDiMuonLine',
'StrippingExoticaDisplDiMuonHighMassLine',
@@ -73,6 +80,9 @@ default_config = {
'DiRHNu' : 1.0,
'DisplDiE' : 1.0,
'DisplDiEHighMass' : 1.0,
'DisplDiELowMassMicro': 1.0,
'Pi0ToDiEGammaMicro' : 1.0,
'EtaToDiEGammaMicro' : 1.0,
'DisplDiMuon' : 1.0,
'DisplDiMuonHighMass' : 1.0,
'DisplDiMuonNoPoint' : 1.0,
@@ -156,6 +166,47 @@ default_config = {
'FDChi2' : 0,
'TAU' : 1*picosecond,
},
'DisplDiELowMassMicro' : {
'L0FILTER' : None, #"L0_CHANNEL('Photon')|L0_CHANNEL('Electron')
'HLT1FILTER' : "HLT_PASS_RE('Hlt1DiElectronLowMassDecision')",
'HLT2FILTER' : None,
'TisTosSpec' : None,
'EProbNNe' : 0.1,
'EIPChi2' : 4,
'PT' : 1000*MeV,
'MMIN' : 5*MeV,
'MMAX' : 300*MeV
},
'Pi0ToDiEGammaMicro' : {
'input' : 'Phys/StdLooseAllPhotons/Particles',
'L0FILTER' : None,
'HLT1FILTER' : "HLT_PASS_RE('Hlt1DiElectronLowMass.*Decision')",
'HLT2FILTER' : None,
'TisTosSpec' : None,
'EProbNNe' : 0.1,
'EIPChi2' : -1,
'EEPT' : 1000*MeV,
'GPT' : 500*MeV,
'GCL' : 0.2,
'PT' : 1000*MeV,
'MMIN' : 0*MeV,
'MMAX' : 300*MeV
},
'EtaToDiEGammaMicro' : {
'input' : 'Phys/StdLooseAllPhotons/Particles',
'L0FILTER' : None,
'HLT1FILTER' : "HLT_PASS_RE('Hlt1DiElectronLowMass.*Decision')",
'HLT2FILTER' : None,
'TisTosSpec' : None,
'EProbNNe' : 0.1,
'EIPChi2' : -1,
'EEPT' : 1000*MeV,
'GPT' : 500*MeV,
'GCL' : 0.2,
'PT' : 1000*MeV,
'MMIN' : 400*MeV,
'MMAX' : 700*MeV
},
'DisplDiMuon': {
# 'TOS_HLT2' : 'Hlt2ExoticaDisplDiMuonDecision',
'MuProbNNmu': 0.5,
@@ -364,6 +415,40 @@ def DisplDiE( conf, name, sharedDiE ):
return SimpleSelection( name, FilterDesktop, sharedDiE, Code=code)
def DisplDiELowMass( conf, name, sharedDiE ):
code = ("(MINTREE('e+'==ABSID,BPVIPCHI2()) > %(EIPChi2)s)"
"& (MINTREE('e+'==ABSID,PROBNNe) > %(EProbNNe)s)"
"& (PT > %(PT)s)"
"& (HASVERTEX)"
"& (M > %(MMIN)s) & (M < %(MMAX)s)")%conf
return SimpleSelection( name, FilterDesktop, sharedDiE, Code=code)
def DiEGamma(conf, name, sharedDiE ):
inputs = [ AutomaticData(Location=conf['input']) ] + sharedDiE
dc = {}
dc['KS0'] = ("(MINTREE('e+'==ABSID,BPVIPCHI2()) > %(EIPChi2)s)"
"& (MINTREE('e+'==ABSID,PROBNNe) > %(EProbNNe)s)"
"& (PT > %(EEPT)s)"
"& (HASVERTEX)")%conf
dc['gamma'] = '(PT > %(GPT)s) & (CL > %(GCL)s)'%conf
cc = "(APT > %(PT)s) & (AM > %(MMIN)s) & (AM < %(MMAX)s)"%conf
mc = "(PT > %(PT)s) & (M > %(MMIN)s) & (M < %(MMAX)s)"%conf
return SimpleSelection( name, CombineParticles, inputs,
DecayDescriptor = "rho(770)0 -> KS0 gamma",
DaughtersCuts = dc,
CombinationCut = cc,
MotherCut = mc,
)
def DisplDiMuon( conf, name, sharedDiMuon ):
code = ("(MINTREE('mu+'==ABSID,BPVIPCHI2()) > %(MuIPChi2)s)"
"& (MINTREE('mu+'==ABSID,PROBNNmu) > %(MuProbNNmu)s)"
@@ -439,6 +524,36 @@ class ExoticaConf(LineBuilder):
__configuration_keys__ = default_config['CONFIG'].keys() # Legacy field
#################################################################################################################################
def _storeInputBremPhotons( self, linename, outputlocprefix = "Leptonic/Phys/", photonloc = "Phys/StdVeryLooseAllPhotons/Particles" ):
from PhysSelPython.Wrappers import FilterSelection, DataOnDemand, SelectionSequence
from Configurables import ( CopyParticles, ParticleCloner,
ProtoParticleCloner, CaloHypoCloner,
CaloClusterCloner, GaudiSequencer )
cloner = CopyParticles( name = "BremPhotonClonerFor%s"%linename )
cloner.OutputPrefix = outputlocprefix+linename
cloner.InputLocation = photonloc
cloner.addTool(ParticleCloner, name="ParticleCloner")
cloner.ParticleCloner.ICloneProtoParticle = "ProtoParticleCloner"
cloner.addTool(ProtoParticleCloner,name="ProtoParticleCloner")
cloner.addTool(CaloHypoCloner,name="CaloHypoCloner")
cloner.CaloHypoCloner.CloneClustersNeuP = True
cloner.CaloHypoCloner.CloneDigitsNeuP = True
cloner.addTool(CaloClusterCloner,name="CaloClusterCloner")
cloner.CaloClusterCloner.CloneEntriesNeuP = True
############################################################
makePhotons = GaudiSequencer("For%sBremPhotonMakerAlg"%linename)
makePhotons.Members += [cloner]
return makePhotons
#####################################################
def __init__(self, name, config):
LineBuilder.__init__(self, name, config)
@@ -486,6 +601,33 @@ class ExoticaConf(LineBuilder):
prescale = prescales['DisplDiEHighMass'],
))
self.registerLine(StrippingLine( name+'DisplDiELowMassMicroLine',
selection = DisplDiELowMass(config['DisplDiELowMassMicro'], 'DisplDiELowMassMicro', sharedDiE),
prescale = prescales['DisplDiELowMassMicro'],
L0DU= config['DisplDiELowMassMicro']['L0FILTER'],
HLT1= config['DisplDiELowMassMicro']['HLT1FILTER'],
HLT2= config['DisplDiELowMassMicro']['HLT2FILTER'],
postselalg = self._storeInputBremPhotons(name+'DisplDiELowMassMicroLine', outputlocprefix="Leptonic/Phys/"),
))
self.registerLine(StrippingLine( name+'Pi0ToDiEGammaMicroLine',
selection = DiEGamma(config['Pi0ToDiEGammaMicro'], 'Pi0ToDiEGammaMicro', sharedDiE),
prescale = prescales['Pi0ToDiEGammaMicro'],
L0DU= config['Pi0ToDiEGammaMicro']['L0FILTER'],
HLT1= config['Pi0ToDiEGammaMicro']['HLT1FILTER'],
HLT2= config['Pi0ToDiEGammaMicro']['HLT2FILTER'],
postselalg = self._storeInputBremPhotons(name+'Pi0ToDiEGammaMicroLine', outputlocprefix="Leptonic/Phys/"),
))
self.registerLine(StrippingLine( name+'EtaToDiEGammaMicroLine',
selection = DiEGamma(config['EtaToDiEGammaMicro'], 'EtaToDiEGammaMicro', sharedDiE),
prescale = prescales['EtaToDiEGammaMicro'],
L0DU= config['EtaToDiEGammaMicro']['L0FILTER'],
HLT1= config['EtaToDiEGammaMicro']['HLT1FILTER'],
HLT2= config['EtaToDiEGammaMicro']['HLT2FILTER'],
postselalg = self._storeInputBremPhotons(name+'EtaToDiEGammaMicroLine', outputlocprefix="Leptonic/Phys/"),
))
self.registerLine(StrippingLine( name+'DisplDiMuonLine',
selection = DisplDiMuon(config['DisplDiMuon'],
'DisplDiMuon', sharedDiMuon),
Loading