CMS 3D CMS Logo

VertexPlots Struct Reference

#include <HLTriggerOffline/BJet/interface/VertexPlots.h>

List of all members.

Public Member Functions

void fill (const reco::Vertex &vertex)
void init (const std::string &name, const std::string &title, unsigned int bins, double zRange, double rRange)
void save (TDirectory &file)
 VertexPlots ()

Public Attributes

TH1 * m_r
TH1 * m_z


Detailed Description

Definition at line 17 of file VertexPlots.h.


Constructor & Destructor Documentation

VertexPlots::VertexPlots (  )  [inline]

Definition at line 18 of file VertexPlots.h.

00018                 :
00019     m_r(0),
00020     m_z(0)
00021   { }


Member Function Documentation

void VertexPlots::fill ( const reco::Vertex vertex  )  [inline]

Definition at line 39 of file VertexPlots.h.

References m_r, m_z, reco::Vertex::position(), and reco::Vertex::z().

Referenced by HLTBtagLifetimeAnalyzer::analyze().

00040   {
00041     m_r->Fill(vertex.position().rho());
00042     m_z->Fill(vertex.z());
00043   }

void VertexPlots::init ( const std::string &  name,
const std::string &  title,
unsigned int  bins,
double  zRange,
double  rRange 
) [inline]

Definition at line 23 of file VertexPlots.h.

References m_r, and m_z.

Referenced by HLTBtagLifetimeAnalyzer::beginJob().

00024   {
00025     // access the shared ROOT file via TFileService
00026     edm::Service<TFileService> fileservice;
00027     
00028     // enable sum-of-squares for all plots
00029     bool sumw2 = TH1::GetDefaultSumw2();
00030     TH1::SetDefaultSumw2(true);
00031 
00032     m_r  = fileservice->make<TH1F>((name + "_R").c_str(),  (title + " R position").c_str(), bins, -rRange, rRange);
00033     m_z  = fileservice->make<TH1F>((name + "_Z").c_str(),  (title + " Z position").c_str(), bins, -zRange, zRange);
00034 
00035     // reset sum-of-squares status
00036     TH1::SetDefaultSumw2(sumw2);
00037   }

void VertexPlots::save ( TDirectory &  file  )  [inline]

Definition at line 45 of file VertexPlots.h.

References m_r, and m_z.

00046   {
00047     m_r->SetDirectory(&file);
00048     m_z->SetDirectory(&file);
00049   }


Member Data Documentation

TH1* VertexPlots::m_r

Definition at line 51 of file VertexPlots.h.

Referenced by fill(), init(), and save().

TH1* VertexPlots::m_z

Definition at line 52 of file VertexPlots.h.

Referenced by fill(), init(), and save().


The documentation for this struct was generated from the following file:
Generated on Tue Jun 9 18:35:00 2009 for CMSSW by  doxygen 1.5.4