CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes
hParam Class Reference

#include <Histograms.h>

Public Member Functions

void Fill (double x, double theta, double Bwire, double Bnorm)
 
 hParam (std::string name_)
 
 hParam (std::string name_, TFile *file)
 
void Write ()
 
virtual ~hParam ()
 

Public Attributes

std::shared_ptr< TH1F > HitParam_Bnorm
 
std::shared_ptr< TH1F > HitParam_Bwire
 
std::shared_ptr< TH1F > HitParam_Theta
 
std::shared_ptr< TH1F > HitParam_X
 

Private Attributes

TString name
 

Detailed Description

Definition at line 508 of file Histograms.h.

Constructor & Destructor Documentation

◆ hParam() [1/2]

hParam::hParam ( std::string  name_)
inline

Definition at line 510 of file Histograms.h.

References HitParam_Bnorm, HitParam_Bwire, HitParam_Theta, HitParam_X, N, and name.

510  {
511  TString N = name_.c_str();
512  name = N;
513  // booking degli istogrammi unidimensionali
514  HitParam_X = std::make_shared<TH1F>(
515  N + "_HitParam_X", "Distribution of theta for parameterization cases in Rphi layers", 100, -2.1, 2.1);
516  HitParam_Theta = std::make_shared<TH1F>(
517  N + "_HitParam_Theta", "Distribution of theta for parameterization cases in Rphi layers", 100, -180., 180.);
518  HitParam_Bwire = std::make_shared<TH1F>(
519  N + "_HitParam_Bwire", "Distribution of bwire for parameterization cases in Rz layers", 100, -0.5, 0.5);
520  HitParam_Bnorm = std::make_shared<TH1F>(
521  N + "_HitParam_Bnorm", "Distribution of bnorm for parameterization cases in Rphi layers", 100, -1, 1);
522  }
std::shared_ptr< TH1F > HitParam_Bwire
Definition: Histograms.h:558
#define N
Definition: blowfish.cc:9
std::shared_ptr< TH1F > HitParam_Bnorm
Definition: Histograms.h:559
TString name
Definition: Histograms.h:562
std::shared_ptr< TH1F > HitParam_X
Definition: Histograms.h:556
std::shared_ptr< TH1F > HitParam_Theta
Definition: Histograms.h:557

◆ ~hParam()

virtual hParam::~hParam ( )
inlinevirtual

Definition at line 524 of file Histograms.h.

524  {
525  // delete HitParam_X;
526  // delete HitParam_Theta;
527  // delete HitParam_Bwire;
528  // delete HitParam_Bnorm;
529  }

◆ hParam() [2/2]

hParam::hParam ( std::string  name_,
TFile *  file 
)
inline

Definition at line 531 of file Histograms.h.

References geometryDiff::file, HitParam_Bnorm, HitParam_Bwire, HitParam_Theta, HitParam_X, hist_helper::make_non_owning_cast(), and name.

531  {
532  name = name_.c_str();
533  // per lettura da file degli istogrammi
534  // 1D
535  HitParam_X = hist_helper::make_non_owning_cast<TH1F>(file->Get(name + "_HitParam_X"));
536  HitParam_Theta = hist_helper::make_non_owning_cast<TH1F>(file->Get(name + "_HitParam_Theta"));
537  HitParam_Bwire = hist_helper::make_non_owning_cast<TH1F>(file->Get(name + "_HitParam_Bwire"));
538  HitParam_Bnorm = hist_helper::make_non_owning_cast<TH1F>(file->Get(name + "_HitParam_Bnorm"));
539  }
std::shared_ptr< T > make_non_owning_cast(TObject *iT)
Definition: Histograms.h:30
std::shared_ptr< TH1F > HitParam_Bwire
Definition: Histograms.h:558
std::shared_ptr< TH1F > HitParam_Bnorm
Definition: Histograms.h:559
TString name
Definition: Histograms.h:562
std::shared_ptr< TH1F > HitParam_X
Definition: Histograms.h:556
std::shared_ptr< TH1F > HitParam_Theta
Definition: Histograms.h:557

Member Function Documentation

◆ Fill()

void hParam::Fill ( double  x,
double  theta,
double  Bwire,
double  Bnorm 
)
inline

Definition at line 541 of file Histograms.h.

References HitParam_Bnorm, HitParam_Bwire, HitParam_Theta, HitParam_X, tauSpinnerTable_cfi::theta, and x.

541  {
542  HitParam_X->Fill(x);
543  HitParam_Theta->Fill(theta);
544  HitParam_Bwire->Fill(Bwire);
545  HitParam_Bnorm->Fill(Bnorm);
546  }
std::shared_ptr< TH1F > HitParam_Bwire
Definition: Histograms.h:558
std::shared_ptr< TH1F > HitParam_Bnorm
Definition: Histograms.h:559
std::shared_ptr< TH1F > HitParam_X
Definition: Histograms.h:556
std::shared_ptr< TH1F > HitParam_Theta
Definition: Histograms.h:557

◆ Write()

void hParam::Write ( )
inline

Definition at line 548 of file Histograms.h.

References HitParam_Bnorm, HitParam_Bwire, HitParam_Theta, and HitParam_X.

548  {
549  HitParam_X->Write();
550  HitParam_Theta->Write();
551  HitParam_Bwire->Write();
552  HitParam_Bnorm->Write();
553  }
std::shared_ptr< TH1F > HitParam_Bwire
Definition: Histograms.h:558
std::shared_ptr< TH1F > HitParam_Bnorm
Definition: Histograms.h:559
std::shared_ptr< TH1F > HitParam_X
Definition: Histograms.h:556
std::shared_ptr< TH1F > HitParam_Theta
Definition: Histograms.h:557

Member Data Documentation

◆ HitParam_Bnorm

std::shared_ptr<TH1F> hParam::HitParam_Bnorm

Definition at line 559 of file Histograms.h.

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

◆ HitParam_Bwire

std::shared_ptr<TH1F> hParam::HitParam_Bwire

Definition at line 558 of file Histograms.h.

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

◆ HitParam_Theta

std::shared_ptr<TH1F> hParam::HitParam_Theta

Definition at line 557 of file Histograms.h.

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

◆ HitParam_X

std::shared_ptr<TH1F> hParam::HitParam_X

Definition at line 556 of file Histograms.h.

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

◆ name

TString hParam::name
private