Skip to content

Commit

Permalink
Erec to float
Browse files Browse the repository at this point in the history
  • Loading branch information
GernotMaier committed Dec 23, 2024
1 parent b698211 commit d9e99be
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 39 deletions.
12 changes: 6 additions & 6 deletions inc/CData.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ class CData
Double_t MSCL;
Float_t MWR;
Float_t MLR;
Double_t Erec;
Double_t EChi2;
Double_t dE; // Error on Erec
Double_t ErecS;
Double_t EChi2S;
Double_t dES; // Error on ErecS
Float_t Erec;
Float_t EChi2;
Float_t dE; // Error on Erec
Float_t ErecS;
Float_t EChi2S;
Float_t dES; // Error on ErecS
Double_t SizeSecondMax;
Double_t theta2_All[25];
Float_t EmissionHeight;
Expand Down
8 changes: 4 additions & 4 deletions inc/VStereoAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ class VStereoAnalysis
double fTreeSelected_MSCL;
double fTreeSelected_MWR;
double fTreeSelected_MLR;
double fTreeSelected_Erec;
double fTreeSelected_EChi2;
double fTreeSelected_ErecS;
double fTreeSelected_EChi2S;
float fTreeSelected_Erec;
float fTreeSelected_EChi2;
float fTreeSelected_ErecS;
float fTreeSelected_EChi2S;
float fTreeSelected_EmissionHeight;
float fTreeSelected_EmissionHeightChi2;
double fTreeSelected_SizeSecondMax;
Expand Down
26 changes: 13 additions & 13 deletions inc/VTableLookupDataHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ class VTableLookupDataHandler
double fR [VDST_MAXTELESCOPES]; //!< distance from each telescope to reconstructed shower core
double fRTel [VDST_MAXTELESCOPES]; //!< distance from each telescope to reconstructed shower core
double fR_telType[VDST_MAXTELESCOPES]; //!< distance from each telescope to reconstructed shower core (depending on tel type)
double fE [VDST_MAXTELESCOPES]; //!< energy assigned to each telescope (method 0)
double fES [VDST_MAXTELESCOPES]; //!< energy assigned to each telescope (method 1)
float fE [VDST_MAXTELESCOPES]; //!< energy assigned to each telescope (method 0)
float fES [VDST_MAXTELESCOPES]; //!< energy assigned to each telescope (method 1)
int fnenergyT; //!< number of images used for the energy calculation
int fenergyQL; //!< quality label for energy calculation
double ftmscw [VDST_MAXTELESCOPES]; //!< mscw assigned to each telescope
Expand All @@ -286,15 +286,15 @@ class VTableLookupDataHandler
double fmscl; //!< mean scaled length
float fmwr; //!< mean width ratio
float fmlr; //!< mean length ratio
double fenergy; //!< reconstructed primary energy
double fechi2; //!< chi2 from reconstructed primary energy
double fdE; //!< dE from reconstructed primary energy
float fenergy; //!< reconstructed primary energy
float fechi2; //!< chi2 from reconstructed primary energy
float fdE; //!< dE from reconstructed primary energy
float fesys; //!< energy correction
float fesysVar; //!< energy correction (variance)
float fesysDist; //!< mean distance to maximum in emission height
double fenergyS; //!< reconstructed primary energy
double fechi2S; //!< chi2 from reconstructed primary energy
double fdES; //!< dE from reconstructed primary energy
float fenergyS; //!< reconstructed primary energy
float fechi2S; //!< chi2 from reconstructed primary energy
float fdES; //!< dE from reconstructed primary energy

// emission height
unsigned int fNTelPairs;
Expand Down Expand Up @@ -389,7 +389,7 @@ class VTableLookupDataHandler
{
return sqrt( fMCxoff* fMCxoff + fMCyoff* fMCyoff );
}
double* getE()
float* getE()
{
return fE;
}
Expand Down Expand Up @@ -538,7 +538,7 @@ class VTableLookupDataHandler
bool readRunParameter();
void reset(); //!< reset a few output variables
void resetAll();
void setChi2( double iChi2, bool iTableErecS = true )
void setChi2( float iChi2, bool iTableErecS = true )
{
if( iTableErecS )
{
Expand All @@ -549,7 +549,7 @@ class VTableLookupDataHandler
fechi2 = iChi2;
}
}
void setdE( double idE, bool iTableErecS = true )
void setdE( float idE, bool iTableErecS = true )
{
if( iTableErecS )
{
Expand All @@ -565,7 +565,7 @@ class VTableLookupDataHandler
{
fR[itel] = iR;
}
void setEnergy( double iE, bool iTableErecS = true )
void setEnergy( float iE, bool iTableErecS = true )
{
if( iTableErecS )
{
Expand All @@ -576,7 +576,7 @@ class VTableLookupDataHandler
fenergy = iE;
}
}
void setEnergyT( int i, double iET, bool iTableErecS = true )
void setEnergyT( int i, float iET, bool iTableErecS = true )
{
if( iTableErecS )
{
Expand Down
8 changes: 4 additions & 4 deletions src/VStereoAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2054,10 +2054,10 @@ bool VStereoAnalysis::init_TreeWithSelectedEvents( int irun, bool isOn )
fTreeSelectedEvents->Branch( "MSCL", &fTreeSelected_MSCL, "MSCL/D" );
fTreeSelectedEvents->Branch( "MWR", &fTreeSelected_MWR, "MWR/D" );
fTreeSelectedEvents->Branch( "MLR", &fTreeSelected_MLR, "MLR/D" );
fTreeSelectedEvents->Branch( "Erec", &fTreeSelected_Erec, "Erec/D" );
fTreeSelectedEvents->Branch( "EChi2", &fTreeSelected_EChi2, "EChi2/D" );
fTreeSelectedEvents->Branch( "ErecS", &fTreeSelected_ErecS, "ErecS/D" );
fTreeSelectedEvents->Branch( "EChi2S", &fTreeSelected_EChi2S, "EChi2S/D" );
fTreeSelectedEvents->Branch( "Erec", &fTreeSelected_Erec, "Erec/F" );
fTreeSelectedEvents->Branch( "EChi2", &fTreeSelected_EChi2, "EChi2/F" );
fTreeSelectedEvents->Branch( "ErecS", &fTreeSelected_ErecS, "ErecS/F" );
fTreeSelectedEvents->Branch( "EChi2S", &fTreeSelected_EChi2S, "EChi2S/F" );
fTreeSelectedEvents->Branch( "EmissionHeight", &fTreeSelected_EmissionHeight, "EmissionHeight/F" );
fTreeSelectedEvents->Branch( "EmissionHeightChi2", &fTreeSelected_EmissionHeightChi2, "EmissionHeightChi2/F" );
fTreeSelectedEvents->Branch( "SizeSecondMax", &fTreeSelected_SizeSecondMax, "SizeSecondMax/D" );
Expand Down
16 changes: 8 additions & 8 deletions src/VTableLookupDataHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1465,9 +1465,9 @@ bool VTableLookupDataHandler::setOutputFile( string iOutput, string iOption, str
fOTree->Branch( "MSCWTSigma", ftmscw_sigma, iTT );
sprintf( iTT, "MSCLTSigma[%d]/F", fNTel );
fOTree->Branch( "MSCLTSigma", ftmscl_sigma, iTT );
sprintf( iTT, "E[%d]/D", fNTel );
sprintf( iTT, "E[%d]/F", fNTel );
fOTree->Branch( "E", fE, iTT );
sprintf( iTT, "ES[%d]/D", fNTel );
sprintf( iTT, "ES[%d]/F", fNTel );
fOTree->Branch( "ES", fES, iTT );

sprintf( iTT, "NMSCW/I" );
Expand All @@ -1480,23 +1480,23 @@ bool VTableLookupDataHandler::setOutputFile( string iOutput, string iOption, str
fOTree->Branch( "MWR", &fmwr, iTT );
sprintf( iTT, "MLR/F" );
fOTree->Branch( "MLR", &fmlr, iTT );
sprintf( iTT, "Erec/D" );
sprintf( iTT, "Erec/F" );
fOTree->Branch( "Erec", &fenergy, iTT );
sprintf( iTT, "EChi2/D" );
sprintf( iTT, "EChi2/F" );
fOTree->Branch( "EChi2", &fechi2, iTT );
sprintf( iTT, "dE/D" );
sprintf( iTT, "dE/F" );
fOTree->Branch( "dE", &fdE, iTT );
sprintf( iTT, "Esys/F" );
fOTree->Branch( "Esys", &fesys, iTT );
sprintf( iTT, "EsysVar/F" );
fOTree->Branch( "EsysVar", &fesysVar, iTT );
sprintf( iTT, "EsysDist/F" );
fOTree->Branch( "EsysDist", &fesysDist, iTT );
sprintf( iTT, "ErecS/D" );
sprintf( iTT, "ErecS/F" );
fOTree->Branch( "ErecS", &fenergyS, iTT );
sprintf( iTT, "EChi2S/D" );
sprintf( iTT, "EChi2S/F" );
fOTree->Branch( "EChi2S", &fechi2S, iTT );
sprintf( iTT, "dES/D" );
sprintf( iTT, "dES/F" );
fOTree->Branch( "dES", &fdES, iTT );
fOTree->Branch( "NErecST", &fnenergyT, "NErecST" );
fOTree->Branch( "ErecQL", &fenergyQL, "ErecQL/I" );
Expand Down
8 changes: 4 additions & 4 deletions src/trainTMVAforGammaHadronSeparation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ TTree* prepareSelectedEventsTree( VTMVARunData* iRun, TCut iCut,
Double_t WobbleE = 0;
Double_t MSCW = 0.;
Double_t MSCL = 0.;
Double_t ErecS = 0.;
Double_t EChi2S = 0.;
Float_t ErecS = 0.;
Float_t EChi2S = 0.;
Double_t Xcore = 0.;
Double_t Ycore = 0.;
Double_t Xoff_derot = 0.;
Expand All @@ -91,8 +91,8 @@ TTree* prepareSelectedEventsTree( VTMVARunData* iRun, TCut iCut,
iDataTree_reduced->Branch( "WobbleE", &WobbleE, "WobbleE/D" );
iDataTree_reduced->Branch( "MSCW", &MSCW, "MSCW/D" );
iDataTree_reduced->Branch( "MSCL", &MSCL, "MSCL/D" );
iDataTree_reduced->Branch( "ErecS", &ErecS, "ErecS/D" );
iDataTree_reduced->Branch( "EChi2S", &EChi2S, "EChi2S/D" );
iDataTree_reduced->Branch( "ErecS", &ErecS, "ErecS/F" );
iDataTree_reduced->Branch( "EChi2S", &EChi2S, "EChi2S/F" );
iDataTree_reduced->Branch( "Xcore", &Xcore, "Xcore/D" );
iDataTree_reduced->Branch( "Ycore", &Ycore, "Ycore/D" );
iDataTree_reduced->Branch( "Xoff_derot", &Xoff_derot, "Xoff_derot/D" );
Expand Down

0 comments on commit d9e99be

Please sign in to comment.