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 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.)
 Used to fill 2D histograms for comparison of opposite charge muons quantities. More...
 
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 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)
 
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 * hMassVSCosThetaCS_
 
TProfile * hMassVSCosThetaCS_prof
 
TH2F * hMassVSEta_
 
TH2F * hMassVSEtaMinus_
 
TH3F * hMassVSEtaPhiMinus_
 
TH3F * hMassVSEtaPhiPlus_
 
TH2F * hMassVSEtaPlus_
 
TH3F * hMassVSEtaPlusEtaMinus_
 
TH2F * hMassVSEtaPlusMinusDiff_
 
TH2F * hMassVSPhiCS_
 
TH2F * hMassVSPhiMinus_
 
TH2F * hMassVSPhiPlus_
 
TH2F * hMassVSPhiPlusMinusDiff_
 
TH3F * hMassVSPhiPlusPhiMinus_
 
TH2F * hMassVSPt_
 
- Protected Attributes inherited from Histograms
TDirectory * histoDir_
 
TString name_
 
TFile * outputFile_
 
double theWeight_
 

Detailed Description

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

References hMassVSCosThetaCS_, hMassVSCosThetaCS_prof, hMassVSEta_, hMassVSEtaMinus_, hMassVSEtaPhiMinus_, hMassVSEtaPhiPlus_, hMassVSEtaPlus_, hMassVSEtaPlusEtaMinus_, hMassVSEtaPlusMinusDiff_, hMassVSPhiCS_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPhiPlusMinusDiff_, hMassVSPhiPlusPhiMinus_, hMassVSPt_, mergeVDriftHistosByStation::name, and Histograms::name_.

797  {
798  name_ = name;
799 
800  // Kinematical variables
801  // ---------------------
802  hMassVSPt_ = new TH2F( name+"_MassVSPt", "resonance mass vs muon transverse momentum", 200, 0., maxPt, 6000, minMass, maxMass );
803 
804  hMassVSEta_ = new TH2F( name+"_MassVSEta", "resonance mass vs muon pseudorapidity", 64, -6.4, 6.4, 6000, minMass, maxMass );
805  hMassVSEtaPlus_ = new TH2F( name+"_MassVSEtaPlus", "resonance mass vs muon+ pseudorapidity", 64, -6.4, 6.4, 6000, minMass, maxMass );
806  hMassVSEtaMinus_ = new TH2F( name+"_MassVSEtaMinus", "resonance mass vs muon- pseudorapidity", 64, -6.4, 6.4, 6000, minMass, maxMass );
807 
808  hMassVSPhiPlus_ = new TH2F( name+"_MassVSPhiPlus", "resonance mass vs muon+ phi angle", 64, -3.2, 3.2, 6000, minMass, maxMass );
809  hMassVSPhiMinus_ = new TH2F( name+"_MassVSPhiMinus", "resonance mass vs muon- phi angle", 64, -3.2, 3.2, 6000, minMass, maxMass );
810 
811 
812  // J/Psi mass -----
813 // hMassVSEtaPhiPlus_ = new TH3F( name+"_MassVSEtaPhiPlus", "resonance mass vs muon+ phi/pseudorapidity",6, -3.2, 3.2, 20, -2.5, 2.5, 6000, minMass, maxMass );
814 // hMassVSEtaPhiMinus_ = new TH3F( name+"_MassVSEtaPhiMinus", "resonance mass vs muon- phi/pseudorapidity", 6, -3.2, 3.2, 20, -2.5, 2.5, 6000, minMass, maxMass );
815 
816  //Z mass -----------
817  hMassVSEtaPhiPlus_ = new TH3F( name+"_MassVSEtaPhiPlus", "resonance mass vs muon+ phi/pseudorapidity", 16, -3.2, 3.2, 20, -2.4, 2.4, 300, minMass, maxMass );
818  hMassVSEtaPhiMinus_ = new TH3F( name+"_MassVSEtaPhiMinus", "resonance mass vs muon- phi/pseudorapidity", 16, -3.2, 3.2, 20, -2.4, 2.4, 300, minMass, maxMass );
819 
820 
821  hMassVSCosThetaCS_ = new TH2F( name+"_MassVSCosThetaCS", "resonance mass vs cos(theta) (CS frame)", 40, -1., 1., 6000, minMass, maxMass );
822  hMassVSPhiCS_ = new TH2F( name+"_MassVSPhiCS", "resonance mass vs phi (CS frame)", 64, -3.2, 3.2, 6000, minMass, maxMass );
823 
824 
825  hMassVSPhiPlusPhiMinus_ = new TH3F( name+"_MassVSPhiPlusPhiMinus", "resonance mass vs muon+ phi/muon- phi",16, -3.2, 3.2,16, -3.2, 3.2, 6000, minMass, maxMass );
826  hMassVSEtaPlusEtaMinus_ = new TH3F( name+"_MassVSEtaPlusEtaMinus", "resonance mass vs muon+ eta/muon- eta",16, -3.2, 3.2,16, -3.2, 3.2, 6000, minMass, maxMass );
827 
828 
829  hMassVSPhiPlusMinusDiff_ = new TH2F( name+"_MassVSPhiPlusMinusDiff", "resonance mass vs delta phi between mu+/mu-", 64, -6.4, 6.4, 6000, minMass, maxMass );
830  hMassVSEtaPlusMinusDiff_ = new TH2F( name+"_MassVSEtaPlusMinusDiff", "resonance mass vs delta pseudorapidity between mu+/mu-", 32, -4.4, 4.4, 6000, minMass, maxMass );
831  hMassVSCosThetaCS_prof = new TProfile (name+"_MassVScosTheta_prof", "resonance mass vs cosTheta", 40, -1., 1., 85., 95.);
832 
833  //hMassVSPt_prof = new TProfile (name+"_MassVSPt_prof", "resonance mass vs muon transverse momentum", 100, 0., 200., minMass, maxMass);
834  //hMassVSEta_prof = new TProfile (name+"_MassVSEta_prof", "resonance mass vs muon pseudorapidity", 30, -6., 6., minMass, maxMass);
835  //hMassVSPhiPlus_prof = new TProfile (name+"_MassVSPhiPlus_prof", "resonance mass vs muon+ phi angle", 32, -3.2, 3.2, minMass, maxMass);
836  //hMassVSPhiMinus_prof = new TProfile (name+"_MassVSPhiMinus_prof", "resonance mass vs muon- phi angle", 32, -3.2, 3.2, minMass, maxMass);
837  }
TH2F * hMassVSEtaMinus_
Definition: Histograms.h:1050
TH3F * hMassVSEtaPhiMinus_
Definition: Histograms.h:1048
TH2F * hMassVSEta_
Definition: Histograms.h:1041
TH3F * hMassVSPhiPlusPhiMinus_
Definition: Histograms.h:1055
TString name_
Definition: Histograms.h:124
TProfile * hMassVSCosThetaCS_prof
Definition: Histograms.h:1058
TH3F * hMassVSEtaPlusEtaMinus_
Definition: Histograms.h:1056
TH2F * hMassVSPhiCS_
Definition: Histograms.h:1045
TH2F * hMassVSEtaPlus_
Definition: Histograms.h:1049
TH2F * hMassVSCosThetaCS_
Definition: Histograms.h:1044
TH3F * hMassVSEtaPhiPlus_
Definition: Histograms.h:1047
TH2F * hMassVSPhiMinus_
Definition: Histograms.h:1043
TH2F * hMassVSEtaPlusMinusDiff_
Definition: Histograms.h:1053
TH2F * hMassVSPhiPlus_
Definition: Histograms.h:1042
TH2F * hMassVSPt_
Definition: Histograms.h:1040
TH2F * hMassVSPhiPlusMinusDiff_
Definition: Histograms.h:1052
HMassVSPart::HMassVSPart ( const TString &  name,
TFile *  file 
)
inline

Definition at line 839 of file Histograms.h.

References hMassVSCosThetaCS_prof, hMassVSEta_, hMassVSEtaMinus_, hMassVSEtaPhiMinus_, hMassVSEtaPhiPlus_, hMassVSEtaPlus_, hMassVSEtaPlusMinusDiff_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPhiPlusMinusDiff_, hMassVSPt_, mergeVDriftHistosByStation::name, and Histograms::name_.

839  {
840  name_=name;
841  hMassVSPt_ = (TH2F *) file->Get(name+"_MassVSPt");
842  hMassVSEta_ = (TH2F *) file->Get(name+"_MassVSEta");
843 
844  hMassVSEtaPhiPlus_ = (TH3F *) file->Get(name+"_MassVSEtaPlus");
845  hMassVSEtaPhiMinus_ = (TH3F *) file->Get(name+"_MassVSEtaMinus");
846  hMassVSEtaPlus_ = (TH2F *) file->Get(name+"_MassVSEtaPlus");
847  hMassVSEtaMinus_ = (TH2F *) file->Get(name+"_MassVSEtaMinus");
848 
849  hMassVSPhiPlusMinusDiff_ = (TH2F *) file->Get(name+"_MassVSPhiPlusMinusDiff");
850  hMassVSEtaPlusMinusDiff_ = (TH2F *) file->Get(name+"_MassVSEtaPlusMinusDiff");
851 
852  hMassVSPhiPlus_ = (TH2F *) file->Get(name+"_MassVSPhiPlus");
853  hMassVSPhiMinus_ = (TH2F *) file->Get(name+"_MassVSPhiMinus");
854 
855  hMassVSCosThetaCS_prof = (TProfile *) file->Get(name+"_MassVScosTheta_prof");
856  //hMassVSPt_prof = (TProfile *) file->Get(name+"_MassVSPt_prof");
857  //hMassVSEta_prof = (TProfile *) file->Get(name+"_MassVSEta_prof");
858  //hMassVSPhiPlus_prof = (TProfile *) file->Get(name+"_MassVSPhiPlus_prof");
859  //hMassVSPhiMinus_prof = (TProfile *) file->Get(name+"_MassVSPhiMinus_prof");
860  }
TH2F * hMassVSEtaMinus_
Definition: Histograms.h:1050
TH3F * hMassVSEtaPhiMinus_
Definition: Histograms.h:1048
TH2F * hMassVSEta_
Definition: Histograms.h:1041
TString name_
Definition: Histograms.h:124
TProfile * hMassVSCosThetaCS_prof
Definition: Histograms.h:1058
TH2F * hMassVSEtaPlus_
Definition: Histograms.h:1049
TH3F * hMassVSEtaPhiPlus_
Definition: Histograms.h:1047
TH2F * hMassVSPhiMinus_
Definition: Histograms.h:1043
TH2F * hMassVSEtaPlusMinusDiff_
Definition: Histograms.h:1053
TH2F * hMassVSPhiPlus_
Definition: Histograms.h:1042
TH2F * hMassVSPt_
Definition: Histograms.h:1040
TH2F * hMassVSPhiPlusMinusDiff_
Definition: Histograms.h:1052
HMassVSPart::~HMassVSPart ( )
inline

Definition at line 862 of file Histograms.h.

References hMassVSCosThetaCS_, hMassVSCosThetaCS_prof, hMassVSEta_, hMassVSEtaMinus_, hMassVSEtaPhiMinus_, hMassVSEtaPhiPlus_, hMassVSEtaPlus_, hMassVSEtaPlusEtaMinus_, hMassVSEtaPlusMinusDiff_, hMassVSPhiCS_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPhiPlusMinusDiff_, hMassVSPhiPlusPhiMinus_, and hMassVSPt_.

862  {
863  delete hMassVSPt_;
864  delete hMassVSEta_;
865  delete hMassVSPhiPlus_;
866  delete hMassVSPhiMinus_;
867  delete hMassVSEtaPhiPlus_;
868  delete hMassVSEtaPhiMinus_;
869  delete hMassVSEtaPlus_;
870  delete hMassVSEtaMinus_;
873  delete hMassVSCosThetaCS_;
874  delete hMassVSPhiCS_;
877  delete hMassVSCosThetaCS_prof;
878  }
TH2F * hMassVSEtaMinus_
Definition: Histograms.h:1050
TH3F * hMassVSEtaPhiMinus_
Definition: Histograms.h:1048
TH2F * hMassVSEta_
Definition: Histograms.h:1041
TH3F * hMassVSPhiPlusPhiMinus_
Definition: Histograms.h:1055
TProfile * hMassVSCosThetaCS_prof
Definition: Histograms.h:1058
TH3F * hMassVSEtaPlusEtaMinus_
Definition: Histograms.h:1056
TH2F * hMassVSPhiCS_
Definition: Histograms.h:1045
TH2F * hMassVSEtaPlus_
Definition: Histograms.h:1049
TH2F * hMassVSCosThetaCS_
Definition: Histograms.h:1044
TH3F * hMassVSEtaPhiPlus_
Definition: Histograms.h:1047
TH2F * hMassVSPhiMinus_
Definition: Histograms.h:1043
TH2F * hMassVSEtaPlusMinusDiff_
Definition: Histograms.h:1053
TH2F * hMassVSPhiPlus_
Definition: Histograms.h:1042
TH2F * hMassVSPt_
Definition: Histograms.h:1040
TH2F * hMassVSPhiPlusMinusDiff_
Definition: Histograms.h:1052

