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 1109 of file Histograms.h.

Constructor & Destructor Documentation

◆ HMassVSPartProfile() [1/2]

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

Definition at line 1111 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPt_, B2GTnPMonitor_cfi::maxMass, PV_cfg::maxPt, B2GTnPMonitor_cfi::minMass, and mergeVDriftHistosByStation::name.

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

◆ HMassVSPartProfile() [2/2]

HMassVSPartProfile::HMassVSPartProfile ( const TString &  name,
TFile *  file 
)
inline

Definition at line 1137 of file Histograms.h.

References geometryDiff::file, hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPt_, and mergeVDriftHistosByStation::name.

1137  {
1138  name_ = name;
1139  hMassVSPt_ = (TProfile2D*)file->Get(name + "_MassVSPt");
1140  hMassVSEta_ = (TProfile2D*)file->Get(name + "_MassVSEta");
1141  hMassVSPhiPlus_ = (TProfile2D*)file->Get(name + "_MassVSPhiPlus");
1142  hMassVSPhiMinus_ = (TProfile2D*)file->Get(name + "_MassVSPhiMinus");
1143  }
TProfile2D * hMassVSPt_
Definition: Histograms.h:1193
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1195
TProfile2D * hMassVSEta_
Definition: Histograms.h:1194
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1196

◆ ~HMassVSPartProfile()

HMassVSPartProfile::~HMassVSPartProfile ( )
inlineoverride

Definition at line 1145 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, and hMassVSPt_.

1145  {
1146  delete hMassVSPt_;
1147  delete hMassVSEta_;
1148  delete hMassVSPhiPlus_;
1149  delete hMassVSPhiMinus_;
1150  }
TProfile2D * hMassVSPt_
Definition: Histograms.h:1193
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1195
TProfile2D * hMassVSEta_
Definition: Histograms.h:1194
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1196

Member Function Documentation

◆ Clear()

void HMassVSPartProfile::Clear ( )
inlineoverride

Definition at line 1185 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, and hMassVSPt_.

1185  {
1186  hMassVSPt_->Clear();
1187  hMassVSEta_->Clear();
1188  hMassVSPhiPlus_->Clear();
1189  hMassVSPhiMinus_->Clear();
1190  }
TProfile2D * hMassVSPt_
Definition: Histograms.h:1193
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1195
TProfile2D * hMassVSEta_
Definition: Histograms.h:1194
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1196

◆ Fill() [1/2]

void HMassVSPartProfile::Fill ( const reco::Particle::LorentzVector p41,
const reco::Particle::LorentzVector p42,
const int  charge,
const double &  weight = 1. 
)
inlineoverride

Definition at line 1152 of file Histograms.h.

References ALCARECOTkAlJpsiMuMu_cff::charge.

1155  {
1156  Fill(CLHEP::HepLorentzVector(p41.x(), p41.y(), p41.z(), p41.t()),
1157  CLHEP::HepLorentzVector(p42.x(), p42.y(), p42.z(), p42.t()),
1158  charge,
1159  weight);
1160  }
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:1152

◆ Fill() [2/2]

void HMassVSPartProfile::Fill ( const CLHEP::HepLorentzVector &  momentum1,
const CLHEP::HepLorentzVector &  momentum2,
const int  charge,
const double &  weight = 1. 
)
inlineoverride

Definition at line 1162 of file Histograms.h.

References ALCARECOTkAlJpsiMuMu_cff::charge, hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPt_, LogDebug, and mps_merge::weight.

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

◆ Write()

void HMassVSPartProfile::Write ( )
inlineoverride

Definition at line 1178 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, and hMassVSPt_.

1178  {
1179  hMassVSPt_->Write();
1180  hMassVSEta_->Write();
1181  hMassVSPhiPlus_->Write();
1182  hMassVSPhiMinus_->Write();
1183  }
TProfile2D * hMassVSPt_
Definition: Histograms.h:1193
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1195
TProfile2D * hMassVSEta_
Definition: Histograms.h:1194
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1196

Member Data Documentation

◆ hMassVSEta_

TProfile2D* HMassVSPartProfile::hMassVSEta_
protected

Definition at line 1194 of file Histograms.h.

Referenced by Clear(), Fill(), HMassVSPartProfile(), Write(), and ~HMassVSPartProfile().

◆ hMassVSPhiMinus_

TProfile2D* HMassVSPartProfile::hMassVSPhiMinus_
protected

Definition at line 1196 of file Histograms.h.

Referenced by Clear(), Fill(), HMassVSPartProfile(), Write(), and ~HMassVSPartProfile().

◆ hMassVSPhiPlus_

TProfile2D* HMassVSPartProfile::hMassVSPhiPlus_
protected

Definition at line 1195 of file Histograms.h.

Referenced by Clear(), Fill(), HMassVSPartProfile(), Write(), and ~HMassVSPartProfile().

◆ hMassVSPt_

TProfile2D* HMassVSPartProfile::hMassVSPt_
protected

Definition at line 1193 of file Histograms.h.

Referenced by Clear(), Fill(), HMassVSPartProfile(), Write(), and ~HMassVSPartProfile().