ATLAS Offline Software
Static Public Member Functions | Static Private Member Functions | List of all members
LVL1::RoIFormatUpdater Class Reference

Tool for changing the format of RoI words. More...

#include <RoIFormatUpdater.h>

Collaboration diagram for LVL1::RoIFormatUpdater:

Static Public Member Functions

static unsigned int UpdateEMTauRoI (unsigned int RoIWord)
 Method to update EM/Tau RoI word. More...
 
static unsigned int UpdateJetEnergyRoI (unsigned int RoIWord)
 Method to update Jet/Energy RoI word. More...
 

Static Private Member Functions

static unsigned int OldJetEnergyType (unsigned int RoIWord)
 Method to identify (old-style) JetEnergy RoI type. More...
 
static unsigned int UpdateJetRoI (unsigned int RoIWord)
 Method to update Jet RoI word. More...
 
static unsigned int UpdateJetEtRoI (unsigned int RoIWord)
 Method to update JetEt RoI word. More...
 
static unsigned int UpdateEnergyRoI0 (unsigned int RoIWord)
 Methods to update EnergySum RoI words. More...
 
static unsigned int UpdateEnergyRoI1 (unsigned int RoIWord)
 
static unsigned int UpdateEnergyRoI2 (unsigned int RoIWord)
 

Detailed Description

Tool for changing the format of RoI words.

   Quick and dirty hack to work around fact that there is no RoI
   format version at the moment. Hopefully this is a short-term
   fix which will be suppressed soon and never needed again.
Author
Alan Watson Alan..nosp@m.Wats.nosp@m.on@ce.nosp@m.rn.c.nosp@m.h 17-5-06
Revision
782811
Date
2016-11-07 18:20:40 +0100 (Mon, 07 Nov 2016)

Definition at line 25 of file RoIFormatUpdater.h.

Member Function Documentation

◆ OldJetEnergyType()

unsigned int LVL1::RoIFormatUpdater::OldJetEnergyType ( unsigned int  RoIWord)
staticprivate

Method to identify (old-style) JetEnergy RoI type.

Definition at line 60 of file RoIFormatUpdater.cxx.

60  {
61  if ( BitOp::getValue( &RoIWord, 0xf0000000 ) == 1) {
63  }
64  else if ( BitOp::getValue( &RoIWord, 0xf0000000 ) == 3) {
65  int subType = BitOp::getValue( &RoIWord, 0x0c000000 );
66  if (subType == 0) {
68  }
69  else if (subType == 1) {
71  }
72  else if (subType == 2) {
74  }
75  }
76  else if ( BitOp::getValue( &RoIWord, 0xf0000000 ) == 2) {
78  }
79  return 9999; // not recognised as an old-style JetEnergy RoI
80  }

◆ UpdateEMTauRoI()

unsigned int LVL1::RoIFormatUpdater::UpdateEMTauRoI ( unsigned int  RoIWord)
static

Method to update EM/Tau RoI word.

Definition at line 22 of file RoIFormatUpdater.cxx.

22  {
23  // Check ionput is consistent with old format EMTau RoI
24  if ((RoIWord&0xf0000000)==0) {
25  unsigned int coord = ((RoIWord&0x0fff0000)<<2);
26  unsigned int hits = (RoIWord&0x0000ffff);
27  return coord+hits;
28  }
29  else {
30  cout << "EMTau RoI type not incorrect. Return RoIWord unmodified" << endl;
31  return RoIWord;
32  }
33  }

◆ UpdateEnergyRoI0()

unsigned int LVL1::RoIFormatUpdater::UpdateEnergyRoI0 ( unsigned int  RoIWord)
staticprivate

Methods to update EnergySum RoI words.

Definition at line 112 of file RoIFormatUpdater.cxx.

112  {
114  unsigned int Ex = (RoIWord&0x0000ffff);
115  return header+Ex;
116  }

◆ UpdateEnergyRoI1()

unsigned int LVL1::RoIFormatUpdater::UpdateEnergyRoI1 ( unsigned int  RoIWord)
staticprivate

Definition at line 118 of file RoIFormatUpdater.cxx.

118  {
120  unsigned int hits = (RoIWord&0x000f0000);
121  unsigned int Ey = (RoIWord&0x0000ffff);
122  return header+hits+Ey;
123  }

◆ UpdateEnergyRoI2()

unsigned int LVL1::RoIFormatUpdater::UpdateEnergyRoI2 ( unsigned int  RoIWord)
staticprivate

Definition at line 125 of file RoIFormatUpdater.cxx.

125  {
127  unsigned int hits = (RoIWord&0x00ff0000);
128  unsigned int Et = (RoIWord&0x0000ffff);
129  return header+hits+Et;
130  }

◆ UpdateJetEnergyRoI()

unsigned int LVL1::RoIFormatUpdater::UpdateJetEnergyRoI ( unsigned int  RoIWord)
static

Method to update Jet/Energy RoI word.

Definition at line 35 of file RoIFormatUpdater.cxx.

35  {
36  // What type of JetEnergy RoI is it?
37  unsigned int type = OldJetEnergyType(RoIWord);
38 
40  return UpdateJetRoI(RoIWord);
41  }
43  return UpdateEnergyRoI0(RoIWord);
44  }
46  return UpdateEnergyRoI1(RoIWord);
47  }
49  return UpdateEnergyRoI2(RoIWord);
50  }
52  return UpdateJetEtRoI(RoIWord);
53  }
54  else {
55  cout << "JetEnergy RoI type not recognised. Return RoIWord unmodified" << endl;
56  return RoIWord;
57  }
58  }

