|
ATLAS Offline Software
|
Go to the documentation of this file.
33 T square(
T x) {
return x*
x; }
42 , m_tileCablingService(nullptr)
50 declareInterface<ITileCalibTool>(
this );
126 return StatusCode::SUCCESS;
132 return StatusCode::SUCCESS;
139 const EventContext& ctx = Gaudi::Hive::currentContext();
149 memset(chanIds, 0,
sizeof(chanIds));
155 int chan_bar[54] = {4 ,1 ,2 ,3 ,0 ,-1 ,
165 int chan_ext[36] = {4, 5 ,2 ,3 ,16,-1 ,
172 ATH_MSG_DEBUG (
"cispar[16] " << cispar[16] <<
", cispas[17] " << cispar[17] <<
", cispar[18] " << cispar[18] );
173 if (cispar[16] == 0x07){
183 else if (cispar[16] == 0x107){
187 return StatusCode::SUCCESS;
192 return StatusCode::SUCCESS;
214 for(; itColl != itCollEnd; ++itColl) {
217 it = (*itColl)->begin();
218 itEnd = (*itColl)->end();
220 for(;
it != itEnd; ++
it) {
242 if (ieta < 0 || ieta > 8)
continue;
244 if (ieta < 9 || ieta > 14)
continue;
249 if (
chan != chan_bar[(ieta*6) +
m_ipmt])
continue;
251 else if ((
ros==3) || (
ros==4)){
252 if ((
chan != chan_ext[((ieta-9)*6) +
m_ipmt]) || (
chan == 0))
continue;
257 float amp = (*it)->amplitude();
272 if (pos_neg_z < 0) pos_neg_z = 0;
273 chanIds[pos_neg_z][ieta][iphi][
m_ipmt] = hwid;
288 if (!triggerTower->sampling())
continue;
290 double eta = triggerTower->eta();
291 double phi = triggerTower->phi();
312 const std::vector<uint16_t>&
adc = triggerTower->adc();
315 tt_ene = (
max -
ped) * 0.25;
316 if (tt_ene < 0.) tt_ene = 0.;
319 if ((ieta < 0) || (ieta > 14))
continue;
321 if (pos_neg_z < 0) pos_neg_z = 0;
324 if(
ros >= 5 ||
ros <=0){
continue;}
329 double tt_ene_pC = tt_ene / pC2GeV;
332 if (triggerTower->e() == 0)
335 <<
", chan: " <<
chan
338 <<
", amplitude : " << tt_ene
339 <<
", old " << triggerTower->e()
340 <<
", ratio old/new " << triggerTower->e() / tt_ene );
342 if ((
ros==1) || (
ros==2)){
343 if (
chan != chan_bar[(ieta*6)-1 +
m_ipmt+1])
continue;
345 else if ((
ros==3) || (
ros==4)) {
346 if ((
chan != chan_ext[((ieta-9)*6)-1 +
m_ipmt+1]) || (
chan == 0))
continue;
372 return StatusCode::SUCCESS;
426 return StatusCode::SUCCESS;
433 TTree *
t =
new TTree(
m_ntupleID.c_str(),
"TileCalib-Ntuple");
461 return StatusCode::SUCCESS;
467 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
Const iterator class for DataVector/DataList.
Scalar phi() const
phi method
static const TileCablingService * getInstance()
get pointer to service instance
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
bool is_valid() const
Check if id is in a valid state.
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
static const unsigned int MAX_DRAWER
Number of drawers in ROS 1-4.
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
int phi(const Identifier id) const
return phi according to :
Class that holds Data Quality fragment information and provides functions to extract the data quality...
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
::StatusCode StatusCode
StatusCode definition for legacy code.
Description of TriggerTower_v2.
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
static const unsigned int MAX_ROS
Number of ROSs
virtual bool isValid() override final
Can the handle be successfully dereferenced?
int eta(const Identifier id) const
return eta according to :
const uint32_t * cispar() const
CIS parameters.
int pos_neg_z(const Identifier id) const
return pos_neg_z according to :
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
#define ATH_MSG_WARNING(x)
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
Handle class for reading from StoreGate.
static const unsigned int MAX_CHAN
Number of channels in drawer.
Identifier tower_id(int pos_neg_z, int sampling, int region, int eta, int phi) const
build a tower identifier
bool is_tile(const Identifier id) const
Test wether given tower or layer is part of the Tile Calorimeter.