Skip to content

Commit

Permalink
Please consider the following formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alibuild committed Dec 3, 2024
1 parent fb9aa2b commit c5b7ce6
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 33 deletions.
2 changes: 1 addition & 1 deletion PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -4531,7 +4531,7 @@ void VarManager::FillDileptonTrackTrack(T1 const& dilepton, T2 const& hadron1, T

//__________________________________________________________________
template <int candidateType, typename T1, typename T2, typename T3>
void VarManager::FillQaudMC(T1 const& dilepton, T2 const& track1, T3 const& track2, float* values)
void VarManager::FillQaudMC(T1 const& dilepton, T2 const& track1, T3 const& track2, float* values)
{
if (!values) {
values = fgValues;
Expand Down
18 changes: 9 additions & 9 deletions PWGDQ/DataModel/ReducedInfoTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -886,14 +886,14 @@ using DileptonTrackCandidate = DileptonTrackCandidates::iterator;
namespace dileptonTrackTrackCandidate
{
// infotmation about the dilepton-track-track
DECLARE_SOA_COLUMN(Mass, mass, float); //!
DECLARE_SOA_COLUMN(Pt, pt, float); //!
DECLARE_SOA_COLUMN(Eta, eta, float); //!
DECLARE_SOA_COLUMN(Phi, phi, float); //!
DECLARE_SOA_COLUMN(Rap, rap, float); //!
DECLARE_SOA_COLUMN(DeltaQ, deltaQ, float); //!
DECLARE_SOA_COLUMN(R1, r1, float); //! distance between the dilepton and the track1 in theta-phi plane
DECLARE_SOA_COLUMN(R2, r2, float); //! distance between the dilepton and the track2 in theta-phi plane
DECLARE_SOA_COLUMN(Mass, mass, float); //!
DECLARE_SOA_COLUMN(Pt, pt, float); //!
DECLARE_SOA_COLUMN(Eta, eta, float); //!
DECLARE_SOA_COLUMN(Phi, phi, float); //!
DECLARE_SOA_COLUMN(Rap, rap, float); //!
DECLARE_SOA_COLUMN(DeltaQ, deltaQ, float); //!
DECLARE_SOA_COLUMN(R1, r1, float); //! distance between the dilepton and the track1 in theta-phi plane
DECLARE_SOA_COLUMN(R2, r2, float); //! distance between the dilepton and the track2 in theta-phi plane
DECLARE_SOA_COLUMN(DileptonMass, dileptonMass, float); //!
DECLARE_SOA_COLUMN(DileptonPt, dileptonPt, float); //!
DECLARE_SOA_COLUMN(DileptonEta, dileptonEta, float); //!
Expand All @@ -909,7 +909,7 @@ DECLARE_SOA_COLUMN(TrackPhi1, trackPhi1, float); //!
DECLARE_SOA_COLUMN(TrackPhi2, trackPhi2, float); //!
DECLARE_SOA_COLUMN(TrackSign1, trackSign1, int); //!
DECLARE_SOA_COLUMN(TrackSign2, trackSign2, int); //!
}
} // namespace dileptonTrackTrackCandidate

DECLARE_SOA_TABLE(DileptonTrackTrackCandidates, "AOD", "RTDQUADPLET", //!
dileptonTrackTrackCandidate::Mass,
Expand Down
31 changes: 17 additions & 14 deletions PWGDQ/Tasks/dqEfficiency.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,7 @@ struct AnalysisDileptonTrackTrack {
// dilepton cut
TString configDileptonCutNamesStr = fConfigDileptonCut.value;
fDileptonCut = *dqcuts::GetCompositeCut(configDileptonCutNamesStr.Data());

// dilepton-track-track cuts
TString configQuadruletCutNamesStr = fConfigQuadrupletCuts.value;
std::unique_ptr<TObjArray> objArray(configQuadruletCutNamesStr.Tokenize(","));
Expand Down Expand Up @@ -1441,7 +1441,8 @@ struct AnalysisDileptonTrackTrack {

// Template function to run pair - track - track combinations
template <int TCandidateType, uint32_t TEventFillMap, uint32_t TEventMCFillMap, uint32_t TTrackFillMap, typename TEvent, typename TTracks, typename TDileptons, typename TEventsMC, typename TTracksMC>
void runDileptonTrackTrack(TEvent const& event, TTracks const& tracks, TDileptons const& dileptons, TEventsMC const& /*eventsMC*/, TTracksMC const& /*tracksMC*/) {
void runDileptonTrackTrack(TEvent const& event, TTracks const& tracks, TDileptons const& dileptons, TEventsMC const& /*eventsMC*/, TTracksMC const& /*tracksMC*/)
{
VarManager::ResetValues(0, VarManager::kNVars, fValuesQuadruplet);
VarManager::FillEvent<TEventFillMap>(event, fValuesQuadruplet);

Expand All @@ -1461,7 +1462,8 @@ struct AnalysisDileptonTrackTrack {
VarManager::FillTrack<fgDileptonFillMap>(dilepton, fValuesQuadruplet);

// apply the dilepton cut
if (!fDileptonCut.IsSelected(fValuesQuadruplet)) continue;
if (!fDileptonCut.IsSelected(fValuesQuadruplet))
continue;

// get the index of the electron legs
int indexLepton1 = dilepton.index0Id();
Expand All @@ -1474,7 +1476,7 @@ struct AnalysisDileptonTrackTrack {

auto lepton1 = tracks.iteratorAt(indexLepton1 - indexOffset);
auto lepton2 = tracks.iteratorAt(indexLepton2 - indexOffset);

auto lepton1MC = lepton1.reducedMCTrack();
auto lepton2MC = lepton2.reducedMCTrack();

Expand All @@ -1487,8 +1489,8 @@ struct AnalysisDileptonTrackTrack {
}

// dilepton combinate with two same particles
if ((fIsSameTrackCut && (t1.isBarrelSelected() & (uint32_t(1) << 1)) && (t2.isBarrelSelected() & (uint32_t(1) << 1))) ||
(!fIsSameTrackCut && (t1.isBarrelSelected() & (uint32_t(1) << 1)) && (t2.isBarrelSelected() & (uint32_t(1) << 2)))) {
if ((fIsSameTrackCut && (t1.isBarrelSelected() & (uint32_t(1) << 1)) && (t2.isBarrelSelected() & (uint32_t(1) << 1))) ||
(!fIsSameTrackCut && (t1.isBarrelSelected() & (uint32_t(1) << 1)) && (t2.isBarrelSelected() & (uint32_t(1) << 2)))) {
} else {
continue;
}
Expand Down Expand Up @@ -1532,17 +1534,18 @@ struct AnalysisDileptonTrackTrack {
}
}
}

}
} // end loop over cuts

// Fill the DileptonTrackTrackCandidates table
if (!CutDecision) continue;
if (!mcDecision) continue;
DileptonTrackTrackTable(fValuesQuadruplet[VarManager::kQuadMass], fValuesQuadruplet[VarManager::kQuadPt], fValuesQuadruplet[VarManager::kQuadEta], fValuesQuadruplet[VarManager::kQuadPhi], fValuesQuadruplet[VarManager::kRap],
fValuesQuadruplet[VarManager::kQ], fValuesQuadruplet[VarManager::kDeltaR1], fValuesQuadruplet[VarManager::kDeltaR2],
dilepton.mass(), dilepton.pt(), dilepton.eta(), dilepton.phi(), dilepton.sign(),
fValuesQuadruplet[VarManager::kDitrackMass], fValuesQuadruplet[VarManager::kDitrackPt], t1.pt(), t2.pt(), t1.eta(), t2.eta(), t1.phi(), t2.phi(), t1.sign(), t2.sign());
if (!CutDecision)
continue;
if (!mcDecision)
continue;
DileptonTrackTrackTable(fValuesQuadruplet[VarManager::kQuadMass], fValuesQuadruplet[VarManager::kQuadPt], fValuesQuadruplet[VarManager::kQuadEta], fValuesQuadruplet[VarManager::kQuadPhi], fValuesQuadruplet[VarManager::kRap],
fValuesQuadruplet[VarManager::kQ], fValuesQuadruplet[VarManager::kDeltaR1], fValuesQuadruplet[VarManager::kDeltaR2],
dilepton.mass(), dilepton.pt(), dilepton.eta(), dilepton.phi(), dilepton.sign(),
fValuesQuadruplet[VarManager::kDitrackMass], fValuesQuadruplet[VarManager::kDitrackPt], t1.pt(), t2.pt(), t1.eta(), t2.eta(), t1.phi(), t2.phi(), t1.sign(), t2.sign());
} // end loop over track - track combinations
} // end loop over dileptons
};
Expand All @@ -1558,7 +1561,7 @@ struct AnalysisDileptonTrackTrack {
int daughterIdFirst = track.daughtersIds()[0];
int daughterIdEnd = track.daughtersIds()[1];
int Ndaughters = daughterIdEnd - daughterIdFirst + 1;
if (Ndaughters == 3){
if (Ndaughters == 3) {
auto dilepton = mcTracks.rawIteratorAt(daughterIdFirst);
auto track1 = mcTracks.rawIteratorAt(daughterIdFirst + 1);
auto track2 = mcTracks.rawIteratorAt(daughterIdFirst + 2);
Expand Down
20 changes: 11 additions & 9 deletions PWGDQ/Tasks/tableReader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,7 @@ struct AnalysisDileptonTrackTrack {
// cut name setting
TString fTrackCutName1;
TString fTrackCutName2;
bool fIsSameTrackCut = false;
bool fIsSameTrackCut = false;
AnalysisCompositeCut fDileptonCut;
std::vector<TString> fQuadrupletCutNames;
std::vector<AnalysisCompositeCut> fQuadrupletCuts;
Expand Down Expand Up @@ -1914,7 +1914,8 @@ struct AnalysisDileptonTrackTrack {
VarManager::FillTrack<fgDileptonFillMap>(dilepton, fValuesQuadruplet);

// apply the dilepton cut
if (!fDileptonCut.IsSelected(fValuesQuadruplet)) continue;
if (!fDileptonCut.IsSelected(fValuesQuadruplet))
continue;
fHistMan->FillHistClass(Form("Dileptons_%s", fDileptonCut.GetName()), fValuesQuadruplet);

// get the index of the electron legs
Expand All @@ -1929,8 +1930,8 @@ struct AnalysisDileptonTrackTrack {
}

// dilepton combinate with two same particles
if ((fIsSameTrackCut && (t1.isBarrelSelected() & (uint32_t(1) << 1)) && (t2.isBarrelSelected() & (uint32_t(1) << 1))) ||
(!fIsSameTrackCut && (t1.isBarrelSelected() & (uint32_t(1) << 1)) && (t2.isBarrelSelected() & (uint32_t(1) << 2)))) {
if ((fIsSameTrackCut && (t1.isBarrelSelected() & (uint32_t(1) << 1)) && (t2.isBarrelSelected() & (uint32_t(1) << 1))) ||
(!fIsSameTrackCut && (t1.isBarrelSelected() & (uint32_t(1) << 1)) && (t2.isBarrelSelected() & (uint32_t(1) << 2)))) {
} else {
continue;
}
Expand Down Expand Up @@ -1964,11 +1965,12 @@ struct AnalysisDileptonTrackTrack {
} // loop over dilepton-track-track cuts

// table to be written out for ML analysis
if (!CutDecision) continue;
DileptonTrackTrackTable(fValuesQuadruplet[VarManager::kQuadMass], fValuesQuadruplet[VarManager::kQuadPt], fValuesQuadruplet[VarManager::kQuadEta], fValuesQuadruplet[VarManager::kQuadPhi], fValuesQuadruplet[VarManager::kRap],
fValuesQuadruplet[VarManager::kQ], fValuesQuadruplet[VarManager::kDeltaR1], fValuesQuadruplet[VarManager::kDeltaR2],
dilepton.mass(), dilepton.pt(), dilepton.eta(), dilepton.phi(), dilepton.sign(),
fValuesQuadruplet[VarManager::kDitrackMass], fValuesQuadruplet[VarManager::kDitrackPt], t1.pt(), t2.pt(), t1.eta(), t2.eta(), t1.phi(), t2.phi(), t1.sign(), t2.sign());
if (!CutDecision)
continue;
DileptonTrackTrackTable(fValuesQuadruplet[VarManager::kQuadMass], fValuesQuadruplet[VarManager::kQuadPt], fValuesQuadruplet[VarManager::kQuadEta], fValuesQuadruplet[VarManager::kQuadPhi], fValuesQuadruplet[VarManager::kRap],
fValuesQuadruplet[VarManager::kQ], fValuesQuadruplet[VarManager::kDeltaR1], fValuesQuadruplet[VarManager::kDeltaR2],
dilepton.mass(), dilepton.pt(), dilepton.eta(), dilepton.phi(), dilepton.sign(),
fValuesQuadruplet[VarManager::kDitrackMass], fValuesQuadruplet[VarManager::kDitrackPt], t1.pt(), t2.pt(), t1.eta(), t2.eta(), t1.phi(), t2.phi(), t1.sign(), t2.sign());
}
}
}
Expand Down

0 comments on commit c5b7ce6

Please sign in to comment.