Skip to content
Snippets Groups Projects
Commit f9c51487 authored by Graeme Stewart's avatar Graeme Stewart
Browse files

PhysicsAnalysis/D3PDMaker/TrigMissingETD3PDMaker deleted from 20.11

parent 5fd0bf02
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 571 deletions
package TrigMissingETD3PDMaker
author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
author Diego Casadei <Diego.Casadei@cern.ch>
# Basic Gaudi/Athena package(s):
use AtlasPolicy AtlasPolicy-*
private
use GaudiInterface GaudiInterface-* External
use AthenaKernel AthenaKernel-* Control
use TrigMissingEtEvent TrigMissingEtEvent-* Trigger/TrigEvent
use D3PDMakerUtils D3PDMakerUtils-* PhysicsAnalysis/D3PDMaker
use TriggerD3PDMaker TriggerD3PDMaker-* PhysicsAnalysis/D3PDMaker
end_private
library TrigMissingETD3PDMaker *.cxx components/*.cxx
apply_pattern component_library
apply_pattern declare_python_modules files="*.py"
apply_pattern declare_joboptions files="*.py"
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# $Id: TrigMETD3PD.py 487405 2012-03-08 17:28:58Z krasznaa $
#
# Some common import(s):
from AthenaCommon.AlgSequence import AlgSequence
##
# @short Function adding the Trigger MET information to the D3PD
#
# The idea here is that one could add all the HLT MET information to his/her
# D3PD with something like this:
#
# <code>
# from TrigMissingETD3PDMaker.TrigMETD3PD import TrigMETD3PDObjects
# TrigMETD3PDObjects( myd3pdalg, 2 )
# </code>
#
# $Revision: 487405 $
# $Date: 2012-03-08 18:28:58 +0100 (Thu, 08 Mar 2012) $
#
def TrigMETD3PDObjects( alg, level = 10 ):
# The LVL1 information:
from TriggerD3PDMaker.EnergySumROID3PDObject import EnergySumROID3PDObject
alg += EnergySumROID3PDObject( level, prefix = "trig_L1_esum_" )
# The LVL2 information:
from TrigMissingETD3PDMaker.TrigMETD3PDObject import TrigMETD3PDObject
alg += TrigMETD3PDObject( level, prefix = "trig_L2_met_",
sgkey = "HLT_T2MissingET" )
# The New LVL2 FEB information:
from RecExConfig.ObjKeyStore import cfgKeyStore
if cfgKeyStore.isInInputFile( "TrigMissingETContainer", "HLT_L2MissingET_FEB" ):
alg += TrigMETD3PDObject( level, prefix = "trig_L2_feb_met_",
sgkey = "HLT_L2MissingET_FEB" )
pass
# The EF information:
alg += TrigMETD3PDObject( level, prefix = "trig_EF_met_",
sgkey = "HLT_TrigEFMissingET" )
if cfgKeyStore.isInInputFile( "TrigMissingETContainer",
"HLT_TrigEFMissingET_FEB" ):
alg += TrigMETD3PDObject( level, prefix = "trig_EF_feb_met_",
sgkey = "HLT_TrigEFMissingET_FEB" )
pass
if cfgKeyStore.isInInputFile( "TrigMissingETContainer",
"HLT_TrigEFMissingET_topocl" ):
alg += TrigMETD3PDObject( level, prefix = "trig_EF_topocl_met_",
sgkey = "HLT_TrigEFMissingET_topocl" )
pass
# The jet ETsum info:
if cfgKeyStore.isInInputFile( "TrigMissingETContainer",
"HLT_L2JetEtSum" ):
alg += TrigMETD3PDObject( level, prefix = "trig_L2_jetetsum_",
sgkey = "HLT_L2JetEtSum" )
pass
if cfgKeyStore.isInInputFile( "TrigMissingETContainer",
"HLT_EFJetEtSum" ):
alg += TrigMETD3PDObject( level, prefix = "trig_EF_jetetsum_",
sgkey = "HLT_EFJetEtSum" )
pass
return alg
##
# @short Function creating the MET trigger D3PD
#
# This function can be used in a top jobOption to create the trigger MET
# D3PD.
#
# $Revision: 487405 $
# $Date: 2012-03-08 18:28:58 +0100 (Thu, 08 Mar 2012) $
#
def TrigMETD3PD( fname, level = 10, tname = "met", sequence = AlgSequence() ):
# Create a D3PD maker algorithm:
import D3PDMakerCoreComps
alg = D3PDMakerCoreComps.MakerAlg( tname, seq = sequence, file = fname )
# Add all the blocks to the D3PD:
TrigMETD3PDObjects( alg, level )
return alg
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# $Id: TrigMETD3PDObject.py 338101 2010-12-20 14:57:28Z krasznaa $
#
# D3PD object saving information about the HLT missing-Et reconstruction.
# Picks up the TrigMissingET objects directly from StoreGate. Default
# parameters only save the information about the default LVL2 MET
# reconstruction. The user should configure it specifically in the job
# itself.
#
from D3PDMakerCoreComps.D3PDObject import D3PDObject
from D3PDMakerCoreComps.D3PDObject import make_SG_D3PDObject
import TrigMissingETD3PDMaker
TrigMETD3PDObject = make_SG_D3PDObject( "TrigMissingETContainer",
"HLT_T2MissingET",
"trig_L2_met_",
"TrigMETD3PDObject" )
TrigMETD3PDObject.defineBlock( 0, "BasicInfo",
TrigMissingETD3PDMaker.TrigMissingETBaseFillerTool )
TrigMETD3PDObject.defineBlock( 0, "ComponentInfo",
TrigMissingETD3PDMaker.TrigMissingETComponentFillerTool )
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# $Id: __init__.py 278517 2010-02-10 16:46:44Z krasznaa $
#
# @file TrigMissingETD3PDMaker/python/__init__.py
# @author scott snyder <snyder@bnl.gov>
# @date Sep, 2009
# @brief Define shortcuts for referencing configurables in this package.
#
# With this, instead of writing
#
# TrigMissingETD3PDMaker.TrigMissingETD3PDMakerConf.D3PD__TrigMissingETBaseFillerTool
#
# we can write
#
# TrigMissingETD3PDMaker.TrigMissingETBaseFillerTool
#
import TrigMissingETD3PDMakerConf
for k, v in TrigMissingETD3PDMakerConf.__dict__.items():
if k.startswith ('D3PD__'):
globals()[k[6:]] = v
# $Id: makeTrigMETD3PD.py 295662 2010-04-27 08:24:34Z krasznaa $
#
# This is a simple top level jobO for creating "the" trigger MET D3PD from
# the specified AOD/ESD file(s).
#
# Set the input file name(s):
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
athenaCommonFlags.FilesInput.set_Value_and_Lock( [
"AOD.pool.root"
] )
# Set the number of events to process:
athenaCommonFlags.EvtMax.set_Value_and_Lock( 100 )
# Set up what the RecExCommon job should and shouldn't do:
from RecExConfig.RecFlags import rec
rec.AutoConfiguration = [ "everything" ]
rec.doCBNT.set_Value_and_Lock( False )
rec.doWriteESD.set_Value_and_Lock( False )
rec.doWriteAOD.set_Value_and_Lock( False )
rec.doWriteTAG.set_Value_and_Lock( False )
rec.doESD.set_Value_and_Lock( False )
rec.doAOD.set_Value_and_Lock( False )
rec.doDPD.set_Value_and_Lock( False )
rec.doHist.set_Value_and_Lock( False )
rec.doPerfMon.set_Value_and_Lock( False )
rec.doForwardDet.set_Value_and_Lock( False )
# Let RecExCommon set everything up:
include( "RecExCommon/RecExCommon_topOptions.py" )
# Read some parameters from the command line:
if not "level" in dir():
level = 10
if not "OutputName" in dir():
OutputName = "trig_met_d3pd_level%d.root" % level
# Now add the D3PD maker to the job:
from TrigMissingETD3PDMaker.TrigMETD3PD import TrigMETD3PD
alg = TrigMETD3PD( OutputName, level )
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: TrigMissingETBaseFillerTool.cxx 502729 2012-05-27 21:54:40Z ssnyder $
// Gaudi/Athena include(s):
#include "AthenaKernel/errorcheck.h"
// EDM include(s):
#include "TrigMissingEtEvent/TrigMissingET.h"
// Local include(s):
#include "TrigMissingETBaseFillerTool.h"
namespace D3PD {
TrigMissingETBaseFillerTool::TrigMissingETBaseFillerTool( const std::string& type,
const std::string& name,
const IInterface* parent )
: BlockFillerTool< TrigMissingETContainer >( type, name, parent )
{
book().ignore(); // Avoid coverity warnings.
}
/**
* Here the output variables are declared to the D3PDMaker framework.
*/
StatusCode TrigMissingETBaseFillerTool::book() {
CHECK( addVariable( "MEx", m_ex ) );
CHECK( addVariable( "MEy", m_ey ) );
CHECK( addVariable( "MEz", m_ez ) );
CHECK( addVariable( "sumEt", m_sumEt ) );
CHECK( addVariable( "sumE", m_sumE ) );
CHECK( addVariable( "flag", m_flag ) );
return StatusCode::SUCCESS;
}
/**
* Here the output variables are filled with the information coming from a
* TrigMissingET object.
*/
StatusCode TrigMissingETBaseFillerTool::fill( const TrigMissingETContainer& met ) {
// Fill the variables with dummy values:
*m_ex = -99999999.9;
*m_ey = -99999999.9;
*m_ez = -99999999.9;
*m_sumEt = -99999999.9;
*m_sumE = -99999999.9;
*m_flag = 0x80000000;
// If the container is empty, leave the dummy values in the variables:
if( ! met.size() ) {
REPORT_MESSAGE( MSG::DEBUG ) << "TrigMET container is empty!";
return StatusCode::SUCCESS;
}
// Issue a warning if there are more than 1 objects in the container.
// This should not happen if the HLT is working correctly.
if( met.size() > 1 ) {
REPORT_MESSAGE( MSG::WARNING ) << "TrigMET container has multiple objects!";
REPORT_MESSAGE( MSG::WARNING ) << "Check with trigger experts!";
}
// Fill the variables with the correct values:
*m_ex = met.front()->ex();
*m_ey = met.front()->ey();
*m_ez = met.front()->ez();
*m_sumEt = met.front()->sumEt();
*m_sumE = met.front()->sumE();
*m_flag = met.front()->getFlag();
return StatusCode::SUCCESS;
}
} // namespace D3PD
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: TrigMissingETBaseFillerTool.h 278740 2010-02-11 14:32:52Z krasznaa $
#ifndef TRIGMISSINGETD3PDMAKER_TRIGMISSINGETBASEFILLERTOOL_H
#define TRIGMISSINGETD3PDMAKER_TRIGMISSINGETBASEFILLERTOOL_H
// EDM include(s):
#include "TrigMissingEtEvent/TrigMissingETContainer.h"
// D3PD include(s):
#include "D3PDMakerUtils/BlockFillerTool.h"
namespace D3PD {
/**
* @short Filler tool saving basic information about missing-ET objects
*
* This tool saves the bare minimum of information about the
* missing-ET reconstructed in the HLT.
*
* @author Attila Krasznahorkay Jr.
* @author Diego Casadei
*
* $Revision: 278740 $
* $Date: 2010-02-11 15:32:52 +0100 (Thu, 11 Feb 2010) $
*/
class TrigMissingETBaseFillerTool : public BlockFillerTool< TrigMissingETContainer > {
public:
/// Regular AlgTool constructor
TrigMissingETBaseFillerTool( const std::string& type, const std::string& name,
const IInterface* parent );
/// Function declaring the output variables
virtual StatusCode book();
/// Function filling the output variables
virtual StatusCode fill( const TrigMissingETContainer& met );
private:
float* m_ex; ///< X component of missing energy vector
float* m_ey; ///< Y component of missing energy vector
float* m_ez; ///< Z component of missing energy vector
float* m_sumEt; ///< Sum of |Et|
float* m_sumE; ///< Sum of |E|
int* m_flag; ///< Event flag: 0 (default) means OK
}; // class TrigMissingETBaseFillerTool
} // namespace D3PD
#endif // TRIGMISSINGETD3PDMAKER_TRIGMISSINGETBASEFILLERTOOL_H
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: TrigMissingETComponentFillerTool.cxx 502729 2012-05-27 21:54:40Z ssnyder $
// Gaudi/Athena include(s):
#include "AthenaKernel/errorcheck.h"
// EDM include(s):
#include "TrigMissingEtEvent/TrigMissingET.h"
// Local include(s):
#include "TrigMissingETComponentFillerTool.h"
namespace D3PD {
TrigMissingETComponentFillerTool::TrigMissingETComponentFillerTool( const std::string& type,
const std::string& name,
const IInterface* parent )
: BlockFillerTool< TrigMissingETContainer >( type, name, parent )
{
book().ignore(); // Avoid coverity warnings.
}
/**
* Here the output variables are declared to the D3PDMaker framework.
*/
StatusCode TrigMissingETComponentFillerTool::book() {
CHECK( addVariable( "nameOfComponent", m_name ) );
CHECK( addVariable( "MExComponent", m_ex ) );
CHECK( addVariable( "MEyComponent", m_ey ) );
CHECK( addVariable( "MEzComponent", m_ez ) );
CHECK( addVariable( "sumEtComponent", m_sumEt ) );
CHECK( addVariable( "sumEComponent", m_sumE ) );
CHECK( addVariable( "componentCalib0", m_calib0 ) );
CHECK( addVariable( "componentCalib1", m_calib1 ) );
CHECK( addVariable( "sumOfSigns", m_sumOfSigns ) );
CHECK( addVariable( "usedChannels", m_usedChannels ) );
CHECK( addVariable( "status", m_status ) );
return StatusCode::SUCCESS;
}
/**
* Here the output variables are filled with the information coming from a
* TrigMissingET object.
*/
StatusCode TrigMissingETComponentFillerTool::fill( const TrigMissingETContainer& met ) {
// Clear the vectors:
m_name->clear();
m_ex->clear();
m_ey->clear();
m_ez->clear();
m_sumEt->clear();
m_sumE->clear();
m_calib0->clear();
m_calib1->clear();
m_sumOfSigns->clear();
m_usedChannels->clear();
m_status->clear();
// If the container is empty, leave the dummy values in the variables:
if( ! met.size() ) {
REPORT_MESSAGE( MSG::DEBUG ) << "TrigMET container is empty!";
return StatusCode::SUCCESS;
}
// Issue a warning if there are more than 1 objects in the container.
// This should not happen if the HLT is working correctly.
if( met.size() > 1 ) {
REPORT_MESSAGE( MSG::WARNING ) << "TrigMET container has multiple objects!";
REPORT_MESSAGE( MSG::WARNING ) << "Check with trigger experts!";
}
// Fill the variables with the correct values:
for( unsigned int i = 0; i < met.front()->getNumOfComponents(); ++i ) {
m_name->push_back( met.front()->getNameOfComponent( i ) );
m_ex->push_back( met.front()->getExComponent( i ) );
m_ey->push_back( met.front()->getEyComponent( i ) );
m_ez->push_back( met.front()->getEzComponent( i ) );
m_sumEt->push_back( met.front()->getSumEtComponent( i ) );
m_sumE->push_back( met.front()->getSumEComponent( i ) );
m_calib0->push_back( met.front()->getComponentCalib0( i ) );
m_calib1->push_back( met.front()->getComponentCalib1( i ) );
m_sumOfSigns->push_back( met.front()->getSumOfSigns( i ) );
m_usedChannels->push_back( met.front()->getUsedChannels( i ) );
m_status->push_back( met.front()->getStatus( i ) );
}
return StatusCode::SUCCESS;
}
} // namespace D3PD
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: TrigMissingETComponentFillerTool.h 278740 2010-02-11 14:32:52Z krasznaa $
#ifndef TRIGMISSINGETD3PDMAKER_TRIGMISSINGETCOMPONENTFILLERTOOL_H
#define TRIGMISSINGETD3PDMAKER_TRIGMISSINGETCOMPONENTFILLERTOOL_H
// EDM include(s):
#include "TrigMissingEtEvent/TrigMissingETContainer.h"
// D3PD include(s):
#include "D3PDMakerUtils/BlockFillerTool.h"
namespace D3PD {
/**
* @short Filler tool saving the components of the missing-ET objects
*
* This tool saves the components of the HLT missing-ET calculation.
*
* @author Attila Krasznahorkay Jr.
* @author Diego Casadei
*
* $Revision: 278740 $
* $Date: 2010-02-11 15:32:52 +0100 (Thu, 11 Feb 2010) $
*/
class TrigMissingETComponentFillerTool : public BlockFillerTool< TrigMissingETContainer > {
public:
/// Regular AlgTool constructor
TrigMissingETComponentFillerTool( const std::string& type, const std::string& name,
const IInterface* parent );
/// Function declaring the output variables
virtual StatusCode book();
/// Function filling the output variables
virtual StatusCode fill( const TrigMissingETContainer& met );
private:
std::vector< std::string >* m_name; ///< Name of component
std::vector< float >* m_ex; ///< Ex from component
std::vector< float >* m_ey; ///< Ey from component
std::vector< float >* m_ez; ///< Ez from component
std::vector< float >* m_sumEt; ///< Sum of |Et| from component
std::vector< float >* m_sumE; ///< Sum of |E| from component
std::vector< float >* m_calib0; ///< Constant term for calibration of component
std::vector< float >* m_calib1; ///< Scale for calibration of component
std::vector< short >* m_sumOfSigns; ///< Sum of energy signs for calibration of comp.
std::vector< unsigned short >* m_usedChannels; ///< Number of used channels in component
std::vector< short >* m_status; ///< Status flag for component
}; // class TrigMissingETComponentFillerTool
} // namespace D3PD
#endif // TRIGMISSINGETD3PDMAKER_TRIGMISSINGETCOMPONENTFILLERTOOL_H
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: TrigMissingETGetterTool.h 278517 2010-02-10 16:46:44Z krasznaa $
#ifndef TRIGMISSINGETD3PDMAKER_TRIGMISSINGETGETTERTOOL_H
#define TRIGMISSINGETD3PDMAKER_TRIGMISSINGETGETTERTOOL_H
// EDM include(s):
#include "TrigMissingEtEvent/TrigMissingET.h"
// D3PD include(s):
#include "TriggerD3PDMaker/TriggerObjectGetterTool.h"
namespace D3PD {
/**
* @short Tool retrieving TrigMissingET objects from specific HLT chains
*
* This is just here in "experimental mode". By default the TrigMissingET
* objects are picked up from StoreGate directly. But this tool allows us
* to select TrigMissingET objects only from specific HLT chains.
*
* @author Attila Krasznahorkay Jr.
* @author Diego Casadei
*
* $Revision: 278517 $
* $Date: 2010-02-10 17:46:44 +0100 (Wed, 10 Feb 2010) $
*/
class TrigMissingETGetterTool :
public TriggerObjectGetterTool< TrigMissingET > {
public:
/// Regular AlgTool constructor
TrigMissingETGetterTool( const std::string& type, const std::string& name,
const IInterface* parent )
: TriggerObjectGetterTool< TrigMissingET >( type, name, parent ) {}
}; // class TrigMissingETGetterTool
} // namespace D3PD
#endif // TRIGMISSINGETD3PDMAKER_TRIGMISSINGETGETTERTOOL_H
// $Id: TrigMissingETD3PDMaker_entries.cxx 278740 2010-02-11 14:32:52Z krasznaa $
// Gaudi/Athena include(s):
#include "GaudiKernel/DeclareFactoryEntries.h"
// Local include(s):
#include "../TrigMissingETBaseFillerTool.h"
#include "../TrigMissingETComponentFillerTool.h"
#include "../TrigMissingETGetterTool.h"
//
// Declare the components of the package:
//
DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, TrigMissingETBaseFillerTool )
DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, TrigMissingETComponentFillerTool )
DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, TrigMissingETGetterTool )
DECLARE_FACTORY_ENTRIES( TrigMissingETD3PDMaker ) {
DECLARE_NAMESPACE_TOOL( D3PD, TrigMissingETBaseFillerTool )
DECLARE_NAMESPACE_TOOL( D3PD, TrigMissingETComponentFillerTool )
DECLARE_NAMESPACE_TOOL( D3PD, TrigMissingETGetterTool )
}
// $Id: TrigMissingETD3PDMaker_load.cxx 278517 2010-02-10 16:46:44Z krasznaa $
// Gaudi/Athena include(s):
#include "GaudiKernel/LoadFactoryEntries.h"
// Declare the library to the framework:
LOAD_FACTORY_ENTRIES( TrigMissingETD3PDMaker )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment