CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
HPartVSPhi Class Reference

#include <Histograms.h>

Inherits Histograms.

Public Member Functions

void Clear () override
 
void Fill (const CLHEP::HepLorentzVector &momentum, const double &weight=1.) override
 
void Fill (const reco::Particle::LorentzVector &p4, const double &weight=1.) override
 
 HPartVSPhi (const TString &name)
 
void Write () override
 
 ~HPartVSPhi () override
 

Public Attributes

TH2F * hMassVSPhi_
 
TProfile * hMassVSPhi_prof_
 
TH2F * hPtVSPhi_
 
TProfile * hPtVSPhi_prof_
 

Detailed Description

Definition at line 589 of file Histograms.h.

Constructor & Destructor Documentation

◆ HPartVSPhi()

HPartVSPhi::HPartVSPhi ( const TString &  name)
inline

Definition at line 591 of file Histograms.h.

591  {
592  name_ = name;
593  // hPtVSPhi_ = new TH2F (name+"_PtVSPhi", "transverse momentum vs phi angle",
594  // 12, -3.2, 3.2, 200, 0, 200);
595  // hMassVSPhi_ = new TH2F (name+"_MassVSPhi", "mass vs phi angle",
596  // 7, -3.2, 3.2, 40, 70, 110);
597  // hMassVSPhiF_ = new TH2F (name+"_MassVSPhiF", "mass vs phi F",
598  // 7, -3.2, 3.2, 40, 70, 110);
599  // hMassVSPhiWp2_ = new TH2F (name+"_MassVSPhiWp2", "mass vs phi Wp2",
600  // 7, -3.2, 3.2, 40, 70, 110);
601  // hMassVSPhiWp1_ = new TH2F (name+"_MassVSPhiWp1", "mass vs phi Wp1",
602  // 7, -3.2, 3.2, 40, 70, 110);
603  // hMassVSPhiW0_ = new TH2F (name+"_MassVSPhiW0", "mass vs phi W0",
604  // 7, -3.2, 3.2, 40, 70, 110);
605  // hMassVSPhiWm1_ = new TH2F (name+"_MassVSPhiWm1", "mass vs phi Wm1",
606  // 7, -3.2, 3.2, 40, 70, 110);
607  // hMassVSPhiWm2_ = new TH2F (name+"_MassVSPhiWm2", "mass vs phi Wm2",
608  // 7, -3.2, 3.2, 40, 70, 110);
609  // hMassVSPhiB_ = new TH2F (name+"_MassVSPhiB", "mass vs phi B",
610  // 7, -3.2, 3.2, 40, 70, 110);
611 
612  // TD profile histograms
613  hMassVSPhi_prof_ = new TProfile(name + "_MassVSPhi_prof", "mass vs phi angle", 16, -3.2, 3.2, 70, 110);
614  hPtVSPhi_prof_ = new TProfile(name + "_PtVSPhi_prof", "pt vs phi angle", 16, -3.2, 3.2, 0, 200);
615  }

References hMassVSPhi_prof_, hPtVSPhi_prof_, and Skims_PA_cff::name.

◆ ~HPartVSPhi()

HPartVSPhi::~HPartVSPhi ( )
inlineoverride

Definition at line 617 of file Histograms.h.

617  {
618  delete hPtVSPhi_;
619  delete hMassVSPhi_;
620  delete hMassVSPhi_prof_;
621  delete hPtVSPhi_prof_;
622 
623  // delete hMassVSPhiB_;
624  // delete hMassVSPhiWm2_;
625  // delete hMassVSPhiWm1_;
626  // delete hMassVSPhiW0_;
627  // delete hMassVSPhiWp1_;
628  // delete hMassVSPhiWp2_;
629  // delete hMassVSPhiF_;
630  }

References hMassVSPhi_, hMassVSPhi_prof_, hPtVSPhi_, and hPtVSPhi_prof_.

Member Function Documentation

◆ Clear()

void HPartVSPhi::Clear ( )
inlineoverride

Definition at line 699 of file Histograms.h.

699  {
700  hPtVSPhi_->Clear();
701  hMassVSPhi_->Clear();
702  hPtVSPhi_prof_->Clear();
703  hMassVSPhi_prof_->Clear();
704 
705  // hMassVSPhiB_->Clear();
706  // hMassVSPhiWm2_->Clear();
707  // hMassVSPhiWm1_->Clear();
708  // hMassVSPhiW0_->Clear();
709  // hMassVSPhiWp1_->Clear();
710  // hMassVSPhiWp2_->Clear();
711  // hMassVSPhiF_->Clear();
712  }

References hMassVSPhi_, hMassVSPhi_prof_, hPtVSPhi_, and hPtVSPhi_prof_.

◆ Fill() [1/2]

void HPartVSPhi::Fill ( const CLHEP::HepLorentzVector &  momentum,
const double &  weight = 1. 
)
inlineoverride

Definition at line 636 of file Histograms.h.

636  {
637  hPtVSPhi_->Fill(momentum.phi(), momentum.perp(), weight);
638  hMassVSPhi_->Fill(momentum.phi(), momentum.m(), weight);
639  hMassVSPhi_prof_->Fill(momentum.phi(), momentum.m(), weight);
640  hPtVSPhi_prof_->Fill(momentum.phi(), momentum.perp(), weight);
641 
642  // if (momentum.eta()<-1.2) hMassVSPhiB_->Fill(momentum.phi(),momentum.m(), weight);
643  // else if (momentum.eta()<-0.8 && momentum.eta()>-1.2) hMassVSPhiWm2_->Fill(momentum.phi(),momentum.m(), weight);
644  // else if (momentum.eta()<-0.3 && momentum.eta()>-0.8) hMassVSPhiWm1_->Fill(momentum.phi(),momentum.m(), weight);
645  // else if ((fabs(momentum.eta())) < 0.3) hMassVSPhiW0_->Fill(momentum.phi(),momentum.m(), weight);
646  // else if (momentum.eta()>0.3 && momentum.eta()<0.8) hMassVSPhiWp1_->Fill(momentum.phi(),momentum.m(), weight);
647  // else if (momentum.eta()>0.8 && momentum.eta()<1.2) hMassVSPhiWp2_->Fill(momentum.phi(),momentum.m(), weight);
648  // else if (momentum.eta()>1.2) hMassVSPhiF_->Fill(momentum.phi(),momentum.m(), weight);
649  }

References hMassVSPhi_, hMassVSPhi_prof_, hPtVSPhi_, hPtVSPhi_prof_, and mps_merge::weight.

◆ Fill() [2/2]

void HPartVSPhi::Fill ( const reco::Particle::LorentzVector p4,
const double &  weight = 1. 
)
inlineoverride

Definition at line 632 of file Histograms.h.

632  {
633  Fill(CLHEP::HepLorentzVector(p4.x(), p4.y(), p4.z(), p4.t()), weight);
634  }

References p4.

◆ Write()

void HPartVSPhi::Write ( )
inlineoverride

Definition at line 651 of file Histograms.h.

651  {
652  hPtVSPhi_->Write();
653  hMassVSPhi_->Write();
654  hMassVSPhi_prof_->Write();
655  hPtVSPhi_prof_->Write();
656 
657  // hMassVSPhiB_->Write();
658  // hMassVSPhiWm2_->Write();
659  // hMassVSPhiWm1_->Write();
660  // hMassVSPhiW0_->Write();
661  // hMassVSPhiWp1_->Write();
662  // hMassVSPhiWp2_->Write();
663  // hMassVSPhiF_->Write();
664 
665  // std::vector<TGraphErrors*> graphs ((MuScleFitUtils::fitMass(hMassVSPhi_)));
666  // for(std::vector<TGraphErrors*>::const_iterator graph = graphs.begin(); graph != graphs.end(); graph++){
667  // (*graph)->Write();
668  // }
669  // std::vector<TGraphErrors*> graphsB ((MuScleFitUtils::fitMass(hMassVSPhiB_)));
670  // for(std::vector<TGraphErrors*>::const_iterator graph = graphsB.begin(); graph != graphsB.end(); graph++){
671  // (*graph)->Write();
672  // }
673  // std::vector<TGraphErrors*> graphsWm2 ((MuScleFitUtils::fitMass(hMassVSPhiWm2_)));
674  // for(std::vector<TGraphErrors*>::const_iterator graph = graphsWm2.begin(); graph != graphsWm2.end(); graph++){
675  // (*graph)->Write();
676  // }
677  // std::vector<TGraphErrors*> graphsWm1 ((MuScleFitUtils::fitMass(hMassVSPhiWm1_)));
678  // for(std::vector<TGraphErrors*>::const_iterator graph = graphsWm1.begin(); graph != graphsWm1.end(); graph++){
679  // (*graph)->Write();
680  // }
681  // std::vector<TGraphErrors*> graphsW0 ((MuScleFitUtils::fitMass(hMassVSPhiW0_)));
682  // for(std::vector<TGraphErrors*>::const_iterator graph = graphsW0.begin(); graph != graphsW0.end(); graph++){
683  // (*graph)->Write();
684  // }
685  // std::vector<TGraphErrors*> graphsWp1 ((MuScleFitUtils::fitMass(hMassVSPhiWp1_)));
686  // for(std::vector<TGraphErrors*>::const_iterator graph = graphsWp1.begin(); graph != graphsWp1.end(); graph++){
687  // (*graph)->Write();
688  // }
689  // std::vector<TGraphErrors*> graphsWp2 ((MuScleFitUtils::fitMass(hMassVSPhiWp2_)));
690  // for(std::vector<TGraphErrors*>::const_iterator graph = graphsWp2.begin(); graph != graphsWp2.end(); graph++){
691  // (*graph)->Write();
692  // }
693  // std::vector<TGraphErrors*> graphsF ((MuScleFitUtils::fitMass(hMassVSPhiF_)));
694  // for(std::vector<TGraphErrors*>::const_iterator graph = graphsF.begin(); graph != graphsF.end(); graph++){
695  // (*graph)->Write();
696  // }
697  }

References hMassVSPhi_, hMassVSPhi_prof_, hPtVSPhi_, and hPtVSPhi_prof_.

Member Data Documentation

◆ hMassVSPhi_

TH2F* HPartVSPhi::hMassVSPhi_

Definition at line 716 of file Histograms.h.

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

◆ hMassVSPhi_prof_

TProfile* HPartVSPhi::hMassVSPhi_prof_

Definition at line 717 of file Histograms.h.

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

◆ hPtVSPhi_

TH2F* HPartVSPhi::hPtVSPhi_

Definition at line 715 of file Histograms.h.

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

◆ hPtVSPhi_prof_

TProfile* HPartVSPhi::hPtVSPhi_prof_

Definition at line 718 of file Histograms.h.

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

mps_merge.weight
weight
Definition: mps_merge.py:88
HPartVSPhi::Fill
void Fill(const reco::Particle::LorentzVector &p4, const double &weight=1.) override
Definition: Histograms.h:632
HPartVSPhi::hMassVSPhi_prof_
TProfile * hMassVSPhi_prof_
Definition: Histograms.h:717
HPartVSPhi::hPtVSPhi_
TH2F * hPtVSPhi_
Definition: Histograms.h:715
p4
double p4[4]
Definition: TauolaWrapper.h:92
HPartVSPhi::hPtVSPhi_prof_
TProfile * hPtVSPhi_prof_
Definition: Histograms.h:718
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HPartVSPhi::hMassVSPhi_
TH2F * hMassVSPhi_
Definition: Histograms.h:716
weight
Definition: weight.py:1