ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
LarEMSamplingFraction Class Reference

#include <LarEMSamplingFraction.h>

Inheritance diagram for LarEMSamplingFraction:
Collaboration diagram for LarEMSamplingFraction:

Public Member Functions

 LarEMSamplingFraction (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~LarEMSamplingFraction ()
 
virtual StatusCode initialize () override
 
virtual StatusCode execute () override
 
virtual StatusCode finalize () override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

 LarEMSamplingFraction ()
 Default constructor: More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

bool m_docells {true}
 
int m_mc_pdg {0}
 
double m_mc_eta {0.}
 
double m_mc_phi {0.}
 
double m_mc_e {0.}
 
double m_mc_pt {0.}
 
std::vector< Long64_t > * m_cell_identifier {nullptr}
 
std::vector< float > * m_cell_energy_reco {nullptr}
 
std::vector< float > * m_cell_energy_active_total_corrected {nullptr}
 
std::vector< float > * m_cell_energy_active_total {nullptr}
 
std::vector< float > * m_cell_energy_inactive_total {nullptr}
 
std::vector< int > * m_cell_sampling {nullptr}
 
std::vector< float > * m_cell_eta {nullptr}
 
std::vector< float > * m_cell_phi {nullptr}
 
std::vector< float > * m_energy_reco {nullptr}
 
std::vector< float > * m_energy_hit {nullptr}
 
std::vector< float > * m_energy_inactive_total {nullptr}
 
std::vector< float > * m_energy_inactive_em {nullptr}
 
std::vector< float > * m_energy_inactive_nonem {nullptr}
 
std::vector< float > * m_energy_inactive_inv {nullptr}
 
std::vector< float > * m_energy_inactive_esc {nullptr}
 
std::vector< float > * m_energy_active_total_corrected {nullptr}
 
std::vector< float > * m_energy_active_total {nullptr}
 
std::vector< float > * m_energy_active_em {nullptr}
 
std::vector< float > * m_energy_active_nonem {nullptr}
 
std::vector< float > * m_energy_active_inv {nullptr}
 
std::vector< float > * m_energy_active_esc {nullptr}
 
TTree * m_mytree {nullptr}
 
std::vector< std::string > m_CalibrationHitContainerNames
 
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey
 
const CaloCell_IDm_calo_id {nullptr}
 
const TileIDm_tileID {nullptr}
 
const TileHWIDm_tileHWID {nullptr}
 
const TileCablingServicem_tileCabling {nullptr}
 
SG::ReadCondHandleKey< ILArfSamplm_fSamplKey {this,"fSamplKey","LArfSamplSym","SG Key of LArfSampl object"}
 
SG::ReadCondHandleKey< TileSamplingFractionm_tileSamplingFractionKey
 Name of TileSamplingFraction in condition store. More...
 
ServiceHandle< TileCablingSvcm_tileCablingSvc
 Name of Tile cabling service. More...
 
DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 27 of file LarEMSamplingFraction.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ LarEMSamplingFraction() [1/2]

LarEMSamplingFraction::LarEMSamplingFraction ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 27 of file LarEMSamplingFraction.cxx.

29  : AthAlgorithm(name, pSvcLocator)
30 {
31  // Name of ClusterContainer to use
32  declareProperty("DoCells",m_docells);
33  declareProperty("CalibrationHitContainerNames",m_CalibrationHitContainerNames);
34 }

◆ ~LarEMSamplingFraction()

LarEMSamplingFraction::~LarEMSamplingFraction ( )
virtual

Definition at line 38 of file LarEMSamplingFraction.cxx.

39 { }

◆ LarEMSamplingFraction() [2/2]

LarEMSamplingFraction::LarEMSamplingFraction ( )
private

Default constructor:

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode LarEMSamplingFraction::execute ( )
overridevirtual

!

Definition at line 114 of file LarEMSamplingFraction.cxx.

115 {
117  const ILArfSampl* fSampl=*fSamplHdl;
118 
120  ATH_CHECK( tileSamplingFraction.isValid() );
121 
122  const CaloCalibrationHitContainer* cchc;
123  std::vector<const CaloCalibrationHitContainer *> v_cchc;
124  for (const std::string& containerName : m_CalibrationHitContainerNames) {
125  if ( !evtStore()->contains<CaloCalibrationHitContainer>(containerName))
126  {
127  ATH_MSG_ERROR("SG does not contain calibration hit container " << containerName);
128  return StatusCode::FAILURE;
129  }
130  else
131  {
132  StatusCode sc = evtStore()->retrieve(cchc,containerName);
133  if (sc.isFailure() )
134  {
135  ATH_MSG_ERROR("Cannot retrieve calibration hit container " << containerName);
136  return sc;
137  }
138  else
139  {
140  v_cchc.push_back(cchc);
141  }
142  }
143  }
144 
145  const McEventCollection* truthEvent{};
146  StatusCode sc = evtStore()->retrieve(truthEvent, "TruthEvent");
147  if (sc.isFailure()||!truthEvent)
148  {
149  ATH_MSG_ERROR("No McEventCollection found");
150  return StatusCode::FAILURE;
151  }
152  auto gen = *HepMC::begin(*truthEvent->at(0));
153  m_mc_pdg = gen->pdg_id();
154  m_mc_eta = gen->momentum().pseudoRapidity();
155  m_mc_phi = gen->momentum().phi();
156  m_mc_e = gen->momentum().e();
157  m_mc_pt = sqrt(pow(gen->momentum().px(),2)+pow(gen->momentum().py(),2));
158 
159  //inspiration:
160  //see https://gitlab.cern.ch/atlas/athena/blob/master/Calorimeter/CaloCalibHitRec/src/CalibHitToCaloCell.cxx
161  //and https://gitlab.cern.ch/atlas/athena/blob/master/Calorimeter/CaloCalibHitRec/src/CaloDmEnergy.cxx
162 
164  ATH_CHECK(caloMgrHandle.isValid());
165  const CaloDetDescrManager* caloMgr = *caloMgrHandle;
166 
167  m_energy_reco =new vector<float>;
168  m_energy_hit =new vector<float>;
169 
170  m_energy_inactive_total=new vector<float>;
171  m_energy_inactive_em =new vector<float>;
172  m_energy_inactive_nonem=new vector<float>;
173  m_energy_inactive_inv =new vector<float>;
174  m_energy_inactive_esc =new vector<float>;
175 
176  m_energy_active_total_corrected=new vector<float>;
177  m_energy_active_total=new vector<float>;
178  m_energy_active_em =new vector<float>;
179  m_energy_active_nonem=new vector<float>;
180  m_energy_active_inv =new vector<float>;
181  m_energy_active_esc =new vector<float>;
182 
183  if(m_docells) {
184  m_cell_identifier =new std::vector<Long64_t>;
185  m_cell_energy_reco =new std::vector<float>;
186  m_cell_energy_active_total_corrected=new std::vector<float>;
187  m_cell_energy_active_total =new std::vector<float>;
188  m_cell_energy_inactive_total =new std::vector<float>;
189  m_cell_sampling =new std::vector<int>;
190  m_cell_eta =new std::vector<float>;
191  m_cell_phi =new std::vector<float>;
192  }
193 
194  struct cell_info {
195  Long64_t cell_identifier=0;
196  float cell_energy_reco=0;
197  float cell_energy_active_total_corrected=0;
198  float cell_energy_active_total=0;
199  float cell_energy_inactive_total=0;
200  int cell_sampling=0;
201  float cell_eta=0;
202  float cell_phi=0;
203  };
204 
205  std::map< Long64_t , cell_info > cell_info_map;
206 
207  for(int s=0;s<24;s++)
208  {
209  m_energy_reco->push_back(0.0);
210  m_energy_hit->push_back(0.0);
211 
212  m_energy_inactive_total->push_back(0.0);
213  m_energy_inactive_em ->push_back(0.0);
214  m_energy_inactive_nonem->push_back(0.0);
215  m_energy_inactive_inv ->push_back(0.0);
216  m_energy_inactive_esc ->push_back(0.0);
217 
218  m_energy_active_total_corrected->push_back(0.0);
219  m_energy_active_total->push_back(0.0);
220  m_energy_active_em ->push_back(0.0);
221  m_energy_active_nonem->push_back(0.0);
222  m_energy_active_inv ->push_back(0.0);
223  m_energy_active_esc ->push_back(0.0);
224  }
225 
226  int count=0;
227  for (const CaloCalibrationHitContainer* calibHitContainer: v_cchc)
228  {
230  for(const CaloCalibrationHit* calibHit : *calibHitContainer)
231  {
232  Identifier id=calibHit->cellID();
233 
234  double Etot = calibHit->energyTotal();
235  double Eem = calibHit->energyEM();
236  double Enonem = calibHit->energyNonEM();
237  double Einv = calibHit->energyInvisible();
238  double Eesc = calibHit->energyEscaped();
239 
240  double Efactor=1.0;
241 
242  const CaloDetDescrElement* caloDDE = caloMgr->get_element(id);
243  int sampling=-1;
244  if(caloDDE) {
245  sampling = caloDDE->getSampling();
246 
247  if((sampling>=0 && sampling<=11) || (sampling>=21 && sampling<=23)) Efactor=1/fSampl->FSAMPL(id);
248  if((sampling>=12 && sampling<=20)) {
249  HWIdentifier channel_id = m_tileCabling->s2h_channel_id(id);
251  int drawerIdx = m_tileHWID->drawerIdx(channel_id);
252  Efactor = tileSamplingFraction->getSamplingFraction(drawerIdx, channel);
253  Identifier cell_id = m_tileID->cell_id(id);
254  if(caloMgr->get_element(cell_id)) {
255  id=cell_id;
256  }
257  }
258  }
259 
260  ATH_MSG_VERBOSE( "cellID "<<id<<" layer "<<sampling<<" energyTotal "<<Etot<<" Eem "<<Eem<<" Enonem "<<Enonem<<" Einv "<<Einv<<" Eesc "<<Eesc<<" Efactor="<<Efactor);
261 
262  if(sampling>=0 && sampling<=23)
263  {
264  if(m_docells) {
265  cell_info_map[id.get_compact()].cell_identifier=id.get_compact();
266  cell_info_map[id.get_compact()].cell_sampling=sampling;
267  cell_info_map[id.get_compact()].cell_eta=caloDDE->eta_raw();
268  cell_info_map[id.get_compact()].cell_phi=caloDDE->phi_raw();
269  }
270 
271  if(m_CalibrationHitContainerNames[count]=="LArCalibrationHitInactive" || m_CalibrationHitContainerNames[count]=="TileCalibHitInactiveCell")
272  {
273  m_energy_inactive_total->at(sampling)+=Etot;
274  m_energy_inactive_em ->at(sampling)+=Eem;
275  m_energy_inactive_nonem->at(sampling)+=Enonem;
276  m_energy_inactive_inv ->at(sampling)+=Einv;
277  m_energy_inactive_esc ->at(sampling)+=Eesc;
278 
279  if(m_docells) cell_info_map[id.get_compact()].cell_energy_inactive_total+=Etot;
280  }
281 
282  if(m_CalibrationHitContainerNames[count]=="LArCalibrationHitActive" || m_CalibrationHitContainerNames[count]=="TileCalibHitActiveCell")
283  {
284  m_energy_active_total_corrected->at(sampling)+=Etot*Efactor;
285  m_energy_active_total->at(sampling)+=Etot;
286  m_energy_active_em ->at(sampling)+=Eem;
287  m_energy_active_nonem->at(sampling)+=Enonem;
288  m_energy_active_inv ->at(sampling)+=Einv;
289  m_energy_active_esc ->at(sampling)+=Eesc;
290 
291  if(m_docells) {
292  cell_info_map[id.get_compact()].cell_energy_active_total_corrected+=Etot*Efactor;
293  cell_info_map[id.get_compact()].cell_energy_active_total+=Etot;
294  }
295  }
296 
297  }
298 
299  }
300 
301  count++;
302  }
303 
304  //Get reco cells if available
305  const CaloCellContainer *cellColl{};
306  sc = evtStore()->retrieve(cellColl, "AllCalo");
307 
308  if (sc.isFailure()) {
309  ATH_MSG_WARNING( "Couldn't read AllCalo cells from StoreGate");
310  //return NULL;
311  } else {
312  ATH_MSG_DEBUG( "Found: "<<cellColl->size()<<" calorimeter cells");
313  for (const CaloCell* cell : *cellColl) {
314  Identifier id=cell->ID();
315  const CaloDetDescrElement* caloDDE = caloMgr->get_element(id);
316  int sampling=-1;
317  if(caloDDE) {
318  sampling = caloDDE->getSampling();
319  m_energy_reco->at(sampling)+=cell->energy();
320  if((sampling>=12 && sampling<=20)) {
321  Identifier cell_id = m_tileID->cell_id(id);
322  if(caloMgr->get_element(cell_id)) {
323  id=cell_id;
324  }
325  }
326  }
327  if(m_docells) {
328  cell_info_map[id.get_compact()].cell_identifier=id.get_compact();
329  cell_info_map[id.get_compact()].cell_sampling=sampling;
330  cell_info_map[id.get_compact()].cell_eta=caloDDE->eta_raw();
331  cell_info_map[id.get_compact()].cell_phi=caloDDE->phi_raw();
332  cell_info_map[id.get_compact()].cell_energy_reco+=cell->energy();
333  }
334  }
335  } //calorimeter cells
336 
337 
338  //Get all G4Hits (from CaloHitAnalysis)
339  const std::vector<std::string> lArKeys = {"LArHitEMB", "LArHitEMEC", "LArHitFCAL", "LArHitHEC"};
340  for (const std::string& containerName: lArKeys) {
341  const LArHitContainer* larContainer{};
342  ATH_MSG_DEBUG( "Checking G4Hits: "<<containerName);
343  if(evtStore()->retrieve(larContainer,containerName)==StatusCode::SUCCESS) {
344  int hitnumber = 0;
345  for (const LArHit* larHit : *larContainer) {
346  hitnumber++;
347  const CaloDetDescrElement *hitElement = caloMgr->get_element(larHit->cellID());
348  if(!hitElement) continue;
349  Identifier larhitid = hitElement->identify();
350  if(caloMgr->get_element(larhitid)) {
351  CaloCell_ID::CaloSample larlayer = caloMgr->get_element(larhitid)->getSampling();
352  m_energy_hit->at(larlayer)+=larHit->energy();
353  }
354  } // End while LAr hits
355  ATH_MSG_DEBUG( "Read "<<hitnumber<<" G4Hits from "<<containerName);
356  }
357  else {
358  ATH_MSG_INFO( "Can't retrieve LAr hits");
359  }// End statuscode success upon retrieval of hits
360  }// End detector type loop
361 
362  const TileHitVector * hitVec{};
363  if (evtStore()->retrieve(hitVec,"TileHitVec")==StatusCode::SUCCESS && m_tileID ) {
364  int hitnumber = 0;
365  for(const TileHit& hit : *hitVec) {
366  ++hitnumber;
367  Identifier pmt_id = hit.identify();
368  Identifier cell_id = m_tileID->cell_id(pmt_id);
369 
370  if (caloMgr->get_element(cell_id)) {
371  CaloCell_ID::CaloSample layer = caloMgr->get_element(cell_id)->getSampling();
372 
373  //could there be more subhits??
374  for (int tilesubhit_i = 0; tilesubhit_i<hit.size(); tilesubhit_i++) {
376  ATH_MSG_DEBUG( "Tile subhit: "<<tilesubhit_i<<"/"<<hit.size()<< " E: "<<hit.energy(tilesubhit_i) );
377  m_energy_hit->at(layer) += hit.energy(tilesubhit_i);
378  }
379  }
380  }
381  ATH_MSG_DEBUG( "Read "<<hitnumber<<" G4Hits from TileHitVec");
382  }
383 
384  for(auto& cell:cell_info_map) {
385  m_cell_identifier ->push_back(cell.second.cell_identifier);
386  m_cell_sampling ->push_back(cell.second.cell_sampling);
387  m_cell_eta ->push_back(cell.second.cell_eta);
388  m_cell_phi ->push_back(cell.second.cell_phi);
389  m_cell_energy_reco ->push_back(cell.second.cell_energy_reco);
390  m_cell_energy_active_total_corrected->push_back(cell.second.cell_energy_active_total_corrected);
391  m_cell_energy_active_total ->push_back(cell.second.cell_energy_active_total);
392  m_cell_energy_inactive_total ->push_back(cell.second.cell_energy_inactive_total);
393  }
394 
395  m_mytree->Fill();
396 
397  delete m_energy_reco;
398  delete m_energy_hit;
400  delete m_energy_inactive_em;
402  delete m_energy_inactive_inv;
403  delete m_energy_inactive_esc;
404 
406  delete m_energy_active_total;
407  delete m_energy_active_em;
408  delete m_energy_active_nonem;
409  delete m_energy_active_inv;
410  delete m_energy_active_esc;
411 
412  if(m_docells) {
413  delete m_cell_identifier;
414  delete m_cell_energy_reco;
418  delete m_cell_sampling;
419  delete m_cell_eta;
420  delete m_cell_phi;
421  }
422 
423  return StatusCode::SUCCESS;
424 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode LarEMSamplingFraction::finalize ( )
overridevirtual

Definition at line 106 of file LarEMSamplingFraction.cxx.

107 {
108 
109  return StatusCode::SUCCESS;
110 }

◆ initialize()

StatusCode LarEMSamplingFraction::initialize ( )
overridevirtual

Definition at line 43 of file LarEMSamplingFraction.cxx.

44 {
45  //---- initialize the StoreGateSvc ptr ----------------
46 
47  ServiceHandle<ITHistSvc> histSvc("THistSvc",name());
48  ATH_CHECK( histSvc.retrieve() );
49 
50  m_mytree = new TTree("mytree","mytree");
51  m_mytree->Branch("energy_reco", &m_energy_reco);
52  m_mytree->Branch("energy_hit", &m_energy_hit);
53  m_mytree->Branch("energy_inactive_total",&m_energy_inactive_total);
54  m_mytree->Branch("energy_inactive_em", &m_energy_inactive_em);
55  m_mytree->Branch("energy_inactive_nonem",&m_energy_inactive_nonem);
56  m_mytree->Branch("energy_inactive_inv", &m_energy_inactive_inv);
57  m_mytree->Branch("energy_inactive_esc", &m_energy_inactive_esc);
58  m_mytree->Branch("energy_active_total_corrected",&m_energy_active_total_corrected);
59  m_mytree->Branch("energy_active_total",&m_energy_active_total);
60  m_mytree->Branch("energy_active_em", &m_energy_active_em);
61  m_mytree->Branch("energy_active_nonem",&m_energy_active_nonem);
62  m_mytree->Branch("energy_active_inv", &m_energy_active_inv);
63  m_mytree->Branch("energy_active_esc", &m_energy_active_esc);
64  m_mytree->Branch("mc_pdg", &m_mc_pdg);
65  m_mytree->Branch("mc_eta", &m_mc_eta);
66  m_mytree->Branch("mc_phi", &m_mc_phi);
67  m_mytree->Branch("mc_e", &m_mc_e);
68  m_mytree->Branch("mc_pt", &m_mc_pt);
69 
70  if(m_docells) {
71  m_mytree->Branch("cell_identifier",&m_cell_identifier);
72  m_mytree->Branch("cell_energy_reco",&m_cell_energy_reco);
73  m_mytree->Branch("cell_energy_inactive_total",&m_cell_energy_inactive_total);
74  m_mytree->Branch("cell_energy_active_total_corrected",&m_cell_energy_active_total_corrected);
75  m_mytree->Branch("cell_energy_active_total",&m_cell_energy_active_total);
76  m_mytree->Branch("cell_sampling",&m_cell_sampling);
77  m_mytree->Branch("cell_eta",&m_cell_eta);
78  m_mytree->Branch("cell_phi",&m_cell_phi);
79  }
80 
81  histSvc->regTree("/MYSTREAM/myTree",m_mytree).ignore();
82 
83  // pointer to detector manager:
85  ATH_CHECK(detStore()->retrieve(m_calo_id, "CaloCell_ID"));
86 
87  const CaloIdManager* caloIdManager;
88  ATH_CHECK(detStore()->retrieve(caloIdManager));
89 
90  m_tileID=caloIdManager->getTileID();
91  if(m_tileID==0) throw std::runtime_error("ISF_HitAnalysis: Invalid Tile ID helper");
92 
94 
97 
98  ATH_CHECK( m_tileCablingSvc.retrieve() );
99  m_tileCabling = m_tileCablingSvc->cablingService();
100 
101  return StatusCode::SUCCESS;
102 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg() [1/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_CalibrationHitContainerNames

std::vector<std::string> LarEMSamplingFraction::m_CalibrationHitContainerNames
private

Definition at line 78 of file LarEMSamplingFraction.h.

◆ m_calo_id

const CaloCell_ID* LarEMSamplingFraction::m_calo_id {nullptr}
private

Definition at line 85 of file LarEMSamplingFraction.h.

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> LarEMSamplingFraction::m_caloMgrKey
private
Initial value:
{ this
, "CaloDetDescrManager"
, "CaloDetDescrManager"
, "SG Key for CaloDetDescrManager in the Condition Store" }

Definition at line 80 of file LarEMSamplingFraction.h.

◆ m_cell_energy_active_total

std::vector<float>* LarEMSamplingFraction::m_cell_energy_active_total {nullptr}
private

Definition at line 54 of file LarEMSamplingFraction.h.

◆ m_cell_energy_active_total_corrected

std::vector<float>* LarEMSamplingFraction::m_cell_energy_active_total_corrected {nullptr}
private

Definition at line 53 of file LarEMSamplingFraction.h.

◆ m_cell_energy_inactive_total

std::vector<float>* LarEMSamplingFraction::m_cell_energy_inactive_total {nullptr}
private

Definition at line 55 of file LarEMSamplingFraction.h.

◆ m_cell_energy_reco

std::vector<float>* LarEMSamplingFraction::m_cell_energy_reco {nullptr}
private

Definition at line 52 of file LarEMSamplingFraction.h.

◆ m_cell_eta

std::vector<float>* LarEMSamplingFraction::m_cell_eta {nullptr}
private

Definition at line 57 of file LarEMSamplingFraction.h.

◆ m_cell_identifier

std::vector<Long64_t>* LarEMSamplingFraction::m_cell_identifier {nullptr}
private

Definition at line 51 of file LarEMSamplingFraction.h.

◆ m_cell_phi

std::vector<float>* LarEMSamplingFraction::m_cell_phi {nullptr}
private

Definition at line 58 of file LarEMSamplingFraction.h.

◆ m_cell_sampling

std::vector<int>* LarEMSamplingFraction::m_cell_sampling {nullptr}
private

Definition at line 56 of file LarEMSamplingFraction.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_docells

bool LarEMSamplingFraction::m_docells {true}
private

Definition at line 43 of file LarEMSamplingFraction.h.

◆ m_energy_active_em

std::vector<float>* LarEMSamplingFraction::m_energy_active_em {nullptr}
private

Definition at line 71 of file LarEMSamplingFraction.h.

◆ m_energy_active_esc

std::vector<float>* LarEMSamplingFraction::m_energy_active_esc {nullptr}
private

Definition at line 74 of file LarEMSamplingFraction.h.

◆ m_energy_active_inv

std::vector<float>* LarEMSamplingFraction::m_energy_active_inv {nullptr}
private

Definition at line 73 of file LarEMSamplingFraction.h.

◆ m_energy_active_nonem

std::vector<float>* LarEMSamplingFraction::m_energy_active_nonem {nullptr}
private

Definition at line 72 of file LarEMSamplingFraction.h.

◆ m_energy_active_total

std::vector<float>* LarEMSamplingFraction::m_energy_active_total {nullptr}
private

Definition at line 70 of file LarEMSamplingFraction.h.

◆ m_energy_active_total_corrected

std::vector<float>* LarEMSamplingFraction::m_energy_active_total_corrected {nullptr}
private

Definition at line 69 of file LarEMSamplingFraction.h.

◆ m_energy_hit

std::vector<float>* LarEMSamplingFraction::m_energy_hit {nullptr}
private

Definition at line 61 of file LarEMSamplingFraction.h.

◆ m_energy_inactive_em

std::vector<float>* LarEMSamplingFraction::m_energy_inactive_em {nullptr}
private

Definition at line 64 of file LarEMSamplingFraction.h.

◆ m_energy_inactive_esc

std::vector<float>* LarEMSamplingFraction::m_energy_inactive_esc {nullptr}
private

Definition at line 67 of file LarEMSamplingFraction.h.

◆ m_energy_inactive_inv

std::vector<float>* LarEMSamplingFraction::m_energy_inactive_inv {nullptr}
private

Definition at line 66 of file LarEMSamplingFraction.h.

◆ m_energy_inactive_nonem

std::vector<float>* LarEMSamplingFraction::m_energy_inactive_nonem {nullptr}
private

Definition at line 65 of file LarEMSamplingFraction.h.

◆ m_energy_inactive_total

std::vector<float>* LarEMSamplingFraction::m_energy_inactive_total {nullptr}
private

Definition at line 63 of file LarEMSamplingFraction.h.

◆ m_energy_reco

std::vector<float>* LarEMSamplingFraction::m_energy_reco {nullptr}
private

Definition at line 60 of file LarEMSamplingFraction.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_fSamplKey

SG::ReadCondHandleKey<ILArfSampl> LarEMSamplingFraction::m_fSamplKey {this,"fSamplKey","LArfSamplSym","SG Key of LArfSampl object"}
private

Definition at line 91 of file LarEMSamplingFraction.h.

◆ m_mc_e

double LarEMSamplingFraction::m_mc_e {0.}
private

Definition at line 48 of file LarEMSamplingFraction.h.

◆ m_mc_eta

double LarEMSamplingFraction::m_mc_eta {0.}
private

Definition at line 46 of file LarEMSamplingFraction.h.

◆ m_mc_pdg

int LarEMSamplingFraction::m_mc_pdg {0}
private

Definition at line 45 of file LarEMSamplingFraction.h.

◆ m_mc_phi

double LarEMSamplingFraction::m_mc_phi {0.}
private

Definition at line 47 of file LarEMSamplingFraction.h.

◆ m_mc_pt

double LarEMSamplingFraction::m_mc_pt {0.}
private

Definition at line 49 of file LarEMSamplingFraction.h.

◆ m_mytree

TTree* LarEMSamplingFraction::m_mytree {nullptr}
private

Definition at line 76 of file LarEMSamplingFraction.h.

◆ m_tileCabling

const TileCablingService* LarEMSamplingFraction::m_tileCabling {nullptr}
private

Definition at line 89 of file LarEMSamplingFraction.h.

◆ m_tileCablingSvc

ServiceHandle<TileCablingSvc> LarEMSamplingFraction::m_tileCablingSvc
private
Initial value:
{ this,
"TileCablingSvc", "TileCablingSvc", "Tile cabling service"}

Name of Tile cabling service.

Definition at line 102 of file LarEMSamplingFraction.h.

◆ m_tileHWID

const TileHWID* LarEMSamplingFraction::m_tileHWID {nullptr}
private

Definition at line 88 of file LarEMSamplingFraction.h.

◆ m_tileID

const TileID* LarEMSamplingFraction::m_tileID {nullptr}
private

Definition at line 87 of file LarEMSamplingFraction.h.

◆ m_tileSamplingFractionKey

SG::ReadCondHandleKey<TileSamplingFraction> LarEMSamplingFraction::m_tileSamplingFractionKey
private
Initial value:
{this,
"TileSamplingFraction", "TileSamplingFraction", "Input Tile sampling fraction"}

Name of TileSamplingFraction in condition store.

Definition at line 96 of file LarEMSamplingFraction.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LarEMSamplingFraction::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: LarEMSamplingFraction.h:80
LarEMSamplingFraction::m_tileHWID
const TileHWID * m_tileHWID
Definition: LarEMSamplingFraction.h:88
CaloCalibrationHitContainer
Definition: CaloCalibrationHitContainer.h:25
LarEMSamplingFraction::m_mc_phi
double m_mc_phi
Definition: LarEMSamplingFraction.h:47
LarEMSamplingFraction::m_mc_eta
double m_mc_eta
Definition: LarEMSamplingFraction.h:46
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
LarEMSamplingFraction::m_mc_e
double m_mc_e
Definition: LarEMSamplingFraction.h:48
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
LarEMSamplingFraction::m_energy_inactive_nonem
std::vector< float > * m_energy_inactive_nonem
Definition: LarEMSamplingFraction.h:65
LarEMSamplingFraction::m_energy_active_total
std::vector< float > * m_energy_active_total
Definition: LarEMSamplingFraction.h:70
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LarEMSamplingFraction::m_mc_pdg
int m_mc_pdg
Definition: LarEMSamplingFraction.h:45
LarEMSamplingFraction::m_cell_energy_inactive_total
std::vector< float > * m_cell_energy_inactive_total
Definition: LarEMSamplingFraction.h:55
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LarEMSamplingFraction::m_tileCablingSvc
ServiceHandle< TileCablingSvc > m_tileCablingSvc
Name of Tile cabling service.
Definition: LarEMSamplingFraction.h:102
LarEMSamplingFraction::m_cell_eta
std::vector< float > * m_cell_eta
Definition: LarEMSamplingFraction.h:57
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
CaloDetDescrManager_Base::get_element
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
Definition: CaloDetDescrManager.cxx:159
AtlasHitsVector
Definition: AtlasHitsVector.h:33
McEventCollection
McEventCollection
Definition: GeneratorObjectsTPCnv.cxx:60
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LArHitContainer
Hit collection.
Definition: LArHitContainer.h:26
LarEMSamplingFraction::m_tileSamplingFractionKey
SG::ReadCondHandleKey< TileSamplingFraction > m_tileSamplingFractionKey
Name of TileSamplingFraction in condition store.
Definition: LarEMSamplingFraction.h:96
LarEMSamplingFraction::m_docells
bool m_docells
Definition: LarEMSamplingFraction.h:43
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
LarEMSamplingFraction::m_cell_identifier
std::vector< Long64_t > * m_cell_identifier
Definition: LarEMSamplingFraction.h:51
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
TileHWID::channel
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
Definition: TileHWID.h:189
master.gen
gen
Definition: master.py:32
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
CaloDetDescrElement::eta_raw
float eta_raw() const
cell eta_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:350
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
LarEMSamplingFraction::m_energy_inactive_total
std::vector< float > * m_energy_inactive_total
Definition: LarEMSamplingFraction.h:63
LarEMSamplingFraction::m_CalibrationHitContainerNames
std::vector< std::string > m_CalibrationHitContainerNames
Definition: LarEMSamplingFraction.h:78
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
CaloIdManager::getTileID
const TileID * getTileID(void) const
Definition: CaloIdManager.cxx:100
CaloDetDescrElement::identify
Identifier identify() const override final
cell identifier
Definition: CaloDetDescrElement.cxx:64
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LarEMSamplingFraction::m_energy_active_total_corrected
std::vector< float > * m_energy_active_total_corrected
Definition: LarEMSamplingFraction.h:69
CaloIdManager
This class initializes the Calo (LAr and Tile) offline identifiers.
Definition: CaloIdManager.h:45
LarEMSamplingFraction::m_energy_active_esc
std::vector< float > * m_energy_active_esc
Definition: LarEMSamplingFraction.h:74
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
LarEMSamplingFraction::m_energy_active_inv
std::vector< float > * m_energy_active_inv
Definition: LarEMSamplingFraction.h:73
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
LarEMSamplingFraction::m_calo_id
const CaloCell_ID * m_calo_id
Definition: LarEMSamplingFraction.h:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LarEMSamplingFraction::m_energy_inactive_inv
std::vector< float > * m_energy_inactive_inv
Definition: LarEMSamplingFraction.h:66
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ILArfSampl::FSAMPL
virtual const float & FSAMPL(const HWIdentifier &id) const =0
LarEMSamplingFraction::m_cell_phi
std::vector< float > * m_cell_phi
Definition: LarEMSamplingFraction.h:58
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LarEMSamplingFraction::m_mc_pt
double m_mc_pt
Definition: LarEMSamplingFraction.h:49
createCoolChannelIdFile.channel_id
channel_id
Definition: createCoolChannelIdFile.py:52
MuonSegmentReaderConfig.histSvc
histSvc
Definition: MuonSegmentReaderConfig.py:96
LarEMSamplingFraction::m_cell_energy_active_total_corrected
std::vector< float > * m_cell_energy_active_total_corrected
Definition: LarEMSamplingFraction.h:53
LarEMSamplingFraction::m_tileID
const TileID * m_tileID
Definition: LarEMSamplingFraction.h:87
LarEMSamplingFraction::m_energy_reco
std::vector< float > * m_energy_reco
Definition: LarEMSamplingFraction.h:60
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LarEMSamplingFraction::m_energy_active_em
std::vector< float > * m_energy_active_em
Definition: LarEMSamplingFraction.h:71
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
LarEMSamplingFraction::m_mytree
TTree * m_mytree
Definition: LarEMSamplingFraction.h:76
LarEMSamplingFraction::m_fSamplKey
SG::ReadCondHandleKey< ILArfSampl > m_fSamplKey
Definition: LarEMSamplingFraction.h:91
LarEMSamplingFraction::m_cell_sampling
std::vector< int > * m_cell_sampling
Definition: LarEMSamplingFraction.h:56
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
CaloCalibrationHit
Class to store calorimeter calibration hit.
Definition: CaloCalibrationHit.h:23
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TileHWID::drawerIdx
int drawerIdx(const HWIdentifier &id) const
construct drawer index from HW identifier
Definition: TileHWID.h:175
LarEMSamplingFraction::m_tileCabling
const TileCablingService * m_tileCabling
Definition: LarEMSamplingFraction.h:89
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
TileHit
Definition: TileSimEvent/TileSimEvent/TileHit.h:30
LArHit
Class to store hit energy and time in LAr cell from G4 simulation.
Definition: LArHit.h:25
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloDetDescrElement::getSampling
CaloCell_ID::CaloSample getSampling() const
cell sampling
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:395
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LarEMSamplingFraction::m_cell_energy_active_total
std::vector< float > * m_cell_energy_active_total
Definition: LarEMSamplingFraction.h:54
LarEMSamplingFraction::m_energy_active_nonem
std::vector< float > * m_energy_active_nonem
Definition: LarEMSamplingFraction.h:72
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
HepMC::begin
GenEvent::particle_iterator begin(HepMC::GenEvent &e)
Definition: GenEvent.h:620
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LarEMSamplingFraction::m_energy_inactive_esc
std::vector< float > * m_energy_inactive_esc
Definition: LarEMSamplingFraction.h:67
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
Tile_Base_ID::cell_id
Identifier cell_id(const Identifier &any_id) const
Definition: Tile_Base_ID.cxx:581
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
LarEMSamplingFraction::m_cell_energy_reco
std::vector< float > * m_cell_energy_reco
Definition: LarEMSamplingFraction.h:52
LarEMSamplingFraction::m_energy_hit
std::vector< float > * m_energy_hit
Definition: LarEMSamplingFraction.h:61
LarEMSamplingFraction::m_energy_inactive_em
std::vector< float > * m_energy_inactive_em
Definition: LarEMSamplingFraction.h:64
fitman.k
k
Definition: fitman.py:528
ILArfSampl
Definition: ILArfSampl.h:14
CaloDetDescrElement::phi_raw
float phi_raw() const
cell phi_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:352
TileCablingService::s2h_channel_id
HWIdentifier s2h_channel_id(const Identifier &id) const
Definition: TileCablingService.cxx:1076
ServiceHandle< ITHistSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14