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 reco::Particle::LorentzVector &p4, const double &weight=1.) override
 
void Fill (const CLHEP::HepLorentzVector &momentum, 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 ( const TString &  name)
inline

Definition at line 591 of file Histograms.h.

References Skims_PA_cff::name.

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  }
TProfile * hMassVSPhi_prof_
Definition: Histograms.h:717
TProfile * hPtVSPhi_prof_
Definition: Histograms.h:718
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  }
TProfile * hMassVSPhi_prof_
Definition: Histograms.h:717
TH2F * hPtVSPhi_
Definition: Histograms.h:715
TProfile * hPtVSPhi_prof_
Definition: Histograms.h:718
TH2F * hMassVSPhi_
Definition: Histograms.h:716

Member Function Documentation

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  }
TProfile * hMassVSPhi_prof_
Definition: Histograms.h:717
TH2F * hPtVSPhi_
Definition: Histograms.h:715
TProfile * hPtVSPhi_prof_
Definition: Histograms.h:718
TH2F * hMassVSPhi_
Definition: Histograms.h:716
void HPartVSPhi::Fill ( const reco::Particle::LorentzVector p4,
const double &  weight = 1. 
)
inlineoverride

Definition at line 632 of file Histograms.h.

References HcalObjRepresent::Fill().

632  {
633  Fill(CLHEP::HepLorentzVector(p4.x(), p4.y(), p4.z(), p4.t()), weight);
634  }
Definition: weight.py:1
double p4[4]
Definition: TauolaWrapper.h:92
void Fill(const reco::Particle::LorentzVector &p4, const double &weight=1.) override
Definition: Histograms.h:632
void HPartVSPhi::Fill ( const CLHEP::HepLorentzVector &  momentum,
const double &  weight = 1. 
)
inlineoverride

Definition at line 636 of file Histograms.h.

References mps_merge::weight.

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  }
TProfile * hMassVSPhi_prof_
Definition: Histograms.h:717
TH2F * hPtVSPhi_
Definition: Histograms.h:715
TProfile * hPtVSPhi_prof_
Definition: Histograms.h:718
TH2F * hMassVSPhi_
Definition: Histograms.h:716
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  }
TProfile * hMassVSPhi_prof_
Definition: Histograms.h:717
TH2F * hPtVSPhi_
Definition: Histograms.h:715
TProfile * hPtVSPhi_prof_
Definition: Histograms.h:718
TH2F * hMassVSPhi_
Definition: Histograms.h:716

Member Data Documentation

TH2F* HPartVSPhi::hMassVSPhi_

Definition at line 716 of file Histograms.h.

TProfile* HPartVSPhi::hMassVSPhi_prof_

Definition at line 717 of file Histograms.h.

TH2F* HPartVSPhi::hPtVSPhi_

Definition at line 715 of file Histograms.h.

TProfile* HPartVSPhi::hPtVSPhi_prof_

Definition at line 718 of file Histograms.h.