Member Function Documentation

virtual void HMassVSPart::Clear ( )
inlinevirtual

Implements Histograms.

Definition at line 1014 of file Histograms.h.

References hMassVSCosThetaCS_, hMassVSCosThetaCS_prof, hMassVSEta_, hMassVSEtaMinus_, hMassVSEtaPhiMinus_, hMassVSEtaPhiPlus_, hMassVSEtaPlus_, hMassVSEtaPlusEtaMinus_, hMassVSEtaPlusMinusDiff_, hMassVSPhiCS_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPhiPlusMinusDiff_, hMassVSPhiPlusPhiMinus_, and hMassVSPt_.

1014  {
1015  hMassVSPt_->Clear();
1016  hMassVSEta_->Clear();
1017  hMassVSPhiPlus_->Clear();
1018  hMassVSPhiMinus_->Clear();
1019 
1020  hMassVSEtaPhiPlus_->Clear();
1021  hMassVSEtaPhiMinus_->Clear();
1022  hMassVSEtaPlus_->Clear();
1023  hMassVSEtaMinus_->Clear();
1024 
1025  hMassVSPhiPlusPhiMinus_->Clear();
1026  hMassVSEtaPlusEtaMinus_->Clear();
1027  hMassVSCosThetaCS_->Clear();
1028  hMassVSPhiCS_->Clear();
1029  hMassVSPhiPlusMinusDiff_->Clear();
1030  hMassVSEtaPlusMinusDiff_->Clear();
1031  hMassVSCosThetaCS_prof->Clear();
1032 
1033  //hMassVSPt_prof_->Clear();
1034  //hMassVSEta_prof_->Clear();
1035  //hMassVSPhiPlus_prof_->Clear();
1036  //hMassVSPhiMinus_prof_->Clear();
1037  }
TH2F * hMassVSEtaMinus_
Definition: Histograms.h:1050
TH3F * hMassVSEtaPhiMinus_
Definition: Histograms.h:1048
TH2F * hMassVSEta_
Definition: Histograms.h:1041
TH3F * hMassVSPhiPlusPhiMinus_
Definition: Histograms.h:1055
TProfile * hMassVSCosThetaCS_prof
Definition: Histograms.h:1058
TH3F * hMassVSEtaPlusEtaMinus_
Definition: Histograms.h:1056
TH2F * hMassVSPhiCS_
Definition: Histograms.h:1045
TH2F * hMassVSEtaPlus_
Definition: Histograms.h:1049
TH2F * hMassVSCosThetaCS_
Definition: Histograms.h:1044
TH3F * hMassVSEtaPhiPlus_
Definition: Histograms.h:1047
TH2F * hMassVSPhiMinus_
Definition: Histograms.h:1043
TH2F * hMassVSEtaPlusMinusDiff_
Definition: Histograms.h:1053
TH2F * hMassVSPhiPlus_
Definition: Histograms.h:1042
TH2F * hMassVSPt_
Definition: Histograms.h:1040
TH2F * hMassVSPhiPlusMinusDiff_
Definition: Histograms.h:1052
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 880 of file Histograms.h.

References CommonMethods::weight().

Referenced by Fill().

881  {
882  Fill(CLHEP::HepLorentzVector(p41.x(),p41.y(),p41.z(),p41.t()),
883  CLHEP::HepLorentzVector(p42.x(),p42.y(),p42.z(),p42.t()), charge, weight);
884  }
virtual void Fill(const reco::Particle::LorentzVector &p41, const reco::Particle::LorentzVector &p42, const int charge, const double &weight=1.)
Definition: Histograms.h:880
double charge(const std::vector< uint8_t > &Ampls)
virtual void HMassVSPart::Fill ( const reco::Particle::LorentzVector p41,
const reco::Particle::LorentzVector p42,
const reco::Particle::LorentzVector p4Res,
const double &  weight = 1. 
)
inlinevirtual

Reimplemented from Histograms.

Definition at line 886 of file Histograms.h.

References Fill(), and CommonMethods::weight().

890  {
891  Fill(CLHEP::HepLorentzVector(p41.x(),p41.y(),p41.z(),p41.t()),
892  CLHEP::HepLorentzVector(p42.x(),p42.y(),p42.z(),p42.t()),
893  CLHEP::HepLorentzVector(p4Res.x(),p4Res.y(),p4Res.z(),p4Res.t()),
894  weight);
895  }
virtual void Fill(const reco::Particle::LorentzVector &p41, const reco::Particle::LorentzVector &p42, const int charge, const double &weight=1.)
Definition: Histograms.h:880
virtual void HMassVSPart::Fill ( const CLHEP::HepLorentzVector &  momentum1,
const CLHEP::HepLorentzVector &  momentum2,
const CLHEP::HepLorentzVector &  momentumRes,
const double &  weight = 1. 
)
inlinevirtual

Used to fill 2D histograms for comparison of opposite charge muons quantities.

Reimplemented from Histograms.

Definition at line 898 of file Histograms.h.

References hMassVSCosThetaCS_, hMassVSCosThetaCS_prof, hMassVSEtaPlusEtaMinus_, hMassVSEtaPlusMinusDiff_, hMassVSPhiCS_, hMassVSPhiPlusMinusDiff_, hMassVSPhiPlusPhiMinus_, RPCpg::mu, RPCpg::mubar, funct::pow(), dttmaxenums::R, mathSSE::sqrt(), and CommonMethods::weight().

902  {
903 
904  /************************************************************************
905  *
906  * Observable: cos(theta) = 2 Q^-1 (Q^2+Qt^2)^-(1/2) (mu^+ mubar^- - mu^- mubar^+)
907  * (computed in Collins-Soper frame)
908  *
909  ************************************************************************/
910 
911  double costhetaCS, phiCS;
912 
913  CLHEP::HepLorentzVector mu= momentum1;
914  CLHEP::HepLorentzVector mubar= momentum2;
915  CLHEP::HepLorentzVector Q(mu+mubar);
916  double muplus = 1.0/sqrt(2.0) * (mu.e() + mu.z());
917  double muminus = 1.0/sqrt(2.0) * (mu.e() - mu.z());
918  double mubarplus = 1.0/sqrt(2.0) * (mubar.e() + mubar.z());
919  double mubarminus = 1.0/sqrt(2.0) * (mubar.e() - mubar.z());
920  //double costheta = 2.0 / Q.Mag() / sqrt(pow(Q.Mag(), 2) + pow(Q.Pt(), 2)) * (muplus * mubarminus - muminus * mubarplus);
921  costhetaCS = 2.0 / Q.mag() / sqrt(pow(Q.mag(), 2) + pow(Q.perp(), 2)) * (muplus * mubarminus - muminus * mubarplus);
922  if (momentumRes.rapidity()<0) costhetaCS = -costhetaCS;
923 
924 
925 
926 
927  /************************************************************************
928  *
929  * 3) tanphi = (Q^2 + Qt^2)^1/2 / Q (Dt dot R unit) /(Dt dot Qt unit)
930  *
931  ************************************************************************/
932 
933  // unit vector on R direction
934  CLHEP::HepLorentzVector Pbeam(0.,0.,3500.,3500.);
935  CLHEP::Hep3Vector R = Pbeam.vect().cross(Q.vect());
936  CLHEP::Hep3Vector Runit = R.unit();
937 
938 
939  // unit vector on Qt
940  CLHEP::Hep3Vector Qt = Q.vect(); Qt.setZ(0);
941  CLHEP::Hep3Vector Qtunit = Qt.unit();
942 
943 
944  CLHEP::HepLorentzVector D(mu-mubar);
945  CLHEP::Hep3Vector Dt = D.vect(); Dt.setZ(0);
946  double tanphi = sqrt(pow(Q.mag(), 2) + pow(Q.perp(), 2)) / Q.mag() * Dt.dot(Runit) / Dt.dot(Qtunit);
947  if (momentumRes.rapidity()<0) tanphi = -tanphi;
948  phiCS = atan(tanphi);
949 
950  hMassVSPhiCS_->Fill(phiCS,momentumRes.m(), weight);
951  hMassVSCosThetaCS_->Fill(costhetaCS,momentumRes.m(), weight);
952  hMassVSCosThetaCS_prof ->Fill(costhetaCS,momentumRes.m());
953  /*************************************************************************
954  *************************************************************************/
955 
956  hMassVSPhiPlusPhiMinus_->Fill(momentum1.phi(), momentum2.phi(), momentumRes.m(), weight);
957  hMassVSEtaPlusEtaMinus_->Fill(momentum1.eta(), momentum2.eta(), momentumRes.m(), weight);
958 
959  hMassVSPhiPlusMinusDiff_->Fill( (momentum1.phi()-momentum2.phi()), momentumRes.m(), weight);
960  hMassVSEtaPlusMinusDiff_->Fill( (momentum1.eta()-momentum2.eta()), momentumRes.m(), weight);
961  }
TH3F * hMassVSPhiPlusPhiMinus_
Definition: Histograms.h:1055
TProfile * hMassVSCosThetaCS_prof
Definition: Histograms.h:1058
TH3F * hMassVSEtaPlusEtaMinus_
Definition: Histograms.h:1056
TH2F * hMassVSPhiCS_
Definition: Histograms.h:1045
T sqrt(T t)
Definition: SSEVec.h:46
const int mu
Definition: Constants.h:23
const int mubar
Definition: Constants.h:24
TH2F * hMassVSCosThetaCS_
Definition: Histograms.h:1044
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:150
TH2F * hMassVSEtaPlusMinusDiff_
Definition: Histograms.h:1053
TH2F * hMassVSPhiPlusMinusDiff_
Definition: Histograms.h:1052
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
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 963 of file Histograms.h.

