CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TtSemiLepSignalSel Class Reference

#include <TtSemiLepSignalSel.h>

Public Member Functions

double DeltaPhi (const math::XYZTLorentzVector &, const math::XYZTLorentzVector &)
 
double DeltaR (const math::XYZTLorentzVector &, const math::XYZTLorentzVector &)
 
double detajet2jet3 () const
 
double detajet3jet4 () const
 
double dphiMETlepton () const
 
double Et1 () const
 
double lepeta () const
 
double maxdijetmass () const
 
double MET () const
 
double mindijetmass () const
 
double mindRjetlepton () const
 
double sumEt () const
 
 TtSemiLepSignalSel ()
 
 TtSemiLepSignalSel (const std::vector< pat::Jet > &, const math::XYZTLorentzVector &, const edm::View< pat::MET > &)
 
 ~TtSemiLepSignalSel ()
 

Private Attributes

double massalljets
 
double var_detajet2jet3
 
double var_detajet3jet4
 
double var_dphiMETlepton
 
double var_Et1
 
double var_lepeta
 
double var_maxdijetmass
 
double var_MET
 
double var_mindijetmass
 
double var_mindRjetlepton
 
double var_sumEt
 

Detailed Description

Definition at line 11 of file TtSemiLepSignalSel.h.

Constructor & Destructor Documentation

◆ TtSemiLepSignalSel() [1/2]

TtSemiLepSignalSel::TtSemiLepSignalSel ( )

Definition at line 4 of file TtSemiLepSignalSel.cc.

4 {}

◆ TtSemiLepSignalSel() [2/2]

TtSemiLepSignalSel::TtSemiLepSignalSel ( const std::vector< pat::Jet > &  topJets,
const math::XYZTLorentzVector lepton,
const edm::View< pat::MET > &  MET 
)

Definition at line 6 of file TtSemiLepSignalSel.cc.

References counter, DeltaPhi(), DeltaR(), mps_fire::i, dqmiolumiharvest::j, TtFullLepDaughter::Lep, massalljets, var_detajet2jet3, var_detajet3jet4, var_dphiMETlepton, var_Et1, var_lepeta, var_maxdijetmass, var_MET, var_mindijetmass, var_mindRjetlepton, and var_sumEt.

8  { //function
9 
10  unsigned int nJetsMax = topJets.size();
11 
12  var_MET = MET.begin()->et();
13  var_sumEt = 0.;
14 
15  math::XYZTLorentzVector Jetsum(0., 0., 0., 0.);
16 
17  for (unsigned int i = 0; i < nJetsMax; i++) {
18  math::XYZTLorentzVector aJet = topJets[i].p4();
19  Jetsum += aJet;
20  var_sumEt += topJets[i].et();
21  }
22  massalljets = Jetsum.M();
23 
24  var_lepeta = lepton.Eta();
25 
26  math::XYZTLorentzVector Met = MET.begin()->p4();
27  const math::XYZTLorentzVector& Lep = lepton;
28  double Etjet[4];
29  double Jetjet[6];
30  double dijetmass;
31  var_mindijetmass = 99999.;
32  var_maxdijetmass = -1.;
33  int counter = 0;
34  for (int i = 0; i < 4; i++) {
35  math::XYZTLorentzVector aJet = topJets[i].p4();
36  Etjet[i] = aJet.Et();
37  for (int j = i + 1; j < 4; j++) {
38  math::XYZTLorentzVector asecJet = topJets[j].p4();
39  dijetmass = (aJet + asecJet).M();
40  if (dijetmass < var_mindijetmass)
41  var_mindijetmass = dijetmass;
42  if (dijetmass > var_maxdijetmass)
43  var_maxdijetmass = dijetmass;
44  counter++;
45  }
46  }
47 
48  var_Et1 = Etjet[0];
49 
51 
52  counter = 0;
53  for (int i = 0; i < 4; i++) {
54  math::XYZTLorentzVector aJet = topJets[i].p4();
55  for (int j = i + 1; j < 4; j++) {
56  math::XYZTLorentzVector asecJet = topJets[j].p4();
57  Jetjet[counter] = fabs(aJet.Eta() - asecJet.Eta());
58  counter++;
59  }
60  }
61 
62  var_detajet2jet3 = Jetjet[3];
63  var_detajet3jet4 = Jetjet[5];
64 
65  double Lepjet[4];
66  var_mindRjetlepton = 99999.;
67  for (int i = 0; i < 4; i++) {
68  math::XYZTLorentzVector aJet = topJets[i].p4();
69  Lepjet[i] = DeltaR(Lep, aJet);
70  if (Lepjet[i] < var_mindRjetlepton)
71  var_mindRjetlepton = Lepjet[i];
72  }
73 }
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
double DeltaR(const math::XYZTLorentzVector &, const math::XYZTLorentzVector &)
static std::atomic< unsigned int > counter
double DeltaPhi(const math::XYZTLorentzVector &, const math::XYZTLorentzVector &)
static const std::string Lep

◆ ~TtSemiLepSignalSel()

TtSemiLepSignalSel::~TtSemiLepSignalSel ( )

Definition at line 88 of file TtSemiLepSignalSel.cc.

88 {}

Member Function Documentation

◆ DeltaPhi()

double TtSemiLepSignalSel::DeltaPhi ( const math::XYZTLorentzVector v1,
const math::XYZTLorentzVector v2 
)

Definition at line 75 of file TtSemiLepSignalSel.cc.

References HLT_2024v14_cff::dPhi, and Pi.

Referenced by DeltaR(), and TtSemiLepSignalSel().

75  {
76  double dPhi = fabs(v1.Phi() - v2.Phi());
77  if (dPhi > TMath::Pi())
78  dPhi = 2 * TMath::Pi() - dPhi;
79  return dPhi;
80 }
const double Pi

◆ DeltaR()

double TtSemiLepSignalSel::DeltaR ( const math::XYZTLorentzVector v1,
const math::XYZTLorentzVector v2 
)

Definition at line 82 of file TtSemiLepSignalSel.cc.

References DeltaPhi(), HLT_2024v14_cff::dPhi, and HGC3DClusterGenMatchSelector_cfi::dR.

Referenced by TtSemiLepSignalSel().

82  {
83  double dPhi = DeltaPhi(v1, v2);
84  double dR = TMath::Sqrt((v1.Eta() - v2.Eta()) * (v1.Eta() - v2.Eta()) + dPhi * dPhi);
85  return dR;
86 }
double DeltaPhi(const math::XYZTLorentzVector &, const math::XYZTLorentzVector &)

◆ detajet2jet3()

double TtSemiLepSignalSel::detajet2jet3 ( ) const
inline

Definition at line 26 of file TtSemiLepSignalSel.h.

References var_detajet2jet3.

Referenced by evaluateTtSemiLepSignalSel().

26 { return var_detajet2jet3; }

◆ detajet3jet4()

double TtSemiLepSignalSel::detajet3jet4 ( ) const
inline

Definition at line 27 of file TtSemiLepSignalSel.h.

References var_detajet3jet4.

Referenced by evaluateTtSemiLepSignalSel().

27 { return var_detajet3jet4; }

◆ dphiMETlepton()

double TtSemiLepSignalSel::dphiMETlepton ( ) const
inline

Definition at line 24 of file TtSemiLepSignalSel.h.

References var_dphiMETlepton.

Referenced by evaluateTtSemiLepSignalSel().

24 { return var_dphiMETlepton; }

◆ Et1()

double TtSemiLepSignalSel::Et1 ( ) const
inline

Definition at line 20 of file TtSemiLepSignalSel.h.

References var_Et1, and var_sumEt.

Referenced by evaluateTtSemiLepSignalSel().

◆ lepeta()

double TtSemiLepSignalSel::lepeta ( ) const
inline

Definition at line 21 of file TtSemiLepSignalSel.h.

References var_lepeta.

