Commit c1cb53b4 authored by Alan Watson's avatar Alan Watson Committed by Graeme Stewart
Browse files

Add restricted eta results to EnergySumRoI (xAODTrigger-00-00-50)

        * EnergySumRoI: schema evolution to _v2. Adds restricted eta
	  results to RoI.
	* Tag as xAODTrigger-00-00-50

2015-12-01 Alan Watson <Alan.Watson@CERN.CH>
        * Root/EnergySumRoI_v1.cxx: fix bug in overflow reporting
	* Tag as xAODTrigger-00-00-49

2015-11-25 Will Buttinger <will@cern.ch>
	* Root/xAODTriggerCLIDs.cxx: Added JetEtROI missing classes
	* Tagging xAODTrigger-00-00-48
parent 60032a61
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: EnergySumRoIAuxInfo_v2.cxx 680159 2015-07-03 14:02:33Z krasznaa $
// Local includes
#include "xAODTrigger/versions/EnergySumRoIAuxInfo_v2.h"
namespace xAOD {
EnergySumRoIAuxInfo_v2::EnergySumRoIAuxInfo_v2()
: AuxInfoBase(),
roiWord0( 0 ), roiWord1( 0 ), roiWord2( 0 ),
roiWord3( 0 ), roiWord4( 0 ), roiWord5( 0 ),
thrNames(),
energyX( 0 ), energyY( 0 ), energyT( 0 ),
energyXRestricted( 0 ), energyYRestricted( 0 ), energyTRestricted( 0 ) {
AUX_VARIABLE( roiWord0 );
AUX_VARIABLE( roiWord1 );
AUX_VARIABLE( roiWord2 );
AUX_VARIABLE( roiWord3 );
AUX_VARIABLE( roiWord4 );
AUX_VARIABLE( roiWord5 );
AUX_VARIABLE( thrNames );
AUX_VARIABLE( energyX );
AUX_VARIABLE( energyY );
AUX_VARIABLE( energyT );
AUX_VARIABLE( energyXRestricted );
AUX_VARIABLE( energyYRestricted );
AUX_VARIABLE( energyTRestricted );
}
} // namespace xAOD
......@@ -2,7 +2,7 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: EnergySumRoI_v1.cxx 615960 2014-09-10 14:03:39Z krasznaa $
// $Id: EnergySumRoI_v1.cxx 711888 2015-12-01 13:36:40Z watsona $
// xAOD include(s):
#include "xAODCore/AuxStoreAccessorMacros.h"
......@@ -85,17 +85,17 @@ namespace xAOD {
bool EnergySumRoI_v1::overflowX() const {
return ( ( roiWord0() >> 16 ) & 0x1 );
return ( ( roiWord0() >> 15 ) & 0x1 );
}
bool EnergySumRoI_v1::overflowY() const {
return ( ( roiWord1() >> 16 ) & 0x1 );
return ( ( roiWord1() >> 15 ) & 0x1 );
}
bool EnergySumRoI_v1::overflowT() const {
return ( ( roiWord2() >> 16 ) & 0x1 );
return ( ( roiWord2() >> 15 ) & 0x1 );
}
//
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: EnergySumRoI_v2.cxx 711888 2015-12-01 13:36:40Z watsona $
// xAOD include(s):
#include "xAODCore/AuxStoreAccessorMacros.h"
// Local include(s):
#include "xAODTrigger/versions/EnergySumRoI_v2.h"
namespace xAOD {
EnergySumRoI_v2::EnergySumRoI_v2()
: SG::AuxElement() {
}
/// @param roiword0 The first RoI word produced by the L1Calo hardware
/// @param roiword1 The second RoI word produced by the L1Calo hardware
/// @param roiword2 The third RoI word produced by the L1Calo hardware
/// @param energyX The total energy deposited in the X direction
/// @param energyY The total energy deposited in the Y direction
/// @param energyT The total transverse energy deposited
///
void EnergySumRoI_v2::initialize( uint32_t roiword0, uint32_t roiword1,
uint32_t roiword2,
float energyX, float energyY,
float energyT ) {
bool restricted = ((roiword0&s_Run2TruncRoIBit) != 0);
if (restricted) {
setRoIWord3( roiword0 );
setRoIWord4( roiword1 );
setRoIWord5( roiword2 );
setEnergyXRestricted( energyX );
setEnergyYRestricted( energyY );
setEnergyTRestricted( energyT );
}
else {
setRoIWord0( roiword0 );
setRoIWord1( roiword1 );
setRoIWord2( roiword2 );
setEnergyX( energyX );
setEnergyY( energyY );
setEnergyT( energyT );
}
return;
}
/// Update RoI word value. The function works out for itself which word input is
void EnergySumRoI_v2::setRoIWord( uint32_t roiword ) {
bool word0 = ((roiword&s_RoIType) == s_Word0);
bool word1 = ((roiword&s_RoIType) == s_Word1);
bool word2 = ((roiword&s_RoIType) == s_Word2);
bool restricted = ((roiword&s_Run2TruncRoIBit) != 0);
if (!restricted) {
if (word0) setRoIWord0(roiword);
else if (word1) setRoIWord1(roiword);
else if (word2) setRoIWord2(roiword);
}
else {
if (word0) setRoIWord3(roiword);
else if (word1) setRoIWord4(roiword);
else if (word2) setRoIWord5(roiword);
}
return;
}
/////////////////////////////////////////////////////////////////////////////
//
// Implementation for the RoI word accessor functions
//
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EnergySumRoI_v2, uint32_t, roiWord0,
setRoIWord0 )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EnergySumRoI_v2, uint32_t, roiWord1,
setRoIWord1 )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EnergySumRoI_v2, uint32_t, roiWord2,
setRoIWord2 )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EnergySumRoI_v2, uint32_t, roiWord3,
setRoIWord3 )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EnergySumRoI_v2, uint32_t, roiWord4,
setRoIWord4 )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EnergySumRoI_v2, uint32_t, roiWord5,
setRoIWord5 )
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// Implementation of the threshold pattern helper functions
//
uint32_t EnergySumRoI_v2::thrPatSumET(bool restricted) const {
if (restricted) return ( ( roiWord3() >> 16 ) & 0xff );
else return ( ( roiWord0() >> 16 ) & 0xff );
}
uint32_t EnergySumRoI_v2::thrPatMET(bool restricted) const {
if (restricted) return ( ( roiWord4() >> 16 ) & 0xff );
else return ( ( roiWord1() >> 16 ) & 0xff );
}
uint32_t EnergySumRoI_v2::thrPatMETSig() const {
return ( ( roiWord2() >> 16 ) & 0xff );
}
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// Implementation of the overflow helper functions
//
bool EnergySumRoI_v2::overflowX(bool restricted) const {
if (restricted) return ( ( roiWord3() >> 15 ) & 0x1 );
else return ( ( roiWord0() >> 15 ) & 0x1 );
}
bool EnergySumRoI_v2::overflowY(bool restricted) const {
if (restricted) return ( ( roiWord4() >> 15 ) & 0x1 );
else return ( ( roiWord1() >> 15 ) & 0x1 );
}
bool EnergySumRoI_v2::overflowT(bool restricted) const {
if (restricted) return ( ( roiWord5() >> 15 ) & 0x1 );
else return ( ( roiWord2() >> 15 ) & 0x1 );
}
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// Implementation of the threshold accessor functions
//
/// Accessor for the names of the passed thresholds
static SG::AuxElement::Accessor< std::vector< std::string > >
names( "thrNames" );
void EnergySumRoI_v2::addThreshold( const std::string& name ) {
names( *this ).push_back( name );
return;
}
void EnergySumRoI_v2::clearThresholds() {
names( *this ).clear();
return;
}
const std::vector< std::string >& EnergySumRoI_v2::thrNames() const {
return names( *this );
}
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//
// Implementation for the energy accessor functions
//
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EnergySumRoI_v2, float, energyX,
setEnergyX )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EnergySumRoI_v2, float, energyY,
setEnergyY )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EnergySumRoI_v2, float, energyT,
setEnergyT )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EnergySumRoI_v2, float, energyXRestricted,
setEnergyXRestricted )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EnergySumRoI_v2, float, energyYRestricted,
setEnergyYRestricted )
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( EnergySumRoI_v2, float, energyTRestricted,
setEnergyTRestricted )
// User functions for setting and getting either full or restricted ET
//void EnergySumRoI_v2::setEnergyX( float value, bool restricted ) {
// if (restricted) setEnergyXTrunc(value);
// else setEnergyXFull(value);
//}
//void EnergySumRoI_v2::setEnergyY( float value, bool restricted ) {
// if (restricted) setEnergyYTrunc(value);
// else setEnergyYFull(value);
//}
//void EnergySumRoI_v2::setEnergyT( float value, bool restricted ) {
// if (restricted) setEnergyTTrunc(value);
// else setEnergyTFull(value);
//}
//float EnergySumRoI_v2::energyX( bool restricted ) const {
// if (restricted) return energyXTrunc();
// else return energyXFull();
//}
//float EnergySumRoI_v2::energyY( bool restricted ) const {
// if (restricted) return energyYTrunc();
// else return energyYFull();
//}
//float EnergySumRoI_v2::energyT( bool restricted ) const {
// if (restricted) return energyTTrunc();
// else return energyTFull();
//}
//
/////////////////////////////////////////////////////////////////////////////
} // namespace xAOD
......@@ -10,6 +10,8 @@
#include "xAODTrigger/EmTauRoIAuxContainer.h"
#include "xAODTrigger/EnergySumRoI.h"
#include "xAODTrigger/EnergySumRoIAuxInfo.h"
#include "xAODTrigger/JetEtRoI.h"
#include "xAODTrigger/JetEtRoIAuxInfo.h"
#include "xAODTrigger/JetRoIContainer.h"
#include "xAODTrigger/JetRoIAuxContainer.h"
#include "xAODTrigger/MuonRoIContainer.h"
......
......@@ -4,15 +4,16 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: EnergySumRoI.h 631149 2014-11-26 12:26:18Z krasznaa $
// $Id: EnergySumRoI.h 743093 2016-04-26 21:46:56Z watsona $
#ifndef XAODTRIGGER_ENERGYSUMROI_H
#define XAODTRIGGER_ENERGYSUMROI_H
// Local include(s):
#include "xAODTrigger/versions/EnergySumRoI_v1.h"
#include "xAODTrigger/versions/EnergySumRoI_v2.h"
namespace xAOD{
typedef EnergySumRoI_v1 EnergySumRoI;
typedef EnergySumRoI_v2 EnergySumRoI;
}
// Set up a CLID for the class:
......
......@@ -4,16 +4,17 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: EnergySumRoIAuxInfo.h 631149 2014-11-26 12:26:18Z krasznaa $
// $Id: EnergySumRoIAuxInfo.h 743093 2016-04-26 21:46:56Z watsona $
#ifndef XAODTRIGGER_ENERGYSUMROIAUXINFO_H
#define XAODTRIGGER_ENERGYSUMROIAUXINFO_H
// Local include(s):
#include "xAODTrigger/versions/EnergySumRoIAuxInfo_v1.h"
#include "xAODTrigger/versions/EnergySumRoIAuxInfo_v2.h"
namespace xAOD{
/// Declare the most recent version of the energy-sum auxiliary info
typedef EnergySumRoIAuxInfo_v1 EnergySumRoIAuxInfo;
typedef EnergySumRoIAuxInfo_v2 EnergySumRoIAuxInfo;
}
// Set up a CLID for the class:
......
<!-- $Id: selection.xml 710006 2015-11-23 21:01:29Z sutt $ -->
<!-- $Id: selection.xml 743093 2016-04-26 21:46:56Z watsona $ -->
<lcgdict>
<!-- The byte stream auxiliary container, v1: -->
......@@ -72,6 +72,11 @@
<class name="xAOD::EnergySumRoIAuxInfo_v1"
id="7BD71A00-5EB8-11E3-95AF-02163E00A743" />
<class name="xAOD::EnergySumRoI_v2"
id="3F26401F-25D9-4CCA-B883-57EBCEE8D299" />
<class name="xAOD::EnergySumRoIAuxInfo_v2"
id="7A0DB6D7-05F6-4D3A-9E8B-0230350E3E25" />
<!-- TriggerMenu dictionaries: -->
<class name="xAOD::TriggerMenu_v1" />
<class name="xAOD::TriggerMenuContainer_v1"
......
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: EnergySumRoIAuxInfo_v2.h 631149 2014-11-26 12:26:18Z krasznaa $
#ifndef XAODTRIGGER_VERSIONS_ENERGYSUMROIAUXINFO_V2_H
#define XAODTRIGGER_VERSIONS_ENERGYSUMROIAUXINFO_V2_H
// System include(s):
extern "C" {
# include <stdint.h>
}
#include <vector>
#include <string>
// EDM include(s):
#include "xAODCore/AuxInfoBase.h"
namespace xAOD {
/// Auxiliary store for an EnergySum RoI object
///
/// This auxiliary store describes a single EnergySum RoI object, as we
/// only have one of those in the ATLAS events.
///
/// @author Lukas Heinrich <Lukas.Heinrich@cern.ch>
/// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
///
/// $Revision: 631149 $
/// $Date: 2014-11-26 13:26:18 +0100 (Wed, 26 Nov 2014) $
///
class EnergySumRoIAuxInfo_v2 : public AuxInfoBase {
public:
/// Default constuctor
EnergySumRoIAuxInfo_v2();
private:
uint32_t roiWord0;
uint32_t roiWord1;
uint32_t roiWord2;
uint32_t roiWord3;
uint32_t roiWord4;
uint32_t roiWord5;
std::vector< std::string > thrNames;
float energyX;
float energyY;
float energyT;
float energyXRestricted;
float energyYRestricted;
float energyTRestricted;
}; // class EnergySumRoIAuxInfo_v2
} // namespace xAOD
// Declare the inheritance of the type:
#include "xAODCore/BaseInfo.h"
SG_BASE( xAOD::EnergySumRoIAuxInfo_v2, xAOD::AuxInfoBase );
#endif // XAODTRIGGER_VERSIONS_EnergySumRoIAuxInfo_v2_H
// Dear emacs, this is -*- c++ -*-
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
// $Id: EnergySumRoI_v2.h 631149 2014-11-26 12:26:18Z krasznaa $
#ifndef XAODTRIGGER_VERSIONS_ENERGYSUMROI_V2_H
#define XAODTRIGGER_VERSIONS_ENERGYSUMROI_V2_H
// System include(s):
extern "C" {
# include <stdint.h>
}
#include <vector>
#include <string>
// xAOD include(s):
#include "AthContainers/AuxElement.h"
namespace xAOD {
/// Class describing a LVL1 energy-sum "RoI"
///
/// This class describes the properties of the LVL1 energy-sum calculation
/// in the xAOD format.
///
/// @author Lukas Heinrich <Lukas.Heinrich@cern.ch>
/// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
/// @author Alan Watson <Alan.Watson@cern.ch>
///
/// $Revision: 631149 $
/// $Date: 2014-11-26 13:26:18 +0100 (Wed, 26 Nov 2014) $
///
class EnergySumRoI_v2 : public SG::AuxElement {
public:
/// Default constructor
EnergySumRoI_v2();
/// Initialise the object with its most important properties from a single RoI
void initialize( uint32_t roiword0, uint32_t roiword1, uint32_t roiword2,
float energyX, float energyY, float energyT );
/// @name RoI word accessor functions
/// @{
/// Generic RoI word adding: the function will identify which word it is
void setRoIWord( uint32_t value );
/// The first RoI word produced by the L1Calo hardware
uint32_t roiWord0() const;
/// Set the first "raw" RoI word describing the energy-sum RoI
void setRoIWord0( uint32_t value );
/// The second RoI word produced by the L1Calo hardware
uint32_t roiWord1() const;
/// Set the second "raw" RoI word describing the energy-sum RoI
void setRoIWord1( uint32_t value );
/// The third RoI word produced by the L1Calo hardware
uint32_t roiWord2() const;
/// Set the third "raw" RoI word describing the energy-sum RoI
void setRoIWord2( uint32_t value );
/// The fourth RoI word produced by the L1Calo hardware
uint32_t roiWord3() const;
/// Set the first "raw" RoI word describing the energy-sum RoI
void setRoIWord3( uint32_t value );
/// The fifth RoI word produced by the L1Calo hardware
uint32_t roiWord4() const;
/// Set the second "raw" RoI word describing the energy-sum RoI
void setRoIWord4( uint32_t value );
/// The sixth RoI word produced by the L1Calo hardware
uint32_t roiWord5() const;
/// Set the third "raw" RoI word describing the energy-sum RoI
void setRoIWord5( uint32_t value );
/// @}
/// @name Helper functions accessing the threshold patterns
/// @{
/// The bit-pattern describing the passed sum-E<sub>T</sub> thresholds
uint32_t thrPatSumET( bool restricted = false ) const;
/// The bit-pattern describing the passed missing-E<sub>T</sub> thresholds
uint32_t thrPatMET( bool restricted = false ) const;
/// The bit-pattern describing the passed missing-E<sub>T</sub> significance
/// thresholds
uint32_t thrPatMETSig() const;
/// @}
/// @name Helper functions accessing the overflow bits
/// @{
/// The overflow flag for the E<sub>X</sub> calculation
bool overflowX(bool restricted = false) const;
/// The overflow flag for the E<sub>Y</sub> calculation
bool overflowY(bool restricted = false) const;
/// The overflow flag for the E<sub>T</sub> calculation
bool overflowT(bool restricted = false) const;
/// @}
/// @name Thresholds passed by the event
/// @{
/// Add a new threshold that was passed
void addThreshold( const std::string& name );
/// Remove all the passed thresholds
void clearThresholds();
/// The names of the thresholds passed
const std::vector< std::string >& thrNames() const;
/// @}
/// @name Missing E<sub>T</sub> values
/// @{
/// The total energy deposited in the X direction
float energyX() const;
float energyXRestricted() const;
/// Set the total energy deposited in the X direction
void setEnergyX(float value);
void setEnergyXRestricted(float value);
/// The missing energy in the X direction
float exMiss() const { return -energyX(); }
float exMissRestricted() const { return -energyXRestricted(); }
/// The total energy deposited in the Y direction
float energyY() const;
float energyYRestricted() const;
/// Set the total energy deposited in the Y direction
void setEnergyY(float value);
void setEnergyYRestricted(float value);
/// The missing energy in the Y direction
float eyMiss() const { return -energyY(); }
float eyMissRestricted() const { return -energyYRestricted(); }
/// The deposited total transverse energy
float energyT() const;
float energyTRestricted() const;
/// Set the deposited total transverse energy
void setEnergyT(float value);
void setEnergyTRestricted(float value);
/// The basic setters and getters for the xAOD class
/// @}
private:
static const unsigned int s_Run2TruncRoIBit = 0x4000000;
static const unsigned int s_RoIType = 0xf0000000;
static const unsigned int s_Word0 = 0x40000000;
static const unsigned int s_Word1 = 0x60000000;
static const unsigned int s_Word2 = 0x50000000;
}; // class EnergySumRoI_v2
} // namespace xAOD
// Declare the inheritace of the class: