pueoAnalysisTools
Loading...
Searching...
No Matches
effective_area Class Reference

An effective area calculator. More...

#include <effective_area.h>

Public Attributes

std::filesystem::path PUEO_MC_DATA
 Path to where the run/ directories are stored.
 
double effective_area_score = 0.
 The combined effective areas of all the runs in PUEO_MC_DATA.
 

Private Member Functions

void compute_mean_interaction_length ()
 Computes the mean interaction_length by going through the DataFrame df.
 
void compute_total_weight ()
 Computes total_num_weighted_passEvents by going through the DataFrame df.
 
void compute_effective_area ()
 Computes effective_area_score based on all runs in PUEO_MC_DATA.
 

Private Attributes

std::unique_ptr< TChain > allTree_chain_ptr
 A chain that combines the allTrees in all the IceFinal files in PUEO_MC_DATA.
 
int total_num_neutrino_simulated = 0
 The (combined) total number of neutrinos thrown in PUEO_MC_DATA.
 
std::unique_ptr< TChain > passTree_chain_ptr
 A chain that combines the passTree in all the IceFinal files in PUEO_MC_DATA.
 
int passTree_length = 0
 Similar to total_num_neutrino_simulated; this is the length of passTree_chain_ptr.
 
std::unique_ptr< ROOT::RDataFrame > df
 CERN ROOT DataFrame built based on passTree_chain_ptr.
 
double interaction_length = 0
 Interaction length in kilometers.
 
double total_num_weighted_passEvents = 0.
 The (combined) total number of passed events (weighted) in PUEO_MC_DATA.
 
const double ICE_VOLUME = 26859227.0607
 Antarctica ice volume [km \(^3\)].
 

Detailed Description

An effective area calculator.

Definition at line 26 of file effective_area.h.

Member Function Documentation

◆ compute_mean_interaction_length()

void compute_mean_interaction_length ( )
private

Computes the mean interaction_length by going through the DataFrame df.

Parameters
[in]df
[out]interaction_length
Note
Only called if passTree_length is positive.

Definition at line 30 of file effective_area.cpp.

◆ compute_total_weight()

void compute_total_weight ( )
private

Computes total_num_weighted_passEvents by going through the DataFrame df.

Parameters
[in]df
[out]total_num_weighted_passEvents

Definition at line 36 of file effective_area.cpp.

◆ compute_effective_area()

void compute_effective_area ( )
private

Computes effective_area_score based on all runs in PUEO_MC_DATA.

Parameters
[in]total_num_weighted_passEventsSee total_num_weighted_passEvents
[in]interaction_lengthSee interaction_length
[in]total_num_neutrino_simulatedSee total_num_neutrino_simulated
[out]effective_area_score
Note
Only called if interaction_length is positive.
Todo
NiceMC has an extra \(\rho\)-factor (although close to 1) for computing this; what is it?

The effective volume is defined by

\[V_{\rm eff} \equiv V_a \cdot 4 \pi \cdot \frac{ N_{\rm passed} }{N_{\rm total}} \]

where \(V_a\) denotes the ICE_VOLUME, \( N_{\rm passed} \) the total_num_weighted_passEvents, and \(N_{\rm total} \) the total_num_neutrino_simulated. The effective area is then defined by

\[A_{\rm eff} \equiv V_{\rm eff} \div l_{\rm int} \]

where \(l_{\rm int}\) is the interaction_length.

Definition at line 50 of file effective_area.cpp.

Member Data Documentation

◆ PUEO_MC_DATA

std::filesystem::path PUEO_MC_DATA

Path to where the run/ directories are stored.

Warning
it is assumed that these runs are of the same energy.

Example file structure:

e513ad03_2025Feb28_f0ce4e36_2025Feb28_nnt_400_energy_19/ <--PUEO_MC_DATA
├── run1
│   └── IceFinal_1_allTree.root
├── run10
│   └── IceFinal_10_allTree.root
├── run100
│   └── IceFinal_100_allTree.root
├── run11
│   └── IceFinal_11_allTree.root
├── run12
│   └── IceFinal_12_allTree.root
├── run13
│   └── IceFinal_13_allTree.root
--snip--
std::filesystem::path PUEO_MC_DATA
Path to where the run/ directories are stored.

Definition at line 53 of file effective_area.h.

◆ effective_area_score

double effective_area_score = 0.

The combined effective areas of all the runs in PUEO_MC_DATA.

See compute_effective_area to see how this is calculated.

Definition at line 60 of file effective_area.h.

◆ allTree_chain_ptr

std::unique_ptr<TChain> allTree_chain_ptr
private

A chain that combines the allTrees in all the IceFinal files in PUEO_MC_DATA.

This chain contains every single event; ie. its length gives us total_num_neutrino_simulated.

Definition at line 68 of file effective_area.h.

◆ total_num_neutrino_simulated

int total_num_neutrino_simulated = 0
private

The (combined) total number of neutrinos thrown in PUEO_MC_DATA.

For example, if each run simulates 400 neutrinos, and there are 100 runs, then this would be 40k.

Note
There is no need for all the runs to simulate the same number of neutrinos, although this is probably the case.

Definition at line 76 of file effective_area.h.

◆ passTree_chain_ptr

std::unique_ptr<TChain> passTree_chain_ptr
private

A chain that combines the passTree in all the IceFinal files in PUEO_MC_DATA.

This chain is used to construct df, which in turn is used to compute total_num_weighted_passEvents.

Definition at line 83 of file effective_area.h.

◆ passTree_length

int passTree_length = 0
private

Similar to total_num_neutrino_simulated; this is the length of passTree_chain_ptr.

This is used to guarantee that compute_mean_interaction_length does not divide by zero.

Note
This is not what we use to compute effective_area, because passed events have to be weighted. See total_num_weighted_passEvents.

Definition at line 92 of file effective_area.h.

◆ df

std::unique_ptr<ROOT::RDataFrame> df
private

CERN ROOT DataFrame built based on passTree_chain_ptr.

This is then used to iterate through all the (passed) events for computing total_num_weighted_passEvents.

Definition at line 99 of file effective_area.h.

◆ interaction_length

double interaction_length = 0
private

Interaction length in kilometers.

The mean interaction length of the pass events, computed by compute_mean_interaction_length.

Todo
Is it really the mean interaction length that we should be using?

Definition at line 117 of file effective_area.h.

◆ total_num_weighted_passEvents

double total_num_weighted_passEvents = 0.
private

The (combined) total number of passed events (weighted) in PUEO_MC_DATA.

  • A single passed event is weighted based on several paramers.
  • Let \(w1\), \(w2\), and \(w3\) represent neutrino.path.weight, loop.positionWeight, and loop.directionWeight, then the total weight of this event is \( w1 \div (w2 \cdot w3) \)
  • See compute_total_weight.

Definition at line 133 of file effective_area.h.


The documentation for this class was generated from the following files: