CMS 3D CMS Logo

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

#include <Histograms.h>

Inheritance diagram for HMassVSPartProfile:
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
 
- Public Member Functions inherited from Histograms
virtual void Fill (const reco::Particle::LorentzVector &p1, const reco::Particle::LorentzVector &p2)
 
virtual void Fill (const CLHEP::HepLorentzVector &momentum1, const CLHEP::HepLorentzVector &momentum2)
 
virtual void Fill (const CLHEP::HepLorentzVector &p1, const reco::Particle::LorentzVector &p2)
 
virtual void Fill (const reco::Particle::LorentzVector &p4, const double &weight=1.)
 
virtual void Fill (const reco::Particle::LorentzVector &p4, const int charge, const double &weight=1.)
 
virtual void Fill (const CLHEP::HepLorentzVector &momentum, const int charge, const double &weight=1.)
 
virtual void Fill (const reco::Particle::LorentzVector &p4, const double &resValue, const int charge)
 
virtual void Fill (const reco::Particle::LorentzVector &p4, const double &genValue, const double recValue, const int charge)
 
virtual void Fill (const CLHEP::HepLorentzVector &p, const double &likeValue)
 
virtual void Fill (const unsigned int number)
 
virtual void Fill (const reco::Particle::LorentzVector &recoP1, const int charge1, const reco::Particle::LorentzVector &genP1, const reco::Particle::LorentzVector &recoP2, const int charge2, const reco::Particle::LorentzVector &genP2, const double &recoMass, const double &genMass)
 
virtual void Fill (const reco::Particle::LorentzVector &recoP1, const int charge1, const reco::Particle::LorentzVector &recoP2, const int charge2, const double &recoMass, const double &genMass)
 
virtual void Fill (const reco::Particle::LorentzVector &recoP1, const reco::Particle::LorentzVector &genP1, const reco::Particle::LorentzVector &recoP2, const reco::Particle::LorentzVector &genP2)
 
virtual void Fill (const double &x, const double &y)
 
virtual void Fill (const double &x, const double &y, const double &a, const double &b)
 
virtual void Fill (const reco::Particle::LorentzVector &p41, const reco::Particle::LorentzVector &p42, const reco::Particle::LorentzVector &p4Res, const double &weight=1.)
 
virtual void Fill (const CLHEP::HepLorentzVector &momentum1, const CLHEP::HepLorentzVector &momentum2, const CLHEP::HepLorentzVector &momentumRes, const double &weight=1.)
 
virtual double Get (const reco::Particle::LorentzVector &recoP1, const TString &covarianceName)
 
virtual TString GetName ()
 
 Histograms ()
 
 Histograms (const TString &name)
 
 Histograms (TFile *outputFile, const TString &name)
 
virtual void SetWeight (double weight)
 
virtual ~Histograms ()
 

Protected Attributes

TProfile2D * hMassVSEta_
 
TProfile2D * hMassVSPhiMinus_
 
TProfile2D * hMassVSPhiPlus_
 
TProfile2D * hMassVSPt_
 
- Protected Attributes inherited from Histograms
TDirectory * histoDir_
 
TString name_
 
TFile * outputFile_
 
double theWeight_
 

Detailed Description

Definition at line 1067 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 1070 of file Histograms.h.

References PFRecoTauDiscriminationByHPSSelection_cfi::maxMass, MuonErrorMatrixAnalyzer_cfi::maxPt, PFRecoTauDiscriminationByHPSSelection_cfi::minMass, dataset::name, and Histograms::name_.

1070  {
1071  name_ = name;
1072 
1073  // Kinematical variables
1074  // ---------------------
1075  hMassVSPt_ = new TProfile2D( name+"_MassVSPt", "resonance mass vs muon transverse momentum", 200, 0., maxPt, 6000, minMass, maxMass, 0., 100. );
1076  hMassVSEta_ = new TProfile2D( name+"_MassVSEta", "resonance mass vs muon pseudorapidity", 64, -6.4, 6.4, 6000, minMass, maxMass, 0., 100. );
1077  hMassVSPhiPlus_ = new TProfile2D( name+"_MassVSPhiPlus", "resonance mass vs muon+ phi angle", 64, -3.2, 3.2, 6000, minMass, maxMass, 0., 100. );
1078  hMassVSPhiMinus_ = new TProfile2D( name+"_MassVSPhiMinus", "resonance mass vs muon- phi angle", 64, -3.2, 3.2, 6000, minMass, maxMass, 0., 100. );
1079  }
TProfile2D * hMassVSPt_
Definition: Histograms.h:1131
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1133
TString name_
Definition: Histograms.h:122
TProfile2D * hMassVSEta_
Definition: Histograms.h:1132
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1134
HMassVSPartProfile::HMassVSPartProfile ( const TString &  name,
TFile *  file 
)
inline

Definition at line 1081 of file Histograms.h.

References dataset::name, and Histograms::name_.

1081  {
1082  name_=name;
1083  hMassVSPt_ = (TProfile2D *) file->Get(name+"_MassVSPt");
1084  hMassVSEta_ = (TProfile2D *) file->Get(name+"_MassVSEta");
1085  hMassVSPhiPlus_ = (TProfile2D *) file->Get(name+"_MassVSPhiPlus");
1086  hMassVSPhiMinus_ = (TProfile2D *) file->Get(name+"_MassVSPhiMinus");
1087  }
TProfile2D * hMassVSPt_
Definition: Histograms.h:1131
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1133
TString name_
Definition: Histograms.h:122
TProfile2D * hMassVSEta_
Definition: Histograms.h:1132
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1134
HMassVSPartProfile::~HMassVSPartProfile ( )
inlineoverride

Definition at line 1089 of file Histograms.h.

1089  {
1090  delete hMassVSPt_;
1091  delete hMassVSEta_;
1092  delete hMassVSPhiPlus_;
1093  delete hMassVSPhiMinus_;
1094  }
TProfile2D * hMassVSPt_
Definition: Histograms.h:1131
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1133
TProfile2D * hMassVSEta_
Definition: Histograms.h:1132
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1134

Member Function Documentation

void HMassVSPartProfile::Clear ( )
inlineoverridevirtual

Implements Histograms.

Definition at line 1123 of file Histograms.h.

1123  {
1124  hMassVSPt_->Clear();
1125  hMassVSEta_->Clear();
1126  hMassVSPhiPlus_->Clear();
1127  hMassVSPhiMinus_->Clear();
1128  }
TProfile2D * hMassVSPt_
Definition: Histograms.h:1131
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1133
TProfile2D * hMassVSEta_
Definition: Histograms.h:1132
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1134
void HMassVSPartProfile::Fill ( const reco::Particle::LorentzVector p41,
const reco::Particle::LorentzVector p42,
const int  charge,
const double &  weight = 1. 
)
inlineoverridevirtual

Reimplemented from Histograms.

Definition at line 1096 of file Histograms.h.

References Histograms::Fill().

1096  {
1097  Fill(CLHEP::HepLorentzVector(p41.x(),p41.y(),p41.z(),p41.t()),
1098  CLHEP::HepLorentzVector(p42.x(),p42.y(),p42.z(),p42.t()), charge, weight);
1099  }
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:1096
void HMassVSPartProfile::Fill ( const CLHEP::HepLorentzVector &  momentum1,
const CLHEP::HepLorentzVector &  momentum2,
const int  charge,
const double &  weight = 1. 
)
inlineoverridevirtual

Reimplemented from Histograms.

Definition at line 1101 of file Histograms.h.

References LogDebug, and mps_merge::weight.

1101  {
1102  hMassVSPt_->Fill(momentum1.perp(),momentum2.m(), weight);
1103  hMassVSEta_->Fill(momentum1.eta(),momentum2.m(), weight);
1104  if(charge>0){
1105  hMassVSPhiPlus_->Fill(momentum1.phi(), momentum2.m(), weight);
1106  }
1107  else if(charge<0){
1108  hMassVSPhiMinus_->Fill(momentum1.phi(), momentum2.m(), weight);
1109  }
1110  else {
1111  LogDebug("Histograms") << "HMassVSPartProfile: wrong charge value = " << charge << std::endl;
1112  abort();
1113  }
1114  }
#define LogDebug(id)
TProfile2D * hMassVSPt_
Definition: Histograms.h:1131
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1133
TProfile2D * hMassVSEta_
Definition: Histograms.h:1132
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1134
void HMassVSPartProfile::Write ( )
inlineoverridevirtual

Implements Histograms.

Definition at line 1116 of file Histograms.h.

1116  {
1117  hMassVSPt_->Write();
1118  hMassVSEta_->Write();
1119  hMassVSPhiPlus_->Write();
1120  hMassVSPhiMinus_->Write();
1121  }
TProfile2D * hMassVSPt_
Definition: Histograms.h:1131
TProfile2D * hMassVSPhiPlus_
Definition: Histograms.h:1133
TProfile2D * hMassVSEta_
Definition: Histograms.h:1132
TProfile2D * hMassVSPhiMinus_
Definition: Histograms.h:1134

Member Data Documentation

TProfile2D* HMassVSPartProfile::hMassVSEta_
protected

Definition at line 1132 of file Histograms.h.

TProfile2D* HMassVSPartProfile::hMassVSPhiMinus_
protected

Definition at line 1134 of file Histograms.h.

TProfile2D* HMassVSPartProfile::hMassVSPhiPlus_
protected

Definition at line 1133 of file Histograms.h.

TProfile2D* HMassVSPartProfile::hMassVSPt_
protected

Definition at line 1131 of file Histograms.h.