7#include "GaudiKernel/MsgStream.h"
20 log << MSG::DEBUG <<
"Converting LVL1_ROI from persistent state..." <<
endmsg;
27 for( std::vector< Muon_ROI_p1 >::const_iterator it = persObj->
m_muonROIs.begin(); it != persObj->
m_muonROIs.end(); ++it ) {
28 Muon_ROI roi( it->m_roiWord, it->m_eta, it->m_phi, it->m_thrName, it->m_thrValue );
34 for( std::vector< Jet_ROI_p1 >::const_iterator it = persObj->
m_jetROIs.begin(); it != persObj->
m_jetROIs.end(); ++it ) {
35 Jet_ROI roi( it->m_roiWord, it->m_eta, it->m_phi, ( it->m_roiWord & 0xfff ) );
39 for( std::vector< std::string >::const_iterator it2 = it->m_thresholdNames.begin(); it2 != it->m_thresholdNames.end(); ++it2 ) {
42 for( std::vector< Float_t >::const_iterator it2 = it->m_thresholdValues.begin(); it2 != it->m_thresholdValues.end(); ++it2 ) {
50 for( std::vector< JetET_ROI_p1 >::const_iterator it = persObj->
m_jetetROIs.begin(); it != persObj->
m_jetetROIs.end(); ++it ) {
51 JetET_ROI roi( it->m_roiWord, ( it->m_roiWord & 0xf ) );
52 for( std::vector< std::string >::const_iterator it2 = it->m_thresholds.begin(); it2 != it->m_thresholds.end(); ++it2 ) {
60 for( std::vector< EmTau_ROI_p1 >::const_iterator it = persObj->
m_emtauROIs.begin(); it != persObj->
m_emtauROIs.end(); ++it ) {
61 EmTau_ROI roi( it->m_roiWord, it->m_eta, it->m_phi, ( it->m_roiWord & 0xffff ) );
68 for( std::vector< std::string >::const_iterator it2 = it->m_thresholdNames.begin(); it2 != it->m_thresholdNames.end(); ++it2 ) {
71 for( std::vector< Float_t >::const_iterator it2 = it->m_thresholdValues.begin(); it2 != it->m_thresholdValues.end(); ++it2 ) {
84 unsigned int overflows = 0;
85 if (conv.energyOverflow(it->m_roiWord0)) overflows |= 0x1;
86 if (conv.energyOverflow(it->m_roiWord1)) overflows |= 0x2;
87 if (conv.energyOverflow(it->m_roiWord2)) overflows |= 0x4;
89 EnergySum_ROI roi( it->m_roiWord0, it->m_roiWord1, it->m_roiWord2, it->m_energyX, it->m_energyY, it->m_energyT,
90 ( ( it->m_roiWord1 >> 16 ) & 0xff), ( ( it->m_roiWord2 >> 16 ) & 0xff), ( ( it->m_roiWord0 >> 16 ) & 0xff),
92 for( std::vector< std::string >::const_iterator it2 = it->m_thresholds.begin(); it2 != it->m_thresholds.end(); ++it2 ) {
98 log << MSG::DEBUG <<
"Converting LVL1_ROI from persistent state [OK]" <<
endmsg;
106 log << MSG::DEBUG <<
"Creating persistent state of LVL1_ROI..." <<
endmsg;
111 for( LVL1_ROI::muons_type::const_iterator it = transObj->
getMuonROIs().begin(); it != transObj->
getMuonROIs().end(); ++it ) {
114 roi.
m_eta = it->getEta();
115 roi.
m_phi = it->getPhi();
118 persObj->
m_muonROIs.push_back( std::move(roi) );
123 for( LVL1_ROI::jets_type::const_iterator it = transObj->
getJetROIs().begin(); it != transObj->
getJetROIs().end(); ++it ) {
126 roi.
m_eta = it->getEta();
127 roi.
m_phi = it->getPhi();
131 for( std::vector< std::string >::const_iterator it2 = it->getThresholdNames().begin(); it2 != it->getThresholdNames().end(); ++it2 ) {
134 for( std::vector< float >::const_iterator it2 = it->getThresholdValues().begin(); it2 != it->getThresholdValues().end(); ++it2 ) {
137 persObj->
m_jetROIs.push_back( std::move(roi) );
142 for( LVL1_ROI::jetets_type::const_iterator it = transObj->
getJetEtROIs().begin(); it != transObj->
getJetEtROIs().end(); ++it ) {
145 for( std::vector< std::string >::const_iterator it2 = it->getThresholds().begin(); it2 != it->getThresholds().end(); ++it2 ) {
153 for( LVL1_ROI::emtaus_type::const_iterator it = transObj->
getEmTauROIs().begin(); it != transObj->
getEmTauROIs().end(); ++it ) {
156 roi.
m_eta = it->getEta();
157 roi.
m_phi = it->getPhi();
158 roi.
m_Core = it->getCore();
164 for( std::vector< std::string >::const_iterator it2 = it->getThresholdNames().begin(); it2 != it->getThresholdNames().end(); ++it2 ) {
167 for( std::vector< float >::const_iterator it2 = it->getThresholdValues().begin(); it2 != it->getThresholdValues().end(); ++it2 ) {
183 for( std::vector< std::string >::const_iterator it2 = it->getThresholds().begin(); it2 != it->getThresholds().end(); ++it2 ) {
189 log << MSG::DEBUG <<
"Creating persistent state of LVL1_ROI [OK]" <<
endmsg;
TPConverterConstBase< TRANS, PERS > T_AthenaPoolTPCnvConstBase
Persistent representation of EmTau_ROI.
std::vector< Float_t > m_thresholdValues
std::vector< std::string > m_thresholdNames
Em/Tau RoI class for analysis.
void setCore(float value)
Set the ET deposited in the "RoI core".
void setHadIsol(float value)
Set the hadron calorimeter isolation (outer ring of Had towers)
void addThresholdName(thresholds_type::value_type thr)
Add the name of a threshold that this RoI passed.
void addThresholdValue(thr_value_type::value_type thr)
Add the value of a threshold that this RoI passed.
void setEMIsol(float value)
Set the EM calorimeter isolation (outer ring of EM towers)
void setTauClus(float value)
Set the deposited ET in the "tau cluster".
void setEMClus(float value)
Set the deposited ET in the "EM cluster".
void setHadCore(float value)
Set the ET deposited in the inner hadronic isolation region (2x2 core)
Persistent representation of EnergySum_ROI.
std::vector< std::string > m_thresholds
Energy-Sum RoI class for analysis.
void addThreshold(thresholds_type::value_type thr)
Add the name of a threshold that this RoI passed.
Persistent representation of JetET_ROI.
std::vector< std::string > m_thresholds
Energy-Sum RoI class for analysis.
void addThreshold(thresholds_type::value_type thr)
Add the name of a threshold that this RoI passed.
Persistent representation of Jet_ROI.
std::vector< std::string > m_thresholdNames
std::vector< Float_t > m_thresholdValues
Jet RoI class for analysis.
void addThresholdName(thresholds_type::value_type thr)
Add the name of a threshold that this RoI passed.
void setET6x6(float value)
Set the ET deposited in a 6x6 cluster.
void setET4x4(float value)
Set the ET deposited in a 4x4 cluster.
void setET8x8(float value)
Set the ET deposited in an 8x8 cluster.
void addThresholdValue(thr_value_type::value_type thr)
Add the value of a threshold that this RoI passed.
A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word.
virtual void persToTrans(const LVL1_ROI_p1 *persObj, LVL1_ROI *transObj, MsgStream &log) const override
virtual void transToPers(const LVL1_ROI *transObj, LVL1_ROI_p1 *persObj, MsgStream &log) const override
Persistent representation of LVL1_ROI.
std::vector< Jet_ROI_p1 > m_jetROIs
std::vector< EnergySum_ROI_p1 > m_energysumROIs
std::vector< Muon_ROI_p1 > m_muonROIs
std::vector< EmTau_ROI_p1 > m_emtauROIs
std::vector< JetET_ROI_p1 > m_jetetROIs
Top level AOD object storing LVL1 RoIs.
const emtaus_type & getEmTauROIs() const
Get all the em/tau RoIs in the event.
void addMuonROI(const muons_type::value_type roi)
Add a muon RoI to the object.
void addEmTauROI(const emtaus_type::value_type roi)
Add an em/tau RoI to the object.
const energysums_type & getEnergySumROIs() const
Get all the energy sum RoIs in the event.
void addJetETROI(const jetets_type::value_type roi)
Add a jet-ET RoI to the object.
const muons_type & getMuonROIs() const
Get all the muon RoIs in the event.
void addJetROI(const jets_type::value_type roi)
Add a jet RoI to the object.
void clear()
Clear all the RoIs from the object.
void addEnergySumROI(const energysums_type::value_type roi)
Add an energy sum RoI to the object.
const jets_type & getJetROIs() const
Get all the jet RoIs in the event.
const jetets_type & getJetEtROIs() const
Get all the jet-ET RoIs in the event.
Persistent representation of Muon_ROI.
Muon RoI class for analysis.