Skip to content
Snippets Groups Projects

Fix bug in config file

18 files
+ 8493
2454
Compare changes
  • Side-by-side
  • Inline
Files
18
@@ -8,9 +8,9 @@
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
__author__ = 'Vitalii Lisovskyi; based on Bu2LLK lines'
__date__ = '04/09/2019'
__version__ = '$Revision: 1 $'
__author__ = 'Vitalii Lisovskyi, Niladri Sahoo; based on Bu2LLK lines'
__date__ = '12/07/2023'
__version__ = '$Revision: 2 $'
__all__ = ( 'B2DibaryonMuMuConf', 'default_config' )
@@ -36,6 +36,7 @@ default_config = {
, 'DiLeptonIPCHI2' : 0
, 'LeptonIPCHI2' : 9
, 'LeptonPT' : 300
, 'LeptonPTTight' : 500
, 'KaonIPCHI2' : 9
, 'KaonPT' : 250
, 'UpperMass' : 5500
@@ -78,6 +79,7 @@ class B2DibaryonMuMuConf(LineBuilder) :
, 'DiLeptonIPCHI2'
, 'LeptonIPCHI2'
, 'LeptonPT'
, 'LeptonPTTight'
, 'KaonIPCHI2'
, 'KaonPT'
, 'UpperMass'
@@ -99,6 +101,7 @@ class B2DibaryonMuMuConf(LineBuilder) :
self._name = name
mmXLine_name = name
mmXSSLine_name = name + "_SS"
from StandardParticles import StdLoosePions as Pions
from StandardParticles import StdLooseKaons as Kaons
@@ -107,7 +110,9 @@ class B2DibaryonMuMuConf(LineBuilder) :
from StandardParticles import StdLooseLambdaDD as LambdasDD
from StandardParticles import StdLooseLambdaLD as LambdasLD
#+++++++++++++++++++++++++++++++++++++++++
# 1 : Make K, Ks, K*, K1, Phi and Lambdas
#+++++++++++++++++++++++++++++++++++++++++
SelKaons = self._filterHadron( name = "KaonsFor" + self._name,
sel = Kaons,
@@ -152,8 +157,9 @@ class B2DibaryonMuMuConf(LineBuilder) :
sel = LambdasLD,
params = config )
#+++++++++++++++++++++++++++++++++++++++++
# 2 : Make Dileptons
#+++++++++++++++++++++++++++++++++++++++++
from StandardParticles import StdLooseDiMuon as DiMuons
MuonID = "(HASMUON)&(ISMUON)"
@@ -164,8 +170,19 @@ class B2DibaryonMuMuConf(LineBuilder) :
params = config,
idcut = DiMuonID )
# 4 : Combine Particles
MuMu_SS = self._makeMuMuSS( "MuMuSSFor" + self._name,
params = config,
muonid = MuonID )
SelDiMuon_SS = self._filterDiLepton( "SelMuMuSSFor" + self._name,
dilepton = MuMu_SS,
params = config,
idcut = DiMuonID )
#+++++++++++++++++++++++++++++++++++++++++
# 4 : Combine Particles
#+++++++++++++++++++++++++++++++++++++++++
SelB2mmX = self._makeB2LLX(mmXLine_name,
dilepton = SelDiMuon,
@@ -173,9 +190,18 @@ class B2DibaryonMuMuConf(LineBuilder) :
params = config,
masscut = "ADAMASS('B+') < %(BMassWindow)s *MeV"% config)
SelB2mmX_SS = self._makeB2LLX(mmXSSLine_name,
dilepton = SelDiMuon_SS,
hadrons = [ SelPions, SelKaons, SelLambdasLL , SelLambdasDD , SelLambdasLD, SelppK, Selpppi, SelpL, SelLamLam ],
params = config,
masscut = "ADAMASS('B+') < %(BMassWindow)s *MeV"% config)
#+++++++++++++++++++++++++++++++++++++++++
# 5 : Declare Lines
#+++++++++++++++++++++++++++++++++++++++++
SPDFilter = {
'Code' : " ( recSummary(LHCb.RecSummary.nSPDhits,'Raw/Spd/Digits') < 600 )" ,
@@ -191,12 +217,23 @@ class B2DibaryonMuMuConf(LineBuilder) :
RequiredRawEvents = [],
MDSTFlag = False )
self.B2mmX_SSLine = StrippingLine(mmXSSLine_name + "Line",
prescale = config['Bu2mmLinePrescale'],
postscale = 1,
selection = SelB2mmX_SS,
FILTER = SPDFilter,
RequiredRawEvents = [],
MDSTFlag = False,
MaxCandidates = 300)
# 6 : Register Lines
#+++++++++++++++++++++++++++++++++++++++++
# 6 : Register Lines
#+++++++++++++++++++++++++++++++++++++++++
self.registerLine( self.B2mmXLine )
self.registerLine( self.B2mmX_SSLine )
#####################################################
@@ -215,6 +252,7 @@ class B2DibaryonMuMuConf(LineBuilder) :
_Filter = FilterDesktop( Code = _Code )
return Selection( name, Algorithm = _Filter, RequiredSelections = [ sel ] )
#####################################################
def _filterLongLivedHadron( self, name, sel, params ):
"""
@@ -249,6 +287,29 @@ class B2DibaryonMuMuConf(LineBuilder) :
_Filter = FilterDesktop( Code = _Code )
return Selection(name, Algorithm = _Filter, RequiredSelections = [ dilepton ] )
#####################################################
# not used anymore for SSLines, rather use _filterDiLepton
def _filterDiLeptonTight( self, name, dilepton, params, idcut = None ) :
"""
Handy interface for dilepton filter
"""
_Code = "(ID=='J/psi(1S)') & "\
"(PT > %(DiLeptonPT)s *MeV) & "\
"(MM < %(UpperMass)s *MeV) & "\
"(MINTREE(ABSID<14,PT) > %(LeptonPTTight)s *MeV) & "\
"(MINTREE(ABSID<14,MIPCHI2DV(PRIMARY)) > %(LeptonIPCHI2)s) & "\
"(VFASPF(VCHI2/VDOF) < 10) & (BPVVDCHI2 > %(DiLeptonFDCHI2)s) & "\
"(MIPCHI2DV(PRIMARY) > %(DiLeptonIPCHI2)s)" % params
# add additional cut on PID if requested
if idcut : _Code += ( " & " + idcut )
_Filter = FilterDesktop( Code = _Code )
return Selection(name, Algorithm = _Filter, RequiredSelections = [ dilepton ] )
#####################################################
def _makeppK( self, name, kaons, protons, params ) :
"""
@@ -280,6 +341,7 @@ class B2DibaryonMuMuConf(LineBuilder) :
# make and store the Selection object
return Selection( name, Algorithm = _Combine, RequiredSelections = [ kaons, protons ] )
####################################################
def _makepppi( self, name, pions, protons, params ) :
"""
@@ -311,6 +373,7 @@ class B2DibaryonMuMuConf(LineBuilder) :
# make and store the Selection object
return Selection( name, Algorithm = _Combine, RequiredSelections = [ pions, protons ] )
#####################################################
def _makepLambda( self, name, lambdasLL, lambdasDD, lambdasLD, protons, params ) :
"""
@@ -418,6 +481,35 @@ class B2DibaryonMuMuConf(LineBuilder) :
return _sel
####################################################
def _makeMuMuSS( self, name, params, muonid = None):
"""
Makes MuMu same sign combinations
"""
from StandardParticles import StdLooseMuons as Muons
_DecayDescriptor = "[J/psi(1S) -> mu+ mu+]cc"
_MassCut = "(AM > 100*MeV)"
_MotherCut = "(VFASPF(VCHI2/VDOF) < 9)"
_DaughtersCut = "(PT > %(LeptonPT)s) & " \
"(MIPCHI2DV(PRIMARY) > %(LeptonIPCHI2)s)" % params
_Combine = CombineParticles( DecayDescriptor = _DecayDescriptor,
CombinationCut = _MassCut,
MotherCut = _MotherCut )
_MuonCut = _DaughtersCut
if muonid : _MuonCut += ( "&" + muonid )
_Combine.DaughtersCuts = {
"mu+" : _MuonCut,
}
return Selection(name, Algorithm = _Combine, RequiredSelections = [ Muons ] )
#####################################################
def _makeB2LLX( self, name, dilepton, hadrons, params, masscut = "(ADAMASS('B+')< 1500 *MeV" ):
"""
@@ -443,4 +535,6 @@ class B2DibaryonMuMuConf(LineBuilder) :
_Merge = MergedSelection( "Merge" + name, RequiredSelections = hadrons )
return Selection(name, Algorithm = _Combine, RequiredSelections = [ dilepton, _Merge ] )
#####################################################
Loading