Anp::HistBasic Class Reference

#include <PlotBasic.h>

Inheritance diagram for Anp::HistBasic:
Anp::Base

List of all members.

Public Member Functions

 HistBasic ()
virtual ~HistBasic ()
bool Fill (const Basic &basic, double weight=1.0)
bool Make (TDirectory *dir)

Private Member Functions

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

Private Attributes

TDirectory * fDir
bool fPlot
int fNMiss
TH1 * fActiveFrac
TH1 * fAdc
TH1 * fNPlaneScint
TH1 * fNPlaneSteel
TH1 * fNPlaneRatio
TH1 * fNPlaneUVDiff
TH1 * fNStrip
TH1 * fNStripUVDiff
TH1 * fPe
TH1 * fPlaneBeg
TH1 * fPlaneEnd
TH1 * fSigCor
TH1 * fSigCorZoom
TH1 * fSigCorUVDiff
TH1 * fSigCorUVFrac
TH1 * fSigCorPerStrip
TH1 * fSigCorPerPlane
TH1 * fSigMap
TH1 * fTimeSpan

Detailed Description

Definition at line 25 of file PlotBasic.h.


Constructor & Destructor Documentation

Anp::HistBasic::HistBasic (  ) 

Definition at line 28 of file PlotBasic.cxx.

00029    :fDir(0),
00030     fPlot(false),
00031     fNMiss(0),
00032     fActiveFrac(0),
00033     fAdc(0),
00034     fNPlaneScint(0),
00035     fNPlaneSteel(0),
00036     fNPlaneRatio(0),
00037     fNPlaneUVDiff(0),
00038     fNStrip(0),
00039     fNStripUVDiff(0),
00040     fPe(0),
00041     fPlaneBeg(0),
00042     fPlaneEnd(0),
00043     fSigCor(0),
00044     fSigCorZoom(0),
00045     fSigCorUVDiff(0),
00046     fSigCorUVFrac(0),
00047     fSigCorPerStrip(0),
00048     fSigCorPerPlane(0),
00049     fSigMap(0),
00050     fTimeSpan(0)
00051 {
00052 }

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

Definition at line 55 of file PlotBasic.cxx.

00056 {
00057 }


Member Function Documentation

bool Anp::HistBasic::Fill ( const Basic basic,
double  weight = 1.0 
)

Definition at line 60 of file PlotBasic.cxx.

References Anp::Basic::ActiveFrac(), Anp::Basic::ADC(), Anp::Basic::BegPlane(), Anp::Basic::EndPlane(), fActiveFrac, fAdc, fNPlaneRatio, fNPlaneScint, fNPlaneSteel, fNPlaneUVDiff, fNStrip, fNStripUVDiff, fPe, fPlaneBeg, fPlaneEnd, fPlot, fSigCor, fSigCorPerPlane, fSigCorPerStrip, fSigCorUVDiff, fSigCorUVFrac, fSigCorZoom, fSigMap, fTimeSpan, Anp::Basic::MaxTime(), Anp::Basic::MinTime(), Anp::Basic::NPlaneScint(), Anp::Basic::NPlaneSteel(), Anp::Basic::NStrip(), Anp::Basic::NUPlane(), Anp::Basic::NUStrip(), Anp::Basic::NVPlane(), Anp::Basic::NVStrip(), Anp::Basic::PE(), Anp::Basic::SigCor(), Anp::Basic::SigCorU(), Anp::Basic::SigCorV(), and Anp::Basic::SigMap().

00061 {
00062    //
00063    // Fill histograms if they have been created
00064    //
00065    if(!fPlot) return false;
00066 
00067    fActiveFrac  -> Fill(basic.ActiveFrac(), weight);
00068    fAdc         -> Fill(basic.ADC(), weight);
00069    fNStrip      -> Fill(basic.NStrip(), weight);
00070    fNPlaneScint -> Fill(basic.NPlaneScint(), weight);
00071    fNPlaneSteel -> Fill(basic.NPlaneSteel(), weight);
00072    fPe          -> Fill(basic.PE(), weight);
00073    fSigCor      -> Fill(basic.SigCor(), weight);
00074    fSigCorZoom  -> Fill(basic.SigCor(), weight);
00075    fSigMap      -> Fill(basic.SigMap(), weight);
00076 
00077    const double nsteel = basic.NPlaneSteel();
00078    const double nscint = basic.NPlaneScint();
00079    const double nstrip = basic.NStrip();
00080    const double sigcor = basic.SigCor();
00081 
00082    if(nsteel > 0.0) fNPlaneRatio    -> Fill(basic.NPlaneScint()/nsteel, weight);
00083    if(nscint > 0.0) fSigCorPerPlane -> Fill(basic.SigCor()/nscint, weight);
00084    if(nstrip > 0.0) fSigCorPerStrip -> Fill(basic.SigCor()/nstrip, weight);
00085    if(sigcor > 0.0) fSigCorUVFrac  -> Fill((basic.SigCorU() - basic.SigCorV())/sigcor, weight);
00086 
00087    fNPlaneUVDiff -> Fill(basic.NUPlane() - basic.NVPlane(), weight);
00088    fNStripUVDiff -> Fill(basic.NUStrip() - basic.NVStrip(), weight);
00089    fSigCorUVDiff -> Fill(basic.SigCorU() - basic.SigCorV(), weight);
00090 
00091    fTimeSpan -> Fill(1.0e9*(basic.MaxTime() - basic.MinTime()), weight);
00092    fPlaneBeg -> Fill(basic.BegPlane(), weight);
00093    fPlaneEnd -> Fill(basic.EndPlane(), weight);
00094 
00095    return true;
00096 }

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

