Skip to content
Merged
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2022-2025 Eventdisplay Developers
Copyright (c) 2022-2026 Eventdisplay Developers
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
55 changes: 0 additions & 55 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ all VTS: evndisp \
VTS.getRunListFromDB \
VTS.getLaserRunFromDB \
VTS.getRun_TimeElevAzim \
writeParticleRateFilesForTMVA \
writelaserinDB \
logFile \
printCrabSensitivity \
Expand Down Expand Up @@ -1060,60 +1059,6 @@ writeVTSWPPhysSensitivityFiles: $(WRITEVTSPHYSOBJ)
$(LD) $(LDFLAGS) $^ $(GLIBS) $(OutPutOpt) ./bin/$@
@echo "$@ done"

########################################################
# writeParticleRateFilesForTMVA
########################################################
WRITEPARTPHYSOBJ= ./obj/writeParticleRateFilesForTMVA.o \
./obj/VGlobalRunParameter.o ./obj/VGlobalRunParameter_Dict.o \
./obj/CRunSummary.o ./obj/CRunSummary_Dict.o \
./obj/VAstronometry.o ./obj/VAstronometry_Dict.o \
./obj/VInstrumentResponseFunctionReader.o ./obj/VInstrumentResponseFunctionReader_Dict.o \
./obj/VSensitivityCalculator.o ./obj/VSensitivityCalculator_Dict.o \
./obj/CEffArea.o ./obj/CEffArea_Dict.o \
./obj/VAnalysisUtilities.o ./obj/VAnalysisUtilities_Dict.o \
./obj/VHistogramUtilities.o ./obj/VHistogramUtilities_Dict.o \
./obj/VInstrumentResponseFunctionData.o ./obj/VInstrumentResponseFunctionData_Dict.o \
./obj/VPlotUtilities.o ./obj/VPlotUtilities_Dict.o \
./obj/VGammaHadronCuts.o ./obj/VGammaHadronCuts_Dict.o \
./obj/VGammaHadronCutsStatistics.o ./obj/VGammaHadronCutsStatistics_Dict.o \
./obj/VTMVAEvaluator.o ./obj/VTMVAEvaluator_Dict.o \
./obj/VTMVARunDataEnergyCut.o ./obj/VTMVARunDataEnergyCut_Dict.o \
./obj/VTMVARunDataZenithCut.o ./obj/VTMVARunDataZenithCut_Dict.o \
./obj/VInstrumentResponseFunctionRunParameter.o ./obj/VInstrumentResponseFunctionRunParameter_Dict.o \
./obj/Ctelconfig.o ./obj/CData.o \
./obj/VTMVADispAnalyzer.o ./obj/VMeanScaledVariables.o \
./obj/VDispAnalyzer.o ./obj/VDispTableReader.o ./obj/VDispTableReader_Dict.o ./obj/VDispTableAnalyzer.o \
./obj/VEmissionHeightCalculator.o ./obj/VSimpleStereoReconstructor.o ./obj/VGrIsuAnalyzer.o \
./obj/VSpectralFitter.o ./obj/VSpectralFitter_Dict.o \
./obj/VEnergyThreshold.o ./obj/VEnergyThreshold_Dict.o \
./obj/VRunList.o ./obj/VRunList_Dict.o \
./obj/VEnergySpectrumfromLiterature.o ./obj/VEnergySpectrumfromLiterature_Dict.o \
./obj/VEnergySpectrum.o ./obj/VEnergySpectrum_Dict.o \
./obj/VMathsandFunctions.o ./obj/VMathsandFunctions_Dict.o \
./obj/VDifferentialFlux.o ./obj/VDifferentialFlux_Dict.o \
./obj/VMonteCarloRateCalculator.o ./obj/VMonteCarloRateCalculator_Dict.o \
./obj/VMonteCarloRunHeader.o ./obj/VMonteCarloRunHeader_Dict.o \
./obj/VStatistics_Dict.o \
./obj/VEvndispRunParameter.o ./obj/VEvndispRunParameter_Dict.o \
./obj/VSkyCoordinatesUtilities.o \
./obj/VTimeMask.o ./obj/VTimeMask_Dict.o \
./obj/VAnaSumRunParameter.o ./obj/VAnaSumRunParameter_Dict.o \
./obj/VImageCleaningRunParameter.o ./obj/VImageCleaningRunParameter_Dict.o \
./obj/VDispAnalyzer.o ./obj/VDispTableReader.o ./obj/VDispTableReader_Dict.o ./obj/VDispTableAnalyzer.o \
./obj/VTMVADispAnalyzer.o \
./obj/VUtilities.o

