ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
DerivationFramework::Combination Struct Reference

#include <FourMuonTool.h>

Collaboration diagram for DerivationFramework::Combination:

Public Member Functions

std::string combinationCharges ()
 
std::string combinationIndices ()
 
const xAOD::TrackParticleGetMuonTrack (const xAOD::Muon *mu) const
 
std::vector< const xAOD::TrackParticle * > trackParticles (const std::string &specify)
 

Public Attributes

std::vector< const xAOD::Muon * > muons
 
std::vector< unsigned int > quadIndices
 
std::pair< unsigned int, unsigned int > pairIndices
 

Detailed Description

Definition at line 38 of file FourMuonTool.h.

Member Function Documentation

◆ combinationCharges()

std::string DerivationFramework::Combination::combinationCharges ( )
inline

Definition at line 44 of file FourMuonTool.h.

44  {
45  std::string chargeStr = "";
46  if (muons.at(0)->charge() > 0) {chargeStr += "+";}
47  else {chargeStr += "-";}
48  if (muons.at(1)->charge() > 0) {chargeStr += "+";}
49  else {chargeStr += "-";}
50  if (muons.size()==4) {
51  if (muons.at(2)->charge() > 0) {chargeStr += "+";}
52  else {chargeStr += "-";}
53  if (muons.at(3)->charge() > 0) {chargeStr += "+";}
54  else {chargeStr += "-";}
55  }
56  return chargeStr;
57  }

◆ combinationIndices()

std::string DerivationFramework::Combination::combinationIndices ( )
inline

Definition at line 59 of file FourMuonTool.h.

59  {
60  std::string indexStr = "";
61  std::stringstream ss;
62  if (muons.size()==2) {
63  ss.str(""); ss.clear();
64  ss << pairIndices.first;
65  indexStr+=ss.str();
66  ss.str(""); ss.clear();
67  ss << pairIndices.second;
68  indexStr+=ss.str();
69  }
70  if (muons.size()==4) {
71  for (unsigned int i=0; i<4; ++i) {
72  ss.str(""); ss.clear();
73  ss << quadIndices[i];
74  indexStr+=ss.str();
75  }
76  }
77  return indexStr;
78  }

◆ GetMuonTrack()

const xAOD::TrackParticle* DerivationFramework::Combination::GetMuonTrack ( const xAOD::Muon mu) const
inline

Definition at line 80 of file FourMuonTool.h.

80  {
81  auto& link = mu->inDetTrackParticleLink();
82  return link.isValid() ? *link : nullptr;
83  }

◆ trackParticles()

std::vector<const xAOD::TrackParticle*> DerivationFramework::Combination::trackParticles ( const std::string &  specify)
inline

Definition at line 85 of file FourMuonTool.h.

85  {
86  std::vector<const xAOD::TrackParticle*> theTracks;
87  bool oppCh(false);
88  if (muons.at(0)->charge()*muons.at(1)->charge() < 0) oppCh=true;
89  if (specify=="pair1") {
90  theTracks.push_back(GetMuonTrack(muons.at(0)));
91  theTracks.push_back(GetMuonTrack(muons.at(1)));
92  }
93  if (specify=="pair2") {
94  theTracks.push_back(GetMuonTrack(muons.at(2)));
95  theTracks.push_back(GetMuonTrack(muons.at(3)));
96  }
97  if (specify=="DC") {
98  if (oppCh) {
99  theTracks.push_back(GetMuonTrack(muons.at(0)));
100  theTracks.push_back(GetMuonTrack(muons.at(1)));
101  theTracks.push_back(GetMuonTrack(muons.at(2)));
102  theTracks.push_back(GetMuonTrack(muons.at(3)));
103  } else {
104  theTracks.push_back(GetMuonTrack(muons.at(0)));
105  theTracks.push_back(GetMuonTrack(muons.at(2)));
106  theTracks.push_back(GetMuonTrack(muons.at(1)));
107  theTracks.push_back(GetMuonTrack(muons.at(3)));
108  }
109  }
110  if (specify=="AC") {
111  theTracks.push_back(GetMuonTrack(muons.at(0)));
112  theTracks.push_back(GetMuonTrack(muons.at(3)));
113  theTracks.push_back(GetMuonTrack(muons.at(1)));
114  theTracks.push_back(GetMuonTrack(muons.at(2)));
115  }
116  if (specify=="SS") {
117  if (oppCh) {
118  theTracks.push_back(GetMuonTrack(muons.at(0)));
119  theTracks.push_back(GetMuonTrack(muons.at(2)));
120  theTracks.push_back(GetMuonTrack(muons.at(1)));
121  theTracks.push_back(GetMuonTrack(muons.at(3)));
122  } else {
123  theTracks.push_back(GetMuonTrack(muons.at(0)));
124  theTracks.push_back(GetMuonTrack(muons.at(1)));
125  theTracks.push_back(GetMuonTrack(muons.at(2)));
126  theTracks.push_back(GetMuonTrack(muons.at(3)));
127  }
128  }
129  return theTracks;
130  }

Member Data Documentation

◆ muons

std::vector<const xAOD::Muon*> DerivationFramework::Combination::muons

Definition at line 40 of file FourMuonTool.h.

◆ pairIndices

std::pair<unsigned int, unsigned int> DerivationFramework::Combination::pairIndices

Definition at line 42 of file FourMuonTool.h.

◆ quadIndices

std::vector<unsigned int> DerivationFramework::Combination::quadIndices

Definition at line 41 of file FourMuonTool.h.


The documentation for this struct was generated from the following file:
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
lumiFormat.i
int i
Definition: lumiFormat.py:85
DerivationFramework::Combination::quadIndices
std::vector< unsigned int > quadIndices
Definition: FourMuonTool.h:41
DerivationFramework::Combination::pairIndices
std::pair< unsigned int, unsigned int > pairIndices
Definition: FourMuonTool.h:42
DerivationFramework::Combination::muons
std::vector< const xAOD::Muon * > muons
Definition: FourMuonTool.h:40
DerivationFramework::Combination::GetMuonTrack
const xAOD::TrackParticle * GetMuonTrack(const xAOD::Muon *mu) const
Definition: FourMuonTool.h:80
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53