Skip to content

Commit 74e5862

Browse files
committed
Fixed quadruants definitions
1 parent 724e6d5 commit 74e5862

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

Common/Tasks/muonQa.cxx

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2214,12 +2214,18 @@ struct muonQa {
22142214
if ((sign1 * sign2) >= 0)
22152215
continue;
22162216

2217-
int posQuadrant = (sign1 > 0) ? GetQuadrantPhi(muonTrack1.phi() * 180.0 / TMath::Pi())
2218-
: GetQuadrantPhi(muonTrack2.phi() * 180.0 / TMath::Pi());
2219-
int negQuadrant = (sign1 < 0) ? GetQuadrantPhi(muonTrack1.phi() * 180.0 / TMath::Pi())
2220-
: GetQuadrantPhi(muonTrack2.phi() * 180.0 / TMath::Pi());
2221-
int posTopBottom = (posQuadrant == 0 || posQuadrant == 1) ? 0 : 1;
2222-
int negTopBottom = (negQuadrant == 0 || negQuadrant == 1) ? 0 : 1;
2217+
int quadruant1 = GetQuadruantPhi(muonTrack1.phi() * 180.0 / TMath::Pi());
2218+
int quadruant2 = GetQuadruantPhi(muonTrack2.phi() * 180.0 / TMath::Pi());
2219+
2220+
int TopBottom1 = (quadruant1 == 0 || quadruant1 == 0) ? 0 : 1;
2221+
int TopBottom2 = (quadruant2 == 0 || quadruant2 == 0) ? 0 : 1;
2222+
2223+
// int posQuadrant = (sign1 > 0) ? GetQuadrantPhi(muonTrack1.phi() * 180.0 / TMath::Pi())
2224+
// : GetQuadrantPhi(muonTrack2.phi() * 180.0 / TMath::Pi());
2225+
// int negQuadrant = (sign1 < 0) ? GetQuadrantPhi(muonTrack1.phi() * 180.0 / TMath::Pi())
2226+
// : GetQuadrantPhi(muonTrack2.phi() * 180.0 / TMath::Pi());
2227+
// int posTopBottom = (posQuadrant == 0 || posQuadrant == 1) ? 0 : 1;
2228+
// int negTopBottom = (negQuadrant == 0 || negQuadrant == 1) ? 0 : 1;
22232229

22242230
bool goodMuonTracks = (IsGoodMuon(fgValuesMuon1, fgValuesMuonPV1) && IsGoodMuon(fgValuesMuon2, fgValuesMuonPV2));
22252231
bool goodGlobalMuonTracks = (IsGoodGlobalMuon(fgValuesMuon1, fgValuesMuonPV1) && IsGoodGlobalMuon(fgValuesMuon2, fgValuesMuonPV2));
@@ -2233,13 +2239,13 @@ struct muonQa {
22332239
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMass_MuonKine_MuonCuts"))->Fill(mass);
22342240
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMassFull_MuonKine_MuonCuts"))->Fill(mass);
22352241

2236-
if (posTopBottom == 0 && negTopBottom == 0) {
2242+
if (TopBottom1 == 0 && TopBottom2 == 0) {
22372243
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMass_MuonKine_MuonCuts_TT"))->Fill(mass);
22382244
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMassFull_MuonKine_MuonCuts_TT"))->Fill(mass);
2239-
} else if ((posTopBottom == 0 && negTopBottom == 1) || (posTopBottom == 1 && negTopBottom == 0)) {
2245+
} else if ((TopBottom1 == 0 && TopBottom2 == 1) || (TopBottom1 == 1 && TopBottom2 == 0)) {
22402246
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMass_MuonKine_MuonCuts_TB"))->Fill(mass);
22412247
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMassFull_MuonKine_MuonCuts_TB"))->Fill(mass);
2242-
} else if (posTopBottom == 1 && negTopBottom == 1) {
2248+
} else if (TopBottom1 == 1 && TopBottom2 == 1) {
22432249
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMass_MuonKine_MuonCuts_BB"))->Fill(mass);
22442250
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMassFull_MuonKine_MuonCuts_BB"))->Fill(mass);
22452251
}
@@ -2248,13 +2254,13 @@ struct muonQa {
22482254
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMass_MuonKine_MuonCuts"))->Fill(mass);
22492255
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMassFull_MuonKine_MuonCuts"))->Fill(mass);
22502256

2251-
if (posTopBottom == 0 && negTopBottom == 0) {
2257+
if (TopBottom1 == 0 && TopBottom2 == 0) {
22522258
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMass_MuonKine_MuonCuts_TT"))->Fill(mass);
22532259
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMassFull_MuonKine_MuonCuts_TT"))->Fill(mass);
2254-
} else if ((posTopBottom == 0 && negTopBottom == 1) || (posTopBottom == 1 && negTopBottom == 0)) {
2260+
} else if ((TopBottom1 == 0 && TopBottom2 == 1) || (TopBottom1 == 1 && TopBottom2 == 0)) {
22552261
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMass_MuonKine_MuonCuts_TB"))->Fill(mass);
22562262
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMassFull_MuonKine_MuonCuts_TB"))->Fill(mass);
2257-
} else if (posTopBottom == 1 && negTopBottom == 1) {
2263+
} else if (TopBottom1 == 1 && TopBottom2 == 1) {
22582264
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMass_MuonKine_MuonCuts_BB"))->Fill(mass);
22592265
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMassFull_MuonKine_MuonCuts_BB"))->Fill(mass);
22602266
}
@@ -2267,13 +2273,13 @@ struct muonQa {
22672273
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMass_MuonKine_GlobalMuonCuts"))->Fill(mass);
22682274
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMassFull_MuonKine_GlobalMuonCuts"))->Fill(mass);
22692275

2270-
if (posTopBottom == 0 && negTopBottom == 0) {
2276+
if (TopBottom1 == 0 && TopBottom2 == 0) {
22712277
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMass_MuonKine_GlobalMuonCuts_TT"))->Fill(mass);
22722278
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMassFull_MuonKine_GlobalMuonCuts_TT"))->Fill(mass);
2273-
} else if ((posTopBottom == 0 && negTopBottom == 1) || (posTopBottom == 1 && negTopBottom == 0)) {
2279+
} else if ((TopBottom1 == 0 && TopBottom2 == 1) || (TopBottom1 == 1 && TopBottom2 == 0)) {
22742280
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMass_MuonKine_GlobalMuonCuts_TB"))->Fill(mass);
22752281
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMassFull_MuonKine_GlobalMuonCuts_TB"))->Fill(mass);
2276-
} else if (posTopBottom == 1 && negTopBottom == 1) {
2282+
} else if (TopBottom1 == 1 && TopBottom2 == 1) {
22772283
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMass_MuonKine_GlobalMuonCuts_BB"))->Fill(mass);
22782284
registryDimuon.get<TH1>(HIST("dimuon/same-event/invariantMassFull_MuonKine_GlobalMuonCuts_BB"))->Fill(mass);
22792285
}
@@ -2282,13 +2288,13 @@ struct muonQa {
22822288
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMass_MuonKine_GlobalMuonCuts"))->Fill(mass);
22832289
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMassFull_MuonKine_GlobalMuonCuts"))->Fill(mass);
22842290

2285-
if (posTopBottom == 0 && negTopBottom == 0) {
2291+
if (TopBottom1 == 0 && TopBottom2 == 0) {
22862292
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMass_MuonKine_GlobalMuonCuts_TT"))->Fill(mass);
22872293
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMassFull_MuonKine_GlobalMuonCuts_TT"))->Fill(mass);
2288-
} else if ((posTopBottom == 0 && negTopBottom == 1) || (posTopBottom == 1 && negTopBottom == 0)) {
2294+
} else if ((TopBottom1 == 0 && TopBottom2 == 1) || (TopBottom1 == 1 && TopBottom2 == 0)) {
22892295
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMass_MuonKine_GlobalMuonCuts_TB"))->Fill(mass);
22902296
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMassFull_MuonKine_GlobalMuonCuts_TB"))->Fill(mass);
2291-
} else if (posTopBottom == 1 && negTopBottom == 1) {
2297+
} else if (TopBottom1 == 1 && TopBottom2 == 1) {
22922298
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMass_MuonKine_GlobalMuonCuts_BB"))->Fill(mass);
22932299
registryDimuon.get<TH1>(HIST("dimuon/mixed-event/invariantMassFull_MuonKine_GlobalMuonCuts_BB"))->Fill(mass);
22942300
}

0 commit comments

Comments
 (0)