Skip to content

Commit

Permalink
3tel core and direction
Browse files Browse the repository at this point in the history
  • Loading branch information
GernotMaier committed Dec 28, 2024
1 parent 6a74715 commit 2518db9
Show file tree
Hide file tree
Showing 11 changed files with 202 additions and 59 deletions.
19 changes: 13 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,8 @@ ACCOBJECT = ./obj/makeRadialAcceptance.o \
./obj/VEvndispRunParameter.o ./obj/VEvndispRunParameter_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/VTMVADispAnalyzer.o ./obj/VMeanScaledVariables.o \
./obj/VEmissionHeightCalculator.o ./obj/VSimpleStereoReconstructor.o ./obj/VGrIsuAnalyzer.o \
./obj/VUtilities.o


Expand Down Expand Up @@ -461,7 +462,8 @@ ACCOBJECT = ./obj/VTS.getRun_TimeElevAzim.o \
./obj/VStar.o ./obj/VStar_Dict.o \
./obj/VDB_Connection.o \
./obj/VDispAnalyzer.o ./obj/VDispTableReader.o ./obj/VDispTableReader_Dict.o ./obj/VDispTableAnalyzer.o \
./obj/VTMVADispAnalyzer.o \
./obj/VTMVADispAnalyzer.o ./obj/VMeanScaledVariables.o \
./obj/VEmissionHeightCalculator.o ./obj/VSimpleStereoReconstructor.o ./obj/VGrIsuAnalyzer.o \
./obj/VUtilities.o

ifeq ($(ASTRONMETRY),-DASTROSLALIB)
Expand Down Expand Up @@ -503,6 +505,7 @@ EFFOBJECT = ./obj/VGammaHadronCuts.o ./obj/VGammaHadronCuts_Dict.o ./obj/CData.o
./obj/VEnergySpectrumfromLiterature.o ./obj/VEnergySpectrumfromLiterature_Dict.o \
./obj/VDispAnalyzer.o ./obj/VDispTableReader.o ./obj/VDispTableReader_Dict.o ./obj/VDispTableAnalyzer.o \
./obj/VTMVADispAnalyzer.o ./obj/VMeanScaledVariables.o \
./obj/VEmissionHeightCalculator.o ./obj/VSimpleStereoReconstructor.o ./obj/VGrIsuAnalyzer.o \
./obj/makeEffectiveArea.o

ifeq ($(ASTRONMETRY),-DASTROSLALIB)
Expand Down Expand Up @@ -632,7 +635,8 @@ ANASUMOBJECTS = ./obj/VAnaSum.o ./obj/VGammaHadronCuts.o ./obj/VGammaHadronCuts_
./obj/VSkyCoordinatesUtilities.o ./obj/VUtilities.o \
./obj/VMathsandFunctions.o ./obj/VMathsandFunctions_Dict.o \
./obj/VDispAnalyzer.o ./obj/VDispTableReader.o ./obj/VDispTableReader_Dict.o ./obj/VDispTableAnalyzer.o \
./obj/VTMVADispAnalyzer.o \
./obj/VTMVADispAnalyzer.o ./obj/VMeanScaledVariables.o \
./obj/VEmissionHeightCalculator.o ./obj/VSimpleStereoReconstructor.o ./obj/VGrIsuAnalyzer.o \
./obj/anasum.o

ifeq ($(ASTRONMETRY),-DASTROSLALIB)
Expand Down Expand Up @@ -921,7 +925,8 @@ COMPAREDATAMCOBJ= ./obj/CData.o \
./obj/VHistogramUtilities.o ./obj/VHistogramUtilities_Dict.o \
./obj/VMathsandFunctions.o ./obj/VMathsandFunctions_Dict.o \
./obj/VDispAnalyzer.o ./obj/VDispTableReader.o ./obj/VDispTableReader_Dict.o ./obj/VDispTableAnalyzer.o \
./obj/VTMVADispAnalyzer.o \
./obj/VTMVADispAnalyzer.o ./obj/VMeanScaledVariables.o \
./obj/VEmissionHeightCalculator.o ./obj/VSimpleStereoReconstructor.o ./obj/VGrIsuAnalyzer.o \
./obj/compareDatawithMC.o

