|
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "CaloEvent/CaloClusterContainer.h"
19 m_readFileforXcryo(true),
36 return StatusCode::SUCCESS;
55 return StatusCode::FAILURE;
72 const float zCalo = 30000.;
73 float beam_coor_x =
track->getUslope()*zCalo +
track->getUintercept() + xCryo;
74 float beam_coor_y =
track->getVslope()*zCalo +
track->getVintercept();
78 bool sx3 = (beam_coor_x!=0 ||
track->getUintercept()!=0 ||
track->getUslope()!=0 );
82 bool sy3 = (beam_coor_y!=0 ||
track->getVintercept()!=0 ||
track->getVslope()!=0 );
84 if(! (sx1 &&
sx2 && sx3 && sy1 &&
sy2 && sy3)) {
85 ATH_MSG_DEBUG (
"CheckTrackParams failed: "<<sx1<<
" "<<
sx2<<
" "<<sx3<<
" / "<<sy1<<
" "<<
sy2<<
" "<<sy3);
88 setFilterPassed(
false);
89 return StatusCode::SUCCESS;
104 scnum = hit->GetSC();
105 if(scnum <= 0)
continue;
107 ATH_MSG_DEBUG (
"Scint: "<<scnum<<
", track: "<<hit->GetTrackID()<<
", energy: "<<hit->GetEdep());
108 if( (scnum==
m_scint_prim[
i]) && (hit->GetTrackID() == 1) && (hit->GetEdep() > 0.)) {
109 has_energy[
i] =
true;
117 scnum = hit->GetSC();
118 if(scnum <= 0)
continue;
120 ATH_MSG_DEBUG (
"Scint: "<<scnum<<
", track: "<<hit->GetTrackID()<<
", energy: "<<hit->GetEdep());
121 if( (scnum==
m_scint_prim[
i]) && (hit->GetTrackID() == 1) && (hit->GetEdep() > 0.)) {
122 has_energy[
i] =
true;
128 ATH_MSG_DEBUG (
"CheckPrimaryTrack failed, no energy deposit in all asked scint." );
131 setFilterPassed(
false);
132 return StatusCode::SUCCESS;
141 scnum = hit->GetSC();
142 if(scnum <= 0)
continue;
143 if(hit->GetSC() == 5 && (hit->GetTrackID() == 1)) {
147 setFilterPassed(
false);
148 return StatusCode::SUCCESS;
160 unsigned int cSize = theCluster->getClusterSize();
161 if(cL != 0 && eD > 0. && cSize > 1) {
168 setFilterPassed(
false);
169 return StatusCode::SUCCESS;
175 const TBTrack* mytrack =
nullptr;
183 setFilterPassed(
false);
184 return StatusCode::SUCCESS;
190 setFilterPassed(
false);
191 return StatusCode::SUCCESS;
195 setFilterPassed(
true);
196 return StatusCode::SUCCESS;
201 return StatusCode::SUCCESS;
208 std::string m_txtFileWithXY =
"xcryo_ytable.txt";
211 std::ifstream xyFile;
215 if (!xyFile.is_open()) {
216 ATH_MSG_ERROR (
"File " << m_txtFileWithXY <<
" fail to open in $DATAPATH");
217 return StatusCode::FAILURE;
219 while ( getline(xyFile,
line,
'\n') ) {
221 std::istringstream buf(
line);
223 buf >>
run >>
x >>
y >>
e;
225 if (
run==
m_nRun && xyFile.good())
return StatusCode::SUCCESS;
227 return StatusCode::FAILURE;
def retrieve(aClass, aKey=None)
std::vector< int > m_scint_prim
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
double getUintercept() const
Storable container for CaloCluster.
unsigned int getRunNum() const
double getCryoHitv() const
int run(int argc, char *argv[])
#define ATH_MSG_VERBOSE(x)
@ FIRST_ENG_DENS
First Moment in E/V.
TBBeamQualityMC(const std::string &name, ISvcLocator *pSvcLocator)
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode initialize() override
double getCryoHitu() const
double chi2(TH1 *h0, TH1 *h1)
Principal data class for CaloCell clusters.
std::string m_clusterCollName
virtual StatusCode finalize() override
StatusCode getXcryoYtable(float &x, float &y, float &eBeam)
double getVintercept() const
bool m_readFileforXcryo
Get Xcryo and Ytable from a text file.
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
float getBeamMomentum() const
virtual StatusCode execute() override