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 36 of file FourMuonTool.h.

Member Function Documentation

◆ combinationCharges()

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

Definition at line 42 of file FourMuonTool.h.

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

◆ combinationIndices()

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

Definition at line 57 of file FourMuonTool.h.

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

◆ GetMuonTrack()

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

Definition at line 78 of file FourMuonTool.h.

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

◆ trackParticles()

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

Definition at line 83 of file FourMuonTool.h.

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

Member Data Documentation

◆ muons

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

Definition at line 38 of file FourMuonTool.h.

◆ pairIndices

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

Definition at line 40 of file FourMuonTool.h.

◆ quadIndices

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

Definition at line 39 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:39
DerivationFramework::Combination::pairIndices
std::pair< unsigned int, unsigned int > pairIndices
Definition: FourMuonTool.h:40
DerivationFramework::Combination::muons
std::vector< const xAOD::Muon * > muons
Definition: FourMuonTool.h:38
DerivationFramework::Combination::GetMuonTrack
const xAOD::TrackParticle * GetMuonTrack(const xAOD::Muon *mu) const
Definition: FourMuonTool.h:78
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53