|
ATLAS Offline Software
|
Go to the documentation of this file.
19 #include "GaudiKernel/MsgStream.h"
31 #include "CaloDetDescr/CaloDetDescrElement.h"
48 MsgStream
log(
msgSvc(),
"CaloTTMgrDetDescrCnv");
52 log << MSG::ERROR <<
"DetDescrConverter::initialize failed" <<
endmsg;
71 return StatusCode::SUCCESS;
79 MsgStream
log(
msgSvc(),
"CaloTTMgrDetDescrCnv");
82 return StatusCode::SUCCESS;
90 MsgStream
log(
msgSvc(),
"CaloTTMgrDetDescrCnv");
91 log << MSG::INFO <<
"in createObj: creating a CaloTTDescrManager object in the detector store" <<
endmsg;
100 return StatusCode::FAILURE;
104 std::string mgrKey = *( ddAddr->par() );
126 return StatusCode::FAILURE;
135 return StatusCode::FAILURE;
141 log << MSG::INFO <<
"Set CaloLVL1_ID helper in CaloTTMgr "
151 status = caloMgrKey.initialize();
154 return StatusCode::FAILURE;
163 status = service(
"ToolSvc",toolSvc );
164 if(!
status.isSuccess()) {
169 status =toolSvc->retrieveTool(
"CaloTriggerTowerService",ttSvc);
181 int numberOfIdRegions=0;
182 int numberOfDescrRegions=0;
192 std::vector<Identifier>::const_iterator itId = lvl1_id->
region_begin();
193 std::vector<Identifier>::const_iterator itIdEnd = lvl1_id->
region_end();
195 for(; itId!=itIdEnd;++itId){
200 int region = lvl1_helper->
region(regId);
201 int halfNphi = (lvl1_helper->
phi_max(regId)+1)/2;
202 int nLay = lvl1_helper->
layer_max(regId)+1;
206 calo_descriptor->
set(regId);
211 }
else if( 1 == region ) {
214 }
else if( 2 == region ) {
217 }
else if( 3 == region ) {
223 caloTTMgr->
add(calo_descriptor);
230 int maxPhi=calo_descriptor->
nPhi();
234 if(!lvl1_helper->
is_tile(TTid)) {
236 int maxLay=calo_descriptor->
nLay();
237 for(
int iLay=0;iLay<maxLay;++iLay) {
241 if(lvl1_helper->
is_fcal(layId)) {
244 else if(lvl1_helper->
is_emec(layId) || lvl1_helper->
is_hec(layId)) {
252 else if(lvl1_helper->
is_emec(layId)) {
256 else if(lvl1_helper->
is_hec(layId)) {
266 double dEta=calo_descriptor->
deta();
270 double dPhi=calo_descriptor->
dphi();
289 numberOfDescrRegions++;
290 std::vector<Identifier>::const_iterator
it =
vec.begin();
291 std::vector<Identifier>::const_iterator it_end =
vec.end();
292 for(;
it!=it_end;++
it) {
297 double cDrho=caloDDE->
dr();
298 double z =caloDDE->
z_raw();
299 double cDz =caloDDE->
dz();
302 if( (
rho+cDrho/2.)>rhoMax ) {rhoMax=
rho+cDrho/2.;}
303 if( (
z-cDz/2.)<zMin ) {zMin=
z-cDz/2.;}
304 if( (
z+cDz/2.)>zMax ) {zMax=
z+cDz/2.;}
321 caloTTMgr->
add(tt_region);
337 log << MSG::INFO <<
" Initialized CaloTTMgr, number of descr regions is " << numberOfDescrRegions <<
endmsg;
340 << nEmb <<
" Em Barrel "
341 << nEmec <<
" Em EC "
350 return StatusCode::SUCCESS;
CaloTTMgrDetDescrCnv(ISvcLocator *svcloc)
int layer_max(const Identifier regId) const
max value of phi index (-999 == failure)
float phiMin() const
descriptor parameter: min value of phi
bool is_initialized(void) const
Scalar phi() const
phi method
const long DetDescr_StorageType
std::vector< Identifier > ID
bool is_fcal(const Identifier id) const
Test wether given tower or layer is part of the FCAL.
std::vector< Identifier > createCellIDvecLayer(const Identifier &id) const
Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID,...
Scalar eta() const
pseudorapidity method
float eta_min() const
descriptor parameter: min value of abs(eta)
int phi_max(const Identifier regId) const
min value of phi index (-999 == failure)
calo_descr_size calo_descriptors_size(void) const
Total number of descriptors.
Tool providing the mapping of the online and offline TriggerTower identifiers as well as the TT-cells...
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
bool is_emec(const Identifier id) const
Test wether given tower or layer is part of the EM end-cap.
int region(const Identifier id) const
return region according to :
DataObject * asStorable(T *pObject)
bool is_barrel_end(const Identifier id) const
Test wether given tower or layer is part of the EM barrel END.
std::vector< size_t > vec
void set_spherical(double eta, double phi, double rho)
set coordinates of the Det Descr region – pseudo spherical system; eta is signed, rho is unsigned
Definition of CaloDetDescrManager.
virtual StatusCode finalize()
bool is_hec(const Identifier id) const
Test wether given tower or layer is part of the HEC.
id_iterator region_end() const
end iterator over regions
Identifier layer_id(int pos_neg_z, int sampling, int region, int eta, int phi, int layer) const
build a layer identifier
static const CLID & ID()
the CLID of T
The Athena Transient Store API.
static long storageType()
void set_helper(const CaloLVL1_ID *id_helper)
set the helper used to decode the TT offline identifiers
id_iterator region_begin() const
begin iterator over regions
msgSvc
Provide convenience handles for various services.
::StatusCode StatusCode
StatusCode definition for legacy code.
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Default, invalid implementation of ClassID_traits.
void set_cylindric_size(double deta, double dphi, double dz)
set size of the Det Descr region – pseudo cylindrical system; eta is signed, z as well (same sign)
bool is_emb(const Identifier id) const
Test wether given tower or layer is part of the EM barrel.
float deta() const
descriptor parameter: eta granularity
uint32_t CLID
The Class ID type.
Helper class for offline TT identifiers.
void set_cylindric(double eta, double phi, double z)
set coordinates of the Det Descr region – pseudo cylindrical system; eta is signed,...
short nPhi() const
descriptor parameter: number of phi bins
void set_spherical_size(double deta, double dphi, double drho)
set size of the Det Descr region – pseudo spherical system; eta is signed, rho is unsigned
bool isFCAL(const xAOD::CaloCluster *cluster)
return true if the cluster (or the majority of its energy) is in the FCAL0
int sign_eta() const
descriptor parameter: sign of eta (+-1)
float z_raw() const
cell z_raw
virtual long int repSvcType() const
void set(const Identifier &id)
set internal data member m_id (which is unused.
int pos_neg_z(const Identifier id) const
return pos_neg_z according to :
float r_raw() const
cell r_raw
void add(CaloTTDescrRegion *region)
Insertion in the vector of Det Descr regions (== Trigger Towers)
static const CLID & classID()
This class provides the client interface for accessing the detector description information common to...
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
This class provides an interface to the geometrical description of the Calorimeter Trigger Towers.
virtual StatusCode initialize()
float dphi() const
descriptor parameter: phi granularity
This class is used to build the CaloTTDescriptors and CaloTTDetDescrRegions carrying the geometry inf...
virtual StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&pObj)
void initialize(void)
dummy.
This class holds the Calorimeter TriggerTower geometrical description
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Identifier tower_id(int pos_neg_z, int sampling, int region, int eta, int phi) const
build a tower identifier
setScale setgFexType iEta
bool is_tile(const Identifier id) const
Test wether given tower or layer is part of the Tile Calorimeter.
short nEta() const
descriptor parameter: number of eta bins
short nLay() const
descriptor parameter: number of layers