Definition at line 140 of file PlotBasic.cxx.

References Anp::HistMan::CreateTH1(), fDir, fNMiss, Anp::HistMan::Instance(), and Anp::SetDir().

Referenced by Make().

00141 {
00142    TH1 *h = HistMan::Instance().CreateTH1(key, "basic");
00143    if(h)
00144    {
00145       Anp::SetDir(h, fDir, name);
00146    }
00147    else
00148    {
00149       ++fNMiss;
00150    }
00151 
00152    return h;
00153 }

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

Definition at line 99 of file PlotBasic.cxx.

References fActiveFrac, fAdc, fDir, fNMiss, fNPlaneRatio, fNPlaneScint, fNPlaneSteel, fNPlaneUVDiff, fNStrip, fNStripUVDiff, fPe, fPlaneBeg, fPlaneEnd, fPlot, fSigCor, fSigCorPerPlane, fSigCorPerStrip, fSigCorUVDiff, fSigCorUVFrac, fSigCorZoom, fSigMap, fTimeSpan, and GetTH1().

00100 {
00101    fPlot = false;
00102 
00103    if(!dir) return false;
00104 
00105    fDir = dir;
00106 
00107    fActiveFrac     = HistBasic::GetTH1("active_frac");
00108    fAdc            = HistBasic::GetTH1("adc");
00109    fNPlaneScint    = HistBasic::GetTH1("nplane_scint");
00110    fNPlaneSteel    = HistBasic::GetTH1("nplane_steel");
00111    fNPlaneRatio    = HistBasic::GetTH1("nplane_ratio");
00112    fNPlaneUVDiff   = HistBasic::GetTH1("nplane_uvdiff");
00113    fNStrip         = HistBasic::GetTH1("nstrip");
00114    fNStripUVDiff   = HistBasic::GetTH1("nstrip_uvdiff");
00115    fPe             = HistBasic::GetTH1("pe");
00116    fPlaneBeg       = HistBasic::GetTH1("plane_beg");
00117    fPlaneEnd       = HistBasic::GetTH1("plane_end");
00118    fSigCor         = HistBasic::GetTH1("sigcor");
00119    fSigCorZoom     = HistBasic::GetTH1("sigcor_zoom");
00120    fSigCorUVDiff   = HistBasic::GetTH1("sigcor_uvdiff");
00121    fSigCorUVFrac   = HistBasic::GetTH1("sigcor_uvfrac");
00122    fSigCorPerPlane = HistBasic::GetTH1("sigcor_per_plane");
00123    fSigCorPerStrip = HistBasic::GetTH1("sigcor_per_strip");
00124    fSigMap         = HistBasic::GetTH1("sigmap");
00125    fTimeSpan       = HistBasic::GetTH1("time_span");
00126 
00127    if(fNMiss == 0)
00128    {
00129       fPlot = true;
00130    }
00131    else
00132    {
00133       cerr << "HistBasic::Make - missed " << fNMiss << " histograms" << endl;      
00134    }
00135 
00136    return fPlot;
00137 }


Member Data Documentation

Definition at line 47 of file PlotBasic.h.

Referenced by Fill(), and Make().

TH1* Anp::HistBasic::fAdc [private]

Definition at line 48 of file PlotBasic.h.

Referenced by Fill(), and Make().

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

Definition at line 42 of file PlotBasic.h.

Referenced by GetTH1(), and Make().

int Anp::HistBasic::fNMiss [private]

Definition at line 45 of file PlotBasic.h.

Referenced by GetTH1(), and Make().

Definition at line 51 of file PlotBasic.h.

Referenced by Fill(), and Make().

Definition at line 49 of file PlotBasic.h.

Referenced by Fill(), and Make().

Definition at line 50 of file PlotBasic.h.

Referenced by Fill(), and Make().

Definition at line 52 of file PlotBasic.h.

Referenced by Fill(), and Make().

TH1* Anp::HistBasic::fNStrip [private]

Definition at line 53 of file PlotBasic.h.

Referenced by Fill(), and Make().

Definition at line 54 of file PlotBasic.h.

Referenced by Fill(), and Make().

TH1* Anp::HistBasic::fPe [private]

Definition at line 55 of file PlotBasic.h.

Referenced by Fill(), and Make().

TH1* Anp::HistBasic::fPlaneBeg [private]

Definition at line 56 of file PlotBasic.h.

Referenced by Fill(), and Make().

TH1* Anp::HistBasic::fPlaneEnd [private]

Definition at line 57 of file PlotBasic.h.

Referenced by Fill(), and Make().

bool Anp::HistBasic::fPlot [private]

Definition at line 44 of file PlotBasic.h.

Referenced by Fill(), and Make().

TH1* Anp::HistBasic::fSigCor [private]

Definition at line 58 of file PlotBasic.h.

Referenced by Fill(), and Make().

Definition at line 63 of file PlotBasic.h.

Referenced by Fill(), and Make().

Definition at line 62 of file PlotBasic.h.

Referenced by Fill(), and Make().

Definition at line 60 of file PlotBasic.h.

Referenced by Fill(), and Make().

Definition at line 61 of file PlotBasic.h.

Referenced by Fill(), and Make().

Definition at line 59 of file PlotBasic.h.

Referenced by Fill(), and Make().

TH1* Anp::HistBasic::fSigMap [private]

Definition at line 64 of file PlotBasic.h.

Referenced by Fill(), and Make().

TH1* Anp::HistBasic::fTimeSpan [private]

Definition at line 65 of file PlotBasic.h.

Referenced by Fill(), and Make().


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

Generated on 24 Jul 2018 for loon by  doxygen 1.6.1