|
ATLAS Offline Software
|
Go to the documentation of this file.
17 #include "GaudiKernel/EventIDRange.h"
26 #include "eformat/SourceIdentifier.h"
53 return StatusCode::SUCCESS;
73 return StatusCode::SUCCESS;
83 return StatusCode::FAILURE;
91 std::unique_ptr<IRegSelLUT> rd =
createTable (**roiMap);
93 if ( !rd )
return StatusCode::FAILURE;
106 if( lutCondData.
record( rcd ).isFailure() ) {
108 <<
" " << lutCondData.
key()
109 <<
" with range " <<
range );
110 return StatusCode::FAILURE;
116 return StatusCode::FAILURE;
122 return StatusCode::SUCCESS;
130 std::unique_ptr<RegSelectorHashMap>
lut(
nullptr);
196 std::unique_ptr<RegionSelectorLUT> lut_stuff = std::make_unique<RegionSelectorLUT>( lut_size );
201 for ( ; it2!=it2_end ; ++it2 ) {
206 int samp =
helper->sampling(layer_id);
208 bool isFcal =
helper->is_fcal(layer_id);
210 if ( isFcal != fcal )
continue;
211 if ( sampling==0 && samp!=0 )
continue;
212 if ( sampling!=0 && samp==0 )
continue;
213 if ( fcal_layer==0 &&
layer!=0 ) {
214 ATH_MSG_DEBUG(
"Whoa! how did this happen ? should never be able to get here: " << samp <<
" " <<
layer <<
" " << isFcal );
225 float phi1 = region->
phi()-
dPhi/2. ;
226 float phi2 = phi1+
dPhi;
232 helper->get_hash(layer_id, hashid, &IdCntx ) ;
235 if ( isFcal && ( samp != 0 ) ) {
236 if (
helper->pos_neg_z(layer_id)==1 ) {
251 int pseudolayer =
helper->eta(layer_id);
255 layer = ( pseudolayer<2 ? 0 : 1 );
258 if (
helper->pos_neg_z(layer_id)==1 ) {
269 layer = ( pseudolayer<2 ? 2 : 3 );
272 if (
helper->pos_neg_z(layer_id)==1 ) {
285 const std::vector<HWIdentifier>& vROBID = roiMap.
collectionID((
unsigned int)hashid);
288 if( !vROBID.empty() ) {
290 if( vROBID.size() > 1 ) {
292 <<
") ROBID for this TT, sampling, layer, etamin, phimin= "
293 <<
helper->show_to_string(layer_id) <<
" "
294 << samp <<
" " <<
layer <<
" " <<
eta1 <<
" " << phi1
299 std::vector<HWIdentifier>::const_iterator
it = vROBID.begin();
300 std::vector<HWIdentifier>::const_iterator it_end = vROBID.end();
302 for ( ;
it!=it_end ; ++
it ) {
306 eformat::SubDetector detid = (eformat::SubDetector) larReadoutModuleSvc.
subDet(mId);
311 eformat::helper::SourceIdentifier sid(detid,
m);
315 lut_stuff->
additem( (
double)
eta1, (
double)
eta2, (
double)phi1, (
double)phi2, samp,
layer, (
int)hashid, (
int)rod_id );
318 <<
" hashid,sampling, layer, etamin, phimin= "
319 <<
helper->show_to_string(layer_id) <<
" "
321 << samp <<
" " <<
layer <<
" " <<
eta1 <<
" " << phi1 );
331 ATH_MSG_DEBUG (
"No ROBID for this TT, sign, sampling, layer, etamin, phimin= "
332 <<
helper->show_to_string(layer_id)
333 <<
" " << samp <<
" " <<
layer <<
" " <<
eta1 <<
" " << phi1 );
346 lut = std::make_unique<RegSelectorHashMap>();
347 lut->addLut( lut_stuff.get());
348 lut->mountDataStruct();
def retrieve(aClass, aKey=None)
SG::WriteCondHandleKey< IRegSelLUTCondData > m_tableKey
Output conditions object.
static int subDet(const HWIdentifier &id)
return sub-detector identifier
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
static int rodFragId(const HWIdentifier &id)
return ROD fragment identifier ( == ROL == ROB identifier )
setEt setPhi setE277 setWeta2 eta1
bool range(EventIDRange &r)
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
virtual StatusCode initialize() override
constexpr auto lut(Generator &&f)
double phi() const
return coordinateof the Det Descr Region: phi
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.
virtual StatusCode execute(const EventContext &ctx) const override
std::string m_managerName
calo_region_vec::const_iterator calo_region_const_iterator
Service for creating and interpreting LAr readout modules identifiers.
const DataObjID & fullKey() const
SG::ReadCondHandleKey< LArRoIMap > m_roiMapKey
double dphi() const
return size in eta (unsigned)
::StatusCode StatusCode
StatusCode definition for legacy code.
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
virtual Identifier identify() const
emacs: this is -*- c++ -*-
Helper class for offline TT identifiers.
const std::string & key() const
StatusCode initialize(bool used=true)
std::unique_ptr< RegSelectorHashMap > createTable(const LArRoIMap &roiMap) const
RegSelCondAlg_LAr(const std::string &name, ISvcLocator *pSvcLocator)
Mapping between calorimeter trigger id to offline/online Identifier.
This class provides an interface to the geometrical description of the Calorimeter Trigger Towers.
double eta() const
return coordinateof the Det Descr Region: eta (signed)
This class is used to build the CaloTTDescriptors and CaloTTDetDescrRegions carrying the geometry inf...
double deta() const
return size in phi (unsigned)
const std::string & key() const
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
const std::vector< COLL_ID > & collectionID(const TT_ID &id) const
Get list of robIds for a given trigger tower ID.
void additem(const int hashId, const double etaMin, const double etaMax, const double phiMin, const double phiMax, const int layerDiskNumber, const int layerDiskPosition)
RegSelCondData< IRegSelLUT > IRegSelLUTCondData
void addDependency(const EventIDRange &range)