Skip to content

Commit

Permalink
Merge pull request #265 from VERITAS-Observatory/size2
Browse files Browse the repository at this point in the history
v490.9-dev2 - removal of size2
  • Loading branch information
GernotMaier authored May 18, 2024
2 parents c7a7e2f + 3330bf7 commit 37d0bcf
Show file tree
Hide file tree
Showing 22 changed files with 82 additions and 232 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/ci-buildmatrix-cpp11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ name: cpp11-buildmatrix
# Controls when the workflow will run
on:
# pull_request:
# branches: [main, master, v490-dev-v0.7]
# run this workflow manually from the Actions tab
# branches: [main, master]
workflow_dispatch:

jobs:
Expand All @@ -15,13 +14,11 @@ jobs:
os: [ubuntu-latest]
root:
- "rootproject/root:6.24.06-centos7"
- "rootproject/root:6.22.08-ubuntu20.04"
runs-on: ${{ matrix.os }}
container: ${{ matrix.root }}

steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: vbf
run: |
Expand All @@ -44,4 +41,4 @@ jobs:
export LD_LIBRARY_PATH="${EVNDISPSYS}/obj:${EVNDISPSYS}/lib:${LD_LIBRARY_PATH}"
export LD_LIBRARY_PATH="${VBFSYS}/lib:${LD_LIBRARY_PATH}"
export SOFASYS=/sofa
make VTS
make -j 4 VTS
12 changes: 7 additions & 5 deletions .github/workflows/ci-buildmatrix-cpp17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ name: cpp17-buildmatrix
# Controls when the workflow will run
on:
pull_request:
branches: [main, master, v490-dev-v0.7]
# run this workflow manually from the Actions tab
branches: [main, master]
workflow_dispatch:

jobs:
Expand All @@ -16,14 +15,17 @@ jobs:
root:
- "rootproject/root:latest"
- "rootproject/root:6.26.06-ubuntu22.04"
- "rootproject/root:6.26.06-fedora35"
- "rootproject/root:6.30.02-alma9"
runs-on: ${{ matrix.os }}
container: ${{ matrix.root }}

steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v4

- name: install libblas
if: ${{ matrix.root == 'rootproject/root:latest' || matrix.root == 'rootproject/root:6.26.06-ubuntu22.04' }}
run: apt-get install -y libblas-dev

- name: vbf
run: |
curl https://syncandshare.desy.de/index.php/s/${{ secrets.VBFcpp17 }}/download > VBF.tar.gz
Expand All @@ -45,4 +47,4 @@ jobs:
export LD_LIBRARY_PATH="${EVNDISPSYS}/obj:${EVNDISPSYS}/lib:${LD_LIBRARY_PATH}"
export LD_LIBRARY_PATH="${VBFSYS}/lib:${LD_LIBRARY_PATH}"
export SOFASYS=/sofa
make VTS
make -j 4 VTS
11 changes: 4 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request
# events but only for the main branch
pull_request:
branches: [main, master]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
Expand All @@ -26,15 +22,16 @@ jobs:
container: ${{ matrix.root }}

steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v4

# Runs a set of commands using the runners shell
- name: install libblas
run: apt-get install -y libblas-dev

- name: build
run: |
root-config --version
export EVNDISPSYS=$(echo $GITHUB_WORKSPACE)
export SOFASYS=${EVNDISPSYS}/sofa
./install_sofa.sh CI
make config
make VTS
make -j 4 VTS
16 changes: 8 additions & 8 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Eventdisplay is a C++ based library and designed to run in typical Linux environ

CERN's [ROOT](https://root.cern.ch/) library for I/O, histogramming, and statistical applications:

- ROOT versions >= 6.20
- ROOT versions >= 6.28
- the first-stage tool `evndisp` requires ROOT compiled with mysql for access to the VERITAS database. Pre-compiled version of ROOT (downloaded from [here](https://root.cern/install/)) have mysql installed. If building from source, ensure the mysql dependencies are installed and compiler flags are added (see [root installation page](https://root.cern/install/build_from_source/)). All other stages of Eventdisplay do not required mysql - meaning e.g., the conda-based installation of Eventdisplay is fine.
- paths for ROOT should be set through e.g.,

Expand All @@ -28,7 +28,7 @@ root-config --has-mysql
### SOFA

[SOFA](http://www.iausofa.org/current_C.html) for all astronometry transformations.

Download and install using this script in the $EVNDISPSYS directory:

```
Expand Down Expand Up @@ -63,7 +63,7 @@ Eventdisplay can be used efficiently with the correct environmental variables se

### Compiling and Linking

ROOTSYS : (required) ROOT installation; add $ROOTSYS/lib to $LD_LIBRARY_PATH and $ROOTSYS/bin to $PATH
ROOTSYS : (required) ROOT installation; add $ROOTSYS/lib to $LD_LIBRARY_PATH and $ROOTSYS/bin to $PATH

SOFASYS: (required) Astronomy library from Sofa

Expand All @@ -83,11 +83,11 @@ EVNDISPSCRIPTS: Eventdisplay scripts directory

Assume a computing environment, where several users are analysis the same raw data
(would be in $VERITAS_DATA_DIR), but having their analysis results written to their own
directories ($VERITAS_USER_DATA_DIR).
directories ($VERITAS_USER_DATA_DIR).
Note that $VERITAS_DATA_DIR and $VERITAS_USER_DATA_DIR can point to the same directory.

- VERITAS_EVNDISP_AUX_DIR: directory with all auxiliary data like calibration files, lookup tables, effective areas, etc
- VERITAS_DATA_DIR : directory containing the raw telescope data or input simulation files
- VERITAS_DATA_DIR : directory containing the raw telescope data or input simulation files
- VERITAS_USER_DATA_DIR : user data directory: containing output files from this analysis package
- VERITAS_USER_LOG_DIR : user log file directory: log files and temporary scripts are written to this directory

Expand All @@ -107,14 +107,14 @@ make config

Compare the output with the requirements on software and environmental variable settings described above.

In the main Eventdisplay directory ($EVNDISPSYS is pointing to this directory), compile all Eventdisplay binaries with
In the main Eventdisplay directory ($EVNDISPSYS is pointing to this directory), compile all Eventdisplay binaries with

```
source ./setObservatory.sh VTS
source ./setObservatory.sh VTS
make VTS
```

If you are working on a computing with several cores, this can be accelerated by e.g. compiling with four cores in parallel:
If you are working on a computing with several cores, this can be accelerated by e.g. compiling with four cores in parallel:

```
source ./setObservatory.sh VTS
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#
# Optional libraries:
#
# for using GSL libraries (as part of ROO mathmore)
# for using GSL libraries (as part of ROOT mathmore)
#
# for using FITS (optional)
# FITSSYS (pointing to FITS installation)
Expand Down Expand Up @@ -540,7 +540,7 @@ printCrabSensitivity = ./obj/printCrabSensitivity.o \
./obj/VAnaSumRunParameter.o ./obj/VAnaSumRunParameter_Dict.o \
./obj/VTimeMask.o ./obj/VTimeMask_Dict.o \
./obj/CRunSummary.o ./obj/CRunSummary_Dict.o \


./obj/printCrabSensitivity.o: ./src/printCrabSensitivity.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
Expand All @@ -555,7 +555,7 @@ printCrabSensitivity: $(printCrabSensitivity)
# logFile
########################################################
LOGFILE = ./obj/logFile.o \


./obj/logFile.o: ./src/logFile.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $<
Expand Down Expand Up @@ -725,7 +725,7 @@ ifneq ($(TSPECTRUMFLAG),-DNOSPECTRUM)
endif

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

ifneq ($(GSLFLAG),-DNOGSL)
Expand Down Expand Up @@ -925,7 +925,7 @@ compareDatawithMC: $(COMPAREDATAMCOBJ)
@echo "$@ done"

########################################################
# printMJD
# printMJD
########################################################
PRINTMJDOBJ= ./obj/VSkyCoordinatesUtilities.o \
./obj/VAstronometry.o \
Expand All @@ -940,7 +940,7 @@ printMJD: $(PRINTMJDOBJ)
@echo "$@ done"

########################################################
# printSQLDate
# printSQLDate
########################################################
printSQLDateOBJ= ./obj/VSkyCoordinatesUtilities.o \
./obj/VAstronometry.o \
Expand Down Expand Up @@ -1532,7 +1532,7 @@ ifeq ($(GSLFLAG),-DNOGSL)
@echo "evndisp without GSL libraries (no Hough muon calibration, no likelihood fitter)"
else
@echo "evndisp with GSL libraries (used in Hough muon calibration, likelihood fitter)"
@echo " GSL $(GSLFLAG)"
@echo " GSL $(GSLFLAG)"
@echo " $(GSLCFLAGS) $(GSLLIBS)"
endif
@echo ""
Expand Down Expand Up @@ -1602,7 +1602,7 @@ else
endif

###############################################################################################################################
# source code formating
# source code formatting
###############################################################################################################################
formatSourceCode:
@echo ""
Expand Down
15 changes: 0 additions & 15 deletions inc/CData.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ class CData
Float_t meanPedvar_ImageT[VDST_MAXTELESCOPES];
Double_t dist[VDST_MAXTELESCOPES];
Double_t size[VDST_MAXTELESCOPES];
Double_t size2[VDST_MAXTELESCOPES];
Double_t fraclow[VDST_MAXTELESCOPES];
Double_t loss[VDST_MAXTELESCOPES];
Double_t max1[VDST_MAXTELESCOPES];
Expand Down Expand Up @@ -192,7 +191,6 @@ class CData
TBranch* b_meanPedvar_ImageT; //!
TBranch* b_dist; //!
TBranch* b_size; //!
TBranch* b_size2; //!
TBranch* b_fraclow; //!
TBranch* b_loss; //!
TBranch* b_max1; //!
Expand Down Expand Up @@ -590,17 +588,6 @@ void CData::Init( TTree* tree )
{
fChain->SetBranchAddress( "dist", dist );
fChain->SetBranchAddress( "size", size );
if( fChain->GetBranchStatus( "size2" ) )
{
fChain->SetBranchAddress( "size2", size2 );
}
else
{
for( int i = 0; i < VDST_MAXTELESCOPES; i++ )
{
size2[i] = 0.;
}
}
if( fChain->GetBranchStatus( "fracLow" ) )
{
fChain->SetBranchAddress( "fracLow", fraclow );
Expand Down Expand Up @@ -687,7 +674,6 @@ void CData::Init( TTree* tree )
{
dist[i] = 0.;
size[i] = 0.;
size2[i] = 0.;
fraclow[i] = 0.;
loss[i] = 0.;
max1[i] = 0.;
Expand Down Expand Up @@ -916,7 +902,6 @@ Bool_t CData::Notify()

b_dist = fChain->GetBranch( "dist" );
b_size = fChain->GetBranch( "size" );
b_size2 = fChain->GetBranch( "size2" );
b_fraclow = fChain->GetBranch( "fraclow" );
b_max1 = fChain->GetBranch( "max1" );
b_max2 = fChain->GetBranch( "max2" );
Expand Down
5 changes: 4 additions & 1 deletion inc/VDeadPixelOrganizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ class VNGain
vector<VNStateDuration> stateHistory ;

// functions
VNGain() { fIsLow = false; } ;
VNGain()
{
fIsLow = false;
} ;
void initialize( string gainType, VNPixel* parentVNP ) ;
void updateState( int mjd, double time, PixelStateInt state ) ;
void setParentVNPixelPointer( VNPixel* ptr ) ;
Expand Down
2 changes: 1 addition & 1 deletion inc/VDispAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ class VDispAnalyzer
void setQualityCuts( unsigned int iNImages_min = 0, float iAxesAngles_min = 0.,
float imaxdist = 1.e5, float imaxloss = 1.,
float iminfui = 0., float iminwidth = -1., float iminfitstat = -10.,
int iminntubes = 0 )
int iminntubes = 0 )
{
fAxesAngles_min = iAxesAngles_min;
fNImages_min = iNImages_min;
Expand Down
4 changes: 4 additions & 0 deletions inc/VGlobalRunParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#include <TTree.h>
#include <TROOT.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

#include <fstream>
#include <iostream>
#include <stdlib.h>
Expand Down
2 changes: 0 additions & 2 deletions inc/VImageParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ class VImageParameter
float length; //!< Length of ellipse
float width; //!< width of ellipse
float size; //!< total signal
float size2; //!< total signal (second summation window)
float sizeLL; //!< total signal; LL method
float size2LL; //!< total signal (second summation window); LL method
float dist; //!< distance to centroid
float azwidth; //!< used by certain analysis techniques
float alpha; //!< Alpha angle (-Pi/2..Pi/2)
Expand Down
2 changes: 1 addition & 1 deletion inc/VImageParameterCalculation.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class VImageParameterCalculation : public TObject

VImageParameterCalculation( unsigned int iShortTree = 0, VEvndispData* iData = 0 );
~VImageParameterCalculation();
vector<bool> calcLL( bool iUseSums2 = false ); //!< calculate image parameters (log like)
vector<bool> calcLL( bool ); //!< calculate image parameters (log like)
void muonRingFinder(); //!< fit a single ring to the image to look for muons
void sizeInMuonRing(); //! calculate the brightness of the muon ring
void muonPixelDistribution(); //!< determine the distribution of pixels in the image
Expand Down
23 changes: 2 additions & 21 deletions inc/VTableLookupDataHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ class VTableLookupDataHandler
double ffui [VDST_MAXTELESCOPES];
double fdist_telType[VDST_MAXTELESCOPES];
double fsize [VDST_MAXTELESCOPES];
double fsize2 [VDST_MAXTELESCOPES];
double fsizeCorr [VDST_MAXTELESCOPES];
double fsize_telType[VDST_MAXTELESCOPES];
double floss [VDST_MAXTELESCOPES];
Expand Down Expand Up @@ -502,26 +501,8 @@ class VTableLookupDataHandler
{
return fOutFile;
}
double* getSize( double iSizeCorrection = 1., bool iSelectedImagesOnly = false, bool iSize2 = false ); // deprecated
double* getSize( double iSizeCorrection, ULong64_t iTelType, bool iSelectedImagesOnly, bool iSize2 = false ); // deprecated
double* getSize( vector<double> iSizeCorrection, bool iSelectedImagesOnly = false, bool iSize2 = false );
double* getSize( vector<double> iSizeCorrection, ULong64_t iTelType, bool iSelectedImagesOnly = false, bool iSize2 = false );
double* getSize2( double iSizeCorrection = 1., bool iSelectedImagesOnly = false ) // deprecated
{
return getSize( iSizeCorrection, iSelectedImagesOnly, true );
}
double* getSize2( double iSizeCorrection, ULong64_t iTelType, bool iSelectedImagesOnly ) // deprecated
{
return getSize( iSizeCorrection, iTelType, iSelectedImagesOnly, true );
}
double* getSize2( vector<double> iSizeCorrection, bool iSelectedImagesOnly )
{
return getSize( iSizeCorrection, iSelectedImagesOnly, true );
}
double* getSize2( vector<double> iSizeCorrection, ULong64_t iTelType, bool iSelectedImagesOnly )
{
return getSize( iSizeCorrection, iTelType, iSelectedImagesOnly, true );
}
double* getSize( double iSizeCorrection = 1., bool iSelectedImagesOnly = false );
double* getSize( double iSizeCorrection, ULong64_t iTelType, bool iSelectedImagesOnly );
double* getWeight()
{
return fweight;
Expand Down
3 changes: 1 addition & 2 deletions src/VCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -903,14 +903,13 @@ void VCamera::drawEventText()
fData->getImageParametersLogL()->size,
fData->getImageParametersLogL()->Fitstat );
fTextEvent[fTextEvent.size() - 1]->SetTitle( iText );
sprintf( iText, "GEO: c_x=%.2f,c_y=%.2f,dist=%.2f,length=%.3f,width=%.3f,size=%.0f/%.0f,loss=%.2f,lossDead=%.2f,fui=%.2f",
sprintf( iText, "GEO: c_x=%.2f,c_y=%.2f,dist=%.2f,length=%.3f,width=%.3f,size=%.0f,loss=%.2f,lossDead=%.2f,fui=%.2f",
fData->getImageParameters()->cen_x,
fData->getImageParameters()->cen_y,
fData->getImageParameters()->dist,
fData->getImageParameters()->length,
fData->getImageParameters()->width,
fData->getImageParameters()->size,
fData->getImageParameters()->size2,
fData->getImageParameters()->loss,
fData->getImageParameters()->lossAndDead,
fData->getImageParameters()->fui );
Expand Down
6 changes: 5 additions & 1 deletion src/VEventLoop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ VEventLoop::VEventLoop( VEvndispRunParameter* irunparameter )
fCalibrator = new VCalibrator();

// create data summarizer
fDST = new VDST( ( fRunMode == R_DST ), ( fRunPar->fsourcetype == 1 || fRunPar->fsourcetype == 2 || fRunPar->fsourcetype == 6 ) );
fDST = 0;
if( fRunMode == R_DST )
{
fDST = new VDST( ( fRunMode == R_DST ), ( fRunPar->fsourcetype == 1 || fRunPar->fsourcetype == 2 || fRunPar->fsourcetype == 6 ) );
}

// create analyzer (one for all telescopes)
fAnalyzer = new VImageAnalyzer();
Expand Down
Loading

0 comments on commit 37d0bcf

Please sign in to comment.