Commit c3e38b52 authored by clantz's avatar clantz
Browse files

Initialized and reset PWF_histo (processed waveform)

parent c64b5e6f
......@@ -83,7 +83,8 @@ void Detector::SetBranches( TTree *_dataTree ){
void Detector::DeclareHistograms(){
for( uint ch = 0; ch < m_Element.size(); ch++ ){
m_Element.at(ch)->WF_histo = new TH1D(m_Element.at(ch)->name.c_str(), (m_Element.at(ch)->name + ", " + m_Element.at(ch)->detector).c_str(), m_nSamp, 0, m_nSamp);
m_Element.at(ch)->WF_histo = new TH1D( m_Element.at(ch)->name.c_str(), (m_Element.at(ch)->name + ", " + m_Element.at(ch)->detector).c_str(), m_nSamp, 0, m_nSamp);
m_Element.at(ch)->PWF_histo = new TH1D((m_Element.at(ch)->name + " Processed").c_str(), (m_Element.at(ch)->name + ", " + m_Element.at(ch)->detector + " Processed").c_str() , m_nSamp, 0, m_nSamp);
m_Element.at(ch)->FirstDerivative = new TH1D((m_Element.at(ch)->name + " Derivative").c_str(), (m_Element.at(ch)->name + ", " + m_Element.at(ch)->detector + " Derivative").c_str(), m_nSamp, 0, m_nSamp);
}
......@@ -95,6 +96,7 @@ void Detector::DeclareHistograms(){
void Detector::FillHistograms(){
for( uint ch = 0; ch < m_Element.size(); ch++ ){
m_Element.at(ch)->WF_histo->Reset();
m_Element.at(ch)->PWF_histo->Reset();
m_Element.at(ch)->FirstDerivative->Reset();
m_Element.at(ch)->FirstDerivativeRMS = 0;
m_Element.at(ch)->CrossZeroPoints.clear();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment