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 CLHEP::HepLorentzVector &momentum1, const CLHEP::HepLorentzVector &momentum2, const int charge, const double &weight=1.) override
 
void Fill (const reco::Particle::LorentzVector &p41, const reco::Particle::LorentzVector &p42, 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() [1/2]

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.

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  }

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPt_, B2GTnPMonitor_cfi::maxMass, MuonErrorMatrixAnalyzer_cfi::maxPt, B2GTnPMonitor_cfi::minMass, and Skims_PA_cff::name.

◆ HMassVSPartProfile() [2/2]

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

Definition at line 1135 of file Histograms.h.

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  }

References FrontierConditions_GlobalTag_cff::file, hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPt_, and Skims_PA_cff::name.

◆ ~HMassVSPartProfile()

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  }

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, and hMassVSPt_.

Member Function Documentation

◆ Clear()

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  }

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, and hMassVSPt_.

◆ Fill() [1/2]

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.

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  }

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

◆ Fill() [2/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 1150 of file Histograms.h.

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  }

References ALCARECOTkAlJpsiMuMu_cff::charge.

◆ Write()

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  }

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, and hMassVSPt_.

Member Data Documentation

◆ hMassVSEta_

TProfile2D* HMassVSPartProfile::hMassVSEta_
protected

Definition at line 1192 of file Histograms.h.

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

◆ hMassVSPhiMinus_

TProfile2D* HMassVSPartProfile::hMassVSPhiMinus_
protected

Definition at line 1194 of file Histograms.h.

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

◆ hMassVSPhiPlus_

TProfile2D* HMassVSPartProfile::hMassVSPhiPlus_
protected

Definition at line 1193 of file Histograms.h.

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

◆ hMassVSPt_

TProfile2D* HMassVSPartProfile::hMassVSPt_
protected

Definition at line 1191 of file Histograms.h.

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

mps_merge.weight
weight
Definition: mps_merge.py:88
MuonErrorMatrixAnalyzer_cfi.maxPt
maxPt
Definition: MuonErrorMatrixAnalyzer_cfi.py:19
HMassVSPartProfile::hMassVSPhiMinus_
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1194
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
B2GTnPMonitor_cfi.maxMass
maxMass
Definition: B2GTnPMonitor_cfi.py:55
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
HMassVSPartProfile::hMassVSPt_
TProfile2D * hMassVSPt_
Definition: Histograms.h:1191
HMassVSPartProfile::hMassVSEta_
TProfile2D * hMassVSEta_
Definition: Histograms.h:1192
HMassVSPartProfile::hMassVSPhiPlus_
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1193
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
B2GTnPMonitor_cfi.minMass
minMass
Definition: B2GTnPMonitor_cfi.py:54
weight
Definition: weight.py:1
HMassVSPartProfile::Fill
void Fill(const reco::Particle::LorentzVector &p41, const reco::Particle::LorentzVector &p42, const int charge, const double &weight=1.) override
Definition: Histograms.h:1150