16 #include "GaudiKernel/MsgStream.h"
22 unsigned int RoIFormatUpdater::UpdateEMTauRoI(
unsigned int RoIWord) {
24 if ((RoIWord&0xf0000000)==0) {
25 unsigned int coord = ((RoIWord&0x0fff0000)<<2);
26 unsigned int hits = (RoIWord&0x0000ffff);
30 cout <<
"EMTau RoI type not incorrect. Return RoIWord unmodified" << endl;
35 unsigned int RoIFormatUpdater::UpdateJetEnergyRoI(
unsigned int RoIWord) {
37 unsigned int type = OldJetEnergyType(RoIWord);
39 if (
type == TrigT1CaloDefs::JetRoIWordType) {
40 return UpdateJetRoI(RoIWord);
42 else if (
type == TrigT1CaloDefs::EnergyRoIWordType0) {
43 return UpdateEnergyRoI0(RoIWord);
45 else if (
type == TrigT1CaloDefs::EnergyRoIWordType1) {
46 return UpdateEnergyRoI1(RoIWord);
48 else if (
type == TrigT1CaloDefs::EnergyRoIWordType2) {
49 return UpdateEnergyRoI2(RoIWord);
51 else if (
type == TrigT1CaloDefs::JetEtRoIWordType) {
52 return UpdateJetEtRoI(RoIWord);
55 cout <<
"JetEnergy RoI type not recognised. Return RoIWord unmodified" << endl;
60 unsigned int RoIFormatUpdater::OldJetEnergyType(
unsigned int RoIWord) {
62 return TrigT1CaloDefs::JetRoIWordType;
67 return TrigT1CaloDefs::EnergyRoIWordType0;
69 else if (subType == 1) {
70 return TrigT1CaloDefs::EnergyRoIWordType1;
72 else if (subType == 2) {
73 return TrigT1CaloDefs::EnergyRoIWordType2;
77 return TrigT1CaloDefs::JetEtRoIWordType;
82 unsigned int RoIFormatUpdater::UpdateJetRoI(
unsigned int RoIWord) {
84 (
static_cast<unsigned int>(TrigT1CaloDefs::jetRoIType)<<30) +
85 (
static_cast<unsigned int>(TrigT1CaloDefs::jetRoI)<<29);
86 unsigned int hits = (RoIWord&0x00000fff);
87 unsigned int fwdjet(0);
88 if (RoIWord&0x00000f00) fwdjet = 1<<18;
96 unsigned int frame = 4*(
col>>1) + (
row>>1);
97 unsigned int rl = 2*(
row%2) + (
col%2);
98 unsigned int coord = (crate<<9) + (jem<<5) +(frame<<2) +
rl;
104 unsigned int RoIFormatUpdater::UpdateJetEtRoI(
unsigned int RoIWord) {
106 (
static_cast<unsigned int>(TrigT1CaloDefs::jetRoIType)<<30) +
107 (
static_cast<unsigned int>(TrigT1CaloDefs::jetEtRoI)<<29);
108 unsigned int hits = (RoIWord&0x0000000f);
112 unsigned int RoIFormatUpdater::UpdateEnergyRoI0(
unsigned int RoIWord) {
113 unsigned int header = (TrigT1CaloDefs::energyRoIType<<30) + (TrigT1CaloDefs::energyRoI0<<28);
114 unsigned int Ex = (RoIWord&0x0000ffff);
118 unsigned int RoIFormatUpdater::UpdateEnergyRoI1(
unsigned int RoIWord) {
119 unsigned int header = (TrigT1CaloDefs::energyRoIType<<30) + (TrigT1CaloDefs::energyRoI1<<28);
120 unsigned int hits = (RoIWord&0x000f0000);
121 unsigned int Ey = (RoIWord&0x0000ffff);
125 unsigned int RoIFormatUpdater::UpdateEnergyRoI2(
unsigned int RoIWord) {
126 unsigned int header = (TrigT1CaloDefs::energyRoIType<<30) + (TrigT1CaloDefs::energyRoI2<<28);
127 unsigned int hits = (RoIWord&0x00ff0000);
128 unsigned int Et = (RoIWord&0x0000ffff);