Commit ac1a166b authored by Georg Auzinger's avatar Georg Auzinger
Browse files

some formatting changes

parent 3a158648
......@@ -7,14 +7,14 @@
<Module FeId="0" FMCId="0" ModuleId="0" Status="1">
<CBC_Files path="./settings/"/>
<CBC Id="0" configfile="Cbc_default_hole.txt"/>
<CBC Id="1" configfile="Cbc_default_hole.txt"/>
<CBC Id="2" configfile="Cbc_default_hole.txt"/>
<CBC Id="3" configfile="Cbc_default_hole.txt"/>
<CBC Id="4" configfile="Cbc_default_hole.txt"/>
<CBC Id="5" configfile="Cbc_default_hole.txt"/>
<CBC Id="6" configfile="Cbc_default_hole.txt"/>
<CBC Id="7" configfile="Cbc_default_hole.txt"/>
<CBC Id="0" configfile="Cbc_default_electron.txt"/>
<CBC Id="1" configfile="Cbc_default_electron.txt"/>
<CBC Id="2" configfile="Cbc_default_electron.txt"/>
<CBC Id="3" configfile="Cbc_default_electron.txt"/>
<CBC Id="4" configfile="Cbc_default_electron.txt"/>
<CBC Id="5" configfile="Cbc_default_electron.txt"/>
<CBC Id="6" configfile="Cbc_default_electron.txt"/>
<CBC Id="7" configfile="Cbc_default_electron.txt"/>
</Module>
<!-- Commissioning Mode -->
......@@ -67,10 +67,10 @@
</HwDescription>
<Settings>
<Setting name="TargetVcth"> 0x78 </Setting>
<Setting name="TargetVcth"> 0x80 </Setting>
<Setting name="Nevents"> 10 </Setting>
<Setting name="EnableTestPulse"> 0 </Setting>
<Setting name="TestPulsePotentiometer"> 0xF1 </Setting>
<Setting name="HoleMode"> 1 </Setting>
<Setting name="FitSCurves"> 1 </Setting>
<Setting name="HoleMode"> 0 </Setting>
<Setting name="FitSCurves"> 0 </Setting>
</Settings>
......@@ -26,7 +26,7 @@
<!-- Trigger -->
<!-- set to 1 to use external triggers -->
<Register name="user_wb_ttc_fmc_regs.pc_commands.TRIGGER_SEL"> 0 </Register>
<Register name="user_wb_ttc_fmc_regs.pc_commands.INT_TRIGGER_FREQ"> 4 </Register>
<Register name="user_wb_ttc_fmc_regs.pc_commands.INT_TRIGGER_FREQ"> 8 </Register>
<!-- DIO5 threshold: [v]/3.3*256 -->
<Register name="user_wb_ttc_fmc_regs.dio5.fmcdio5_threshold_trig_in"> 40 </Register>
<!-- set to 0 for rising edge, 1 for falling -->
......@@ -66,11 +66,11 @@
<Settings>
<Setting name="HoleMode"> 1 </Setting>
<Setting name="Nevents" > 10 </Setting>
<Setting name="Vplus" > 0x26 </Setting>
<Setting name="TPAmplitude" > 0xD5 </Setting>
<Setting name="Vplus" > 0x50 </Setting>
<Setting name="TPAmplitude" > 0x0C </Setting>
<!-- <Setting name="Channel" > 1 </Setting> -->
<Setting name="TestGroup" > 1 </Setting>
<Setting name="ChannelOffset" > 0x04 </Setting>
<Setting name="ChannelOffset" > 0x40 </Setting>
<Setting name="StepSize" > 5 </Setting>
<Setting name="FitSCurves" > 0 </Setting>
</Settings>
......@@ -3,60 +3,60 @@
void PulseShape::Initialize()
{
fNCbc = 0;
std::cerr << "void PulseShape::Initialize()" << std::endl;
for ( auto& cShelve : fShelveVector )
{
uint32_t cShelveId = cShelve->getShelveId();
std::cerr << "cShelveId = " << cShelveId << std::endl;
for ( auto& cBoard : cShelve->fBoardVector )
{
uint32_t cBoardId = cBoard->getBeId();
std::cerr << "cBoardId = " << cBoardId << std::endl;
// we could read the Delay_after_TestPulse Register in a variable
uint32_t cDelayAfterPulse = fBeBoardInterface->ReadBoardReg( cBoard, DELAY_AF_TEST_PULSE );
fDelayAfterPulse = cDelayAfterPulse;
std::cout << "actual Delay: " << +cDelayAfterPulse << std::endl;
for ( auto& cFe : cBoard->fModuleVector )
{
uint32_t cFeId = cFe->getFeId();
std::cerr << "cFeId = " << cFeId << std::endl;
for ( auto& cCbc : cFe->fCbcVector )
{
uint32_t cCbcId = cCbc->getCbcId();
std::cerr << "cCbcId = " << cCbcId << std::endl;
fNCbc++;
// Create the Canvas to draw
TCanvas* ctmpCanvas = new TCanvas( Form( "c_online_canvas_fe%dcbc%d", cFeId, cCbcId ), Form( "FE%dCBC%d Online Canvas", cFeId, cCbcId ) );
ctmpCanvas->Divide( 2, 1 );
fCanvasMap[cCbc] = ctmpCanvas;
TH2I* cFrame = new TH2I( "cFrame", "PulseShape; Delay [ns]; Amplitude [VCth]", 350, 4950, 5300, 255, 0, 255 );
cFrame->SetStats( false );
ctmpCanvas->cd( 2 );
cFrame->Draw( );
bookHistogram( cCbc, "frame", cFrame );
std::cerr << "Initializing map fCanvasMap[" << Form( "0x%x", cCbc ) << "] = " << Form( "0x%x", ctmpCanvas ) << std::endl;
// Create Multigraph Object for each CBC
TString cName = Form( "g_cbc_pulseshape_MultiGraph_Fe%dCbc%d", cFeId, cCbcId );
TObject* cObj = gROOT->FindObject( cName );
if ( cObj ) delete cObj;
TMultiGraph* cMultiGraph = new TMultiGraph();
cMultiGraph->SetName( cName );
bookHistogram( cCbc, "cbc_pulseshape", cMultiGraph );
cName = Form( "f_cbc_pulse_Fe%dCbc%d", cFeId, cCbcId );
cObj = gROOT->FindObject( cName );
if ( cObj ) delete cObj;
}
}
}
}
parseSettings();
std::cout << "Histograms and Settings initialised." << std::endl;
fNCbc = 0;
std::cerr << "void PulseShape::Initialize()" << std::endl;
for ( auto& cShelve : fShelveVector )
{
uint32_t cShelveId = cShelve->getShelveId();
std::cerr << "cShelveId = " << cShelveId << std::endl;
for ( auto& cBoard : cShelve->fBoardVector )
{
uint32_t cBoardId = cBoard->getBeId();
std::cerr << "cBoardId = " << cBoardId << std::endl;
// we could read the Delay_after_TestPulse Register in a variable
uint32_t cDelayAfterPulse = fBeBoardInterface->ReadBoardReg( cBoard, DELAY_AF_TEST_PULSE );
fDelayAfterPulse = cDelayAfterPulse;
std::cout << "actual Delay: " << +cDelayAfterPulse << std::endl;
for ( auto& cFe : cBoard->fModuleVector )
{
uint32_t cFeId = cFe->getFeId();
std::cerr << "cFeId = " << cFeId << std::endl;
for ( auto& cCbc : cFe->fCbcVector )
{
uint32_t cCbcId = cCbc->getCbcId();
std::cerr << "cCbcId = " << cCbcId << std::endl;
fNCbc++;
// Create the Canvas to draw
TCanvas* ctmpCanvas = new TCanvas( Form( "c_online_canvas_fe%dcbc%d", cFeId, cCbcId ), Form( "FE%dCBC%d Online Canvas", cFeId, cCbcId ) );
ctmpCanvas->Divide( 2, 1 );
fCanvasMap[cCbc] = ctmpCanvas;
TH2I* cFrame = new TH2I( "cFrame", "PulseShape; Delay [ns]; Amplitude [VCth]", 350, 4950, 5300, 255, 0, 255 );
cFrame->SetStats( false );
ctmpCanvas->cd( 2 );
cFrame->Draw( );
bookHistogram( cCbc, "frame", cFrame );
std::cerr << "Initializing map fCanvasMap[" << Form( "0x%x", cCbc ) << "] = " << Form( "0x%x", ctmpCanvas ) << std::endl;
// Create Multigraph Object for each CBC
TString cName = Form( "g_cbc_pulseshape_MultiGraph_Fe%dCbc%d", cFeId, cCbcId );
TObject* cObj = gROOT->FindObject( cName );
if ( cObj ) delete cObj;
TMultiGraph* cMultiGraph = new TMultiGraph();
cMultiGraph->SetName( cName );
bookHistogram( cCbc, "cbc_pulseshape", cMultiGraph );
cName = Form( "f_cbc_pulse_Fe%dCbc%d", cFeId, cCbcId );
cObj = gROOT->FindObject( cName );
if ( cObj ) delete cObj;
}
}
}
}
parseSettings();
std::cout << "Histograms and Settings initialised." << std::endl;
}
......@@ -66,120 +66,120 @@ void PulseShape::ScanTestPulseDelay( uint8_t pStepSize )
{
// setSystemTestPulse(fTPAmplitude, fChannelId);
// enableChannel(fChannelId);
setSystemTestPulse( fTPAmplitude/*, 0 */ );
enableTestGroup();
// initialize the historgram for the channel map
int cCoarseDefault = 201;
int cLow = ( cCoarseDefault - 1 ) * 25;
int cHigh = ( cCoarseDefault + 8 ) * 25;
for ( uint32_t cTestPulseDelay = cLow ; cTestPulseDelay < cHigh; cTestPulseDelay += fStepSize )
{
setDelayAndTesGroup( cTestPulseDelay );
ScanVcth( cTestPulseDelay );
}
// setSystemTestPulse(fTPAmplitude, fChannelId);
// enableChannel(fChannelId);
setSystemTestPulse( fTPAmplitude/*, 0 */ );
enableTestGroup();
// initialize the historgram for the channel map
int cCoarseDefault = 201;
int cLow = ( cCoarseDefault - 1 ) * 25;
int cHigh = ( cCoarseDefault + 8 ) * 25;
for ( uint32_t cTestPulseDelay = cLow ; cTestPulseDelay < cHigh; cTestPulseDelay += fStepSize )
{
setDelayAndTesGroup( cTestPulseDelay );
ScanVcth( cTestPulseDelay );
}
this->fitGraph( cLow );
updateHists( "cbc_pulseshape", true );
this->fitGraph( cLow );
updateHists( "cbc_pulseshape", true );
}
void PulseShape::ScanVcth( uint32_t pDelay )
{
for ( auto& cChannelVector : fChannelMap )
for ( auto& cChannel : cChannelVector.second )
cChannel->initializeHist( pDelay, "Delay" );
uint8_t cVcth = ( fHoleMode ) ? 0xFF : 0x00;
int cStep = ( fHoleMode ) ? -10 : +10;
uint32_t cAllOneCounter = 0;
bool cAllOne = false;
bool cNonZero = false;
bool cSaturate = false;
uint8_t cDoubleVcth;
// Adaptive VCth loop
while ( 0x00 <= cVcth && cVcth <= 0xFF )
{
if ( cAllOne ) break;
if ( cVcth == cDoubleVcth )
{
cVcth += cStep;
continue;
}
// if ( cAllOne ) break;
CbcRegWriter cWriter( fCbcInterface, "VCth", cVcth );
this->accept( cWriter );
// then we take fNEvents
uint32_t cN = 1;
uint32_t cNthAcq = 0;
int cNHits = 0;
// Take Data for all Modules
for ( auto& cShelve : fShelveVector )
{
for ( BeBoard* pBoard : cShelve->fBoardVector )
{
fBeBoardInterface->Start( pBoard );
while ( cN <= fNevents )
{
cN += fBeBoardInterface->ReadData( pBoard, cNthAcq, false );
const std::vector<Event*>& events = fBeBoardInterface->GetEvents( pBoard );
for ( auto& cEvent : events )
cNHits += fillVcthHist( pBoard, cEvent, cVcth );
cNthAcq++;
}
fBeBoardInterface->Stop( pBoard, cNthAcq );
if ( !cNonZero && cNHits != 0 )
{
cNonZero = true;
cDoubleVcth = cVcth;
int cBackStep = 2 * cStep;
if ( int( cVcth ) - cBackStep > 255 ) cVcth = 255;
else if ( int( cVcth ) - cBackStep < 0 ) cVcth = 0;
else cVcth -= cBackStep;
cStep /= 10;
continue;
}
if ( cNHits > 0.95 * fNCbc * fNevents * findChannelsInTestGroup( fTestGroup ).size() )
cAllOneCounter++;
if ( cAllOneCounter > 6 ) cAllOne = true;
if ( cAllOne )
break;
cVcth += cStep;
updateHists( "", false );
if ( fHoleMode && cVcth >= 0xFE && cNHits != 0 )
{
cSaturate = true;
break;
}
if ( !fHoleMode && cVcth <= 0x01 && cNHits != 0 )
{
cSaturate = true;
break;
}
}
}
}
for ( auto& cChannelVector : fChannelMap )
{
for ( auto& cChannel : cChannelVector.second )
{
if ( fFitHist ) cChannel->fitHist( fNevents, fHoleMode, pDelay, "Delay", fResultFile );
else cChannel->differentiateHist( fNevents, fHoleMode, pDelay, "Delay", fResultFile );
if ( !cSaturate ) cChannel->setPulsePoint( pDelay, cChannel->getPedestal() );
else cChannel->setPulsePoint( pDelay, 255 );
}
}
updateHists( "", true );
updateHists( "cbc_pulseshape", false );
for ( auto& cChannelVector : fChannelMap )
for ( auto& cChannel : cChannelVector.second )
cChannel->initializeHist( pDelay, "Delay" );
uint8_t cVcth = ( fHoleMode ) ? 0xFF : 0x00;
int cStep = ( fHoleMode ) ? -10 : +10;
uint32_t cAllOneCounter = 0;
bool cAllOne = false;
bool cNonZero = false;
bool cSaturate = false;
uint8_t cDoubleVcth;
// Adaptive VCth loop
while ( 0x00 <= cVcth && cVcth <= 0xFF )
{
if ( cAllOne ) break;
if ( cVcth == cDoubleVcth )
{
cVcth += cStep;
continue;
}
// if ( cAllOne ) break;
CbcRegWriter cWriter( fCbcInterface, "VCth", cVcth );
this->accept( cWriter );
// then we take fNEvents
uint32_t cN = 1;
uint32_t cNthAcq = 0;
int cNHits = 0;
// Take Data for all Modules
for ( auto& cShelve : fShelveVector )
{
for ( BeBoard* pBoard : cShelve->fBoardVector )
{
fBeBoardInterface->Start( pBoard );
while ( cN <= fNevents )
{
cN += fBeBoardInterface->ReadData( pBoard, cNthAcq, false );
const std::vector<Event*>& events = fBeBoardInterface->GetEvents( pBoard );
for ( auto& cEvent : events )
cNHits += fillVcthHist( pBoard, cEvent, cVcth );
cNthAcq++;
}
fBeBoardInterface->Stop( pBoard, cNthAcq );
if ( !cNonZero && cNHits != 0 )
{
cNonZero = true;
cDoubleVcth = cVcth;
int cBackStep = 2 * cStep;
if ( int( cVcth ) - cBackStep > 255 ) cVcth = 255;
else if ( int( cVcth ) - cBackStep < 0 ) cVcth = 0;
else cVcth -= cBackStep;
cStep /= 10;
continue;
}
if ( cNHits > 0.95 * fNCbc * fNevents * findChannelsInTestGroup( fTestGroup ).size() )
cAllOneCounter++;
if ( cAllOneCounter > 6 ) cAllOne = true;
if ( cAllOne )
break;
cVcth += cStep;
updateHists( "", false );
if ( fHoleMode && cVcth >= 0xFE && cNHits != 0 )
{
cSaturate = true;
break;
}
if ( !fHoleMode && cVcth <= 0x01 && cNHits != 0 )
{
cSaturate = true;
break;
}
}
}
}
for ( auto& cChannelVector : fChannelMap )
{
for ( auto& cChannel : cChannelVector.second )
{
if ( fFitHist ) cChannel->fitHist( fNevents, fHoleMode, pDelay, "Delay", fResultFile );
else cChannel->differentiateHist( fNevents, fHoleMode, pDelay, "Delay", fResultFile );
if ( !cSaturate ) cChannel->setPulsePoint( pDelay, cChannel->getPedestal() );
else cChannel->setPulsePoint( pDelay, 255 );
}
}
updateHists( "", true );
updateHists( "cbc_pulseshape", false );
}
......@@ -190,46 +190,46 @@ void PulseShape::ScanVcth( uint32_t pDelay )
void PulseShape::fitGraph( int pLow )
{
for ( auto& cCbc : fChannelMap )
{
for ( auto& cChannel : cCbc.second )
{
TString cName = Form( "f_cbc_pulse_Fe%dCbc%d_Channel%d", cCbc.first->getFeId(), cCbc.first->getCbcId(), cChannel->fChannelId );
TObject* cObj = gROOT->FindObject( cName );
if ( cObj ) delete cObj;
//TF1* cPulseFit = new TF1( cName, pulseshape, ( fDelayAfterPulse - 1 ) * 25, ( fDelayAfterPulse + 6 ) * 25, 6 );
TF1* cPulseFit = new TF1( cName, pulseshape, 5000, 5300, 6 );
cPulseFit->SetParNames( "Amplitude", "t_0", "tau", "Amplitude offset", "Rel. negative pulse amplitude", "Delta t" );
//"scale_par"
cPulseFit->SetParLimits( 0, 160, 2000 );
cPulseFit->SetParameter( 0, 250 );
//"offset"
cPulseFit->SetParLimits( 1, 5000, 5300 );
cPulseFit->SetParameter( 1, 5025 );
//"time_constant"
cPulseFit->SetParLimits( 2, 25, 75 );
cPulseFit->SetParameter( 2, 50 );
//"y_offset"
cPulseFit->SetParLimits( 3, 0, 200 );
cPulseFit->SetParameter( 3, 50 );
//"Relative amplitude of negative pulse"
cPulseFit->SetParameter( 4, 0.5 );
cPulseFit->SetParLimits( 4, 0, 1 );
//delta t
cPulseFit->FixParameter( 5, 50 );
cChannel->fPulse->Fit( cPulseFit, "R+S" );
TString cDirName = "PulseshapeFits";
TDirectory* cDir = dynamic_cast< TDirectory* >( gROOT->FindObject( cDirName ) );
if ( !cDir ) cDir = fResultFile->mkdir( cDirName );
fResultFile->cd( cDirName );
cChannel->fPulse->Write( cChannel->fPulse->GetName(), TObject::kOverwrite );
cPulseFit->Write( cPulseFit->GetName(), TObject::kOverwrite );
fResultFile->cd();
}
}
for ( auto& cCbc : fChannelMap )
{
for ( auto& cChannel : cCbc.second )
{
TString cName = Form( "f_cbc_pulse_Fe%dCbc%d_Channel%d", cCbc.first->getFeId(), cCbc.first->getCbcId(), cChannel->fChannelId );
TObject* cObj = gROOT->FindObject( cName );
if ( cObj ) delete cObj;
//TF1* cPulseFit = new TF1( cName, pulseshape, ( fDelayAfterPulse - 1 ) * 25, ( fDelayAfterPulse + 6 ) * 25, 6 );
TF1* cPulseFit = new TF1( cName, pulseshape, 5000, 5300, 6 );
cPulseFit->SetParNames( "Amplitude", "t_0", "tau", "Amplitude offset", "Rel. negative pulse amplitude", "Delta t" );
//"scale_par"
cPulseFit->SetParLimits( 0, 160, 2000 );
cPulseFit->SetParameter( 0, 250 );
//"offset"
cPulseFit->SetParLimits( 1, 5000, 5300 );
cPulseFit->SetParameter( 1, 5025 );
//"time_constant"
cPulseFit->SetParLimits( 2, 25, 75 );
cPulseFit->SetParameter( 2, 50 );
//"y_offset"
cPulseFit->SetParLimits( 3, 0, 200 );
cPulseFit->SetParameter( 3, 50 );
//"Relative amplitude of negative pulse"
cPulseFit->SetParameter( 4, 0.5 );
cPulseFit->SetParLimits( 4, 0, 1 );
//delta t
cPulseFit->FixParameter( 5, 50 );
cChannel->fPulse->Fit( cPulseFit, "R+S" );
TString cDirName = "PulseshapeFits";
TDirectory* cDir = dynamic_cast< TDirectory* >( gROOT->FindObject( cDirName ) );
if ( !cDir ) cDir = fResultFile->mkdir( cDirName );
fResultFile->cd( cDirName );
cChannel->fPulse->Write( cChannel->fPulse->GetName(), TObject::kOverwrite );
cPulseFit->Write( cPulseFit->GetName(), TObject::kOverwrite );
fResultFile->cd();
}
}
}
......@@ -239,15 +239,15 @@ std::vector<uint32_t> PulseShape::findChannelsInTestGroup( uint32_t pTestGroup )
{
std::vector<uint32_t> cChannelVector;
for ( int idx = 0; idx < 16; idx++ )
{
int ctemp1 = idx * 16 + pTestGroup * 2 + 1 ;
int ctemp2 = ctemp1 + 1;
if ( ctemp1 < 254 ) cChannelVector.push_back( ctemp1 );
if ( ctemp2 < 254 ) cChannelVector.push_back( ctemp2 );
}
return cChannelVector;
std::vector<uint32_t> cChannelVector;
for ( int idx = 0; idx < 16; idx++ )
{
int ctemp1 = idx * 16 + pTestGroup * 2 + 1 ;
int ctemp2 = ctemp1 + 1;
if ( ctemp1 < 254 ) cChannelVector.push_back( ctemp1 );
if ( ctemp2 < 254 ) cChannelVector.push_back( ctemp2 );
}
return cChannelVector;
......@@ -256,238 +256,238 @@ std::vector<uint32_t> PulseShape::findChannelsInTestGroup( uint32_t pTestGroup )
void PulseShape::enableTestGroup( )
{
std::vector<std::pair<std::string, uint8_t> > cRegVec;
for ( auto& cChannel : fChannelVector )
{
TString cRegName = Form( "Channel%03d", cChannel );
cRegVec.push_back( std::make_pair( cRegName.Data(), fOffset ) );
}
CbcMultiRegWriter cWriter( fCbcInterface, cRegVec );
this->accept( cWriter );
std::vector<std::pair<std::string, uint8_t> > cRegVec;
for ( auto& cChannel : fChannelVector )
{
TString cRegName = Form( "Channel%03d", cChannel );
cRegVec.push_back( std::make_pair( cRegName.Data(), fOffset ) );
}
CbcMultiRegWriter cWriter( fCbcInterface, cRegVec );
this->accept( cWriter );
}
void PulseShape::setDelayAndTesGroup( uint32_t pDelay )
{
uint8_t cCoarseDelay = floor( pDelay / 25 );
uint8_t cFineDelay = ( cCoarseDelay * 25 ) + 24 - pDelay;
uint8_t cCoarseDelay = floor( pDelay / 25 );
uint8_t cFineDelay = ( cCoarseDelay * 25 ) + 24 - pDelay;
std::cout << "cFineDelay: " << +cFineDelay << std::endl;
std::cout << "cCoarseDelay: " << +cCoarseDelay << std::endl;
std::cout << "Current Time: " << +pDelay << std::endl;
BeBoardRegWriter cBeBoardWriter( fBeBoardInterface, DELAY_AF_TEST_PULSE, cCoarseDelay );
this->accept( cBeBoardWriter );
CbcRegWriter cWriter( fCbcInterface, "SelTestPulseDel&ChanGroup", to_reg( cFineDelay, fTestGroup ) );
this->accept( cWriter );
std::cout << "cFineDelay: " << +cFineDelay << std::endl;
std::cout << "cCoarseDelay: " << +cCoarseDelay << std::endl;
std::cout << "Current Time: " << +pDelay << std::endl;
BeBoardRegWriter cBeBoardWriter( fBeBoardInterface, DELAY_AF_TEST_PULSE, cCoarseDelay );
this->accept( cBeBoardWriter );
CbcRegWriter cWriter( fCbcInterface, "SelTestPulseDel&ChanGroup", to_reg( cFineDelay, fTestGroup ) );
this->accept( cWriter );
}
uint32_t PulseShape::fillVcthHist( BeBoard* pBoard, Event* pEvent, uint32_t pVcth )
{
uint32_t cHits = 0;
// Loop over Events from this Acquisition
for ( auto cFe : pBoard->fModuleVector )
{
for ( auto cCbc : cFe->fCbcVector )
{
// get histogram to fill
auto cChannelVector = fChannelMap.find( cCbc );
if ( cChannelVector == std::end( fChannelMap ) ) std::cout << "Error, no channel vector mapped to this CBC ( " << +cCbc->getCbcId() << " )" << std::endl;
else
{
for ( auto& cChannel : cChannelVector->second )
{
if ( pEvent->DataBit( cFe->getFeId(), cCbc->getCbcId(), cChannel->fChannelId - 1 ) )
{
cChannel->fillHist( pVcth );
cHits++;
}
}
}
}
return cHits;
}
uint32_t cHits = 0;
// Loop over Events from this Acquisition
for ( auto cFe : pBoard->fModuleVector )
{
for ( auto cCbc : cFe->fCbcVector )
{
// get histogram to fill