◆ UpdateJetEtRoI()

unsigned int LVL1::RoIFormatUpdater::UpdateJetEtRoI ( unsigned int  RoIWord)
staticprivate

Method to update JetEt RoI word.

Definition at line 104 of file RoIFormatUpdater.cxx.

104  {
105  unsigned int header =
106  (static_cast<unsigned int>(TrigT1CaloDefs::jetRoIType)<<30) +
107  (static_cast<unsigned int>(TrigT1CaloDefs::jetEtRoI)<<29);
108  unsigned int hits = (RoIWord&0x0000000f);
109  return header+hits;
110  }

◆ UpdateJetRoI()

unsigned int LVL1::RoIFormatUpdater::UpdateJetRoI ( unsigned int  RoIWord)
staticprivate

Method to update Jet RoI word.

Definition at line 82 of file RoIFormatUpdater.cxx.

82  {
83  unsigned int header =
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;
89 
90  // That was the easy bit. Unfortunately the coordinate format has
91  // also changed. This does make sense, but it isn't pretty!
92  unsigned int crate = BitOp::getValue( &RoIWord, 0x00200000);
93  unsigned int jem = BitOp::getValue( &RoIWord, 0x001e0000);
94  unsigned int row = BitOp::getValue( &RoIWord, 0x0001c000);
95  unsigned int col = BitOp::getValue( &RoIWord, 0x00003000);
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;
99  coord = (coord<<19);
100 
101  return header+coord+fwdjet+hits;
102  }

The documentation for this class was generated from the following files:
query_example.row
row
Definition: query_example.py:24
LVL1::TrigT1CaloDefs::energyRoI2
@ energyRoI2
Definition: TrigT1CaloDefs.h:198
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
header
Definition: hcg.cxx:526
LVL1::TrigT1CaloDefs::JetEtRoIWordType
@ JetEtRoIWordType
Definition: TrigT1CaloDefs.h:169
LVL1::RoIFormatUpdater::OldJetEnergyType
static unsigned int OldJetEnergyType(unsigned int RoIWord)
Method to identify (old-style) JetEnergy RoI type.
Definition: RoIFormatUpdater.cxx:60
LVL1::RoIFormatUpdater::UpdateJetEtRoI
static unsigned int UpdateJetEtRoI(unsigned int RoIWord)
Method to update JetEt RoI word.
Definition: RoIFormatUpdater.cxx:104
LVL1::TrigT1CaloDefs::EnergyRoIWordType1
@ EnergyRoIWordType1
Definition: TrigT1CaloDefs.h:171
LVL1::TrigT1CaloDefs::EnergyRoIWordType2
@ EnergyRoIWordType2
Definition: TrigT1CaloDefs.h:172
LVL1::TrigT1CaloDefs::EnergyRoIWordType0
@ EnergyRoIWordType0
Definition: TrigT1CaloDefs.h:170
LVL1::TrigT1CaloDefs::jetEtRoI
@ jetEtRoI
Definition: TrigT1CaloDefs.h:192
LVL1::TrigT1CaloDefs::energyRoI1
@ energyRoI1
Definition: TrigT1CaloDefs.h:197
LVL1::TrigT1CaloDefs::energyRoIType
@ energyRoIType
Definition: TrigT1CaloDefs.h:181
LVL1::RoIFormatUpdater::UpdateEnergyRoI0
static unsigned int UpdateEnergyRoI0(unsigned int RoIWord)
Methods to update EnergySum RoI words.
Definition: RoIFormatUpdater.cxx:112
LVL1::RoIFormatUpdater::UpdateJetRoI
static unsigned int UpdateJetRoI(unsigned int RoIWord)
Method to update Jet RoI word.
Definition: RoIFormatUpdater.cxx:82
query_example.col
col
Definition: query_example.py:7
JetVoronoiDiagramHelpers::coord
double coord
Definition: JetVoronoiDiagramHelpers.h:45
PlotCalibFromCool.rl
rl
Definition: PlotCalibFromCool.py:529
LVL1::TrigT1CaloDefs::jetRoI
@ jetRoI
Definition: TrigT1CaloDefs.h:191
LVL1::TrigT1CaloDefs::JetRoIWordType
@ JetRoIWordType
Definition: TrigT1CaloDefs.h:168
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::TrigT1CaloDefs::energyRoI0
@ energyRoI0
Definition: TrigT1CaloDefs.h:196
BitOp::getValue
static unsigned int getValue(const unsigned int *uintValue, const unsigned int mask)
get the value in the input word represented by a bit pattern given as a bitmask
Definition: BitOp.cxx:47
LVL1::RoIFormatUpdater::UpdateEnergyRoI1
static unsigned int UpdateEnergyRoI1(unsigned int RoIWord)
Definition: RoIFormatUpdater.cxx:118
LVL1::RoIFormatUpdater::UpdateEnergyRoI2
static unsigned int UpdateEnergyRoI2(unsigned int RoIWord)
Definition: RoIFormatUpdater.cxx:125
LVL1::TrigT1CaloDefs::jetRoIType
@ jetRoIType
Definition: TrigT1CaloDefs.h:180