Skip to content

Commit

Permalink
astyle
Browse files Browse the repository at this point in the history
  • Loading branch information
GernotMaier committed Dec 30, 2024
1 parent b86d21b commit a3e7ab2
Show file tree
Hide file tree
Showing 18 changed files with 98 additions and 98 deletions.
6 changes: 3 additions & 3 deletions inc/CData.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CData
vector< double > fTelY;
vector< double > fTelZ;

void reconstruct_3tel_images(long unsigned int);
void reconstruct_3tel_images( long unsigned int );
void reconstruct_3tel_images_direction();
void reconstruct_3tel_images_energy();
void reconstruct_3tel_images_scaled_emission_height();
Expand Down Expand Up @@ -273,7 +273,7 @@ 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 );
unsigned long int telescope_combination,
double stereo_reconstruction_min_angle, vector< double > tel_x, vector< double > tel_y, vector< double > tel_z );
};
#endif
4 changes: 2 additions & 2 deletions inc/VDispAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class VDispAnalyzer
bool UseIntersectForHeadTail,
int* img_fitstat );

void calculateMeanEnergy(vector< float >& disp_energy_T, float* img_size, double* img_weight);
void calculateMeanEnergy( vector< float >& disp_energy_T, float* img_size, double* img_weight );
void calculateMeanShowerDirection( vector< float >& v_x, vector< float >& v_y, vector< float >& v_weight,
float& xs, float& ys, float& dispdiff, unsigned int iMaxN );

Expand All @@ -134,7 +134,7 @@ class VDispAnalyzer
float* img_tgrad, float* img_loss, int* img_ntubes,
double* img_weight,
double xoff_4, double yoff_4,
float * img_fui, float* img_pedvar, int* img_fitstat );
float* img_fui, float* img_pedvar, int* img_fitstat );

float evaluate( float iWidth, float iLength, float iAsymm, float iDist,
float iSize, float iPedvar, float itgrad, float iLoss,
Expand Down
8 changes: 4 additions & 4 deletions inc/VMeanScaledVariables.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ using namespace std;

namespace VMeanScaledVariables
{
double mean_reduced_scaled_variable(unsigned int ntel, float *data, float *mc_value, float *mc_sigma);
double mean_reduced_scaled_variable(unsigned int ntel, float *data, double *mc_value, double *mc_sigma);
double mean_reduced_scaled_variable( unsigned int ntel, float* data, float* mc_value, float* mc_sigma );
double mean_reduced_scaled_variable( unsigned int ntel, float* data, double* mc_value, double* mc_sigma );

double mean_scaled_variable(unsigned int ntel, float *data, float *size, float *mc_value );
double mean_scaled_variable(unsigned int ntel, float *data, float *size, double *mc_value );
double mean_scaled_variable( unsigned int ntel, float* data, float* size, float* mc_value );
double mean_scaled_variable( unsigned int ntel, float* data, float* size, double* mc_value );
}

#endif
2 changes: 1 addition & 1 deletion inc/VTableLookupDataHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class VTableLookupDataHandler
{
return fRTel;
}
float * getDistanceToCore( ULong64_t iTelType );
float* getDistanceToCore( ULong64_t iTelType );
int getEventNumber()
{
return eventNumber;
Expand Down
6 changes: 3 additions & 3 deletions inc/VUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ namespace VUtilities
}

// friendlier colors
inline int color_id(unsigned int index)
inline int color_id( unsigned int index )
{
// Array containing the specified ROOT color ID
int colors[] = {12, 633, 9, 418, 801, 881, 900, 32, 423, 393, 798, 616, 409};
unsigned int size = sizeof(colors) / sizeof(colors[0]);
unsigned int size = sizeof( colors ) / sizeof( colors[0] );

if (index >= size)
if( index >= size )
{
return index;
}
Expand Down
66 changes: 33 additions & 33 deletions src/CData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Int_t CData::GetEntry( Long64_t entry )

if( fTelescopeCombination > 0 && fTelescopeCombination != 15 )
{
reconstruct_3tel_images(fTelescopeCombination);
reconstruct_3tel_images( fTelescopeCombination );
}
return a;
}
Expand Down Expand Up @@ -632,26 +632,26 @@ Bool_t CData::Notify()
* - ErecS, EChi2S, dES (lookup table based energy reconstruction results)
*
*/
void CData::reconstruct_3tel_images(unsigned long int telescope_combination)
void CData::reconstruct_3tel_images( unsigned long int telescope_combination )
{
reconstruct_3tel_reset_variables();
bitset<sizeof(long int) * 4> tel_bitset(telescope_combination);
bitset<sizeof(long int) * 4> tel_nimages(0);
bitset<sizeof(long int ) * 4> tel_bitset( telescope_combination );
bitset<sizeof(long int ) * 4> tel_nimages( 0 );

// update list of available images
UInt_t tel_list[VDST_MAXTELESCOPES];
for(unsigned int i = 0; i < VDST_MAXTELESCOPES; i++ )
for( unsigned int i = 0; i < VDST_MAXTELESCOPES; i++ )
{
tel_list[i] = 9999;
}
unsigned int z = 0;
for(int i = 0; i < NImages; i++ )
for( int i = 0; i < NImages; i++ )
{
unsigned int t = ImgSel_list[i];
if( tel_bitset.test(t) )
if( tel_bitset.test( t ) )
{
tel_list[z]=t;
tel_nimages.set(t);
tel_list[z] = t;
tel_nimages.set( t );
z++;
}
else
Expand All @@ -664,7 +664,7 @@ void CData::reconstruct_3tel_images(unsigned long int telescope_combination)
}
// ImgSel_list lists the available images (e.g., 2, 3, 4) and is of length NImages
NImages = z;
for(int i = 0; i < NImages; i++ )
for( int i = 0; i < NImages; i++ )
{
ImgSel_list[i] = tel_list[i];
}
Expand All @@ -676,7 +676,7 @@ void CData::reconstruct_3tel_images(unsigned long int telescope_combination)
}

SizeSecondMax = 0.;
for(int i = 0; i < NImages; i++ )
for( int i = 0; i < NImages; i++ )
{
unsigned int t = ImgSel_list[i];
if( size[t] > SizeSecondMax )
Expand Down Expand Up @@ -749,10 +749,10 @@ void CData::reconstruct_3tel_images_scaled_emission_height()
*/
void CData::reconstruct_3tel_images_scaled_variables()
{
MSCW = VMeanScaledVariables::mean_reduced_scaled_variable(4, width, MSCWT, MSCWTSigma );
MSCL = VMeanScaledVariables::mean_reduced_scaled_variable(4, length, MSCLT, MSCLTSigma );
MWR = VMeanScaledVariables::mean_scaled_variable(4, width, size, MSCWT );
MLR = VMeanScaledVariables::mean_scaled_variable(4, length, size, MSCLT );
MSCW = VMeanScaledVariables::mean_reduced_scaled_variable( 4, width, MSCWT, MSCWTSigma );
MSCL = VMeanScaledVariables::mean_reduced_scaled_variable( 4, length, MSCLT, MSCLTSigma );
MWR = VMeanScaledVariables::mean_scaled_variable( 4, width, size, MSCWT );
MLR = VMeanScaledVariables::mean_scaled_variable( 4, length, size, MSCLT );
}

/*
Expand All @@ -763,12 +763,12 @@ void CData::reconstruct_3tel_images_direction()
{
// intersection method
VSimpleStereoReconstructor i_SR;
i_SR.initialize(2, fStereoMinAngle);
i_SR.initialize( 2, fStereoMinAngle );
i_SR.reconstruct_direction(
fTelX.size(),
ArrayPointing_Elevation, ArrayPointing_Azimuth,
fTelX.data(), fTelY.data(), fTelZ.data(),
size, cen_x, cen_y, cosphi, sinphi, width, length, 0 );
fTelX.size(),
ArrayPointing_Elevation, ArrayPointing_Azimuth,
fTelX.data(), fTelY.data(), fTelZ.data(),
size, cen_x, cen_y, cosphi, sinphi, width, length, 0 );
Xoff_intersect = i_SR.fShower_Xoffset;
Yoff_intersect = i_SR.fShower_Yoffset;

Expand All @@ -777,7 +777,7 @@ void CData::reconstruct_3tel_images_direction()
float xs, ys, dispdiff;

VDispAnalyzer i_dispAnalyzer;
i_dispAnalyzer.calculateMeanShowerDirection(v_x, v_y, v_weight, xs, ys, dispdiff, v_x.size() );
i_dispAnalyzer.calculateMeanShowerDirection( v_x, v_y, v_weight, xs, ys, dispdiff, v_x.size() );
// expect that this is called for MC only
Xoff = Xoff_derot = xs;
Yoff = Yoff_derot = ys;
Expand All @@ -795,21 +795,21 @@ void CData::reconstruct_3tel_images_direction()

// core reconstruction
i_SR.reconstruct_core(
fTelX.size(),
ArrayPointing_Elevation, ArrayPointing_Azimuth,
Xoff, Yoff,
fTelX.data(), fTelY.data(), fTelZ.data(),
size, cen_x, cen_y, cosphi, sinphi, width, length, 0 );
fTelX.size(),
ArrayPointing_Elevation, ArrayPointing_Azimuth,
Xoff, Yoff,
fTelX.data(), fTelY.data(), fTelZ.data(),
size, cen_x, cen_y, cosphi, sinphi, width, length, 0 );
Xcore = i_SR.fShower_Xcore;
Ycore = i_SR.fShower_Ycore;
bitset<sizeof(long int) * 4> tel_nimages(ImgSel);
bitset<sizeof(long int ) * 4> tel_nimages( ImgSel );
for( unsigned int t = 0; t < fTelX.size(); t++ )
{
R_core[t] = -9999.;
if( tel_nimages.test(t) && Ze >= 0. && Xcore > -9998. && Ycore > -9998. )
if( tel_nimages.test( t ) && Ze >= 0. && Xcore > -9998. && Ycore > -9998. )
{
R_core[t] = VUtilities::line_point_distance(
Ycore, -1.*Xcore, 0., Ze, Az, fTelY[t], -1.*fTelX[t], fTelZ[t] );
Ycore, -1.*Xcore, 0., Ze, Az, fTelY[t], -1.*fTelX[t], fTelZ[t] );
}
}
}
Expand All @@ -822,11 +822,11 @@ void CData::reconstruct_3tel_images_energy()
{
VDispAnalyzer i_dispAnalyzer;
vector< float > disp_energy_T;
for(unsigned int t = 0; t < fTelX.size(); t++ )
for( unsigned int t = 0; t < fTelX.size(); t++ )
{
disp_energy_T.push_back( E[t] );
}
i_dispAnalyzer.calculateMeanEnergy( disp_energy_T, size, 0);
i_dispAnalyzer.calculateMeanEnergy( disp_energy_T, size, 0 );
Erec = i_dispAnalyzer.getEnergy();
EChi2 = i_dispAnalyzer.getEnergyChi2();
dE = i_dispAnalyzer.getEnergydES();
Expand All @@ -839,8 +839,8 @@ void CData::reconstruct_3tel_images_energy()
*
*/
void CData::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 )
unsigned long int telescope_combination,
double stereo_reconstruction_min_angle, vector< double > tel_x, vector< double > tel_y, vector< double > tel_z )
{
fTelescopeCombination = telescope_combination;
fStereoMinAngle = stereo_reconstruction_min_angle;
Expand Down
10 changes: 5 additions & 5 deletions src/VDispAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ void VDispAnalyzer::calculateEnergies( unsigned int i_ntel,
{
return;
}
calculateMeanEnergy(fdisp_energy_T, img_size, img_weight);
calculateMeanEnergy( fdisp_energy_T, img_size, img_weight );
}

/*
Expand All @@ -789,8 +789,8 @@ void VDispAnalyzer::calculateEnergies( unsigned int i_ntel,
*/
void VDispAnalyzer::calculateMeanEnergy(
vector< float >& disp_energy_T,
float *img_size,
double* img_weight)
float* img_size,
double* img_weight )
{
vector< double > energy_tel;
vector< double > energy_weight;
Expand Down Expand Up @@ -853,8 +853,8 @@ void VDispAnalyzer::calculateMeanEnergy(
}
if( energy_tel.size() > 1 )
{
fdisp_energy_chi /= ( (float)energy_tel.size() - 1. );
fdisp_energy_dEs /= (float)energy_tel.size();
fdisp_energy_chi /= (( float )energy_tel.size() - 1. );
fdisp_energy_dEs /= ( float )energy_tel.size();
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/VGammaHadronCuts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ bool VGammaHadronCuts::applyTMVACut( int i )
fTMVA_EvaluationResult = -99.;
if( fTMVAEvaluator )
{
bool i_TMVA_Evaluation = fTMVAEvaluator->evaluate(false, true);
bool i_TMVA_Evaluation = fTMVAEvaluator->evaluate( false, true );
fTMVA_EvaluationResult = fTMVAEvaluator->getTMVA_EvaluationResult();
return i_TMVA_Evaluation;
}
Expand Down
2 changes: 1 addition & 1 deletion src/VInstrumentResponseFunctionRunParameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ bool VInstrumentResponseFunctionRunParameter::readRunParameters( string ifilenam
telconfig_arraycentre_X = telconfig->getArrayCentreX();
telconfig_arraycentre_Y = telconfig->getArrayCentreY();
telconfig_arraymax = telconfig->getArrayMaxSize();
for(unsigned int t = 0; t < telconfig->fChain->GetEntries(); t++ )
for( unsigned int t = 0; t < telconfig->fChain->GetEntries(); t++ )
{
telconfig->GetEntry( t );
telconfig_telx.push_back( telconfig->TelX );
Expand Down
36 changes: 18 additions & 18 deletions src/VMeanScaledVariables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
* Mean reduced scaled variable (e.g. mscw)
*
*/
double VMeanScaledVariables::mean_reduced_scaled_variable(unsigned int ntel, float *data_value, float *mc_value, float *mc_sigma)
double VMeanScaledVariables::mean_reduced_scaled_variable( unsigned int ntel, float* data_value, float* mc_value, float* mc_sigma )
{
double value = 0.;
double weight = 0;
double value = 0.;
double weight = 0;

if(ntel < 1)
{
return -9999.;
}
if( ntel < 1 )
{
return -9999.;
}

for( unsigned int t = 0; t < ntel; t++ )
{
if( mc_value[t] > -90. && mc_sigma[t] > -90. )
{
value += ( data_value[t] - mc_value[t] ) / mc_sigma[t] * (mc_value[t] * mc_value[t]) / ( mc_sigma[t] * mc_sigma[t] );
value += ( data_value[t] - mc_value[t] ) / mc_sigma[t] * ( mc_value[t] * mc_value[t] ) / ( mc_sigma[t] * mc_sigma[t] );
weight += ( mc_value[t] * mc_value[t] ) / ( mc_sigma[t] * mc_sigma[t] );
}
}
Expand All @@ -34,23 +34,23 @@ double VMeanScaledVariables::mean_reduced_scaled_variable(unsigned int ntel, flo
return value / weight;
}

double VMeanScaledVariables::mean_reduced_scaled_variable(unsigned int ntel, float *data_value, double *mc_value, double *mc_sigma)
double VMeanScaledVariables::mean_reduced_scaled_variable( unsigned int ntel, float* data_value, double* mc_value, double* mc_sigma )
{
float f_mc_value[ntel];
float f_mc_sigma[ntel];
for(unsigned int t = 0; t < ntel; t++ )
for( unsigned int t = 0; t < ntel; t++ )
{
f_mc_value[t] = (float)mc_value[t];
f_mc_sigma[t] = (float)mc_sigma[t];
f_mc_value[t] = ( float )mc_value[t];
f_mc_sigma[t] = ( float )mc_sigma[t];
}
return VMeanScaledVariables::mean_reduced_scaled_variable(ntel, data_value, f_mc_value, f_mc_sigma );
return VMeanScaledVariables::mean_reduced_scaled_variable( ntel, data_value, f_mc_value, f_mc_sigma );
}

/*
* mean scaled variables (e.g. MWR)
*
*/
double VMeanScaledVariables::mean_scaled_variable(unsigned int ntel, float *data, float *size, float *mc_value )
double VMeanScaledVariables::mean_scaled_variable( unsigned int ntel, float* data, float* size, float* mc_value )
{
double imr = 0.;
double inr = 0.;
Expand All @@ -70,12 +70,12 @@ double VMeanScaledVariables::mean_scaled_variable(unsigned int ntel, float *data
return -9999.;
}

double VMeanScaledVariables::mean_scaled_variable(unsigned int ntel, float *data, float *size, double *mc_value )
double VMeanScaledVariables::mean_scaled_variable( unsigned int ntel, float* data, float* size, double* mc_value )
{
float f_mc_value[ntel];
for(unsigned int t = 0; t < ntel; t++ )
for( unsigned int t = 0; t < ntel; t++ )
{
f_mc_value[t] = (float)mc_value[t];
f_mc_value[t] = ( float )mc_value[t];
}
return VMeanScaledVariables::mean_scaled_variable(ntel, data, size, f_mc_value );
return VMeanScaledVariables::mean_scaled_variable( ntel, data, size, f_mc_value );
}
12 changes: 6 additions & 6 deletions src/VPlotAnasumHistograms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,13 +742,13 @@ TCanvas* VPlotAnasumHistograms::plot_theta2( double t2min, double t2max, int irb

if( containment_lines )
{
TLine *iL_68 = new TLine( t_68, 0., t_68, htheta2_diff->GetMaximum()*0.5);
iL_68->SetLineStyle(2);
iL_68->SetLineColor(2);
TLine *iL_68 = new TLine( t_68, 0., t_68, htheta2_diff->GetMaximum() * 0.5 );
iL_68->SetLineStyle( 2 );
iL_68->SetLineColor( 2 );
iL_68->Draw();
TLine *iL_95 = new TLine( t_95, 0., t_95, htheta2_diff->GetMaximum()*0.5);
iL_95->SetLineStyle(2);
iL_95->SetLineColor(2);
TLine *iL_95 = new TLine( t_95, 0., t_95, htheta2_diff->GetMaximum() * 0.5 );
iL_95->SetLineStyle( 2 );
iL_95->SetLineColor( 2 );
iL_95->Draw();
}

Expand Down
Loading

0 comments on commit a3e7ab2

Please sign in to comment.