ifeq ($(ASTRONMETRY),-DASTROSLALIB)
WRITECTAPHYSOBJ += ./obj/VASlalib.o
endif

./obj/writeParticleRateFilesForTMVA.o: ./src/writeParticleRateFilesForTMVA.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<

writeParticleRateFilesForTMVA: $(WRITEPARTPHYSOBJ)
$(LD) $(LDFLAGS) $^ $(GLIBS) $(OutPutOpt) ./bin/$@
@echo "$@ done"

########################################################
# combineLookupTables
########################################################
Expand Down
1 change: 1 addition & 0 deletions docs/changes/336.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve TMVA interpolation from average zenith to average airmass.
2 changes: 2 additions & 0 deletions docs/changes/336.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Removed deprecated smoothing and interpolation functionality for MVA cut values.
Cleaned up unused parameters and obsolete code related to box smoothing and TMVA optimization.
5 changes: 1 addition & 4 deletions inc/VAnaSumRunParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@ class VAnaSumRunParameterDataClass : public TNamed

string fEffectiveAreaFile; // file with effective areas, use NOFILE if not available

// all models
unsigned int fNBoxSmooth;

// ON/OFF MODEL
double fOO_alpha;

Expand All @@ -139,7 +136,7 @@ class VAnaSumRunParameterDataClass : public TNamed
{
return fRunOn < x.fRunOn;
}
ClassDef( VAnaSumRunParameterDataClass, 3 );
ClassDef( VAnaSumRunParameterDataClass, 4 );
};

class VAnaSumRunParameter : public TNamed, public VGlobalRunParameter
Expand Down
8 changes: 0 additions & 8 deletions inc/VGammaHadronCuts.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,6 @@ class VGammaHadronCuts : public VAnalysisUtilities
unsigned int fTMVAWeightFileIndex_Zmax;
map< unsigned int, double > fTMVASignalEfficiency;
map< unsigned int, double > fTMVA_MVACut;
string fTMVAOptimizeSignalEfficiencyParticleNumberFile;
double fTMVAParticleNumberFile_Conversion_Rate_to_seconds;
double fTMVAOptimizeSignalEfficiencySignificance_Min;
double fTMVAOptimizeSignalEfficiencySignalEvents_Min;
double fTMVAOptimizeSignalEfficiencyObservationTime_h;
double fTMVAFixedSignalEfficiencyMax;
double fTMVAMinSourceStrength;
double fTMVAFixedThetaCutMin;
double fTMVA_EvaluationResult;
VTMVAEvaluatorResults* fTMVAEvaluatorResults;

Expand Down
2 changes: 1 addition & 1 deletion inc/VInstrumentResponseFunctionRunParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class VInstrumentResponseFunctionRunParameter : public TNamed
bool readRunParameterFromTextFile( string iFile );
bool testRunparameters();

ClassDef( VInstrumentResponseFunctionRunParameter, 19 );
ClassDef( VInstrumentResponseFunctionRunParameter, 20 );
};

#endif
18 changes: 3 additions & 15 deletions inc/VTMVAEvaluator.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ class VTMVAEvaluator : public TNamed, public VPlotUtilities
double fOptimizationBackgroundAlpha;
double fOptimizationObservingTime_h;

double fTMVA_EvaluationResult; // result from TVMA evaluator
bool fSmoothAndInterpolateMVAValues;
double fTMVA_EvaluationResult; // result from TMVA evaluator
double fAverageZenithPerRun; // (rough) average zenith angle of run

string fTMVAMethodName;
Expand Down Expand Up @@ -169,20 +168,13 @@ class VTMVAEvaluator : public TNamed, public VPlotUtilities
double interpolate_mva_evaluation();
TGraph* readNonNoffGraphsFromFile( TFile* iF, double i_ze_min, double i_ze_max, bool bIsOn = true );
void reset();
void smoothAndInterPolateMVAValue( TH1F*, TH1F*,
unsigned int iE_min, unsigned int iE_max, unsigned int iZ_min, unsigned int iZ_max );
void smoothAndInterPolateMVAValue_EnergyOnly( TH1F*, TH1F* );
void smoothAndInterPolateMVAValue_Energy_and_Zenith( TH1F*, TH1F*,
unsigned int iE_min, unsigned int iE_max, unsigned int iZ_min, unsigned int iZ_max );