References hMassVSEta_, hMassVSEtaMinus_, hMassVSEtaPhiMinus_, hMassVSEtaPhiPlus_, hMassVSEtaPlus_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPt_, LogDebug, and CommonMethods::weight().

964  {
965  hMassVSPt_->Fill(momentum1.perp(),momentum2.m(), weight);
966  //hMassVSPt_prof_->Fill(momentum1.perp(),momentum2.m());
967 
968 
969  hMassVSEta_->Fill(momentum1.eta(),momentum2.m(), weight);
970  //hMassVSEta_prof_->Fill(momentum1.eta(),momentum2.m());
971 
972  if(charge>0){
973  hMassVSPhiPlus_->Fill(momentum1.phi(),momentum2.m(), weight);
974  hMassVSEtaPlus_->Fill(momentum1.eta(),momentum2.m(), weight);
975  hMassVSEtaPhiPlus_->Fill(momentum1.phi(),momentum1.eta(),momentum2.m(), weight);
976  }
977  else if(charge<0){
978  hMassVSPhiMinus_->Fill(momentum1.phi(),momentum2.m(), weight);
979  hMassVSEtaMinus_->Fill(momentum1.eta(),momentum2.m(), weight);
980  hMassVSEtaPhiMinus_->Fill(momentum1.phi(),momentum1.eta(),momentum2.m(), weight);
981  }
982  else {
983  LogDebug("Histograms") << "HMassVSPart: wrong charge value = " << charge << std::endl;
984  abort();
985  }
986  }
#define LogDebug(id)
TH2F * hMassVSEtaMinus_
Definition: Histograms.h:1050
TH3F * hMassVSEtaPhiMinus_
Definition: Histograms.h:1048
TH2F * hMassVSEta_
Definition: Histograms.h:1041
double charge(const std::vector< uint8_t > &Ampls)
TH2F * hMassVSEtaPlus_
Definition: Histograms.h:1049
TH3F * hMassVSEtaPhiPlus_
Definition: Histograms.h:1047
TH2F * hMassVSPhiMinus_
Definition: Histograms.h:1043
TH2F * hMassVSPhiPlus_
Definition: Histograms.h:1042
TH2F * hMassVSPt_
Definition: Histograms.h:1040
virtual void HMassVSPart::Write ( )
inlinevirtual

Implements Histograms.

Definition at line 988 of file Histograms.h.

References hMassVSCosThetaCS_, hMassVSCosThetaCS_prof, hMassVSEta_, hMassVSEtaMinus_, hMassVSEtaPhiMinus_, hMassVSEtaPhiPlus_, hMassVSEtaPlus_, hMassVSEtaPlusEtaMinus_, hMassVSEtaPlusMinusDiff_, hMassVSPhiCS_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPhiPlusMinusDiff_, hMassVSPhiPlusPhiMinus_, and hMassVSPt_.

