CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
HMassVSPartProfile Class Reference

#include <Histograms.h>

Inherits Histograms.

Public Member Functions

void Clear () override
 
void Fill (const reco::Particle::LorentzVector &p41, const reco::Particle::LorentzVector &p42, const int charge, const double &weight=1.) override
 
void Fill (const CLHEP::HepLorentzVector &momentum1, const CLHEP::HepLorentzVector &momentum2, const int charge, const double &weight=1.) override
 
 HMassVSPartProfile (const TString &name, const double &minMass=0., const double &maxMass=150., const double maxPt=100.)
 
 HMassVSPartProfile (const TString &name, TFile *file)
 
void Write () override
 
 ~HMassVSPartProfile () override
 

Protected Attributes

TProfile2D * hMassVSEta_
 
TProfile2D * hMassVSPhiMinus_
 
TProfile2D * hMassVSPhiPlus_
 
TProfile2D * hMassVSPt_
 

Detailed Description

Definition at line 1107 of file Histograms.h.

Constructor & Destructor Documentation

HMassVSPartProfile::HMassVSPartProfile ( const TString &  name,
const double &  minMass = 0.,
const double &  maxMass = 150.,
const double  maxPt = 100. 
)
inline

Definition at line 1109 of file Histograms.h.

References B2GTnPMonitor_cfi::maxMass, MuonErrorMatrixAnalyzer_cfi::maxPt, B2GTnPMonitor_cfi::minMass, and Skims_PA_cff::name.

1112  {
1113  name_ = name;
1114 
1115  // Kinematical variables
1116  // ---------------------
1117  hMassVSPt_ = new TProfile2D(name + "_MassVSPt",
1118  "resonance mass vs muon transverse momentum",
1119  200,
1120  0.,
1121  maxPt,
1122  6000,
1123  minMass,
1124  maxMass,
1125  0.,
1126  100.);
1127  hMassVSEta_ = new TProfile2D(
1128  name + "_MassVSEta", "resonance mass vs muon pseudorapidity", 64, -6.4, 6.4, 6000, minMass, maxMass, 0., 100.);
1129  hMassVSPhiPlus_ = new TProfile2D(
1130  name + "_MassVSPhiPlus", "resonance mass vs muon+ phi angle", 64, -3.2, 3.2, 6000, minMass, maxMass, 0., 100.);
1131  hMassVSPhiMinus_ = new TProfile2D(
1132  name + "_MassVSPhiMinus", "resonance mass vs muon- phi angle", 64, -3.2, 3.2, 6000, minMass, maxMass, 0., 100.);
1133  }
TProfile2D * hMassVSPt_
Definition: Histograms.h:1191
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1193
TProfile2D * hMassVSEta_
Definition: Histograms.h:1192
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1194
HMassVSPartProfile::HMassVSPartProfile ( const TString &  name,
TFile *  file 
)
inline

Definition at line 1135 of file Histograms.h.

References Skims_PA_cff::name.

1135  {
1136  name_ = name;
1137  hMassVSPt_ = (TProfile2D*)file->Get(name + "_MassVSPt");
1138  hMassVSEta_ = (TProfile2D*)file->Get(name + "_MassVSEta");
1139  hMassVSPhiPlus_ = (TProfile2D*)file->Get(name + "_MassVSPhiPlus");
1140  hMassVSPhiMinus_ = (TProfile2D*)file->Get(name + "_MassVSPhiMinus");
1141  }
TProfile2D * hMassVSPt_
Definition: Histograms.h:1191
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1193
TProfile2D * hMassVSEta_
Definition: Histograms.h:1192
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1194
HMassVSPartProfile::~HMassVSPartProfile ( )
inlineoverride

Definition at line 1143 of file Histograms.h.

1143  {
1144  delete hMassVSPt_;
1145  delete hMassVSEta_;
1146  delete hMassVSPhiPlus_;
1147  delete hMassVSPhiMinus_;
1148  }
TProfile2D * hMassVSPt_
Definition: Histograms.h:1191
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1193
TProfile2D * hMassVSEta_
Definition: Histograms.h:1192
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1194

Member Function Documentation

void HMassVSPartProfile::Clear ( )
inlineoverride

Definition at line 1183 of file Histograms.h.

1183  {
1184  hMassVSPt_->Clear();
1185  hMassVSEta_->Clear();
1186  hMassVSPhiPlus_->Clear();
1187  hMassVSPhiMinus_->Clear();
1188  }
TProfile2D * hMassVSPt_
Definition: Histograms.h:1191
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1193
TProfile2D * hMassVSEta_
Definition: Histograms.h:1192
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1194
void HMassVSPartProfile::Fill ( const reco::Particle::LorentzVector p41,
const reco::Particle::LorentzVector p42,
const int  charge,
const double &  weight = 1. 
)
inlineoverride

Definition at line 1150 of file Histograms.h.

References HcalObjRepresent::Fill().

1153  {
1154  Fill(CLHEP::HepLorentzVector(p41.x(), p41.y(), p41.z(), p41.t()),
1155  CLHEP::HepLorentzVector(p42.x(), p42.y(), p42.z(), p42.t()),
1156  charge,
1157  weight);
1158  }
Definition: weight.py:1
void Fill(const reco::Particle::LorentzVector &p41, const reco::Particle::LorentzVector &p42, const int charge, const double &weight=1.) override
Definition: Histograms.h:1150
void HMassVSPartProfile::Fill ( const CLHEP::HepLorentzVector &  momentum1,
const CLHEP::HepLorentzVector &  momentum2,
const int  charge,
const double &  weight = 1. 
)
inlineoverride

Definition at line 1160 of file Histograms.h.

References LogDebug, and mps_merge::weight.

1163  {
1164  hMassVSPt_->Fill(momentum1.perp(), momentum2.m(), weight);
1165  hMassVSEta_->Fill(momentum1.eta(), momentum2.m(), weight);
1166  if (charge > 0) {
1167  hMassVSPhiPlus_->Fill(momentum1.phi(), momentum2.m(), weight);
1168  } else if (charge < 0) {
1169  hMassVSPhiMinus_->Fill(momentum1.phi(), momentum2.m(), weight);
1170  } else {
1171  LogDebug("Histograms") << "HMassVSPartProfile: wrong charge value = " << charge << std::endl;
1172  abort();
1173  }
1174  }
#define LogDebug(id)
TProfile2D * hMassVSPt_
Definition: Histograms.h:1191
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1193
TProfile2D * hMassVSEta_
Definition: Histograms.h:1192
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1194
void HMassVSPartProfile::Write ( )
inlineoverride

Definition at line 1176 of file Histograms.h.

1176  {
1177  hMassVSPt_->Write();
1178  hMassVSEta_->Write();
1179  hMassVSPhiPlus_->Write();
1180  hMassVSPhiMinus_->Write();
1181  }
TProfile2D * hMassVSPt_
Definition: Histograms.h:1191
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1193
TProfile2D * hMassVSEta_
Definition: Histograms.h:1192
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1194

Member Data Documentation

TProfile2D* HMassVSPartProfile::hMassVSEta_
protected

Definition at line 1192 of file Histograms.h.

TProfile2D* HMassVSPartProfile::hMassVSPhiMinus_
protected

Definition at line 1194 of file Histograms.h.

TProfile2D* HMassVSPartProfile::hMassVSPhiPlus_
protected

Definition at line 1193 of file Histograms.h.

TProfile2D* HMassVSPartProfile::hMassVSPt_
protected

Definition at line 1191 of file Histograms.h.