Skip to content
Snippets Groups Projects
Commit af8f3b05 authored by Michael Duehrssen-Debling's avatar Michael Duehrssen-Debling
Browse files

move the resetting of the hit center position into an independent method

parent 66fff1ab
No related merge requests found
...@@ -41,16 +41,19 @@ public: ...@@ -41,16 +41,19 @@ public:
m_useXYZ=true; m_useXYZ=true;
} }
inline void reset_center(){
m_center_r=0;
m_center_z=0;
m_center_eta=0;
m_center_phi=0;
}
inline void reset(){ inline void reset(){
m_eta_x=0.; m_eta_x=0.;
m_phi_y=0.; m_phi_y=0.;
m_z=0.; m_z=0.;
m_E=0.; m_E=0.;
m_useXYZ=false; m_useXYZ=false;
m_center_r=0;
m_center_z=0;
m_center_eta=0;
m_center_phi=0;
} }
inline float& eta() {return m_eta_x;}; inline float& eta() {return m_eta_x;};
......
...@@ -25,7 +25,10 @@ public: ...@@ -25,7 +25,10 @@ public:
const Chain_t& chain() const {return m_chain;}; const Chain_t& chain() const {return m_chain;};
Chain_t& chain() {return m_chain;}; Chain_t& chain() {return m_chain;};
void push_back( const Chain_t::value_type& value ) {m_chain.push_back(value);}; void push_back( const Chain_t::value_type& value ) {m_chain.push_back(value);};
//TODO: add generic functionality to determine the number of hits or center position only once
// and not for every iteration of the hit chain
/// set which instance should determine the number of hits
virtual void set_number_of_hits_simul(TFCSLateralShapeParametrizationHitBase* sim) {m_number_of_hits_simul=sim;}; virtual void set_number_of_hits_simul(TFCSLateralShapeParametrizationHitBase* sim) {m_number_of_hits_simul=sim;};
/// Call get_number_of_hits() only once, as it could contain a random number /// Call get_number_of_hits() only once, as it could contain a random number
......
...@@ -62,7 +62,8 @@ FCSReturnCode TFCSLateralShapeParametrizationHitChain::simulate(TFCSSimulationSt ...@@ -62,7 +62,8 @@ FCSReturnCode TFCSLateralShapeParametrizationHitChain::simulate(TFCSSimulationSt
} }
int ihit=0; int ihit=0;
TFCSLateralShapeParametrizationHitBase::Hit hit; TFCSLateralShapeParametrizationHitBase::Hit hit;
hit.reset_center();
do { do {
hit.reset(); hit.reset();
hit.E()=Ehit; hit.E()=Ehit;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment