CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Private Attributes
hTOF Class Reference

#include <Histograms.h>

Public Member Functions

void Fill (float tof, float TOF_WC, float TOF_hitPos)
 
 hTOF (std::string name)
 
 hTOF (std::string name_, TFile *file)
 
void Write ()
 
 ~hTOF ()
 

Public Attributes

std::shared_ptr< TH1F > hDeltaTOF_hitPos
 
std::shared_ptr< TH1F > hDeltaTOF_WC
 
std::shared_ptr< TH1F > hTOF_hitPos
 
std::shared_ptr< TH1F > hTOF_true
 
std::shared_ptr< TH1F > hTOF_WC
 

Private Attributes

TString name
 

Detailed Description

Definition at line 611 of file Histograms.h.

Constructor & Destructor Documentation

hTOF::hTOF ( std::string  name)
inline

Definition at line 613 of file Histograms.h.

References hDeltaTOF_hitPos, hDeltaTOF_WC, hTOF_hitPos, hTOF_true, hTOF_WC, and N.

613  {
614  TString N = name.c_str();
615 
616  hTOF_true = std::make_shared<TH1F>(N + "_TOF_true", "TOF true", 200, 10., 35.);
617  hTOF_hitPos = std::make_shared<TH1F>(N + "_TOF_hitPos", "TOF assumed, hit pos", 200, 10., 35.);
618  hTOF_WC = std::make_shared<TH1F>(N + "_TOF_WC", "TOF assumed, wire center", 200, 10., 35.);
619 
620  hDeltaTOF_hitPos = std::make_shared<TH1F>(N + "_DeltaTOF_hitPos", "TOF assumed, hit pos", 200, -5., 5.);
621  hDeltaTOF_WC = std::make_shared<TH1F>(N + "_DelataTOF_WC", "TOF assumed, wire center", 200, -5., 5.);
622  }
TString name
Definition: Histograms.h:665
std::shared_ptr< TH1F > hTOF_true
Definition: Histograms.h:658
#define N
Definition: blowfish.cc:9
std::shared_ptr< TH1F > hTOF_hitPos
Definition: Histograms.h:659
std::shared_ptr< TH1F > hTOF_WC
Definition: Histograms.h:660
std::shared_ptr< TH1F > hDeltaTOF_hitPos
Definition: Histograms.h:661
std::shared_ptr< TH1F > hDeltaTOF_WC
Definition: Histograms.h:662
hTOF::hTOF ( std::string  name_,
TFile *  file 
)
inline

Definition at line 624 of file Histograms.h.

References hDeltaTOF_hitPos, hDeltaTOF_WC, hTOF_hitPos, hTOF_true, hTOF_WC, hist_helper::make_non_owning_cast(), and name.

624  {
625  name = name_.c_str();
626  hTOF_true = hist_helper::make_non_owning_cast<TH1F>(file->Get(name + "_TOF_true"));
627  hTOF_hitPos = hist_helper::make_non_owning_cast<TH1F>(file->Get(name + "_TOF_hitPos"));
628  hTOF_WC = hist_helper::make_non_owning_cast<TH1F>(file->Get(name + "_TOF_WC"));
629  hDeltaTOF_hitPos = hist_helper::make_non_owning_cast<TH1F>(file->Get(name + "_DeltaTOF_hitPos"));
630  hDeltaTOF_WC = hist_helper::make_non_owning_cast<TH1F>(file->Get(name + "_DeltaTOF_WC"));
631  }
std::shared_ptr< T > make_non_owning_cast(TObject *iT)
Definition: Histograms.h:30
TString name
Definition: Histograms.h:665
std::shared_ptr< TH1F > hTOF_true
Definition: Histograms.h:658
std::shared_ptr< TH1F > hTOF_hitPos
Definition: Histograms.h:659
std::shared_ptr< TH1F > hTOF_WC
Definition: Histograms.h:660
std::shared_ptr< TH1F > hDeltaTOF_hitPos
Definition: Histograms.h:661
std::shared_ptr< TH1F > hDeltaTOF_WC
Definition: Histograms.h:662
hTOF::~hTOF ( )
inline

Definition at line 633 of file Histograms.h.

633  {
634  // delete hTOF_true;
635  // delete hTOF_hitPos;
636  // delete hTOF_WC;
637  // delete hDeltaTOF_hitPos;
638  // delete hDeltaTOF_WC;
639  }

Member Function Documentation

void hTOF::Fill ( float  tof,
float  TOF_WC,
float  TOF_hitPos 
)
inline

Definition at line 641 of file Histograms.h.

References hDeltaTOF_hitPos, hDeltaTOF_WC, hTOF_hitPos, hTOF_true, and hTOF_WC.

641  {
642  hTOF_hitPos->Fill(TOF_hitPos);
643  hTOF_WC->Fill(TOF_WC);
644  hTOF_true->Fill(tof);
645  hDeltaTOF_hitPos->Fill(tof - TOF_hitPos);
646  hDeltaTOF_WC->Fill(tof - TOF_WC);
647  }
std::shared_ptr< TH1F > hTOF_true
Definition: Histograms.h:658
std::shared_ptr< TH1F > hTOF_hitPos
Definition: Histograms.h:659
std::shared_ptr< TH1F > hTOF_WC
Definition: Histograms.h:660
std::shared_ptr< TH1F > hDeltaTOF_hitPos
Definition: Histograms.h:661
std::shared_ptr< TH1F > hDeltaTOF_WC
Definition: Histograms.h:662
void hTOF::Write ( )
inline

Definition at line 649 of file Histograms.h.

References hDeltaTOF_hitPos, hDeltaTOF_WC, hTOF_hitPos, hTOF_true, and hTOF_WC.

649  {
650  hTOF_true->Write();
651  hTOF_hitPos->Write();
652  hTOF_WC->Write();
653  hDeltaTOF_hitPos->Write();
654  hDeltaTOF_WC->Write();
655  }
std::shared_ptr< TH1F > hTOF_true
Definition: Histograms.h:658
std::shared_ptr< TH1F > hTOF_hitPos
Definition: Histograms.h:659
std::shared_ptr< TH1F > hTOF_WC
Definition: Histograms.h:660
std::shared_ptr< TH1F > hDeltaTOF_hitPos
Definition: Histograms.h:661
std::shared_ptr< TH1F > hDeltaTOF_WC
Definition: Histograms.h:662

Member Data Documentation

std::shared_ptr<TH1F> hTOF::hDeltaTOF_hitPos

Definition at line 661 of file Histograms.h.

Referenced by Fill(), hTOF(), and Write().

std::shared_ptr<TH1F> hTOF::hDeltaTOF_WC

Definition at line 662 of file Histograms.h.

Referenced by Fill(), hTOF(), and Write().

std::shared_ptr<TH1F> hTOF::hTOF_hitPos

Definition at line 659 of file Histograms.h.

Referenced by Fill(), hTOF(), and Write().

std::shared_ptr<TH1F> hTOF::hTOF_true

Definition at line 658 of file Histograms.h.

Referenced by Fill(), hTOF(), and Write().

std::shared_ptr<TH1F> hTOF::hTOF_WC

Definition at line 660 of file Histograms.h.

Referenced by Fill(), hTOF(), and Write().

TString hTOF::name
private