diff --git a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/python/AsgAnalysisConfig.py b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/python/AsgAnalysisConfig.py index d24215bacb43786bb10b49686e591f0fa41b567d..8bef719de42cf8f3b66ca7ad0c5fdc6aa12b3e39 100644 --- a/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/python/AsgAnalysisConfig.py +++ b/PhysicsAnalysis/Algorithms/AsgAnalysisAlgorithms/python/AsgAnalysisConfig.py @@ -182,7 +182,7 @@ class GeneratorAnalysisBlock (ConfigBlock): super (GeneratorAnalysisBlock, self).__init__ ('Generator') self.addOption ('saveCutBookkeepers', True, type=bool) self.addOption ('runNumber', None, type=int) - self.addOption ('cutBookkeepersSystematics', True, type=bool) + self.addOption ('cutBookkeepersSystematics', None, type=bool) def makeAlgs (self, config) : @@ -200,7 +200,10 @@ class GeneratorAnalysisBlock (ConfigBlock): if self.saveCutBookkeepers: alg = config.createAlgorithm('CP::AsgCutBookkeeperAlg', 'CutBookkeeperAlg') alg.runNumber = self.runNumber - alg.enableSystematics = self.cutBookkeepersSystematics + if self.cutBookkeepersSystematics: + alg.enableSystematics = self.cutBookkeepersSystematics + else: + alg.enableSystematics = not config.noSystematics() config.addPrivateTool( 'truthWeightTool', 'PMGTools::PMGTruthWeightTool' ) # Set up the weights algorithm: diff --git a/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SystematicsSvc.cxx b/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SystematicsSvc.cxx index fced1c57ac91f42696d518d80f473d862af8d955..325630bc290f9caa078bde6520bdb8cfa2019053 100644 --- a/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SystematicsSvc.cxx +++ b/PhysicsAnalysis/Algorithms/SystematicsHandles/Root/SystematicsSvc.cxx @@ -270,21 +270,26 @@ namespace CP StatusCode SystematicsSvc :: finalize () { - for (const CP::SystematicVariation& mysys : m_affectingSystematics) - { - // this logic checks whether a systematic is recommended and - // affecting, or only affecting. if it is only the later, it - // reports the systematic in parenthesis to set it apart. - if (m_recommendedSystematics.find (mysys) == m_recommendedSystematics.end()) - ANA_MSG_INFO ("found systematic: (" << mysys << ")"); - else - ANA_MSG_INFO ("found systematic: " << mysys); + if (m_systematicsList.empty()) { + ANA_MSG_INFO ("no systematics were run."); } - - if(m_systematicsRegex!=".*") { - ANA_MSG_INFO("Systematics regex '" << m_systematicsRegex << "' matched:"); - for(const CP::SystematicSet& mysys : makeSystematicsVector()) { + else{ + for (const CP::SystematicVariation& mysys : m_affectingSystematics) + { + // this logic checks whether a systematic is recommended and + // affecting, or only affecting. if it is only the later, it + // reports the systematic in parenthesis to set it apart. + if (m_recommendedSystematics.find (mysys) == m_recommendedSystematics.end()) + ANA_MSG_INFO ("found systematic: (" << mysys << ")"); + else + ANA_MSG_INFO ("found systematic: " << mysys); + } + + if(m_systematicsRegex!=".*") { + ANA_MSG_INFO("Systematics regex '" << m_systematicsRegex << "' matched:"); + for(const CP::SystematicSet& mysys : makeSystematicsVector()) { ANA_MSG_INFO (" '" << mysys.name() << "'"); + } } } return StatusCode::SUCCESS;