public:

VTMVAEvaluator();
~VTMVAEvaluator() {};

bool evaluate( bool interpolate_mva = false, bool use_average_zenith_angle = true );
vector< double > getBackgroundEfficiency();
vector< bool > getOptimumCutValueFound();
vector< double > getSignalEfficiency();
double getOptimalTheta2Cut( double iEnergy_log10TeV, double iZe = -9999 );
vector< double > getTMVACutValue();
Expand All @@ -201,7 +193,7 @@ class VTMVAEvaluator : public TNamed, public VPlotUtilities
{
return fIsZombie;
}
TGraphAsymmErrors* plotSignalAndBackgroundEfficiencies( bool iLogY = true, double iYmin = 1.e-4, double iMVA_min = -1., double iMVA_max = 1. );
void plotSignalAndBackgroundEfficiencies( bool iLogY = true, double iYmin = 1.e-4, double iMVA_min = -1., double iMVA_max = 1. );
void printOptimizedMVACutValues( string iEpoch = "V6" );
void printSensitivityOptimizationParameters();
void printSignalEfficiency();
Expand Down Expand Up @@ -237,10 +229,6 @@ class VTMVAEvaluator : public TNamed, public VPlotUtilities
}
void setSignalEfficiency( double iSignalEfficiency = -99. );
void setSignalEfficiency( map< unsigned int, double > iMSignalEfficiency );
void setSmoothAndInterPolateMVAValues( bool iS = true )
{
fSmoothAndInterpolateMVAValues = iS;
}
void setSpectralIndexForEnergyWeighting( double iS = -2. )
{
fSpectralIndexForEnergyWeighting = iS;
Expand All @@ -253,7 +241,7 @@ class VTMVAEvaluator : public TNamed, public VPlotUtilities
}
void setTMVAMethod( string iMethodName = "BDT" );

ClassDef( VTMVAEvaluator, 36 );
ClassDef( VTMVAEvaluator, 37 );
};

#endif
4 changes: 2 additions & 2 deletions inc/VTMVARunData.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class VTMVARunData : public TNamed
VTMVARunData();
~VTMVARunData() {}
void print();
VTableLookupRunParameter* getTLRunParameter();
VTableLookupRunParameter* getTableLookupRunParameters();
bool readConfigurationFile( char* );
bool openDataFiles();
void setDebug( bool iB = true )
Expand All @@ -112,7 +112,7 @@ class VTMVARunData : public TNamed
}
void updateTrainingEvents( string iVarName, unsigned int iNEvents );

ClassDef( VTMVARunData, 12 );
ClassDef( VTMVARunData, 13 );
};

#endif
2 changes: 1 addition & 1 deletion macros/optimizeBDTcuts.C
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void optimizeBDTcuts(
weightFileIndex_Zmin, weightFileIndex_Zmax );

// plotting
a.plotSignalAndBackgroundEfficiencies();
a.plotSignalAndBackgroundEfficiencies(true, 7.e-3, -0.2, 0.7);

// print results to screen
a.printSignalEfficiency();
Expand Down
5 changes: 0 additions & 5 deletions src/VAnaSumRunParameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ VAnaSumRunParameterDataClass::VAnaSumRunParameterDataClass()

fEffectiveAreaFile = ""; // file with effective areas, use NOFILE if not available

// smoothing algorithm (don't use it if you don't know it)
fNBoxSmooth = 0;

// ON/OFF MODEL
fOO_alpha = 0.;

Expand Down Expand Up @@ -1243,7 +1240,6 @@ void VAnaSumRunParameter::printStereoParameter( unsigned int i )
cout << "TEMPLATE BACKGROUND MODEL" << endl;
}
}
cout << "\t NBoxsmooth: " << fRunList[i].fNBoxSmooth << endl;
cout << endl;
}

Expand Down Expand Up @@ -1364,7 +1360,6 @@ void VAnaSumRunParameter::reset( VAnaSumRunParameterDataClass it )

it.fAcceptanceFile = "";

it.fNBoxSmooth = 0;
it.fOO_alpha = 0.;

it.fRM_RingRadius = 0.;
Expand Down
Loading
Loading