![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Class which contains statically allocated LArCellCollections.
More...
#include <LArCellCont.h>
Class which contains statically allocated LArCellCollections.
Definition at line 41 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 246 of file LArCellCont.cxx.
248 std::vector<LArCellCollection*>::const_iterator
it = (std::vector<LArCellCollection*>::const_iterator)((*this).begin()+
idx);
250 unsigned int itsize =
col->size();
252 for(
unsigned int i=0;
i< itsize; ++
i){
255 #ifdef TRIGLARCELLDEBUG
256 std::cout <<
"LArCellId= " <<
cell->ID() <<
" Ecorr= " << cor <<
" MeV " << std::endl;
258 float cellenergy =
cell->energy();
259 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 208 of file LArCellCont.cxx.
210 for(
int i=0;
i<number_of_col;
i++){
211 int number_of_cell = ((*this)[
i])->
size();
212 for(
int j=0;j<number_of_cell;j++)
213 delete ((*((*
this)[
i]))[j]);
214 if ((*
this)[
i] != NULL)
223 return StatusCode::SUCCESS;
◆ find() [1/2]
Finds a collection by its LArReadoutModuleID.
- Parameters
-
- Returns
const_iterator
to a pointer to LArCellCollection.
Definition at line 228 of file LArCellCont.cxx.
230 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 235 of file LArCellCont.cxx.
239 return (std::vector<LArCellCollection*>::const_iterator)((*this).begin()+
idx);
242 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 265 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;
34 ISvcLocator* svcLoc = Gaudi::svcLocator( );
35 IToolSvc* toolSvc =
nullptr;
36 sc = svcLoc->service(
"ToolSvc",toolSvc);
38 std::cout <<
"LArCellCont:initialize ERROR: Can not retrieve ToolSvc" << std::endl;
39 return StatusCode::FAILURE;
45 std::cout <<
"LArCellCont:initialize ERROR: Can not retrieve DetectorStore" << std::endl;
46 return StatusCode::FAILURE;
52 std::cout <<
"LArCellCont:initialize ERROR: Can not retrieve LArOnlineID" << std::endl;
53 return StatusCode::FAILURE;
58 std::cout <<
"Problems to initialize Hid2RESrcID" << std::endl;
59 return StatusCode::FAILURE;
65 #ifdef TRIGLARCELLDEBUG
66 std::cout <<
"LArCellCont\t\t DEBUG \t"
73 this->push_back(mycoll);
80 std::vector<const CaloCellCorrection*> LArCellCorrTools;
84 makeCell.
initialize( roiMap, onOffMap, man, &LArCellCorrTools, 0 );
95 bool toolAvailable =
sc.isSuccess();
98 std::cout <<
"LArCellCont\t\t INFO \t Failed to retrieve LArBadFebMasker - no masking will be done." << std::endl;
99 std::cout <<
"toolAvailable "<<toolAvailable<<std::endl;
101 std::vector<uint32_t> RobsFromMissingFeb;
106 std::vector<HWIdentifier>::const_iterator
end = onlineId->
channel_end ();
120 for (
unsigned iFeb=0;iFeb<onlineId->
febHashMax();++iFeb) {
131 #ifdef TRIGLARCELLDEBUG
132 std::cout <<
"LArCellCont\t\t DEBUG \t"
137 std::map<LArRoIMap::TT_ID,std::vector<LArCell* > > collMap;
138 if ( (*
this)[
idx]->
size() != 0 ) {
142 hashTab.reserve(256);
144 for(
int ch=0;
ch<128;
ch++){
150 (*this)[
idx]->push_back(larcell);
161 if (
good ) collMap[ttId].push_back(larcell);
165 hashTab.push_back(
index );
166 }
else hashTab.push_back(indexsetmax);
167 #ifdef TRIGLARCELLDEBUG
168 std::cout <<
"Cell registered at Collection "
170 " Channel " <<
ch <<
" TTId " << (
unsigned int)ttId
175 #ifdef TRIGLARCELLDEBUG
176 std::cout <<
"Cell not existing" << std::endl;
179 (*this)[
idx]->push_back(larcell);
180 hashTab.push_back( indexsetmax);
183 for (
const auto& [ttid,
cells] : collMap) {
192 (*this)[
idx]->setTT(ttid,
vec->begin(),
vec->end());
199 for(
size_t i = 0 ;
i < RobsFromMissingFeb.size() ;
i++)
200 for(
size_t j =
i+1 ; j < RobsFromMissingFeb.size() ; j++)
201 if ( RobsFromMissingFeb[
i] == RobsFromMissingFeb[j] )
203 RobsFromMissingFeb.clear();
205 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 270 of file LArCellCont.cxx.
272 #ifdef TRIGLARCELLDEBUG
273 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 280 of file LArCellCont.cxx.
282 std::map<HWIdentifier,int>::const_iterator
end =
m_indexset.end ();
284 std::map<HWIdentifier,int>::const_iterator
beg =
m_indexset.begin();
287 int idx = (*beg).second;
290 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 117 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 132 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 119 of file LArCellCont.h.
◆ m_second
◆ m_vecs
One needs to destroy the TT vectors.
Definition at line 112 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
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
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
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
The Athena Transient Store API.
value_type get_compact(void) const
Get the compact id.
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.
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
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
id_iterator channel_begin() const
Returns an iterator pointing to a channel identifier collection.