988  {
989  hMassVSPt_->Write();
990  hMassVSEta_->Write();
991  hMassVSPhiPlus_->Write();
992  hMassVSPhiMinus_->Write();
993 
994  hMassVSEtaPhiPlus_->Write();
995  hMassVSEtaPhiMinus_->Write();
996  hMassVSEtaPlus_->Write();
997  hMassVSEtaMinus_->Write();
998 
999  hMassVSPhiPlusPhiMinus_->Write();
1000  hMassVSEtaPlusEtaMinus_->Write();
1001  hMassVSCosThetaCS_->Write();
1002  hMassVSPhiCS_->Write();
1003 
1004  hMassVSPhiPlusMinusDiff_->Write();
1005  hMassVSEtaPlusMinusDiff_->Write();
1006  hMassVSCosThetaCS_prof->Write();
1007 
1008  //hMassVSPt_prof_->Write();
1009  //hMassVSEta_prof_->Write();
1010  //hMassVSPhiPlus_prof_->Write();
1011  //hMassVSPhiMinus_prof_->Write();
1012  }
TH2F * hMassVSEtaMinus_
Definition: Histograms.h:1050
TH3F * hMassVSEtaPhiMinus_
Definition: Histograms.h:1048
TH2F * hMassVSEta_
Definition: Histograms.h:1041
TH3F * hMassVSPhiPlusPhiMinus_
Definition: Histograms.h:1055
TProfile * hMassVSCosThetaCS_prof
Definition: Histograms.h:1058
TH3F * hMassVSEtaPlusEtaMinus_
Definition: Histograms.h:1056
TH2F * hMassVSPhiCS_
Definition: Histograms.h:1045
TH2F * hMassVSEtaPlus_
Definition: Histograms.h:1049
TH2F * hMassVSCosThetaCS_
Definition: Histograms.h:1044
TH3F * hMassVSEtaPhiPlus_
Definition: Histograms.h:1047
TH2F * hMassVSPhiMinus_
Definition: Histograms.h:1043
TH2F * hMassVSEtaPlusMinusDiff_
Definition: Histograms.h:1053
TH2F * hMassVSPhiPlus_
Definition: Histograms.h:1042
TH2F * hMassVSPt_
Definition: Histograms.h:1040
TH2F * hMassVSPhiPlusMinusDiff_
Definition: Histograms.h:1052

Member Data Documentation

TH2F* HMassVSPart::hMassVSCosThetaCS_
protected

Definition at line 1044 of file Histograms.h.

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

TProfile* HMassVSPart::hMassVSCosThetaCS_prof
protected

Definition at line 1058 of file Histograms.h.

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

TH2F* HMassVSPart::hMassVSEta_
protected

Definition at line 1041 of file Histograms.h.

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

TH2F* HMassVSPart::hMassVSEtaMinus_
protected

Definition at line 1050 of file Histograms.h.

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

TH3F* HMassVSPart::hMassVSEtaPhiMinus_
protected

Definition at line 1048 of file Histograms.h.

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

TH3F* HMassVSPart::hMassVSEtaPhiPlus_
protected

Definition at line 1047 of file Histograms.h.

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

TH2F* HMassVSPart::hMassVSEtaPlus_
protected

Definition at line 1049 of file Histograms.h.

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

TH3F* HMassVSPart::hMassVSEtaPlusEtaMinus_
protected

Definition at line 1056 of file Histograms.h.

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

TH2F* HMassVSPart::hMassVSEtaPlusMinusDiff_
protected

Definition at line 1053 of file Histograms.h.

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

TH2F* HMassVSPart::hMassVSPhiCS_
protected

Definition at line 1045 of file Histograms.h.

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

TH2F* HMassVSPart::hMassVSPhiMinus_
protected

Definition at line 1043 of file Histograms.h.

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

TH2F* HMassVSPart::hMassVSPhiPlus_
protected

Definition at line 1042 of file Histograms.h.

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

TH2F* HMassVSPart::hMassVSPhiPlusMinusDiff_
protected

Definition at line 1052 of file Histograms.h.

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

TH3F* HMassVSPart::hMassVSPhiPlusPhiMinus_
protected

Definition at line 1055 of file Histograms.h.

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

TH2F* HMassVSPart::hMassVSPt_
protected

Definition at line 1040 of file Histograms.h.

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