Referenced by evaluateTtSemiLepSignalSel().

21 { return fabs(var_lepeta); }

◆ maxdijetmass()

double TtSemiLepSignalSel::maxdijetmass ( ) const
inline

Definition at line 30 of file TtSemiLepSignalSel.h.

References massalljets, and var_maxdijetmass.

Referenced by evaluateTtSemiLepSignalSel().

◆ MET()

double TtSemiLepSignalSel::MET ( ) const
inline

Definition at line 22 of file TtSemiLepSignalSel.h.

References var_MET.

Referenced by evaluateTtSemiLepSignalSel().

22 { return var_MET; }

◆ mindijetmass()

double TtSemiLepSignalSel::mindijetmass ( ) const
inline

Definition at line 29 of file TtSemiLepSignalSel.h.

References massalljets, and var_mindijetmass.

Referenced by evaluateTtSemiLepSignalSel().

◆ mindRjetlepton()

double TtSemiLepSignalSel::mindRjetlepton ( ) const
inline

Definition at line 32 of file TtSemiLepSignalSel.h.

References var_mindRjetlepton.

Referenced by evaluateTtSemiLepSignalSel().

32 { return var_mindRjetlepton; }

◆ sumEt()

double TtSemiLepSignalSel::sumEt ( ) const
inline

Definition at line 19 of file TtSemiLepSignalSel.h.

References var_sumEt.

Referenced by evaluateTtSemiLepSignalSel().

19 { return var_sumEt; }

Member Data Documentation

◆ massalljets

double TtSemiLepSignalSel::massalljets
private

Definition at line 53 of file TtSemiLepSignalSel.h.

Referenced by maxdijetmass(), mindijetmass(), and TtSemiLepSignalSel().

◆ var_detajet2jet3

double TtSemiLepSignalSel::var_detajet2jet3
private

Definition at line 45 of file TtSemiLepSignalSel.h.

Referenced by detajet2jet3(), and TtSemiLepSignalSel().

◆ var_detajet3jet4

double TtSemiLepSignalSel::var_detajet3jet4
private

Definition at line 46 of file TtSemiLepSignalSel.h.

Referenced by detajet3jet4(), and TtSemiLepSignalSel().

◆ var_dphiMETlepton

double TtSemiLepSignalSel::var_dphiMETlepton
private

Definition at line 43 of file TtSemiLepSignalSel.h.

Referenced by dphiMETlepton(), and TtSemiLepSignalSel().

◆ var_Et1

double TtSemiLepSignalSel::var_Et1
private

Definition at line 39 of file TtSemiLepSignalSel.h.

Referenced by Et1(), and TtSemiLepSignalSel().

◆ var_lepeta

double TtSemiLepSignalSel::var_lepeta
private

Definition at line 40 of file TtSemiLepSignalSel.h.

Referenced by lepeta(), and TtSemiLepSignalSel().

◆ var_maxdijetmass

double TtSemiLepSignalSel::var_maxdijetmass
private

Definition at line 49 of file TtSemiLepSignalSel.h.

Referenced by maxdijetmass(), and TtSemiLepSignalSel().

◆ var_MET

double TtSemiLepSignalSel::var_MET
private

Definition at line 41 of file TtSemiLepSignalSel.h.

Referenced by MET(), and TtSemiLepSignalSel().

◆ var_mindijetmass

double TtSemiLepSignalSel::var_mindijetmass
private

Definition at line 48 of file TtSemiLepSignalSel.h.

Referenced by mindijetmass(), and TtSemiLepSignalSel().

◆ var_mindRjetlepton

double TtSemiLepSignalSel::var_mindRjetlepton
private

Definition at line 51 of file TtSemiLepSignalSel.h.

Referenced by mindRjetlepton(), and TtSemiLepSignalSel().

◆ var_sumEt

double TtSemiLepSignalSel::var_sumEt
private

Definition at line 38 of file TtSemiLepSignalSel.h.

Referenced by Et1(), sumEt(), and TtSemiLepSignalSel().