Anp::HistFlux Class Reference

#include <PlotFlux.h>

Inheritance diagram for Anp::HistFlux:
Anp::Base

List of all members.

Public Member Functions

 HistFlux ()
virtual ~HistFlux ()
bool Fill (const FluxInfo &flux, double weight)
bool Make (TDirectory *dir)

Private Member Functions

TH1 * GetTH1 (const std::string &key, const std::string &name="")
TH2 * GetTH2 (const std::string &key, const std::string &name="")

Private Attributes

bool fPlot
bool fUseImp
int fDetector
int fNMiss
TDirectory * fDir
TH1 * fNDecay
TH1 * fNType
TH1 * fPType
TH1 * fParentDecPt
TH1 * fParentDecPtZoom
TH1 * fParentDecPz
TH1 * fParentDecPzZoom
TH1 * fParentTgtPt
TH1 * fParentTgtPtZoom
TH1 * fParentTgtPz
TH1 * fParentTgtPzZoom
TH1 * fWeightImpor
TH1 * fWeightInput
TH2 * fParentDecPtPz
TH2 * fParentTgtPtPz
TH2 * fParentDecPtPzZoom
TH2 * fParentTgtPtPzZoom

Friends

class PlotFlux

Detailed Description

Definition at line 24 of file PlotFlux.h.


Constructor & Destructor Documentation

Anp::HistFlux::HistFlux (  ) 

Definition at line 31 of file PlotFlux.cxx.

00032    :fPlot(false),
00033     fUseImp(false),
00034     fDetector(0),
00035     fNMiss(0),
00036     fDir(0)
00037 {
00038 }

Anp::HistFlux::~HistFlux (  )  [virtual]

Definition at line 41 of file PlotFlux.cxx.

00042 {
00043 }


Member Function Documentation

bool Anp::HistFlux::Fill ( const FluxInfo flux,
double  weight 
)

Definition at line 46 of file PlotFlux.cxx.

References fDetector, fNDecay, fNType, fParentDecPt, fParentDecPtPz, fParentDecPtPzZoom, fParentDecPtZoom, fParentDecPz, fParentDecPzZoom, fParentTgtPt, fParentTgtPtPz, fParentTgtPtPzZoom, fParentTgtPtZoom, fParentTgtPz, fParentTgtPzZoom, fPlot, fPType, fUseImp, fWeightImpor, fWeightInput, Anp::FluxInfo::ndecay, Anp::FluxInfo::nimpwt, Anp::FluxInfo::ntype, Anp::FluxInfo::nwtfar, Anp::FluxInfo::nwtnear, Anp::FluxInfo::pdpx, Anp::FluxInfo::pdpy, Anp::FluxInfo::pdpz, Anp::FluxInfo::ptype, Anp::FluxInfo::tpx, Anp::FluxInfo::tpy, and Anp::FluxInfo::tpz.

00047 {
00048    if(!fPlot) return false;
00049 
00050    fWeightImpor -> Fill(flux.nimpwt);
00051    fWeightInput -> Fill(weight);
00052 
00053    if(fUseImp)
00054    {
00055       weight *= flux.nimpwt;
00056    }
00057 
00058    if     (fDetector == 1) weight *= flux.nwtnear;
00059    else if(fDetector == 2) weight *= flux.nwtfar;
00060 
00061    const double pdec_pt = std::sqrt(flux.pdpy*flux.pdpy + flux.pdpx*flux.pdpx);
00062    const double ptgt_pt = std::sqrt(flux.tpy *flux.tpy  + flux.tpx *flux.tpx);
00063 
00064    fNDecay -> Fill(flux.ndecay, weight);
00065    fNType  -> Fill(flux.ntype,  weight);
00066    fPType  -> Fill(flux.ptype,  weight);
00067 
00068    fParentDecPt     -> Fill(pdec_pt,   weight);
00069    fParentDecPtZoom -> Fill(pdec_pt,   weight);
00070    fParentDecPz     -> Fill(flux.pdpz, weight);
00071    fParentDecPzZoom -> Fill(flux.pdpz, weight);
00072 
00073    fParentTgtPt     -> Fill(ptgt_pt,   weight);
00074    fParentTgtPtZoom -> Fill(ptgt_pt,   weight);
00075    fParentTgtPz     -> Fill(flux.tpz,  weight);
00076    fParentTgtPzZoom -> Fill(flux.tpz,  weight);
00077 
00078    fParentDecPtPz -> Fill(flux.pdpz, pdec_pt, weight);
00079    fParentTgtPtPz -> Fill(flux.tpz,  ptgt_pt, weight);
00080 
00081    fParentDecPtPzZoom -> Fill(flux.pdpz, pdec_pt, weight);
00082    fParentTgtPtPzZoom -> Fill(flux.tpz,  ptgt_pt, weight);
00083 
00084    return true;
00085 }

TH1* Anp::HistFlux::GetTH1 ( const std::string &  key,
const std::string &  name = "" 
) [private]

Referenced by Make().

TH2* Anp::HistFlux::GetTH2 ( const std::string &  key,
const std::string &  name = "" 
) [private]

Referenced by Make().

bool Anp::HistFlux::Make ( TDirectory *  dir  ) 

Definition at line 88 of file PlotFlux.cxx.

References fDir, fNDecay, fNMiss, fNType, fParentDecPt, fParentDecPtPz, fParentDecPtPzZoom, fParentDecPtZoom, fParentDecPz, fParentDecPzZoom, fParentTgtPt, fParentTgtPtPz, fParentTgtPtPzZoom, fParentTgtPtZoom, fParentTgtPz, fParentTgtPzZoom, fPlot, fPType, fWeightImpor, fWeightInput, GetTH1(), and GetTH2().

00089 {
00090    if(!dir) return false;
00091    
00092    fDir = dir;
00093    fPlot = false;
00094 
00095    fNDecay = HistFlux::GetTH1("ndecay");
00096    fNType  = HistFlux::GetTH1("ntype");
00097    fPType  = HistFlux::GetTH1("ptype");
00098 
00099    fParentDecPt     = HistFlux::GetTH1("parent_dec_pt");
00100    fParentDecPtZoom = HistFlux::GetTH1("parent_dec_pt_zoom");
00101    fParentDecPz     = HistFlux::GetTH1("parent_dec_pz");
00102    fParentDecPzZoom = HistFlux::GetTH1("parent_dec_pz_zoom");
00103    fParentTgtPt     = HistFlux::GetTH1("parent_tgt_pt");
00104    fParentTgtPtZoom = HistFlux::GetTH1("parent_tgt_pt_zoom");
00105    fParentTgtPz     = HistFlux::GetTH1("parent_tgt_pz");
00106    fParentTgtPzZoom = HistFlux::GetTH1("parent_tgt_pz_zoom");
00107    fWeightImpor     = HistFlux::GetTH1("weight_impor", "weight_impor");
00108    fWeightInput     = HistFlux::GetTH1("weight_input", "weight_input");
00109   
00110    fParentDecPtPz = HistFlux::GetTH2("parent_dec_pt_pz", "parent_2d_dec_pt_pz");
00111    fParentTgtPtPz = HistFlux::GetTH2("parent_tgt_pt_pz", "parent_2d_tgt_pt_pz");
00112 
00113    fParentDecPtPzZoom = HistFlux::GetTH2("parent_dec_pt_pz_zoom", "parent_2d_dec_pt_pz_zoom");
00114    fParentTgtPtPzZoom = HistFlux::GetTH2("parent_tgt_pt_pz_zoom", "parent_2d_tgt_pt_pz_zoom");
00115 
00116    if(fNMiss == 0)
00117    {
00118       fPlot = true;
00119    }
00120    else
00121    {
00122       cerr << "HistFlux::Set - missed " << fNMiss << " histograms" << endl;
00123    }
00124 
00125    return fPlot;
00126 }


Friends And Related Function Documentation

friend class PlotFlux [friend]

Definition at line 42 of file PlotFlux.h.


Member Data Documentation

int Anp::HistFlux::fDetector [private]

Definition at line 46 of file PlotFlux.h.

Referenced by Fill().

TDirectory* Anp::HistFlux::fDir [private]

Definition at line 49 of file PlotFlux.h.

Referenced by Make().

TH1* Anp::HistFlux::fNDecay [private]

Definition at line 54 of file PlotFlux.h.

Referenced by Fill(), and Make().

int Anp::HistFlux::fNMiss [private]

Definition at line 47 of file PlotFlux.h.

Referenced by Make().

TH1* Anp::HistFlux::fNType [private]

Definition at line 55 of file PlotFlux.h.

Referenced by Fill(), and Make().

Definition at line 58 of file PlotFlux.h.

Referenced by Fill(), and Make().

Definition at line 69 of file PlotFlux.h.

Referenced by Fill(), and Make().

Definition at line 72 of file PlotFlux.h.

Referenced by Fill(), and Make().

Definition at line 59 of file PlotFlux.h.

Referenced by Fill(), and Make().

Definition at line 60 of file PlotFlux.h.

Referenced by Fill(), and Make().

Definition at line 61 of file PlotFlux.h.

Referenced by Fill(), and Make().

Definition at line 62 of file PlotFlux.h.

Referenced by Fill(), and Make().

Definition at line 70 of file PlotFlux.h.

Referenced by Fill(), and Make().

Definition at line 73 of file PlotFlux.h.

Referenced by Fill(), and Make().

Definition at line 63 of file PlotFlux.h.

Referenced by Fill(), and Make().

Definition at line 64 of file PlotFlux.h.

Referenced by Fill(), and Make().

Definition at line 65 of file PlotFlux.h.

Referenced by Fill(), and Make().

bool Anp::HistFlux::fPlot [private]

Definition at line 44 of file PlotFlux.h.

Referenced by Fill(), and Make().

TH1* Anp::HistFlux::fPType [private]

Definition at line 56 of file PlotFlux.h.

Referenced by Fill(), and Make().

bool Anp::HistFlux::fUseImp [private]

Definition at line 45 of file PlotFlux.h.

Referenced by Fill().

Definition at line 66 of file PlotFlux.h.

Referenced by Fill(), and Make().

Definition at line 67 of file PlotFlux.h.

Referenced by Fill(), and Make().


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

Generated on 11 Jan 2018 for loon by  doxygen 1.6.1