|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "Identifier/Identifier.h"
10 #include "CoralBase/Blob.h"
23 m_caloCoolIdTool(
"CaloCoolIdTool"),
70 m_tree =
new TTree(
"mytree",
"Calo Ped ntuple");
90 ATH_MSG_INFO (
" end of CaloAddCellPedShift::initialize " );
91 return StatusCode::SUCCESS;
98 msg() << MSG::INFO <<
" in updateMap ";
99 std::list<std::string>::const_iterator itr;
100 for (itr=
keys.begin(); itr!=
keys.end(); ++itr) {
101 msg() << *itr <<
" ";
108 for (; iColl != last; ++iColl) {
111 unsigned int sysId =
static_cast<unsigned int>(iColl->first);
120 const coral::Blob&
blob = (iColl->second)[
"CaloCondBlob16M"].data<coral::Blob>();
128 return StatusCode::SUCCESS;
135 return StatusCode::SUCCESS;
143 std::vector<float> pedShiftValue;
144 pedShiftValue.resize(
ncell,0.);
150 return StatusCode::FAILURE;
153 FILE* finput = fopen(
m_fname.c_str(),
"r");
161 while( fscanf(finput,
"%d %d %d %d %d %f",&
bec,&pos_neg,&
FT,&slot,&
channel,&pedShift) != EOF ) {
162 ATH_MSG_INFO (
" read linbe " <<
bec <<
" " << pos_neg <<
" " <<
FT <<
" " << slot <<
" " <<
channel <<
" " << pedShift );
166 int ii = (
int) (idHash);
167 pedShiftValue[ii] = pedShift;
176 FILE*
fp = fopen(
"calopedestal.txt",
"w");
212 int ii = (
int) (idSubHash);
215 if (subCalo<3)
ngain=3;
234 unsigned int subHash2;
237 float ped1_old=
flt->getData(subHash2,dbGain,0);
238 float ped2=
flt->getData(subHash2,dbGain,1);
240 float ped1 = ped1_old + pedShiftValue[
i];
242 if (iCool<48) fprintf(
fp,
"%5u %5d %5d %8.3f %8.3f\n",iCool,ii,
gain,ped1,ped2);
247 m_OffId=(
int)(
id.get_identifier32().get_compact());
271 if (std::fabs(ped1-ped1_old)>1.)
279 return StatusCode::SUCCESS;
284 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
const_iterator end() const
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
virtual StatusCode stop() override
standard Athena-Algorithm method
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
Class for storing a number of floats (Flt) and functions on those.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
bool is_em_endcap(const Identifier id) const
test if the id belongs to the EM Endcap
int pos_neg(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
virtual StatusCode initialize() override
standard Athena-Algorithm method
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
#define IOVSVC_CALLBACK_ARGS_K(K)
short hand for IOVSvc call back argument list, to be used when when only the keys argument is needed.
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
virtual StatusCode finalize() override
standard Athena-Algorithm method
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
~CaloAddCellPedShift()
Default Destructor.
bool is_hec(const Identifier id) const
test if the id belongs to the HEC
float eta_raw() const
cell eta_raw
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
bool is_em(const Identifier id) const
test if the id belongs to LArEM
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
virtual StatusCode updateMap(IOVSVC_CALLBACK_ARGS)
CaloAddCellPedShift(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
This class initializes the Calo (LAr and Tile) offline identifiers.
ServiceHandle< ITHistSvc > m_thistSvc
bool is_fcal(const Identifier id) const
test if the id belongs to the FCAL - true also for MiniFCAL
::StatusCode StatusCode
StatusCode definition for legacy code.
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
const DataHandle< CondAttrListCollection > m_noiseAttrListColl
IdentifierHash subcalo_cell_hash(const Identifier cellId, int &subCalo) const
create hash id from 'global' cell id
std::map< unsigned int, const CaloCondBlobFlt * > m_noiseBlobMap
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
StatusCode initialize(bool used=true)
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
static unsigned int getDbCaloGain(int caloGain)
Returns the non-negative gainId to be used with the COOL DB.
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
This class provides the client interface for accessing the detector description information common to...
static CaloCondBlobFlt * getInstance(coral::Blob &blob)
Returns a pointer to a non-const CaloCondBlobFlt.
#define ATH_MSG_WARNING(x)
ChanAttrListMap::const_iterator const_iterator
const CaloCell_ID * m_calo_id
ToolHandle< ICaloCoolIdTool > m_caloCoolIdTool
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
const LArOnlineID * m_onlineID
virtual StatusCode execute() override
standard Athena-Algorithm method
float phi_raw() const
cell phi_raw
size_type calo_cell_hash_max(void) const
cell 'global' hash table max size