CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
HMassVSPart Class Reference

#include <Histograms.h>

Inheritance diagram for HMassVSPart:
Histograms

Public Member Functions

virtual void Clear ()
 
virtual void Fill (const reco::Particle::LorentzVector &p41, const reco::Particle::LorentzVector &p42, const int charge, const double &weight=1.)
 
virtual void Fill (const CLHEP::HepLorentzVector &momentum1, const CLHEP::HepLorentzVector &momentum2, const int charge, const double &weight=1.)
 
 HMassVSPart (const TString &name, const double &minMass=0., const double &maxMass=150., const double maxPt=100.)
 
 HMassVSPart (const TString &name, TFile *file)
 
virtual void Write ()
 
 ~HMassVSPart ()
 
- Public Member Functions inherited from Histograms
void declareHistograms ()
 
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 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)
 
void fillEventInfo (int proc, int strk, int ntrkr)
 
void fillRecHistograms (const RecTrack_t &r)
 
void fillSimHistograms (const SimTrack_t &s)
 
void fillVzeroHistograms (const RecVzero_t &r, int part)
 
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)
 
 Histograms (const edm::ParameterSet &pset)
 
virtual void SetWeight (double weight)
 
void writeHistograms ()
 
virtual ~Histograms ()
 
 ~Histograms ()
 

Protected Attributes

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

Detailed Description

Definition at line 688 of file Histograms.h.

Constructor & Destructor Documentation

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

Definition at line 691 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPt_, mergeVDriftHistosByStation::name, and Histograms::name_.

691  {
692  name_ = name;
693 
694  // Kinematical variables
695  // ---------------------
696  hMassVSPt_ = new TH2F( name+"_MassVSPt", "resonance mass vs muon transverse momentum", 200, 0., maxPt, 6000, minMass, maxMass );
697  hMassVSEta_ = new TH2F( name+"_MassVSEta", "resonance mass vs muon pseudorapidity", 60, -6., 6., 6000, minMass, maxMass );
698  hMassVSPhiPlus_ = new TH2F( name+"_MassVSPhiPlus", "resonance mass vs muon+ phi angle", 64, -3.2, 3.2, 6000, minMass, maxMass );
699  hMassVSPhiMinus_ = new TH2F( name+"_MassVSPhiMinus", "resonance mass vs muon- phi angle", 64, -3.2, 3.2, 6000, minMass, maxMass );
700  //hMassVSPt_prof = new TProfile (name+"_MassVSPt_prof", "resonance mass vs muon transverse momentum", 100, 0., 200., minMass, maxMass);
701  //hMassVSEta_prof = new TProfile (name+"_MassVSEta_prof", "resonance mass vs muon pseudorapidity", 30, -6., 6., minMass, maxMass);
702  //hMassVSPhiPlus_prof = new TProfile (name+"_MassVSPhiPlus_prof", "resonance mass vs muon+ phi angle", 32, -3.2, 3.2, minMass, maxMass);
703  //hMassVSPhiMinus_prof = new TProfile (name+"_MassVSPhiMinus_prof", "resonance mass vs muon- phi angle", 32, -3.2, 3.2, minMass, maxMass);
704  }
TH2F * hMassVSEta_
Definition: Histograms.h:773
TString name_
Definition: Histograms.h:106
TH2F * hMassVSPhiMinus_
Definition: Histograms.h:775
TH2F * hMassVSPhiPlus_
Definition: Histograms.h:774
TH2F * hMassVSPt_
Definition: Histograms.h:772
HMassVSPart::HMassVSPart ( const TString &  name,
TFile *  file 
)
inline

Definition at line 706 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPt_, mergeVDriftHistosByStation::name, and Histograms::name_.

706  {
707  name_=name;
708  hMassVSPt_ = (TH2F *) file->Get(name+"_MassVSPt");
709  hMassVSEta_ = (TH2F *) file->Get(name+"_MassVSEta");
710  hMassVSPhiPlus_ = (TH2F *) file->Get(name+"_MassVSPhiPlus");
711  hMassVSPhiMinus_ = (TH2F *) file->Get(name+"_MassVSPhiMinus");
712  //hMassVSPt_prof = (TProfile *) file->Get(name+"_MassVSPt_prof");
713  //hMassVSEta_prof = (TProfile *) file->Get(name+"_MassVSEta_prof");
714  //hMassVSPhiPlus_prof = (TProfile *) file->Get(name+"_MassVSPhiPlus_prof");
715  //hMassVSPhiMinus_prof = (TProfile *) file->Get(name+"_MassVSPhiMinus_prof");
716  }
TH2F * hMassVSEta_
Definition: Histograms.h:773
TString name_
Definition: Histograms.h:106
TH2F * hMassVSPhiMinus_
Definition: Histograms.h:775
TH2F * hMassVSPhiPlus_
Definition: Histograms.h:774
TH2F * hMassVSPt_
Definition: Histograms.h:772
HMassVSPart::~HMassVSPart ( )
inline

Definition at line 718 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, and hMassVSPt_.

