|
ATLAS Offline Software
|
Go to the documentation of this file.
33 ISvcLocator* pSvcLocator)
35 m_calo_id_manager(nullptr)
47 return StatusCode::SUCCESS;
60 if ( not noise_per_cell_handle.
isValid() ) {
61 ATH_MSG_DEBUG(
"Found invalid read handle for CaloNoiseSigmaDiff");
62 return StatusCode::FAILURE;
64 noise_per_cell = noise_per_cell_handle.
cptr();
71 if ( not caloLumiBCIDHandle.
isValid() ) {
72 ATH_MSG_DEBUG(
"Found invalid read handle for CaloBCIDAverage");
73 return StatusCode::FAILURE;
75 caloLumiBCID = caloLumiBCIDHandle.
cptr();
90 if ( not cellsHandle.isValid() ) {
92 return StatusCode::FAILURE;
98 std::vector<float> energies (hash_max,0);
99 std::vector<float> enTime (hash_max,0);
100 std::vector<float> enForTime (hash_max,0);
101 std::vector<bool> timeDef (hash_max,
false);
102 std::vector<uint16_t> gains (hash_max,0);
103 std::vector<uint16_t> qualities (hash_max,0);
104 std::vector<float> sigma_noise_per_scell(hash_max,0);
117 assert (
hash < energies.size() );
118 float pedestalshift = 0.0;
120 energies[
hash] +=
cell->energy() + pedestalshift;
123 sigma_noise_per_scell[
hash]+=(*noise_per_cell)[cell_hash];
126 if ( ((prov & 0x2000) == 0x2000) && (
cell->et()>50) ) {
128 timeDef[
hash] =
true;
134 if ( qualities[
hash] + (
int)
cell->quality() > 65535 ){
135 qualities[
hash] = 65535 ;
144 int side = tile_cell_id->
side (cell_id);
146 int tower = tile_cell_id->
tower (cell_id);
174 energies[hash1] +=
cell->energy()*0.5;
175 energies[hash2] +=
cell->energy()*0.5;
182 auto superCellContainer = std::make_unique<CaloCellContainer> ();
187 superCellContainer->reserve(energies.size());
190 for (
unsigned int i=0;
i < energies.size();
i++) {
199 float add_noise = 0.0;
201 if ( (!dde->
is_tile()) && (sigma_noise_per_scell[
hash] > 0.0) ){
202 std::normal_distribution<double> distribution(0.0,sigma_noise_per_scell[
hash] );
205 energies[
i]+=add_noise;
210 ss->setEnergy( energies[
i] );
213 float time = enTime[
i] / enForTime[
i];
219 }
else ss->setTime( 999.0 );
221 ss->setQuality( qualities[
i] );
224 ss->setProvenance( 0 );
229 ss->setProvenance( prov );
232 superCellContainer->push_back(
ss);
235 ATH_CHECK( scellContainerHandle.
record( std::move(superCellContainer) ) );
237 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
std::vector< float > CaloNoiseSigmaDiff
NAME : CaloNoiseSigmaDiff.h PACKAGE : Calorimeter/CaloConditions.
Extra patterns decribing particle interation process.
StatusCode execute(const EventContext &context) const
Algorithm execute method.
SG::ReadCondHandleKey< CaloNoiseSigmaDiff > m_noise_per_cell_Key
Property SG Key for the Expected Noise Sigma diff in diff gains.
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
ToolHandle< ICaloSuperCellIDTool > m_scidtool
Property: Offline / supercell mapping tool.
Gaudi::Property< bool > m_compNoise
const_pointer_type cptr()
Dereference the pointer.
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
int side(const Identifier &id) const
void reserve(unsigned int size)
Set the desired capacity.
Helper class for Tile offline identifiers for supercells.
int tower(const Identifier &id) const
const Tile_SuperCell_ID * getTile_SuperCell_ID(void) const
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
bool is_valid() const
Check if id is in a valid state.
SG::WriteHandleKey< CaloCellContainer > m_sCellContainerKey
Property: SG key for the output supercell LAr channel container.
const CaloIdManager * m_calo_id_manager
Entry point for calorimeter ID helpers.
Definition of CaloDetDescrManager.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
const TileID * getTileID(void) const
StatusCode initialize()
Standard Gaudi initialize method.
IdentifierHash calo_hash() const
cell calo hash
int module(const Identifier &id) const
Helper class for offline supercell identifiers.
Helper class for TileCal offline identifiers.
::StatusCode StatusCode
StatusCode definition for legacy code.
Helper class for offline supercell identifiers.
int sampling(const Identifier &id) const
Helper class for offline cell identifiers.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
LArSCSimpleMaker(const std::string &name, ISvcLocator *pSvcLocator)
Standard Gaudi algorithm constructor.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
bool is_tile() const
cell belongs to Tile
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSuperCellMgrKey
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
Property: SG key for the input calorimeter cell container.
Gaudi::Property< bool > m_addBCID
const CaloCell_ID * getCaloCell_ID(void) const
Access to IdHelper.
StatusCode initialize(bool used=true)
Container class for CaloCell.
float average(const Identifier &id) const
generator
Configure Herwig7 These are the commands corresponding to what would go into the regular Herwig infil...
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Data object for each calorimeter readout cell.
def time(flags, cells_name, *args, **kw)
const CaloCell_SuperCell_ID * getCaloCell_SuperCell_ID(void) const
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
int section(const Identifier &id) const
SG::ReadHandleKey< CaloBCIDAverage > m_bcidAvgKey
Property SG Key for the CaloLumiBCID.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Identifier cell_id(const Identifier &any_id) const
unsigned int allocated()
return size already allocated OK
size_type calo_cell_hash_max(void) const
cell 'global' hash table max size
const_pointer_type cptr()