Commit b5f80345 authored by Elisabeth Maria Niel's avatar Elisabeth Maria Niel
Browse files

add polarizedBaryon option with polarization value settings

parent 4c0b2313
Pipeline #1567147 passed with stages
in 2 minutes and 3 seconds
......@@ -111,6 +111,10 @@ class GenericOptionFile(object):
def AddGenXiccCutToolBaryonState( self , eventtype , CutsValue ):
self.AddOptionValue( 'Generation.{0}.{1}.BaryonState'.format( eventtype.Sample(), CutsValue ) ,
'Generation().{0}.{1}Production.BaryonState'.format( eventtype.Sample(), eventtype.Production() ) )
def GeneratePolarizedBaryon( self ):
self.AddOptionValue( 'ToolSvc.EvtGenDecay.PolarizedBaryons' , self.true_string )
def SetBaryonPolarization( self ,eventtype) :
self.AddOptionValue( 'ToolSvc.EvtGenDecay.BaryonPol' , '{0}'.format(eventtype.BaryonPolarizationValue()))
def GeneratePolarizedLambdab( self ):
self.AddOptionValue( 'ToolSvc.EvtGenDecay.PolarizedLambdad' , self.true_string )
def AddParticleValue( self , eventtype ):
......@@ -267,7 +271,7 @@ class EventType:
'DecayEngine' , 'CutsOptions' , 'Configuration' , 'ParticleType' ,
'Momentum' , 'MomentumRange' , 'Id' , 'Production' ,
'FullEventCuts' , 'ParticleValue' , 'ParticleTable' ,
'SUSYModel' , 'PolarizedLambdab' , 'InsertPythonCode' , 'CPUTime',
'SUSYModel' , 'PolarizedLambdab' , 'PolarizedBaryon' , 'PolValue', 'InsertPythonCode' , 'CPUTime',
'PostFilter' , 'PostFilterOptions' ]
def __init__( self , filename , remove , technology ):
""" filename is the name of the decay file
......@@ -440,6 +444,14 @@ class EventType:
return 'PolarizedLambdab' in self.KeywordDictionary.keys()
def PolarizedLambdab( self ):
return self.KeywordDictionary[ 'PolarizedLambdab' ].lower()
def HasPolarizedbaryon( self ):
return 'PolarizedBaryon' in self.KeywordDictionary.keys()
def PolarizedBaryon( self ):
return self.KeywordDictionary[ 'PolarizedBaryon' ].lower()
def HasParticlePol( self ):
return 'PolValue' in self.KeywordDictionary.keys()
def BaryonPolarizationValue( self ):
return self.KeywordDictionary[ 'PolValue' ]
def HasExtraOptions( self ):
return 'ExtraOptions' in self.KeywordDictionary.keys()
def ExtraOptions( self ):
......@@ -1172,6 +1184,12 @@ def run_create( dkfile , remove , python , force ):
if eventtype.HasPolarizedLambdab():
if eventtype.PolarizedLambdab() == "yes":
eventtype.OptionFile.GeneratePolarizedLambdab()
# Polarized baryons
### eventtype.OptionFile
if eventtype.HasPolarizedbaryon():
if eventtype.PolarizedBaryon() == "yes":
eventtype.OptionFile.GeneratePolarizedBaryon()
eventtype.OptionFile.SetBaryonPolarization(eventtype)
# Optional lines for all event types ---------------------------------
# Check if exists ExtraOptions keyword
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment