|
ATLAS Offline Software
|
Go to the documentation of this file.
29 #include "GaudiKernel/ISvcLocator.h"
30 #include "GaudiKernel/StatusCode.h"
45 ISvcLocator* pSvcLocator)
47 m_HadDMCoeffInputFile(
"CaloHadDMCoeff_init_v2.txt"),
48 m_HadDMCoeffOutputFile(
"CaloHadDMCoeff_output.txt"),
49 m_reportProfiles(
"report_CaloHadDMCoeff_profiles.ps"),
50 m_reportMinimization(
"report_CaloHadDMCoeff_minim.ps"),
51 m_reportCheck(
"report_CaloHadDMCoeff_check.ps"),
53 m_doMinimization(false),
57 m_isSingleParticle(true),
58 m_NormalizationTypeForFit(
"Lin"),
59 m_NormalizationTypeForMinim(
"Lin"),
60 m_ClassificationType(
"pdg"),
123 if( !initHadDMCoeff ) {
124 ATH_MSG_FATAL(
" Error while initializing default dead material coefficients " );
125 return StatusCode::FAILURE;
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;
void SetMaxEventsPerFile(int nev)
virtual StatusCode initialize()
std::string m_ClassificationType
use particle id information
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
void make_report(std::string &sfname)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
GetLCDeadMaterial(const std::string &name, ISvcLocator *pSvcLocator)
virtual ~GetLCDeadMaterial()
bool m_doCheck
Do toy reconstruction for final validation of new dead material constants.
void PrintData(const CaloLocalHadCoeff *data, std::ostream &fout)
@ kCLASSIFY_USE_PARTICLEID
int getSizeAreaSet() const
return number of areas defined for this data set
bool m_isTestbeam
H6 combined testbeam flag.
std::string m_NormalizationTypeForFit
Normalization type for fit procedure.
int process(CaloHadDMCoeffData *myData, CaloLocalHadCoeff *myHadDMCoeff, bool isSingleParticle=true, bool tbflag=false)
std::string m_reportCheck
Name of postscript file for results of toy reconstruction.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
CaloLocalHadCoeff * InitDataFromFile(const char *fname)
To fill and fit TProfile histograms using special dead material tree.
std::string m_key
Name of key to write into pool file.
Runs toy reconstruction to validate dead material constants.
void make_report(std::string &sfname)
void make_report(std::string &sfname)
int m_MaxEventsPerFile
number of maximum events to process in one root files
::StatusCode StatusCode
StatusCode definition for legacy code.
Hold binned correction data for local hadronic calibration procedure.
void SetNormalizationType(std::string &stype)
Data to read from special DeadMaterialTree.
CaloLocalHadCoeff * process(CaloHadDMCoeffData *myData, CaloLocalHadCoeff *myHadDMCoeff, bool isSingleParticle=true, bool tbflag=false)
bool m_doFit
Do TProfile fitting.
int getSizeCoeffSet() const
return total number of coefficient sets
std::string m_reportProfiles
Name of postscript file for fit summary.
void SetNormalizationType(std::string &stype)
bool m_doMinimization
Do minimization.
Helpers for checking error return status codes and reporting errors.
bool m_doPool
Do pool writing.
void SetClassificationType(int type)
std::string m_HadDMCoeffOutputFile
Name of text file with calculated coefficients.
virtual StatusCode execute()
bool m_isSingleParticle
data sample contains single particles only
CaloLocalHadCoeff * process(CaloHadDMCoeffData *myData, CaloLocalHadCoeff *myHadDMCoeff, bool isSingleParticle=true, bool tbflag=false)
std::string m_HadDMCoeffInputFile
Name of text file with initial parameters for coefficients calculation.
std::vector< std::string > m_inputRootFiles
List of root files to process.
virtual StatusCode finalize()
std::string m_reportMinimization
Name of postscript file for minimization summary.
std::string m_NormalizationTypeForMinim
Normalization type for minimization procedure.