Skip to content

Commit

Permalink
Merge pull request #469 from gundam-organization/fix/varSplitPlot
Browse files Browse the repository at this point in the history
properly grabbing the split value rather than its index :)
nadrino authored Apr 5, 2024

Unverified

This user has not yet uploaded their public signing key.
2 parents fa52200 + 0c5f7dd commit 40a0ccf
Showing 4 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/Applications/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Applications

set( APPLICATION_LIST
set(
APPLICATION_LIST
# GUNDAM apps
gundamFitter
gundamFitReader
@@ -11,7 +12,7 @@ set( APPLICATION_LIST
gundamConfigCompare
gundamPlotExtractor
gundamConfigUnfolder
)
)


if( ENABLE_DEV_MODE )
2 changes: 1 addition & 1 deletion src/Applications/src/gundamCalcXsec.cxx
Original file line number Diff line number Diff line change
@@ -717,7 +717,7 @@ int main(int argc, char** argv){

LogInfo << "Generating xsec sample plots..." << std::endl;
// manual trigger to tweak the error bars
propagator.getPlotGenerator().generateSampleHistograms();
propagator.getPlotGenerator().generateSampleHistograms( GenericToolbox::mkdirTFile(calcXsecDir, "plots/histograms") );

for( auto& histHolder : propagator.getPlotGenerator().getHistHolderList(0) ){
if( not histHolder.isData ){ continue; } // only data will print errors
3 changes: 3 additions & 0 deletions src/DialDictionary/DialEngine/src/EventDialCache.cpp
Original file line number Diff line number Diff line change
@@ -93,7 +93,10 @@ void EventDialCache::buildReferenceCache( SampleSet& sampleSet_, std::vector<Dia
indexCache.event.eventIndex
);

// make sure we don't need extra allocation while emplace_back
cacheEntry.dialResponseCacheList.reserve( countValidDials(indexCache.dials) );

// filling up the dial references
for( auto& dialIndex : indexCache.dials ){
if( dialIndex.collectionIndex == size_t(-1) or dialIndex.interfaceIndex == size_t(-1) ){ continue; }
cacheEntry.dialResponseCacheList.emplace_back(
2 changes: 1 addition & 1 deletion src/SamplesManager/src/PlotGenerator.cpp
Original file line number Diff line number Diff line change
@@ -665,7 +665,7 @@ void PlotGenerator::defineHistogramHolders() {
for( auto& event : samplePtr->getMcContainer().getEventList() ){
for( auto& entry : splitVarsDictionary.entryList ){
if( entry.name.empty() ){ continue; }
int splitValue = event.getVariables().findVarIndex( entry.name );
auto splitValue = int( event.getVariables().getVarList()[event.getVariables().findVarIndex( entry.name )].getVarAsDouble() );
GenericToolbox::addIfNotInVector(splitValue, entry.fetchSample( samplePtr ).splitValueList);
} // splitVarList
} // Event

0 comments on commit 40a0ccf

Please sign in to comment.