ATLAS Offline Software
Loading...
Searching...
No Matches
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 }
std::vector< const xAOD::Muon * > muons

◆ 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 }
static Double_t ss
std::vector< unsigned int > quadIndices
std::pair< unsigned int, unsigned int > pairIndices

◆ GetMuonTrack()

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

Definition at line 78 of file FourMuonTool.h.

78 {
79 return mu->trackParticle(xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle);
80 }

◆ trackParticles()

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

Definition at line 82 of file FourMuonTool.h.

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

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: