Skip to content

Commit

Permalink
new style code-checks from cms-bot https://cmssdt.cern.ch/SDT/code-ch…
Browse files Browse the repository at this point in the history
…ecks/cms-sw-PR-45117/41778/code-format.patch; the result looks less readable, but we have to comply
  • Loading branch information
slava77devel committed Sep 13, 2024
1 parent 2bc333b commit 5f9c2f6
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 30 deletions.
8 changes: 4 additions & 4 deletions RecoTracker/LSTCore/src/alpaka/PixelQuintuplet.h
Original file line number Diff line number Diff line change
Expand Up @@ -921,10 +921,10 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
segmentsInGPU.partOfPT5[i_pLS] = true;
quintupletsInGPU.partOfPT5[quintupletIndex] = true;
} // tot occupancy
} // end success
} // end T5
} // end iLS
} // end i_pLS
} // end success
} // end T5
} // end iLS
} // end i_pLS
}
};
} // namespace ALPAKA_ACCELERATOR_NAMESPACE::lst
Expand Down
4 changes: 2 additions & 2 deletions RecoTracker/LSTCore/src/alpaka/PixelTriplet.h
Original file line number Diff line number Diff line change
Expand Up @@ -1048,8 +1048,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
}
}
} // for outerTripletArrayIndex
} // for iLSModule < iLSModule_max
} // for i_pLS
} // for iLSModule < iLSModule_max
} // for i_pLS
}
};

Expand Down
72 changes: 48 additions & 24 deletions RecoTracker/LSTCore/standalone/efficiency/src/performance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,36 @@ int main(int argc, char** argv) {
for (auto& charge : charges) {
for (unsigned int isel = 0; isel < sels.size(); ++isel) {
list_effSetDef.push_back(
SimTrackSetDefinition(/* name */ TString("TC_") + selnames[isel],
SimTrackSetDefinition(/* name */
TString("TC_") + selnames[isel],
/* pdgid */ pdgid,
/* q */ charge,
/* pass */ [&](unsigned int isim) { return lstEff.sim_TC_matched().at(isim) > 0; },
/* sel */ sels[isel]));
list_effSetDef.push_back(SimTrackSetDefinition(
/* name */ TString("pT5_") + selnames[isel],
/* name */
TString("pT5_") + selnames[isel],
/* pdgid */ pdgid,
/* q */ charge,
/* pass */ [&](unsigned int isim) { return lstEff.sim_TC_matched_mask().at(isim) & (1 << pT5); },
/* sel */ sels[isel]));
list_effSetDef.push_back(SimTrackSetDefinition(
/* name */ TString("pT3_") + selnames[isel],
/* name */
TString("pT3_") + selnames[isel],
/* pdgid */ pdgid,
/* q */ charge,
/* pass */ [&](unsigned int isim) { return lstEff.sim_TC_matched_mask().at(isim) & (1 << pT3); },
/* sel */ sels[isel]));
list_effSetDef.push_back(SimTrackSetDefinition(
/* name */ TString("T5_") + selnames[isel],
/* name */
TString("T5_") + selnames[isel],
/* pdgid */ pdgid,
/* q */ charge,
/* pass */ [&](unsigned int isim) { return lstEff.sim_TC_matched_mask().at(isim) & (1 << T5); },
/* sel */ sels[isel]));
list_effSetDef.push_back(SimTrackSetDefinition(
/* name */ TString("pLS_") + selnames[isel],
/* name */
TString("pLS_") + selnames[isel],
/* pdgid */ pdgid,
/* q */ charge,
/* pass */ [&](unsigned int isim) { return lstEff.sim_TC_matched_mask().at(isim) & (1 << pLS); },
Expand All @@ -73,19 +78,22 @@ int main(int argc, char** argv) {
if (ana.do_lower_level) {
//lower objects - name will have pT5_lower_, T5_lower_, pT3_lower_
list_effSetDef.push_back(SimTrackSetDefinition(
/* name */ TString("pT5_lower_") + selnames[isel],
/* name */
TString("pT5_lower_") + selnames[isel],
/* pdgid */ pdgid,
/* q */ charge,
/* pass */ [&](unsigned int isim) { return lstEff.sim_pT5_matched().at(isim) > 0; },
/* sel */ sels[isel]));
list_effSetDef.push_back(
SimTrackSetDefinition(/* name */ TString("T5_lower_") + selnames[isel],
SimTrackSetDefinition(/* name */
TString("T5_lower_") + selnames[isel],
/* pdgid */ pdgid,
/* q */ charge,
/* pass */ [&](unsigned int isim) { return lstEff.sim_T5_matched().at(isim) > 0; },
/* sel */ sels[isel]));
list_effSetDef.push_back(SimTrackSetDefinition(
/* name */ TString("pT3_lower_") + selnames[isel],
/* name */
TString("pT3_lower_") + selnames[isel],
/* pdgid */ pdgid,
/* q */ charge,
/* pass */ [&](unsigned int isim) { return lstEff.sim_pT3_matched().at(isim) > 0; },
Expand All @@ -100,39 +108,44 @@ int main(int argc, char** argv) {
// creating a set of fake rate plots
std::vector<RecoTrackSetDefinition> list_FRSetDef;
list_FRSetDef.push_back(
RecoTrackSetDefinition(/* name */ "TC",
RecoTrackSetDefinition(/* name */
"TC",
/* pass */ [&](unsigned int itc) { return lstEff.tc_isFake().at(itc) > 0; },
/* sel */ [&](unsigned int itc) { return 1; },
/* pt */ tas::tc_pt,
/* eta */ tas::tc_eta,
/* phi */ tas::tc_phi,
/* type */ tas::tc_type));
list_FRSetDef.push_back(
RecoTrackSetDefinition(/* name */ "pT5",
RecoTrackSetDefinition(/* name */
"pT5",
/* pass */ [&](unsigned int itc) { return lstEff.tc_isFake().at(itc) > 0; },
/* sel */ [&](unsigned int itc) { return lstEff.tc_type().at(itc) == pT5; },
/* pt */ tas::tc_pt,
/* eta */ tas::tc_eta,
/* phi */ tas::tc_phi,
/* type */ tas::tc_type));
list_FRSetDef.push_back(
RecoTrackSetDefinition(/* name */ "pT3",
RecoTrackSetDefinition(/* name */
"pT3",
/* pass */ [&](unsigned int itc) { return lstEff.tc_isFake().at(itc) > 0; },
/* sel */ [&](unsigned int itc) { return lstEff.tc_type().at(itc) == pT3; },
/* pt */ tas::tc_pt,
/* eta */ tas::tc_eta,
/* phi */ tas::tc_phi,
/* type */ tas::tc_type));
list_FRSetDef.push_back(
RecoTrackSetDefinition(/* name */ "T5",
RecoTrackSetDefinition(/* name */
"T5",
/* pass */ [&](unsigned int itc) { return lstEff.tc_isFake().at(itc) > 0; },
/* sel */ [&](unsigned int itc) { return lstEff.tc_type().at(itc) == T5; },
/* pt */ tas::tc_pt,
/* eta */ tas::tc_eta,
/* phi */ tas::tc_phi,
/* type */ tas::tc_type));
list_FRSetDef.push_back(
RecoTrackSetDefinition(/* name */ "pLS",
RecoTrackSetDefinition(/* name */
"pLS",
/* pass */ [&](unsigned int itc) { return lstEff.tc_isFake().at(itc) > 0; },
/* sel */ [&](unsigned int itc) { return lstEff.tc_type().at(itc) == pLS; },
/* pt */ tas::tc_pt,
Expand All @@ -142,23 +155,26 @@ int main(int argc, char** argv) {

if (ana.do_lower_level) {
list_FRSetDef.push_back(RecoTrackSetDefinition(
/* name */ "pT5_lower",
/* name */
"pT5_lower",
/* pass */ [&](unsigned int ipT5) { return lstEff.pT5_isFake().at(ipT5) > 0; },
/* sel */ [&](unsigned int ipT5) { return 1; },
/* pt */ tas::pT5_pt,
/* eta */ tas::pT5_eta,
/* phi */ tas::pT5_phi,
/* type */ [&]() { return static_cast<const std::vector<int>>(std::vector<int>(tas::pT5_pt().size(), 1)); }));
list_FRSetDef.push_back(RecoTrackSetDefinition(
/* name */ "T5_lower",
/* name */
"T5_lower",
/* pass */ [&](unsigned int it5) { return lstEff.t5_isFake().at(it5) > 0; },
/* sel */ [&](unsigned int it5) { return 1; },
/* pt */ tas::t5_pt,
/* eta */ tas::t5_eta,
/* phi */ tas::t5_phi,
/* type */ [&]() { return static_cast<const std::vector<int>>(std::vector<int>(tas::t5_pt().size(), 1)); }));
list_FRSetDef.push_back(RecoTrackSetDefinition(
/* name */ "pT3_lower",
/* name */
"pT3_lower",
/* pass */ [&](unsigned int ipT3) { return lstEff.pT3_isFake().at(ipT3) > 0; },
/* sel */ [&](unsigned int ipT3) { return 1; },
/* pt */ tas::pT3_pt,
Expand All @@ -172,39 +188,44 @@ int main(int argc, char** argv) {
// creating a set of duplicate rate plots
std::vector<RecoTrackSetDefinition> list_DRSetDef;
list_DRSetDef.push_back(
RecoTrackSetDefinition(/* name */ "TC",
RecoTrackSetDefinition(/* name */
"TC",
/* pass */ [&](unsigned int itc) { return lstEff.tc_isDuplicate().at(itc) > 0; },
/* sel */ [&](unsigned int itc) { return 1; },
/* pt */ tas::tc_pt,
/* eta */ tas::tc_eta,
/* phi */ tas::tc_phi,
/* type */ tas::tc_type));
list_DRSetDef.push_back(
RecoTrackSetDefinition(/* name */ "pT5",
RecoTrackSetDefinition(/* name */
"pT5",
/* pass */ [&](unsigned int itc) { return lstEff.tc_isDuplicate().at(itc) > 0; },
/* sel */ [&](unsigned int itc) { return lstEff.tc_type().at(itc) == pT5; },
/* pt */ tas::tc_pt,
/* eta */ tas::tc_eta,
/* phi */ tas::tc_phi,
/* type */ tas::tc_type));
list_DRSetDef.push_back(
RecoTrackSetDefinition(/* name */ "pT3",
RecoTrackSetDefinition(/* name */
"pT3",
/* pass */ [&](unsigned int itc) { return lstEff.tc_isDuplicate().at(itc) > 0; },
/* sel */ [&](unsigned int itc) { return lstEff.tc_type().at(itc) == pT3; },
/* pt */ tas::tc_pt,
/* eta */ tas::tc_eta,
/* phi */ tas::tc_phi,
/* type */ tas::tc_type));
list_DRSetDef.push_back(
RecoTrackSetDefinition(/* name */ "T5",
RecoTrackSetDefinition(/* name */
"T5",
/* pass */ [&](unsigned int itc) { return lstEff.tc_isDuplicate().at(itc) > 0; },
/* sel */ [&](unsigned int itc) { return lstEff.tc_type().at(itc) == T5; },
/* pt */ tas::tc_pt,
/* eta */ tas::tc_eta,
/* phi */ tas::tc_phi,
/* type */ tas::tc_type));
list_DRSetDef.push_back(
RecoTrackSetDefinition(/* name */ "pLS",
RecoTrackSetDefinition(/* name */
"pLS",
/* pass */ [&](unsigned int itc) { return lstEff.tc_isDuplicate().at(itc) > 0; },
/* sel */ [&](unsigned int itc) { return lstEff.tc_type().at(itc) == pLS; },
/* pt */ tas::tc_pt,
Expand All @@ -214,23 +235,26 @@ int main(int argc, char** argv) {

if (ana.do_lower_level) {
list_DRSetDef.push_back(RecoTrackSetDefinition(
/* name */ "pT5_lower",
/* name */
"pT5_lower",
/* pass */ [&](unsigned int ipT5) { return lstEff.pT5_isDuplicate().at(ipT5) > 0; },
/* sel */ [&](unsigned int ipT5) { return 1; },
/* pt */ tas::pT5_pt,
/* eta */ tas::pT5_eta,
/* phi */ tas::pT5_phi,
/* type */ [&]() { return static_cast<const std::vector<int>>(std::vector<int>(tas::pT5_pt().size(), 1)); }));
list_DRSetDef.push_back(RecoTrackSetDefinition(
/* name */ "T5_lower",
/* name */
"T5_lower",
/* pass */ [&](unsigned int it5) { return lstEff.t5_isDuplicate().at(it5) > 0; },
/* sel */ [&](unsigned int it5) { return 1; },
/* pt */ tas::t5_pt,
/* eta */ tas::t5_eta,
/* phi */ tas::t5_phi,
/* type */ [&]() { return static_cast<const std::vector<int>>(std::vector<int>(tas::t5_pt().size(), 1)); }));
list_DRSetDef.push_back(RecoTrackSetDefinition(
/* name */ "pT3_lower",
/* name */
"pT3_lower",
/* pass */ [&](unsigned int ipT3) { return lstEff.pT3_isDuplicate().at(ipT3) > 0; },
/* sel */ [&](unsigned int ipT3) { return 1; },
/* pt */ tas::pT3_pt,
Expand Down

0 comments on commit 5f9c2f6

Please sign in to comment.