Exemple #1
0
    def __init__(self,
                 name="TauRecConfigured",
                 msglevel=3,
                 ignoreExistingDataObject=True):
        self.name = name
        self.msglevel = msglevel
        from tauRec.tauRecConf import TauProcessorAlg
        from tauRec.tauRecFlags import tauFlags
        from CaloRec.CaloRecConf import CaloCellContainerFinalizerTool
        # add calo cell finalizer tool
        TauCellContainerFinalizer = CaloCellContainerFinalizerTool(
            name='tauRec_tauPi0CellContainerFinalizer')
        from AthenaCommon.AppMgr import ToolSvc

        self._TauProcessorAlgHandle = TauProcessorAlg(
            name=self.name + 'Alg',
            Key_jetInputContainer=tauFlags.tauRecSeedJetCollection(),
            Key_tauOutputContainer="tmp_TauJets",
            Key_tauTrackOutputContainer="TauTracks",
            Key_tauShotClusOutputContainer="TauShotClusters",
            Key_tauShotPFOOutputContainer="TauShotParticleFlowObjects",
            Key_tauPi0CellOutputContainer="TauCommonPi0Cells",
            MaxEta=tauFlags.tauRecSeedMaxEta(),
            MinPt=tauFlags.tauRecSeedMinPt(),
            CellMakerTool=TauCellContainerFinalizer)

        Configured.__init__(self,
                            ignoreExistingDataObject=ignoreExistingDataObject)
    def __init__(self, name="TrigNavSlimming", sequence=AlgSequence()):

        # Remember the parameters:
        self.__sequence = sequence
        self.__name = name

        Configured.__init__(self)
Exemple #3
0
 def __init__(self,
              disable=False,
              ignoreExistingDataObject=caloRingerFlags.
              ignoreRingerExistingDataObject(),
              ignoreConfigError=False):
     "Call Configured init, but with new default ignoreExistingDataObject"
     Configured.__init__(self, disable, ignoreExistingDataObject,
                         ignoreConfigError)
Exemple #4
0
    def __init__(self,
                 name="STVFMETGetter",
                 sequence=AlgSequence(D3PDMakerFlags.PreD3PDAlgSeqName()),
                 **kw):

        # Remember the parameter(s):
        self.__name = name
        self.__sequence = sequence
        Configured.__init__(self, **kw)
Exemple #5
0
 def __init__(self,
              name="TauRecConfigured",
              msglevel=3,
              ignoreExistingDataObject=True):
     self.name = name
     self.msglevel = msglevel
     from tauRec.tauRecConf import TauProcessorAlg
     self._TauProcessorAlgHandle = TauProcessorAlg(name=self.name + 'Alg')
     Configured.__init__(self,
                         ignoreExistingDataObject=ignoreExistingDataObject)
Exemple #6
0
 def __init__ (self,
               disable=False, ignoreExistingDataObject=False, ignoreConfigError=False,
               seq = AlgSequence(),
               *args, **kw):
     self._seq = seq
     self.mlog =  logging.getLogger( self.__class__.__name__)        
     Configured.__init__ (self,
                          disable=disable,
                          ignoreExistingDataObject=ignoreExistingDataObject,
                          ignoreConfigError=ignoreConfigError,
                           *args, **kw)
     return
Exemple #7
0
 def __init__(self, name = "TauRecRunConfigured", msglevel=3, ignoreExistingDataObject=True) :
     self.name = name
     self.msglevel = msglevel
     from tauRec.tauRecConf import TauRunnerAlg 
     from tauRec.tauRecFlags import tauFlags
     self._TauRunnerAlgHandle = TauRunnerAlg ( name=self.name+'Alg', 
                                               Key_tauInputContainer="tmp_TauJets",
                                               Key_Pi0ClusterInputContainer="TauPi0SubtractedClusters",
                                               Key_tauOutputContainer="TauJets",
                                               Key_neutralPFOOutputContainer="TauNeutralParticleFlowObjects",
                                               Key_pi0ClusterOutputContainer="TauPi0Clusters",
                                               Key_hadronicPFOOutputContainer="TauHadronicParticleFlowObjects",
                                               Key_vertexOutputContainer = "TauSecondaryVertices",
                                               Key_chargedPFOOutputContainer = "TauChargedParticleFlowObjects",
                                               Key_pi0Container= "finalTauPi0s"
                                               )
                                                                                             
     Configured.__init__(self, ignoreExistingDataObject=ignoreExistingDataObject)
Exemple #8
0
 def __init__(self,
              disable=False,
              ignoreExistingDataObject=False,
              ignoreConfigError=False,
              seq=AlgSequence(),
              *args,
              **kw):
     self._seq = seq
     if self._truthType != PileUpClassification.SIGNAL:
         self._outputKey = self._outputKey + PileUpClassification.toString[
             self._truthType]
     self._output = {
         "TruthParticleContainer": self._outputKey
     }  # for configured class
     Configured.__init__(self,
                         disable=disable,
                         ignoreExistingDataObject=ignoreExistingDataObject,
                         ignoreConfigError=ignoreConfigError,
                         *args,
                         **kw)
