 |
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();
150 memset(chanIds, 0,
sizeof(chanIds));
156 int chan_bar[54] = {4 ,1 ,2 ,3 ,0 ,-1 ,
166 int chan_ext[36] = {4, 5 ,2 ,3 ,16,-1 ,
173 ATH_MSG_DEBUG (
"cispar[16] " << cispar[16] <<
", cispas[17] " << cispar[17] <<
", cispar[18] " << cispar[18] );
174 if (cispar[16] == 0x07){
184 else if (cispar[16] == 0x107){
188 return StatusCode::SUCCESS;
193 return StatusCode::SUCCESS;
215 for(; itColl != itCollEnd; ++itColl) {
218 it = (*itColl)->begin();
219 itEnd = (*itColl)->end();
221 for(;
it != itEnd; ++
it) {
243 if (ieta < 0 || ieta > 8)
continue;
245 if (ieta < 9 || ieta > 14)
continue;
250 if (
chan != chan_bar[(ieta*6) +
m_ipmt])
continue;
252 else if ((
ros==3) || (
ros==4)){
253 if ((
chan != chan_ext[((ieta-9)*6) +
m_ipmt]) || (
chan == 0))
continue;
258 float amp = (*it)->amplitude();
273 if (pos_neg_z < 0) pos_neg_z = 0;
274 chanIds[pos_neg_z][ieta][iphi][
m_ipmt] = hwid;
289 if (!triggerTower->sampling())
continue;
291 double eta = triggerTower->eta();
292 double phi = triggerTower->phi();
313 const std::vector<uint16_t>&
adc = triggerTower->adc();
316 tt_ene = (
max -
ped) * 0.25;
317 if (tt_ene < 0.) tt_ene = 0.;
320 if ((ieta < 0) || (ieta > 14))
continue;
322 if (pos_neg_z < 0) pos_neg_z = 0;
325 if(
ros >= 5 ||
ros <=0){
continue;}
330 double tt_ene_pC = tt_ene / pC2GeV;
333 if (triggerTower->e() == 0)
336 <<
", chan: " <<
chan
339 <<
", amplitude : " << tt_ene
340 <<
", old " << triggerTower->e()
341 <<
", ratio old/new " << (tt_ene == 0 ? 0 : triggerTower->e() / tt_ene ));
343 if ((
ros==1) || (
ros==2)){
344 if (
chan != chan_bar[(ieta*6)-1 +
m_ipmt+1])
continue;
346 else if ((
ros==3) || (
ros==4)) {
347 if ((
chan != chan_ext[((ieta-9)*6)-1 +
m_ipmt+1]) || (
chan == 0))
continue;
373 return StatusCode::SUCCESS;
427 return StatusCode::SUCCESS;
434 TTree *
t =
new TTree(
m_ntupleID.c_str(),
"TileCalib-Ntuple");
437 t->Branch(
"meanTile",
m_meanTile,ind.Format(
"meanTile%s/F",(
const char *)ind));
438 t->Branch(
"rmsTile",
m_rmsTile,ind.Format(
"rmsTile%s/F",(
const char *)ind));
439 t->Branch(
"meanTileDAC",
m_meanTileDAC,ind.Format(
"meanTileDAC%s/F",(
const char *)ind));
440 t->Branch(
"rmsTileDAC",
m_rmsTileDAC,ind.Format(
"rmsTileDAC%s/F",(
const char *)ind));
441 t->Branch(
"ietaTile",
m_ietaTile,ind.Format(
"ietaTile%s/I",(
const char *)ind));
442 t->Branch(
"iphiTile",
m_iphiTile,ind.Format(
"iphiTile%s/I",(
const char *)ind));
443 t->Branch(
"ipmtTile",
m_ipmtTile,ind.Format(
"ipmtTile%s/I",(
const char *)ind));
444 t->Branch(
"nEvtTile",
m_nEvtTile,ind.Format(
"nEvtTile%s/I",(
const char *)ind));
445 t->Branch(
"meanL1Calo",
m_meanL1Calo,ind.Format(
"meanL1Calo%s/F",(
const char *)ind));
446 t->Branch(
"rmsL1Calo",
m_rmsL1Calo,ind.Format(
"rmsL1Calo%s/F",(
const char *)ind));
447 t->Branch(
"meanL1CaloDAC",
m_meanL1CaloDAC,ind.Format(
"meanL1CaloDAC%s/F",(
const char *)ind));
448 t->Branch(
"rmsL1CaloDAC",
m_rmsL1CaloDAC,ind.Format(
"rmsL1CaloDAC%s/F",(
const char *)ind));
449 t->Branch(
"ietaL1Calo",
m_ietaL1Calo,ind.Format(
"ietaL1Calo%s/I",(
const char *)ind));
450 t->Branch(
"iphiL1Calo",
m_iphiL1Calo,ind.Format(
"iphiL1Calo%s/I",(
const char *)ind));
451 t->Branch(
"ipmtL1Calo",
m_ipmtL1Calo,ind.Format(
"ipmtL1Calo%s/I",(
const char *)ind));
452 t->Branch(
"nEvtL1Calo",
m_nEvtL1Calo,ind.Format(
"nEvtL1Calo%s/I",(
const char *)ind));
453 t->Branch(
"meanTileL1Calo",
m_meanTileL1Calo,ind.Format(
"meanTileL1Calo%s/F",(
const char *)ind));
454 t->Branch(
"rmsTileL1Calo",
m_rmsTileL1Calo,ind.Format(
"rmsTileL1Calo%s/F",(
const char *)ind));
462 return StatusCode::SUCCESS;
468 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
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.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
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.