718  {
719  delete hMassVSPt_;
720  delete hMassVSEta_;
721  delete hMassVSPhiPlus_;
722  delete hMassVSPhiMinus_;
723  }
TH2F * hMassVSEta_
Definition: Histograms.h:773
TH2F * hMassVSPhiMinus_
Definition: Histograms.h:775
TH2F * hMassVSPhiPlus_
Definition: Histograms.h:774
TH2F * hMassVSPt_
Definition: Histograms.h:772

Member Function Documentation

virtual void HMassVSPart::Clear ( )
inlinevirtual

Implements Histograms.

Definition at line 760 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, and hMassVSPt_.

760  {
761  hMassVSPt_->Clear();
762  hMassVSEta_->Clear();
763  hMassVSPhiPlus_->Clear();
764  hMassVSPhiMinus_->Clear();
765  //hMassVSPt_prof_->Clear();
766  //hMassVSEta_prof_->Clear();
767  //hMassVSPhiPlus_prof_->Clear();
768  //hMassVSPhiMinus_prof_->Clear();
769  }
TH2F * hMassVSEta_
Definition: Histograms.h:773
TH2F * hMassVSPhiMinus_
Definition: Histograms.h:775
TH2F * hMassVSPhiPlus_
Definition: Histograms.h:774
TH2F * hMassVSPt_
Definition: Histograms.h:772
virtual void HMassVSPart::Fill ( const reco::Particle::LorentzVector p41,
const reco::Particle::LorentzVector p42,
const int  charge,
const double &  weight = 1. 
)
inlinevirtual

Reimplemented from Histograms.

Definition at line 725 of file Histograms.h.

References CommonMethods::weight().

725  {
726  Fill(CLHEP::HepLorentzVector(p41.x(),p41.y(),p41.z(),p41.t()),
727  CLHEP::HepLorentzVector(p42.x(),p42.y(),p42.z(),p42.t()), charge, weight);
728  }
virtual void Fill(const reco::Particle::LorentzVector &p41, const reco::Particle::LorentzVector &p42, const int charge, const double &weight=1.)
Definition: Histograms.h:725
double charge(const std::vector< uint8_t > &Ampls)
virtual void HMassVSPart::Fill ( const CLHEP::HepLorentzVector &  momentum1,
const CLHEP::HepLorentzVector &  momentum2,
const int  charge,
const double &  weight = 1. 
)
inlinevirtual

Reimplemented from Histograms.

Definition at line 730 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPt_, LogDebug, and CommonMethods::weight().

730  {
731  hMassVSPt_->Fill(momentum1.perp(),momentum2.m(), weight);
732  //hMassVSPt_prof_->Fill(momentum1.perp(),momentum2.m());
733  hMassVSEta_->Fill(momentum1.eta(),momentum2.m(), weight);
734  //hMassVSEta_prof_->Fill(momentum1.eta(),momentum2.m());
735  if(charge>0){
736  hMassVSPhiPlus_->Fill(momentum1.phi(),momentum2.m(), weight);
737  //hMassVSPhiPlus_prof_->Fill(momentum1.phi(),momentum2.m());
738  }
739  else if(charge<0){
740  hMassVSPhiMinus_->Fill(momentum1.phi(),momentum2.m(), weight);
741  //hMassVSPhiMinus_prof_->Fill(momentum1.phi(),momentum2.m());
742  }
743  else {
744  LogDebug("Histograms") << "HMassVSPart: wrong charge value = " << charge << std::endl;
745  abort();
746  }
747  }
#define LogDebug(id)
TH2F * hMassVSEta_
Definition: Histograms.h:773
double charge(const std::vector< uint8_t > &Ampls)
TH2F * hMassVSPhiMinus_
Definition: Histograms.h:775
TH2F * hMassVSPhiPlus_
Definition: Histograms.h:774
TH2F * hMassVSPt_
Definition: Histograms.h:772
virtual void HMassVSPart::Write ( )
inlinevirtual

Implements Histograms.

Definition at line 749 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, and hMassVSPt_.

749  {
750  hMassVSPt_->Write();
751  hMassVSEta_->Write();
752  hMassVSPhiPlus_->Write();
753  hMassVSPhiMinus_->Write();
754  //hMassVSPt_prof_->Write();
755  //hMassVSEta_prof_->Write();
756  //hMassVSPhiPlus_prof_->Write();
757  //hMassVSPhiMinus_prof_->Write();
758  }
TH2F * hMassVSEta_
Definition: Histograms.h:773
TH2F * hMassVSPhiMinus_
Definition: Histograms.h:775
TH2F * hMassVSPhiPlus_
Definition: Histograms.h:774
TH2F * hMassVSPt_
Definition: Histograms.h:772

Member Data Documentation

TH2F* HMassVSPart::hMassVSEta_
protected

Definition at line 773 of file Histograms.h.

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

TH2F* HMassVSPart::hMassVSPhiMinus_
protected

Definition at line 775 of file Histograms.h.

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

TH2F* HMassVSPart::hMassVSPhiPlus_
protected

Definition at line 774 of file Histograms.h.

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

TH2F* HMassVSPart::hMassVSPt_
protected

Definition at line 772 of file Histograms.h.

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