ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TileCellFakeProb Class Reference

Scales down the energy of cells due to simulated failure of drawers. More...

#include <TileCellFakeProb.h>

Inheritance diagram for TileCellFakeProb:
Collaboration diagram for TileCellFakeProb:

Public Member Functions

 TileCellFakeProb (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor. More...
 
virtual ~TileCellFakeProb ()
 Standard destructor. More...
 
virtual StatusCode initialize () override
 AlgTool Initialization. More...
 
virtual double wtCell (const CaloCell *theCell) const override
 implementation of ICellWeightTool weighting method More...
 

Private Member Functions

StatusCode createMiscalibratedCellList ()
 Reads in properties and creates list of miscalibrated cells. More...
 

Private Attributes

ServiceHandle< TileCablingSvcm_cablingSvc
 Name of Tile cabling service. More...
 
Gaudi::Property< std::vector< std::string > > m_deadDrawerInput
 Property: List of "dead" drawers. More...
 
const CaloCell_IDm_caloID
 Pointer to CaloCellID. More...
 
const TileIDm_tileID
 Pointer to TileID. More...
 
const TileHWIDm_tileHWID
 Pointer to TileHWID. More...
 
const TileCablingServicem_cabling
 Pointer to TileCablingService. More...
 
std::map< Identifier, double > m_celllist
 List of "dead" cells and their weights. More...
 

Detailed Description

Scales down the energy of cells due to simulated failure of drawers.

Author
Kai Voss kai.v.nosp@m.oss@.nosp@m.cern..nosp@m.ch
Date
August 25, 2005

Definition at line 33 of file TileCellFakeProb.h.

Constructor & Destructor Documentation

◆ TileCellFakeProb()

TileCellFakeProb::TileCellFakeProb ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Standard constructor.

Definition at line 19 of file TileCellFakeProb.cxx.

21  : base_class(type, name, parent)
22  , m_caloID(nullptr)
23  , m_tileID(nullptr)
24  , m_tileHWID(nullptr)
25  , m_cabling(nullptr)
26 {
27 
28 }

◆ ~TileCellFakeProb()

TileCellFakeProb::~TileCellFakeProb ( )
virtual

Standard destructor.

Definition at line 57 of file TileCellFakeProb.cxx.

57  {
58 }

Member Function Documentation

◆ createMiscalibratedCellList()

StatusCode TileCellFakeProb::createMiscalibratedCellList ( )
private

Reads in properties and creates list of miscalibrated cells.

Definition at line 80 of file TileCellFakeProb.cxx.

80  {
81 
82 // ros 1 to 4 ReadOutSystem number ( 1,2 = pos/neg Barrel (side A/C)
83 // 3,4 = pos/neg Ext.Barrel (side A/C) )
84 // drawer 0 to 63 64 drawers (modules) in one cylinder (phi-slices)
85 // channel 0 to 47 channel number in the drawer
86 // adc 0 to 1 ADC number for the channel (0 = low gain, 1 = high gain)
87 
88  // read in dead drawers from jopOptions
89  std::vector<std::string>::const_iterator itrStringID = m_deadDrawerInput.begin();
90  for (; itrStringID != m_deadDrawerInput.end(); ++itrStringID) {
91  std::string theString = *itrStringID;
92  std::stringstream is;
93  is << theString << std::endl;
94 
95  int iros, idrawer;
96  double weight;
97  is >> iros >> idrawer >> weight;
98 
99  ATH_MSG_DEBUG( "scale ROS " << iros
100  << " Drawer " << idrawer
101  << " with weight=" << weight );
102 
103  // loop over all TileCal cells and check if they belong to dead drawers
104  int sub_calo_num = (int) CaloCell_ID::TILE;
105  IdentifierHash hmin, hmax;
106  m_caloID->calo_cell_hash_range(sub_calo_num, hmin, hmax);
107 
108  int nCells = 0;
109  for (unsigned int i = hmin; i < hmax; ++i) {
111  HWIdentifier myhwid = m_cabling->s2h_drawer_id(id);
112  int ros = m_tileHWID->ros(myhwid);
113  int drawer = m_tileHWID->drawer(myhwid);
114 
115  if ((ros == iros) && (drawer == idrawer)) {
116  m_celllist[id] = weight;
117  ++nCells;
118  }
119  }
120  ATH_MSG_DEBUG( "looped over " << (hmax - hmin)
121  << " cells, " << nCells << " cells matched" );
122  }
123 
124  return StatusCode::SUCCESS;
125 }

◆ initialize()

StatusCode TileCellFakeProb::initialize ( )
overridevirtual

AlgTool Initialization.

Definition at line 30 of file TileCellFakeProb.cxx.

30  {
31 
32  // Get the CaloCell_ID helper from the detector store
33  CHECK( detStore()->retrieve(m_caloID, "CaloCell_ID") );
34 
35  // Get the TileID helper from the detector store
36  CHECK( detStore()->retrieve(m_tileID, "TileID") );
37 
38  // Get the TileHWID helper from the detector store
39  CHECK( detStore()->retrieve(m_tileHWID, "TileHWID") );
40 
41  ATH_CHECK( m_cablingSvc.retrieve());
42 
43  // Instantiate Cabling Svc to initialize pointers to helpers there
44  m_cabling = m_cablingSvc->cablingService();
45  if (m_cabling == 0) {
46  ATH_MSG_FATAL( " Cannot get instance of TileCablingService" );
47  return StatusCode::FAILURE;
48  }
49 
50  // process properties from jobOptions
52 
53  return StatusCode::SUCCESS;
54 }

◆ wtCell()

double TileCellFakeProb::wtCell ( const CaloCell theCell) const
overridevirtual

implementation of ICellWeightTool weighting method

Definition at line 61 of file TileCellFakeProb.cxx.

61  {
62 
63  Identifier id = theCell->ID();
64  double totalweight = 1.0; // default weight
65 
66  if (m_tileID->is_tile(id)) {
67  std::map<Identifier, double>::const_iterator cur = m_celllist.find(id);
68 
69  if (cur != m_celllist.end()) {
70  totalweight = (cur->second);
71  ATH_MSG_VERBOSE( "eta = " << theCell->eta()
72  << ", phi = " << theCell->phi()
73  << ", weight = " << totalweight );
74  }
75  }
76 
77  return totalweight;
78 }

Member Data Documentation

◆ m_cabling

const TileCablingService* TileCellFakeProb::m_cabling
private

Pointer to TileCablingService.

Definition at line 71 of file TileCellFakeProb.h.

◆ m_cablingSvc

ServiceHandle<TileCablingSvc> TileCellFakeProb::m_cablingSvc
private
Initial value:
{ this,
"TileCablingSvc", "TileCablingSvc", "The Tile cabling service"}

Name of Tile cabling service.

Definition at line 57 of file TileCellFakeProb.h.

◆ m_caloID

const CaloCell_ID* TileCellFakeProb::m_caloID
private

Pointer to CaloCellID.

Definition at line 65 of file TileCellFakeProb.h.

◆ m_celllist

std::map<Identifier, double> TileCellFakeProb::m_celllist
private

List of "dead" cells and their weights.

Definition at line 74 of file TileCellFakeProb.h.

◆ m_deadDrawerInput

Gaudi::Property<std::vector<std::string> > TileCellFakeProb::m_deadDrawerInput
private
Initial value:
{this,
"DeadDrawerList", {}, "List of dead drawers"}

Property: List of "dead" drawers.

Definition at line 61 of file TileCellFakeProb.h.

◆ m_tileHWID

const TileHWID* TileCellFakeProb::m_tileHWID
private

Pointer to TileHWID.

Definition at line 69 of file TileCellFakeProb.h.

◆ m_tileID

const TileID* TileCellFakeProb::m_tileID
private

Pointer to TileID.

Definition at line 67 of file TileCellFakeProb.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
CaloCell::phi
virtual double phi() const override final
get phi (through CaloDetDescrElement)
Definition: CaloCell.h:359
TileCellFakeProb::m_deadDrawerInput
Gaudi::Property< std::vector< std::string > > m_deadDrawerInput
Property: List of "dead" drawers.
Definition: TileCellFakeProb.h:61
TileCellFakeProb::m_tileHWID
const TileHWID * m_tileHWID
Pointer to TileHWID.
Definition: TileCellFakeProb.h:69
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
beamspotman.cur
def cur
Definition: beamspotman.py:671
TileCellFakeProb::createMiscalibratedCellList
StatusCode createMiscalibratedCellList()
Reads in properties and creates list of miscalibrated cells.
Definition: TileCellFakeProb.cxx:80
TileCellFakeProb::m_cabling
const TileCablingService * m_cabling
Pointer to TileCablingService.
Definition: TileCellFakeProb.h:71
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
HWIdentifier
Definition: HWIdentifier.h:13
Example_ReadSampleNoise.drawer
drawer
Definition: Example_ReadSampleNoise.py:39
TileHWID::ros
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
Definition: TileHWID.h:167
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
xAOD::nCells
setRawEt setRawPhi nCells
Definition: TrigCaloCluster_v1.cxx:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
CaloCell_Base_ID::calo_cell_hash_range
void calo_cell_hash_range(const Identifier id, IdentifierHash &caloCellMin, IdentifierHash &caloCellMax) const
to loop on 'global' cell hashes of one sub-calorimeter alone
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
AtlasDetectorID::is_tile
bool is_tile(Identifier id) const
Definition: AtlasDetectorID.h:695
CaloCell_Base_ID::TILE
@ TILE
Definition: CaloCell_Base_ID.h:46
maskDeadModules.ros
ros
Definition: maskDeadModules.py:35
TileCellFakeProb::m_cablingSvc
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
Definition: TileCellFakeProb.h:57
TileCablingService::s2h_drawer_id
HWIdentifier s2h_drawer_id(const Identifier &id) const
Definition: TileCablingService.cxx:1011
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CaloCell::ID
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition: CaloCell.h:279
CaloCell_Base_ID::cell_id
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
TileHWID::drawer
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
Definition: TileHWID.h:171
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
hmax
double hmax(TH1 *&h)
Definition: listroot.cxx:115
TileCellFakeProb::m_celllist
std::map< Identifier, double > m_celllist
List of "dead" cells and their weights.
Definition: TileCellFakeProb.h:74
TileCellFakeProb::m_caloID
const CaloCell_ID * m_caloID
Pointer to CaloCellID.
Definition: TileCellFakeProb.h:65
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
TileCellFakeProb::m_tileID
const TileID * m_tileID
Pointer to TileID.
Definition: TileCellFakeProb.h:67
CaloCell::eta
virtual double eta() const override final
get eta (through CaloDetDescrElement)
Definition: CaloCell.h:366
Identifier
Definition: IdentifierFieldParser.cxx:14