Loading [MathJax]/jax/input/TeX/config.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
29 #include "GaudiKernel/ISvcLocator.h"
30 #include "GaudiKernel/StatusCode.h"
38 #include <CLHEP/Units/SystemOfUnits.h>
59 ISvcLocator* pSvcLocator)
61 m_HadDMCoeffInitFile(
"CaloHadDMCoeff_init_v2.txt"),
62 m_outputTree(nullptr),
63 m_outputFileName(
"DeadMaterialTree.root"),
64 m_outputFile(nullptr),
65 m_clusterCollName(
"CaloTopoClusters"),
66 m_HadDMCoeff(nullptr),
68 m_doSaveCalibClusInfo(false),
129 ATH_MSG_FATAL(
" Error while initializing default dead material coefficients " );
130 return StatusCode::FAILURE;
145 return StatusCode::FAILURE;
167 return StatusCode::SUCCESS;
182 return StatusCode::SUCCESS;
207 HepMC::GenEvent::particle_const_iterator pit = truthEvent->
at(0)->particles_begin();
211 double mc_eta =
gen->momentum().pseudoRapidity();
212 double mc_phi =
gen->momentum().phi();
221 int nClus = pClusColl->
size();
235 for(
int i_cls=0; i_cls<nClus; i_cls++){
252 unsigned int iClus = 0;
253 for( ;clusIter!=clusIterEnd;++clusIter,++iClus) {
263 double mx_calib_tot=0;
266 return StatusCode::FAILURE;
271 double mx_calib_emb0=0, mx_calib_eme0=0, mx_calib_tileg3=0;
275 ATH_MSG_ERROR(
"One of the moment ENG_CALIB_EMB0, ENG_CALIB_EME0, ENG_CALIB_TILEG3 is absent" );
276 return StatusCode::FAILURE;
283 if(pClusColl->
size() != pClusCollCalib->
size()) {
284 ATH_MSG_WARNING(
"Different size of calibrated and uncalibrated cluster collection "
285 << pClusColl->
size() <<
" " << pClusCollCalib->
size() );
286 return StatusCode::SUCCESS;
302 if ( pi0Prob < 0 ) pi0Prob = 0;
303 if ( pi0Prob > 1 ) pi0Prob = 1;
312 return StatusCode::FAILURE;
317 double mx_calib_oocL;
320 return StatusCode::FAILURE;
325 double mx_calib_emfrac;
328 return StatusCode::FAILURE;
338 for(; cellIter != cellIterEnd; cellIter++ ){
339 const CaloCell* pCell = (*cellIter);
350 return StatusCode::FAILURE;
367 return StatusCode::FAILURE;
419 return StatusCode::FAILURE;
433 double edm_uncorrected = 0.0;
457 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
virtual double phi() const
The azimuthal angle ( ) of the particle.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterCollName
Name of the uncalibrated CaloClusterContainer to use.
@ ENG_CALIB_DEAD_UNCLASS
Attached Calibration Hit energy in dead material in unclassified areas of the detector.
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version)
Const iterator class for DataVector/DataList.
std::vector< std::vector< double > > * m_cls_dmener
std::string m_outputFileName
Name of the output file to save tree in.
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
@ EM_PROBABILITY
Classification probability to be em-like.
std::vector< double > * m_cls_lambda
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
@ ENG_CALIB_DEAD_LEAKAGE
Attached Calibration Hit energy in dead material behind calorimeters.
TTree * MakeTree(const char *treename)
std::string m_HadDMCoeffInitFile
Name of text file with initial parameters for coefficients calculation.
@ ENG_CALIB_TILEG3
Calibration Hit energy inside the cluster scintillator.
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
virtual double e() const override final
get energy (data member) (synonym to method energy()
@ ENG_CALIB_EMB0
Calibration Hit energy inside the cluster barrel presampler.
int getSizeAreaSet() const
return number of areas defined for this data set
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
@ ENG_CALIB_DEAD_TILE0
Attached Calibration Hit energy in dead material between EMB3 and TILE0.
const CaloCell_ID * m_calo_id
std::vector< double > * m_cls_phi
std::vector< double > * m_cls_eta
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
std::vector< double > * m_cls_ener
MomentType
Enums to identify different moments.
CaloLocalHadCoeff * InitDataFromFile(const char *fname)
CaloHadDMCoeffData * m_data
data to save into the tree
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
std::vector< double > * m_cls_isol
Description of a calorimeter cluster.
std::vector< std::vector< double > > * m_cls_smpener
virtual double eta() const
The pseudorapidity ( ) of the particle.
std::vector< double > * m_cls_ener_unw
std::pair< std::string, xAOD::CaloCluster::MomentType > moment_name_pair
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< int > * m_cls_recostat
@ ENG_CALIB_TOT
Calibration Hit energy inside the cluster.
@ ENG_CALIB_FRAC_EM
Calibration Hit energy inside the cluster caused by e/gamma/pi0.
@ ISOLATION
Energy weighted fraction of non-clustered perimeter cells.
std::vector< std::vector< double > > * m_cls_smpener_unw
Data to read from special DeadMaterialTree.
@ ENG_CALIB_DEAD_FCAL
Attached Calibration Hit energy in dead material before FCAL, between FCAL and HEC.
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
std::vector< xAOD::CaloCluster::MomentType > m_momentForDMArea
std::vector< double > * m_cls_engcalibpres
const GenParticle * ConstGenParticlePtr
@ ENG_CALIB_EME0
Calibration Hit energy inside the cluster endcap presampler.
std::vector< double > * m_cls_calib_emfrac
CaloRecoStatus & recoStatus()
Accesssor to CaloRecoStatus (non-const)
std::vector< double > * m_cls_engcalib
@ ENG_CALIB_DEAD_HEC0
Attached Calibration Hit energy in dead material between EME3 and HEC0.
Helpers for checking error return status codes and reporting errors.
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
std::vector< moment_name_pair > moment_name_vector
@ ENG_CALIB_DEAD_TILEG3
Attached Calibration Hit energy in dead material before scintillator.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
float eSample(const CaloSample sampling) const
Data object for each calorimeter readout cell.
TFile * m_outputFile
Output file to save tree in.
#define ATH_MSG_WARNING(x)
const std::string & getTitle() const
return name
const_cell_iterator cell_end() const
std::vector< std::vector< double > > * m_cls_eprep
virtual const store_type & getStatusWord() const
retrieve the entire status word
std::vector< double > * m_cls_oocener
TTree * m_outputTree
Output tree.
virtual ~GetLCDeadMaterialTree()
virtual StatusCode initialize()
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterCollNameCalib
Name of the calibrated CaloClusterContainer to use.
std::vector< double > * m_cls_pi0prob
GetLCDeadMaterialTree(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode finalize()
@ ENG_CALIB_OUT_L
Attached Calibration Hit energy outside clusters but inside the calorimeter with loose matching (Angl...
const LocalHadArea * getArea(int n_area) const
return area
@ ENG_CALIB_DEAD_EME0
Attached Calibration Hit energy in dead material before EME0, between EME0 and EME1.
const T * at(size_type n) const
Access an element, as an rvalue.
Handle class for reading from StoreGate.
Double_t m_engClusSumCalib
const_iterator to loop over cells belonging to a cluster
bool m_doSaveCalibClusInfo
save additional cluster info from calibrated collections
virtual StatusCode execute()
size_type size() const noexcept
Returns the number of elements in the collection.
reconstruction status indicator
virtual double e() const
The total energy of the particle.
CaloLocalHadCoeff * m_HadDMCoeff
Collection of dead material correction coeffitients.
@ ENG_CALIB_DEAD_EMB0
Attached Calibration Hit energy in dead material before EMB0, between EMB0 and EMB1.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Int_t m_ncls
current Tree number in a TChain