43 return StatusCode::SUCCESS;
62 return StatusCode::FAILURE;
78 m_beam_coor_x = track->getUslope()*zCalo + track->getUintercept() + xCryo;
79 m_beam_coor_y = track->getVslope()*zCalo + track->getVintercept();
89 ATH_MSG_VERBOSE (
"track->getUintercept() = " << track->getUintercept() );
96 return StatusCode::SUCCESS;
101 return StatusCode::SUCCESS;
105 std::string retval(
base);
106 for (
unsigned i=0;i<extension.size();i++) {
107 const char& ch=extension[i];
108 if (ch==
'=' || ch==
':' || ch==
'/')
124 std::string txtFileWithXY =
"xcryo_ytable.txt";
127 std::ifstream xyFile;
130 xyFile.open(filename.c_str());
131 if (!xyFile.is_open()) {
132 ATH_MSG_ERROR (
"File " << txtFileWithXY <<
" fail to open in $DATAPATH");
133 return StatusCode::FAILURE;
135 while ( getline(xyFile, line,
'\n') ) {
137 std::istringstream buf(line);
139 buf >>
run >>
x >>
y >> e;
141 if (
run==
m_nRun && xyFile.good())
return StatusCode::SUCCESS;
143 return StatusCode::FAILURE;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
virtual StatusCode CBNT_initialize() override
bool m_readFileforXcryo
Get Xcryo and Ytable from a text file.
CBNTAA_TBTrack(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode CBNT_finalize() override
std::string add_name(const char *base, const std::string &extension)
StatusCode getXcryoYtable(float &x, float &y, float &eBeam)
virtual StatusCode CBNT_execute() override
void addBranch(const std::string &branchname, T &obj, const std::string &leaflist)
CBNT_TBRecBase(const std::string &name, ISvcLocator *pSvcLocator)
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
float getBeamMomentum() const
unsigned int getRunNum() const