Skip to content
Snippets Groups Projects

Add the electron ID line without tag ID cut

Merged Vitalii Lisovskyi requested to merge vlisovsk_eID_2018 into 2018-patches
1 unresolved thread
1 file
+ 118
6
Compare changes
  • Side-by-side
  • Inline
@@ -21,8 +21,8 @@ stream.appendLines( [
])
'''
__author__=['Jibo He']
__date__ = '03/10/2010'
__author__=['Jibo He','Vitalii Lisovskyi']
__date__ = '21/06/2021'
__version__= '$Revision: 1.2 $'
@@ -61,10 +61,18 @@ config_default = {
'Bu2JpsieeKLine_Prescale' : 1,
'Bu2JpsieeKLine_HltFilter' : None,
'Bu2JpsieeKLine_KaonCut' : "(TRCHI2DOF<4) & (PT>1.0*GeV) & (P>3.0*GeV) & (PIDK >5) & (BPVIPCHI2()>9)", # & (PIDK >0)
'Bu2JpsieeKLine_KaonCut' : "(TRCHI2DOF<4) & (PT>1.0*GeV) & (P>3.0*GeV) & (PIDK>5) & (BPVIPCHI2()>9)", # & (PIDK >0)
'Bu2JpsieeKLine_JpsiCut' : "(BPVDLS>4)",
'Bu2JpsieeKLine_BuComCut' : "in_range(4.1*GeV,AM,6.1*GeV)",
'Bu2JpsieeKLine_BuMomCut' : "in_range(4.2*GeV,M, 6.0*GeV) & (VFASPF(VCHI2PDOF)<9)"
'Bu2JpsieeKLine_BuMomCut' : "in_range(4.2*GeV,M, 6.0*GeV) & (VFASPF(VCHI2PDOF)<9)",
'Bu2JpsieeKLine_notagID_Prescale' : 1,
'Bu2JpsieeKLine_notagID_HltFilter' : None,
'Bu2JpsieeKLine_notagID_KaonCut' : "(TRCHI2DOF<4) & (PT>1.0*GeV) & (P>3.0*GeV) & (PIDK>5) & (BPVIPCHI2()>9)", # & (PIDK >0)
'Bu2JpsieeKLine_notagID_JpsiCut' : "(BPVDLS>4)",
'Bu2JpsieeKLine_notagID_BuComCut' : "in_range(3.6*GeV,AM,8.*GeV)",
'Bu2JpsieeKLine_notagID_BuMomCut' : "(PT>3200) & (VFASPF(VCHI2PDOF)<9) & in_range(4.5*GeV,DTF_FUN(M,True,'J/psi(1S)'),6.0*GeV)"
#'Bu2JpsieeKLine_notagID_BuMomCut' : "in_range(4.2*GeV,M, 6.0*GeV) & (VFASPF(VCHI2PDOF)<6) & (PT>3000)",
}
default_config = {
@@ -72,7 +80,7 @@ default_config = {
'WGs' : ['Calib'],
'BUILDERTYPE' : 'ElectronIDConf',
'CONFIG' : config_default,
'STREAMS' : [ 'BhadronCompleteEvent' ] #[ 'PID' ]
'STREAMS' : { 'Leptonic' : ['StrippingElectronIDCalibBu2JpsiK_notagIDLine'], 'BhadronCompleteEvent' : ['StrippingElectronIDCalibBu2JpsiKLine'] }
}
@@ -118,9 +126,32 @@ class ElectronIDConf(LineBuilder):
eeMaxMass = config['eeMaxMass']
)
self.JpsiList_notagID= makeEE_notagID( 'ee_notagIDFor'+self.name,
#
Both_PT = config['Both_PT'],
Both_P = config['Both_P'],
Both_TRCHI2DOF = config['Both_TRCHI2DOF'],
Both_MIPCHI2 = config['Both_MIPCHI2'],
#
Tag_PT = config['Tag_PT'],
Tag_P = config['Tag_P'],
#Tag_PIDe = config['Tag_PIDe'],
Tag_MIPCHI2 = config['Tag_MIPCHI2'],
#
Probe_PT = config['Probe_PT'],
Probe_P = config['Probe_P'],
Probe_MIPCHI2 = config['Probe_MIPCHI2'],
#
eeCombMinMass = config['eeCombMinMass'],
eeCombMaxMass = config['eeCombMaxMass'],
eeVCHI2PDOF = config['eeVCHI2PDOF'],
eeMinMass = config['eeMinMass'],
eeMaxMass = config['eeMaxMass']
)
self.makeJpsi2eeLine()
self.makeBu2JpsieeKLine()
self.makeBu2JpsieeKLine_notagID()
def createSubSel( self, OutputList, InputList, Cuts ) :
'''create a selection using a FilterDesktop'''
@@ -184,6 +215,26 @@ class ElectronIDConf(LineBuilder):
)
self.registerLine( Bu2JpsieeKLine )
def makeBu2JpsieeKLine_notagID( self ):
from StandardParticles import StdTightKaons
Bu2JpsieeK_notagID = self.createCombinationSel(
OutputList = "Bu2JpsieeK_notagIDFor" + self.name,
DecayDescriptor = "[B+ -> J/psi(1S) K+]cc",
DaughterLists = [ self.JpsiList_notagID, StdTightKaons ],
DaughterCuts = { "J/psi(1S)" : self.config['Bu2JpsieeKLine_notagID_JpsiCut'],
"K+" : self.config['Bu2JpsieeKLine_notagID_KaonCut']},
PreVertexCuts = self.config['Bu2JpsieeKLine_notagID_BuComCut'],
PostVertexCuts = self.config['Bu2JpsieeKLine_notagID_BuMomCut'] )
Bu2JpsieeKLine_notagID = StrippingLine( self.name + "Bu2JpsiK_notagIDLine",
HLT = self.config['Bu2JpsieeKLine_notagID_HltFilter'],
algos = [ Bu2JpsieeK_notagID ] ,
RequiredRawEvents=["Trigger", "Muon", "Calo", "Rich", "Velo", "Tracker"],
prescale = self.config["Bu2JpsieeKLine_notagID_Prescale"]
)
self.registerLine( Bu2JpsieeKLine_notagID )
def makeEE( name,
#
@@ -244,3 +295,64 @@ def makeEE( name,
Algorithm = _EE,
RequiredSelections = [ NoPIDsElectronsForElectronID ]
)
def makeEE_notagID( name,
#
Both_PT,
Both_P,
Both_TRCHI2DOF,
Both_MIPCHI2,
#
Tag_PT,
Tag_P,
#Tag_PIDe,
Tag_MIPCHI2,
#
Probe_PT,
Probe_P,
Probe_MIPCHI2,
#
eeCombMinMass,
eeCombMaxMass,
eeVCHI2PDOF,
eeMinMass,
eeMaxMass
):
from StandardParticles import StdNoPIDsElectrons as NoPIDsElectronsForElectronID
InAccCuts = "(ALL)"#"(0.5<PPINFO(LHCb.ProtoParticle.InAccEcal,-1))"
BothCuts = "(PT> %(Both_PT)s *MeV)"\
" & (TRCHI2DOF < %(Both_TRCHI2DOF)s)"\
" & (MINTREE('e+'==ABSID,BPVIPCHI2())> %(Both_MIPCHI2)s )" % locals()
EEComCut = "(in_range(%(eeCombMinMass)s *MeV, AM, %(eeCombMaxMass)s *MeV))" % locals()
EEMomCut = "(VFASPF(VCHI2)< %(eeVCHI2PDOF)s)"\
" & (in_range(%(eeMinMass)s *MeV, MM, %(eeMaxMass)s *MeV))" % locals()
Tag1Cuts = "(CHILDCUT((PT>%(Tag_PT)s*MeV),1)) & (CHILDCUT((P>%(Tag_P)s*MeV),1))"\
" & (CHILDCUT((BPVIPCHI2()> %(Tag_MIPCHI2)s),1))" % locals()
Tag2Cuts = "(CHILDCUT((PT>%(Tag_PT)s*MeV),2)) & (CHILDCUT((P>%(Tag_P)s*MeV),2))"\
" & (CHILDCUT((BPVIPCHI2()> %(Tag_MIPCHI2)s),2))" % locals()
Probe1Cuts = "(CHILDCUT((PT>%(Probe_PT)s*MeV),1)) & (CHILDCUT((P>%(Probe_P)s*MeV),1))"\
" & (CHILDCUT((BPVIPCHI2()> %(Probe_MIPCHI2)s),1))" % locals()
Probe2Cuts = "(CHILDCUT((PT>%(Probe_PT)s*MeV),2)) & (CHILDCUT((P>%(Probe_P)s*MeV),2))"\
" & (CHILDCUT((BPVIPCHI2()> %(Probe_MIPCHI2)s),2))" % locals()
Tag1Probe2Cuts = Tag1Cuts + " & " + Probe2Cuts
Tag2Probe1Cuts = Tag2Cuts + " & " + Probe1Cuts
_EE = CombineParticles( DecayDescriptor = "J/psi(1S) -> e+ e-",
DaughtersCuts = {"e+" : InAccCuts + "&" + BothCuts },
CombinationCut = EEComCut,
MotherCut = EEMomCut + " & ( ( " + Tag1Probe2Cuts + " ) | (" + Tag2Probe1Cuts + " ) ) "
)
return Selection( name,
Algorithm = _EE,
RequiredSelections = [ NoPIDsElectronsForElectronID ]
)
Loading