Functions
GSNovaModel.cxx File Reference
#include <algorithm>
#include <exception>
#include "TFile.h"
#include "TH2.h"
#include "GENIE/Framework/Messenger/Messenger.h"
#include "GenieSNova/src/GSNovaModel.h"

Go to the source code of this file.

Functions

TH2 * ScaleHist (TH2 *hist)
 
bool compare (const GFluxGenerator &g1, const GFluxGenerator &g2)
 

Function Documentation

bool compare ( const GFluxGenerator g1,
const GFluxGenerator g2 
)
TH2* ScaleHist ( TH2 *  hist)

kPc to cm

Luminosity magnitude

in str

in cm2

Definition at line 25 of file GSNovaModel.cxx.

References analysePickle::hist, and norm.

Referenced by genie::supernova::GSNovaModel::ReadModel().

26 {
27  // The flux is normalized to a fluence through 1cm2 surface at 1kPc distance
28  const double kkpcPerCm = 3.086e21; /// kPc to cm
29  const double kLumiMag = 1e50; /// Luminosity magnitude
30  const double kSphereSolidAngle = 4 * TMath::Pi(); /// in str
31  const double kWindowArea = 1; /// in cm2
32 
33  const double norm = (kLumiMag / (kkpcPerCm * kkpcPerCm)) * kWindowArea / kSphereSolidAngle;
34 
35  hist->Scale(norm);
36 
37  return hist;
38 }
Float_t norm