29#include "GaudiKernel/ISvcLocator.h"
30#include "GaudiKernel/StatusCode.h"
45 ISvcLocator* pSvcLocator)
122 std::unique_ptr<CaloLocalHadCoeff> initHadDMCoeff (dmHelper.
InitDataFromFile(fileName.c_str()));
123 if( !initHadDMCoeff ) {
124 ATH_MSG_FATAL(
" Error while initializing default dead material coefficients " );
125 return StatusCode::FAILURE;
128 ATH_MSG_INFO(
" Number of dead material areas defined:" << initHadDMCoeff->getSizeAreaSet()
129 <<
", total number of correction coefficients:" << initHadDMCoeff->getSizeCoeffSet() );
134 TChain *pChain =
new TChain(
"DeadMaterialTree");
137 return StatusCode::FAILURE;
141 pChain->Add( fname.c_str() );
147 ATH_MSG_INFO(
"Particle ID em fraction will be used to classify clusters:" );
153 std::unique_ptr<CaloLocalHadCoeff> newHadDMCoeffFit;
154 std::unique_ptr<CaloLocalHadCoeff> newHadDMCoeffMinim;
162 if( !newHadDMCoeffFit ) {
165 return StatusCode::FAILURE;
175 if(newHadDMCoeffFit) {
181 if( !newHadDMCoeffMinim ) {
183 return StatusCode::FAILURE;
190 if(newHadDMCoeffMinim) {
192 }
else if(newHadDMCoeffFit) {
224 return StatusCode::SUCCESS;
234 ATH_MSG_INFO(
" Nothing to be done in finalize() method " );
235 return StatusCode::SUCCESS;
245 ATH_MSG_INFO(
" Nothing to be done in execute() method " );
246 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Helpers for checking error return status codes and reporting errors.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
Runs toy reconstruction to validate dead material constants.
int process(CaloHadDMCoeffData *myData, CaloLocalHadCoeff *myHadDMCoeff, bool isSingleParticle=true, bool tbflag=false)
void make_report(std::string &sfname)
Data to read from special DeadMaterialTree.
@ kCLASSIFY_USE_PARTICLEID
To fill and fit TProfile histograms using special dead material tree.
void SetNormalizationType(std::string &stype)
void make_report(std::string &sfname)
CaloLocalHadCoeff * process(CaloHadDMCoeffData *myData, CaloLocalHadCoeff *myHadDMCoeff, bool isSingleParticle=true, bool tbflag=false)
CaloLocalHadCoeff * process(CaloHadDMCoeffData *myData, CaloLocalHadCoeff *myHadDMCoeff, bool isSingleParticle=true, bool tbflag=false)
void SetNormalizationType(std::string &stype)
void make_report(std::string &sfname)
CaloLocalHadCoeff * InitDataFromFile(const char *fname)
void PrintData(const CaloLocalHadCoeff *data, std::ostream &fout)
Hold binned correction data for local hadronic calibration procedure.
virtual ~GetLCDeadMaterial()
std::string m_key
Name of key to write into pool file.
bool m_isTestbeam
H6 combined testbeam flag.
bool m_doFit
Do TProfile fitting.
std::string m_NormalizationTypeForFit
Normalization type for fit procedure.
bool m_doPool
Do pool writing.
GetLCDeadMaterial(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize()
std::string m_reportMinimization
Name of postscript file for minimization summary.
bool m_isSingleParticle
data sample contains single particles only
std::string m_NormalizationTypeForMinim
Normalization type for minimization procedure.
bool m_doMinimization
Do minimization.
bool m_doCheck
Do toy reconstruction for final validation of new dead material constants.
std::string m_HadDMCoeffOutputFile
Name of text file with calculated coefficients.
virtual StatusCode finalize()
std::string m_reportCheck
Name of postscript file for results of toy reconstruction.
virtual StatusCode execute()
std::string m_reportProfiles
Name of postscript file for fit summary.
std::string m_ClassificationType
use particle id information
int m_MaxEventsPerFile
number of maximum events to process in one root files
std::vector< std::string > m_inputRootFiles
List of root files to process.
std::string m_HadDMCoeffInputFile
Name of text file with initial parameters for coefficients calculation.
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)