|
ATLAS Offline Software
|
Class which contains statically allocated LArCellCollections.
More...
#include <LArCellCont.h>
Class which contains statically allocated LArCellCollections.
Definition at line 39 of file LArCellCont.h.
◆ IDENTIFIABLE
◆ LArCellCont()
LArCellCont::LArCellCont |
( |
| ) |
|
Constructor.
Does not do anything. Check initialize.
Definition at line 18 of file LArCellCont.cxx.
◆ ~LArCellCont()
virtual LArCellCont::~LArCellCont |
( |
| ) |
|
|
inlinevirtual |
◆ applyBCIDCorrection()
void LArCellCont::applyBCIDCorrection |
( |
const unsigned int & |
rodid | ) |
|
method to apply correction based on the luminosity to the energy
Definition at line 219 of file LArCellCont.cxx.
221 std::vector<LArCellCollection*>::const_iterator
it = (std::vector<LArCellCollection*>::const_iterator)((*this).begin()+
idx);
223 unsigned int itsize =
col->size();
225 for(
unsigned int i=0;
i< itsize; ++
i){
228 #ifdef TRIGLARCELLDEBUG
229 std::cout <<
"LArCellId= " <<
cell->ID() <<
" Ecorr= " << cor <<
" MeV " << std::endl;
231 float cellenergy =
cell->energy();
232 cell->setEnergyFast( cellenergy - cor );
◆ eventNumber()
void LArCellCont::eventNumber |
( |
const unsigned int |
eN | ) |
|
|
inline |
◆ finalize()
StatusCode LArCellCont::finalize |
( |
void |
| ) |
|
finalize method.
Destroys all cells and collections.
Definition at line 181 of file LArCellCont.cxx.
183 for(
int i=0;
i<number_of_col;
i++){
184 int number_of_cell = ((*this)[
i])->
size();
185 for(
int j=0;j<number_of_cell;j++)
186 delete ((*((*
this)[
i]))[j]);
187 if ((*
this)[
i] != NULL)
196 return StatusCode::SUCCESS;
◆ find() [1/2]
Finds a collection by its LArReadoutModuleID.
- Parameters
-
- Returns
const_iterator
to a pointer to LArCellCollection.
Definition at line 201 of file LArCellCont.cxx.
203 return (std::vector<LArCellCollection*>::const_iterator)((*this).begin()+
idx);
◆ find() [2/2]
Finds a collection by its ROD ID.
- Parameters
-
[in] | Read | Out ID as provided by RegionSelector. |
- Returns
const_iterator
to a pointer to LArCellCollection.
Definition at line 208 of file LArCellCont.cxx.
212 return (std::vector<LArCellCollection*>::const_iterator)((*this).begin()+
idx);
215 return (std::vector<LArCellCollection*>::const_iterator)((*this).end());
◆ findsec()
Each Collection contains data from 2 FEBs.
- Returns
- for each collection the ID of the second FEB.
Definition at line 238 of file LArCellCont.cxx.
◆ initialize()
initialize method.
Builds all cells and collections.
Definition at line 22 of file LArCellCont.cxx.
29 #ifdef TRIGLARCELLDEBUG
30 std::cout <<
"LArCellCont \t\t DEBUG \t in initialize" << std::endl;
47 #ifdef TRIGLARCELLDEBUG
48 std::cout <<
"LArCellCont\t\t DEBUG \t"
55 this->push_back(mycoll);
62 std::vector<const CaloCellCorrection*> LArCellCorrTools;
66 makeCell.
initialize( roiMap, onOffMap, man, &LArCellCorrTools, 0 );
69 bool toolAvailable =
sc.isSuccess();
73 "Failed to retrieve LArBadFebMasker - no masking will be done." <<
endmsg;
75 std::vector<uint32_t> RobsFromMissingFeb;
79 std::vector<HWIdentifier>::const_iterator
end = onlineId->
channel_end ();
93 for (
unsigned iFeb=0;iFeb<onlineId->
febHashMax();++iFeb) {
104 #ifdef TRIGLARCELLDEBUG
105 std::cout <<
"LArCellCont\t\t DEBUG \t"
110 std::map<LArRoIMap::TT_ID,std::vector<LArCell* > > collMap;
111 if ( (*
this)[
idx]->
size() != 0 ) {
115 hashTab.reserve(256);
117 for(
int ch=0;
ch<128;
ch++){
123 (*this)[
idx]->push_back(larcell);
134 if (
good ) collMap[ttId].push_back(larcell);
138 hashTab.push_back(
index );
139 }
else hashTab.push_back(indexsetmax);
140 #ifdef TRIGLARCELLDEBUG
141 std::cout <<
"Cell registered at Collection "
143 " Channel " <<
ch <<
" TTId " << (
unsigned int)ttId
148 #ifdef TRIGLARCELLDEBUG
149 std::cout <<
"Cell not existing" << std::endl;
152 (*this)[
idx]->push_back(larcell);
153 hashTab.push_back( indexsetmax);
156 for (
const auto& [ttid,
cells] : collMap) {
165 (*this)[
idx]->setTT(ttid,
vec->begin(),
vec->end());
172 for(
size_t i = 0 ;
i < RobsFromMissingFeb.size() ;
i++)
173 for(
size_t j =
i+1 ; j < RobsFromMissingFeb.size() ; j++)
174 if ( RobsFromMissingFeb[
i] == RobsFromMissingFeb[j] )
176 RobsFromMissingFeb.clear();
178 return StatusCode::SUCCESS;
◆ lumiBCIDCheck()
bool LArCellCont::lumiBCIDCheck |
( |
const EventContext & |
context | ) |
|
◆ lumiBlock_BCID()
void LArCellCont::lumiBlock_BCID |
( |
const unsigned int |
lumi_block, |
|
|
const unsigned int |
BCID |
|
) |
| |
sets LumiBlock and BCID
Definition at line 243 of file LArCellCont.cxx.
245 #ifdef TRIGLARCELLDEBUG
246 std::cout <<
"Update : CURRENT lumi_block, BCID = " << lumi_block <<
", " <<
BCID <<
" <--> PREVIOUS lumi_block = " <<
m_lumi_block <<
", " <<
m_bcid << std::endl;
◆ MissingROBs()
const std::vector<uint32_t>& LArCellCont::MissingROBs |
( |
void |
| ) |
|
|
inline |
◆ updateBCID()
update BCID dependent correction table for MT case
Definition at line 253 of file LArCellCont.cxx.
255 std::map<HWIdentifier,int>::const_iterator
end =
m_indexset.end ();
257 std::map<HWIdentifier,int>::const_iterator
beg =
m_indexset.begin();
260 int idx = (*beg).second;
263 float corr =
avg.average(
id);
◆ elements
T std::vector< T >::elements |
|
inherited |
◆ m_badFebMasker
A tool to help mask cells.
A tool to help mask febs
Definition at line 115 of file LArCellCont.h.
◆ m_bcid
unsigned int LArCellCont::m_bcid |
|
private |
◆ m_BCIDcache
bool LArCellCont::m_BCIDcache |
|
private |
flag to only update cache when trying to apply corrections
Definition at line 130 of file LArCellCont.h.
◆ m_bcidEvt
◆ m_conv
◆ m_corrBCID
std::vector<float> LArCellCont::m_corrBCID |
|
private |
◆ m_event
unsigned int LArCellCont::m_event |
|
private |
◆ m_eventNumber
std::vector<unsigned int> LArCellCont::m_eventNumber |
|
private |
◆ m_hash
◆ m_hashSym
std::vector< std::vector<int> > LArCellCont::m_hashSym |
|
private |
◆ m_indexset
◆ m_lumi_block
float LArCellCont::m_lumi_block |
|
private |
◆ m_MissingROBs
std::vector<uint32_t> LArCellCont::m_MissingROBs |
|
private |
List of Missing ROBs to be disabled at the RS.
Definition at line 117 of file LArCellCont.h.
◆ m_second
◆ m_vecs
One needs to destroy the TT vectors.
Definition at line 110 of file LArCellCont.h.
The documentation for this class was generated from the following files:
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
uint32_t getRobID(uint32_t rod_id) const
Make a ROB Source ID from a ROD source ID.
bool good() const
Returns true if no problems at all (all bits at zero)
LArCell * getLArCell(unsigned int feb, unsigned int chan, int e, int t, int q, CaloGain::CaloGain caloGain, unsigned int &ttId) const
access by Identifier
#define CHECK_WITH_CONTEXT(...)
Evaluate an expression and check for errors, with an explicitly specified context name.
LArRodIdHash m_hash
Hash ID Identifier mapping to collection index.
size_type febHashMax(void) const
define feb hash tables max size
HWIdentifier getReadoutModuleID(const HWIdentifier &id) const
void initialize(int offset, const std::vector< HWIdentifier > &roms)
Initialize.
bool m_BCIDcache
flag to only update cache when trying to apply corrections
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
ID identifier(int i) const
reverse conversion
std::vector< HWIdentifier > m_second
FEB Hardware Identifier for second FEBs in a Collection.
uint32_t getRodID(const LArFebRodMapping &rodMapping, const HWIdentifier &hid) const
make a ROD SrcID for a HWIdentifier
Building LArCell objects from LArRawChannel.
virtual bool febMissing(const HWIdentifier &febId) const =0
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
std::vector< unsigned int > m_eventNumber
eventNumber of a given Collection
std::vector< size_t > vec
LArBC_t offlineStatus(const Identifier id) const
Query the status of a particular channel by offline ID This is the main client access method.
id_iterator channel_end() const
value_type get_compact() const
Get the compact id.
void initialize(const LArRoIMap &roiMap, const LArOnOffIdMapping &onOffMap, const CaloDetDescrManager &man, const std::vector< const CaloCellCorrection * > *pCorr, unsigned int poolMaxSize=190000)
initialize the internal map
EventIDBase::event_number_t event_number_t
float m_lumi_block
current lumi_block
unsigned int m_event
this event number
bool problematicForUnknownReason() const
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode initialize(const LArFebRodMapping &rodMapping)
EventIDBase::event_number_t m_bcidEvt
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
HWIdentifier ZPhiSymOnl(const HWIdentifier notSymOnlId) const
Find the symmetric HWID for an online channel identifier.
void setGain(CaloGain::CaloGain gain=CaloGain::INVALIDGAIN)
set gain
const ILArBadFebMasker * m_badFebMasker
A tool to help mask cells.
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
const std::vector< HWIdentifier > & getLArRoModIDvec() const
"iterator" on LArReadoutModuleIDs
Container Class for LArCell in a ROB used by EF.
std::vector< float > m_corrBCID
corrections for a given BCID
uint32_t getRodIDFromROM(const COLLECTION_ID &hid) const
make a ROD SrcID for a COLLECTION_ID
Data object for LAr calorimeter readout cell.
setEventNumber setTimeStamp bcid
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Hid2RESrcID m_conv
Hardware to Source ID conversion.
int max() const
return maximum number of IDs
void setThreshold(float t)
std::vector< DataVector< LArCell > * > m_vecs
One needs to destroy the TT vectors.
Identifier cnvToIdentifier(const HWIdentifier &sid) const
create an Identifier from a HWIdentifier (inline)
std::map< HWIdentifier, int > m_indexset
index table
std::vector< uint32_t > m_MissingROBs
List of Missing ROBs to be disabled at the RS.
std::vector< std::vector< int > > m_hashSym
hash references to BCID
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
id_iterator channel_begin() const
Returns an iterator pointing to a channel identifier collection.