Commit 998b4d62 authored by Alex Pearce's avatar Alex Pearce
Browse files

MOdifications to allow procession of MC-uDST

 - AnalyssiConf: add property RootInTES
 - ChargedPP2MC: fix to respect RootInTES

Cherry-picked from Analysis, commit f4ac92a8.
parent b3cbaa6b
......@@ -5,6 +5,12 @@
! Purpose : Configuration for Analysis project
!-----------------------------------------------------------------------------
! 2016-10-18 - Vanya Belyaev
- Configuration.py
modification to allow smooth processing of MC-uDST
add property RooInTES for AnalysisConf
!======================= AnalysisConf v2r6 2016-02-05 ========================
! 2016-01-11 - Olivier Deschamps
......
......@@ -14,26 +14,30 @@ import GaudiKernel.ProcessJobOptions
class AnalysisConf(LHCbConfigurableUser) :
__slots__ = {
"DataType" : '' # Data type, can be ['2008','2009','MC09','2010','2011']
, "Simulation" : False # set to True for MC
, "RedoMCLinks" : False # On some stripped DST one needs to redo the Track<->MC link table. Set to true if problems with association.
, "OutputLevel" : INFO # The global output level
}
"DataType" : '' # Data type, can be ['2008','2009','MC09','2010','2011']
, "InputType" : '' # 'DST', 'DIGI', 'RDST', 'MDST', 'XDST' or 'LDST'. Nothing means the input type is compatible with being a DST.
, "Simulation" : False # set to True for MC
, "RedoMCLinks" : False # On some stripped DST one needs to redo the Track<->MC link table. Set to true if problems with association.
, "OutputLevel" : INFO # The global output level
, "RootInTES" : '' # Root-In-TES
}
_propertyDocDct = {
"DataType" : """ Data type, can be ['2008','2009','MC09','2010','2011'] """
"DataType" : """ Data type, can be ['2008','2009','MC09','2010','2011'] """
, "InputType" : """ 'DST', 'DIGI', 'RDST', 'MDST', 'XDST' or 'LDST'. Nothing means the input type is compatible with being a DST. """
, "Simulation" : """ set to True to use SimCond """
, "RedoMCLinks" : """ On some stripped DST one needs to redo the Track<->MC link table. Set to true if problems with association """
, "OutputLevel" : """ The global output level """
, "OutputLevel" : """ The global output level """
, "RootInTES" : """ Root-In-TES"""
}
__used_configurables__ = (
'CaloAssociatorsConf' ,
'FlavourTaggingConf'
)
#
# configure reconstruction to be redone
#
#
# configure reconstruction to be redone
#
def initSequence(self):
"""
Init Sequence. Called by master application.
......@@ -43,18 +47,18 @@ class AnalysisConf(LHCbConfigurableUser) :
init = GaudiSequencer("AnalysisInitSeq")
self.redoMCLinks(init)
return init
#
# BTaggingTool configuration
#
#
# BTaggingTool configuration
#
def tagging(self):
from Configurables import FlavourTaggingConf
# Just create an instance. Nothing to configure as of yet
ftConf = FlavourTaggingConf()
#
# Set MC
#
#
# Set MC
#
def redoMCLinks(self,init):
"""
Redo MC links.
......@@ -84,35 +88,45 @@ class AnalysisConf(LHCbConfigurableUser) :
"""
Define DaVinciAssociators. Do MC unpacking.
"""
from Configurables import CaloAssociatorsConf
self.unpackMC()
CaloAssociatorsConf ( EnableMCOnDemand = True, OutputLevel = self.getProp("OutputLevel") )
if not self.getProp("InputType") in ["MDST"]:
from Configurables import CaloAssociatorsConf
CaloAssociatorsConf ( EnableMCOnDemand = True, OutputLevel = self.getProp("OutputLevel") )
from CaloKernel.ConfUtils import getAlgo
from Configurables import NeutralPP2MC
from Configurables import NeutralPP2MC, ChargedPP2MC
root_ = '/Event'
if self.getProp( "InputType" ) == 'MDST' and self.getProp('RootInTES') :
root_ = self.getProp('RootInTES')
## offline neutral protoparticles
alg1 = getAlgo (
NeutralPP2MC , ## type
'NeutralPP2MC' , ## base-name
'Offline' , ## context
'Relations/Rec/ProtoP/Neutrals' , ## base-location
root_ + '/Relations/Rec/ProtoP/Neutrals' , ## base-location
True ) ## on-demand
## hlt neutral protoparticles
alg2 = getAlgo (
NeutralPP2MC , ## type
'NeutralPP2MC' , ## base-name
'Hlt' , ## context
'Relations/Rec/ProtoP/Neutrals' , ## base-location
root_ + '/Relations/Rec/ProtoP/Neutrals' , ## base-location
True ) ## on-demand
from Configurables import DataOnDemandSvc, ChargedPP2MC
from Configurables import DataOnDemandSvc
DataOnDemandSvc().AlgMap['/Event/Relations/Rec/ProtoP/Charged' ] = 'ChargedPP2MC'
DataOnDemandSvc().AlgMap['/Event/Relations/Rec/ProtoP/Upstream' ] = 'ChargedPP2MC'
if root_ != '/Event' :
alg1.RootInTES = root_
ChargedPP2MC( RootInTES = root_ )
dod = DataOnDemandSvc()
dod.AlgMap[ root_ + '/Relations/Rec/ProtoP/Charged' ] = ChargedPP2MC()
dod.AlgMap[ root_ + '/Relations/Rec/ProtoP/Upstream' ] = ChargedPP2MC()
self.unpackMC()
#
# Standard Particles
#
def standardParticles(self):
......
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