ifeq ($(ASTRONMETRY),-DASTROSLALIB)
Expand Down Expand Up @@ -1265,7 +1270,8 @@ calculateCrabRateFromMC: ./obj/CEffArea.o ./obj/CEffArea_Dict.o \
./obj/VTimeMask.o ./obj/VTimeMask_Dict.o \
./obj/VAnaSumRunParameter.o ./obj/VAnaSumRunParameter_Dict.o \
./obj/VDispAnalyzer.o ./obj/VDispTableReader.o ./obj/VDispTableReader_Dict.o ./obj/VDispTableAnalyzer.o \
./obj/VTMVADispAnalyzer.o \
./obj/VTMVADispAnalyzer.o ./obj/VMeanScaledVariables.o \
./obj/VEmissionHeightCalculator.o ./obj/VSimpleStereoReconstructor.o ./obj/VGrIsuAnalyzer.o \
./obj/calculateCrabRateFromMC.o
$(LD) $(LDFLAGS) $^ $(GLIBS) $(OutPutOpt) ./bin/$@
@echo "$@ done"
Expand Down Expand Up @@ -1373,7 +1379,8 @@ calculateBinaryPhases: ./obj/CData.o \
./obj/VTableLookupRunParameter.o ./obj/VTableLookupRunParameter_Dict.o \
./obj/VGlobalRunParameter.o ./obj/VGlobalRunParameter_Dict.o \
./obj/VDispAnalyzer.o ./obj/VDispTableReader.o ./obj/VDispTableReader_Dict.o ./obj/VDispTableAnalyzer.o \
./obj/VTMVADispAnalyzer.o \
./obj/VTMVADispAnalyzer.o ./obj/VMeanScaledVariables.o ./obj/VUtilities.o \
./obj/VEmissionHeightCalculator.o ./obj/VSimpleStereoReconstructor.o ./obj/VGrIsuAnalyzer.o \
./obj/VOrbitalPhase.o ./obj/VOrbitalPhase_Dict.o \
./obj/VSkyCoordinatesUtilities.o \
./obj/VAstronometry.o \
Expand Down
20 changes: 17 additions & 3 deletions inc/CData.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,34 @@
#include <TChain.h>
#include <TFile.h>

#include "VEmissionHeightCalculator.h"
#include "VGlobalRunParameter.h"
#include "VMeanScaledVariables.h"
#include "VDispAnalyzer.h"
#include "VSimpleStereoReconstructor.h"

#include <bitset>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>

using namespace std;

class CData
{
private :
void reconstruct_3tel_images_scaled_variables();
void reconstruct_3tel_images_scaled_emission_height();
unsigned long int fTelescopeCombination;
double fStereoMinAngle;
vector< double > fTelX;
vector< double > fTelY;
vector< double > fTelZ;

void reconstruct_3tel_images(long unsigned int);
void reconstruct_3tel_images_direction();
void reconstruct_3tel_images_scaled_emission_height();
void reconstruct_3tel_images_scaled_variables();
void reconstruct_3tel_reset_variables();

public :

Expand Down Expand Up @@ -246,7 +257,7 @@ class CData

CData( TTree* tree = 0, bool bMC = false, int iVersion = 5, bool bShort = false );
virtual ~CData();
virtual Int_t GetEntry( Long64_t entry, unsigned long int telescope_combination = 15 );
virtual Int_t GetEntry( Long64_t entry );
virtual Long64_t LoadTree( Long64_t entry );
virtual void Init( TTree* tree );
virtual Bool_t Notify();
Expand All @@ -258,5 +269,8 @@ class CData
{
return fVersion;
}
void initialize_3tel_reconstruction(
unsigned long int telescope_combination,
double stereo_reconstruction_min_angle, vector< double > tel_x, vector< double > tel_y, vector< double > tel_z );
};
#endif
6 changes: 3 additions & 3 deletions inc/VDispAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ class VDispAnalyzer
vector<ULong64_t> fTelescopeTypeList;
vector<float> fTelescopeFOV;

void calculateMeanShowerDirection( vector< float >& v_x, vector< float >& v_y, vector< float >& v_weight,
float& xs, float& ys, float& dispdiff, unsigned int iMaxN );

unsigned int find_smallest_diff_element(
vector< vector< float > >& i_sign,
vector< float >& x, vector< float >& y,
Expand Down Expand Up @@ -125,6 +122,9 @@ class VDispAnalyzer
bool UseIntersectForHeadTail,
int* img_fitstat );

void calculateMeanShowerDirection( vector< float >& v_x, vector< float >& v_y, vector< float >& v_weight,
float& xs, float& ys, float& dispdiff, unsigned int iMaxN );

vector< float > calculateExpectedDirectionError_or_Sign( unsigned int i_ntel, float iArrayElevation, float iArrayAzimuth,
ULong64_t* iTelType,
float* img_size, float* img_cen_x, float* img_cen_y,
Expand Down
2 changes: 1 addition & 1 deletion inc/VGlobalRunParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// HARDWIRED MAXIMUM NUMBER OF TELESCOPES AND CHANNELS, etc.
// (changing anything here means that you have to rerun all stages
// of the analysis again)
#define VDST_MAXTELESCOPES 100 // maximum number of telescopes
#define VDST_MAXTELESCOPES 10 // maximum number of telescopes
#define VDST_MAXTELTYPES 7 // maximum number of telescope types
#define VDST_MAXNNGROUPTYPES 6 // maximum number of NN-group types searched in NN-image cleaning
#define VDST_MAXCHANNELS 2900 // maximum number of channels per telescopes
Expand Down
4 changes: 4 additions & 0 deletions inc/VInstrumentResponseFunctionRunParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,17 @@ class VInstrumentResponseFunctionRunParameter : public TNamed
double fYoff;
vector< double > fAzMin;
vector< double > fAzMax;
double fRerunStereoReconstruction_minAngle;

double fWobbleIsotropic;

unsigned int telconfig_ntel;
double telconfig_arraycentre_X;
double telconfig_arraycentre_Y;
double telconfig_arraymax;
vector<double> telconfig_telx;
vector<double> telconfig_tely;
vector<double> telconfig_telz;

string fCREnergySpectrumFile;
unsigned int fCREnergySpectrumID;
Expand Down
Loading

0 comments on commit 2518db9

Please sign in to comment.