Exemple #9
0
    def __init__(self,
                 name="DiTauBuilder",
                 ignoreExistingDataObject=True,
                 R_jet=1.0,
                 R_subjet=0.2,
                 R_core=0.1,
                 do_cell_finding=True,
                 write_jet_cells=True,
                 write_subjet_cells=True,
                 use_cells=True):
        self.name = name
        self.R_jet = R_jet
        self.R_subjet = R_subjet
        self.R_core = R_core
        self.do_cell_finding = do_cell_finding
        self.write_jet_cells = write_jet_cells
        self.write_subjet_cells = write_subjet_cells
        self.use_cells = use_cells

        Configured.__init__(self,
                            ignoreExistingDataObject=ignoreExistingDataObject)
 def __init__(self, seq=AlgSequence(), *args, **kw):
     self.seq = seq
     Configured.__init__(self, *args, **kw)
     return
Exemple #11
0
 def __init__(self):
     # tell the Configured machinery that we do not care about the objects already there
     if not TF.doFEX() and TF.doHypo():
         Configured.__init__(self, ignoreExistingDataObject=True)
     else:
         Configured.__init__(self, ignoreExistingDataObject=False)
Exemple #12
0
 def __init__(self, menu):
     Configured.__init__(self)
     self.postConfigure(menu)
Exemple #13
0
def setup_eflowCaloObjectCreator(Configured, nameModifier, mlog):

    if nameModifier != "EM" and nameModifier != "LC":
        mlog.error(
            "Invalid calorimeter scale was specified : should be LC or EM, but was "
            + nameModifier)
        return False

    try:
        from eflowRec.eflowRecConf import eflowPreparation
        eflowPreparationAlgorithm = eflowPreparation("eflow" + nameModifier +
                                                     "CaloObjectBuilder")
    except:
        mlog.error("could not import eflowRec.eflowPreparation")
        print traceback.format_exc()
        return False

    Configured._eflowPreparationHandle = eflowPreparationAlgorithm

    try:
        from eflowRec.eflowRecConf import eflowTrackCaloExtensionTool
        TrackCaloExtensionTool = eflowTrackCaloExtensionTool()
    except:
        mlog.error("could not import eflowRec.eflowTrackCaloExtensionTool")
        print traceback.format_exc()
        return False

    eflowPreparationAlgorithm.TrackExtrapolatorTool = TrackCaloExtensionTool

    # sets output key of C++ algorithm equal to the python side
    eflowPreparationAlgorithm.EflowCaloObjectsOutputName = Configured.outputKey(
    )

    from eflowRec.eflowRecFlags import jobproperties

    if "EM" == nameModifier:
        eflowPreparationAlgorithm.ClustersName = "CaloTopoCluster"
        eflowPreparationAlgorithm.CalClustersName = "CaloCalTopoClusters"
    elif "LC" == nameModifier:
        eflowPreparationAlgorithm.ClustersName = "CaloCalTopoClusters"
        eflowPreparationAlgorithm.CalClustersName = ""

    if True == jobproperties.eflowRecFlags.useLeptons:
        eflowPreparationAlgorithm.useLeptons = True
        if True == jobproperties.eflowRecFlags.storeLeptonCells:
            eflowPreparationAlgorithm.storeLeptonCells = True
            if "LC" == nameModifier:
                eflowPreparationAlgorithm.eflowLeptonCellsName = "eflowRec_leptonCellContainer_LC"
    else:
        eflowPreparationAlgorithm.useLeptons = False

    if "LC" == nameModifier:
        eflowPreparationAlgorithm.EflowCaloObjectsOutputName = "eflowCaloObjects_LC"
        eflowPreparationAlgorithm.eflowElectronsName = "eflowRec_selectedElectrons_LC"

    try:
        from InDetTrackSelectionTool.InDetTrackSelectionToolConf import InDet__InDetTrackSelectionTool
        TrackSelectionTool = InDet__InDetTrackSelectionTool()
    except:
        mlog.error(
            "could not import InDetTrackSelectionTool.InDet__InDetTrackSelectionTool"
        )
        print traceback.format_exc()
        return False

    try:
        from AthenaCommon.AppMgr import ToolSvc
    except:
        mlog.error("could not import ToolSvc")
        print traceback.format_exc()
        return False

    ToolSvc += TrackSelectionTool

    TrackSelectionTool.CutLevel = "TightPrimary"
    TrackSelectionTool.minPt = 500.0

    eflowPreparationAlgorithm.TrackSelectionTool = TrackSelectionTool

    from RecExConfig.ObjKeyStore import objKeyStore
    objKeyStore.addTransient(Configured.outputType(), Configured.outputKey())

    from AthenaCommon.AlgSequence import AlgSequence
    topSequence = AlgSequence()
    topSequence += eflowPreparationAlgorithm

    return True