Skip to content

Commit

Permalink
code-format/checks
Browse files Browse the repository at this point in the history
  • Loading branch information
slava77devel committed Jun 15, 2024
1 parent e64c2cc commit 4cd8924
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 25 deletions.
5 changes: 4 additions & 1 deletion RecoTracker/LSTCore/standalone/code/core/trkCore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,10 @@ std::vector<int> matchedSimTrkIdxs(std::vector<unsigned int> hitidxs,

// Compute all permutations
std::function<void(std::vector<std::vector<int>> &, std::vector<int>, size_t, std::vector<std::vector<int>> &)> perm =
[&](std::vector<std::vector<int>> &result, std::vector<int> intermediate, size_t n, std::vector<std::vector<int>> &va) {
[&](std::vector<std::vector<int>> &result,
std::vector<int> intermediate,
size_t n,
std::vector<std::vector<int>> &va) {
// std::cout << " 'called': " << "called" << std::endl;
if (va.size() > n) {
for (auto x : va[n]) {
Expand Down
4 changes: 3 additions & 1 deletion RecoTracker/LSTCore/standalone/code/core/trktree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6744,7 +6744,9 @@ namespace tas {
const std::vector<std::vector<int> > &simhit_hitType() { return trk.simhit_hitType(); }
const std::vector<unsigned short> &ph2_isUpper() { return trk.ph2_isUpper(); }
const std::vector<unsigned int> &see_nStrip() { return trk.see_nStrip(); }
const std::vector<float> &trk_bestSimTrkShareFracSimClusterDenom() { return trk.trk_bestSimTrkShareFracSimClusterDenom(); }
const std::vector<float> &trk_bestSimTrkShareFracSimClusterDenom() {
return trk.trk_bestSimTrkShareFracSimClusterDenom();
}
const std::vector<unsigned short> &simhit_side() { return trk.simhit_side(); }
const std::vector<float> &simhit_x() { return trk.simhit_x(); }
const std::vector<int> &see_q() { return trk.see_q(); }
Expand Down
18 changes: 9 additions & 9 deletions RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.cc
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ void setGnnNtupleMiniDoublet(SDL::Event<SDL::Acc>* event, unsigned int MD) {

//________________________________________________________________________________________________________________________________
std::tuple<int, float, float, float, int, std::vector<int>> parseTrackCandidate(SDL::Event<SDL::Acc>* event,
unsigned int idx) {
unsigned int idx) {
// Get the type of the track candidate
SDL::trackCandidatesBuffer<alpaka::DevCpu>& trackCandidatesInGPU = (*event->getTrackCandidates());
short type = trackCandidatesInGPU.trackCandidateType[idx];
Expand Down Expand Up @@ -742,8 +742,8 @@ std::tuple<int, float, float, float, int, std::vector<int>> parseTrackCandidate(
}

//________________________________________________________________________________________________________________________________
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parsepT5(SDL::Event<SDL::Acc>* event,
unsigned int idx) {
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parsepT5(
SDL::Event<SDL::Acc>* event, unsigned int idx) {
// Get relevant information
SDL::trackCandidatesBuffer<alpaka::DevCpu>& trackCandidatesInGPU = (*event->getTrackCandidates());
SDL::quintupletsBuffer<alpaka::DevCpu>& quintupletsInGPU = (*event->getQuintuplets());
Expand Down Expand Up @@ -854,8 +854,8 @@ std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned
}

//________________________________________________________________________________________________________________________________
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parsepT3(SDL::Event<SDL::Acc>* event,
unsigned int idx) {
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parsepT3(
SDL::Event<SDL::Acc>* event, unsigned int idx) {
// Get relevant information
SDL::trackCandidatesBuffer<alpaka::DevCpu>& trackCandidatesInGPU = (*event->getTrackCandidates());
SDL::tripletsBuffer<alpaka::DevCpu>& tripletsInGPU = (*event->getTriplets());
Expand Down Expand Up @@ -889,8 +889,8 @@ std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned
}

//________________________________________________________________________________________________________________________________
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parseT5(SDL::Event<SDL::Acc>* event,
unsigned int idx) {
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parseT5(
SDL::Event<SDL::Acc>* event, unsigned int idx) {
SDL::trackCandidatesBuffer<alpaka::DevCpu>& trackCandidatesInGPU = (*event->getTrackCandidates());
SDL::quintupletsBuffer<alpaka::DevCpu>& quintupletsInGPU = (*event->getQuintuplets());
unsigned int T5 = trackCandidatesInGPU.directObjectIndices[idx];
Expand Down Expand Up @@ -923,8 +923,8 @@ std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned
}

//________________________________________________________________________________________________________________________________
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parsepLS(SDL::Event<SDL::Acc>* event,
unsigned int idx) {
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parsepLS(
SDL::Event<SDL::Acc>* event, unsigned int idx) {
SDL::trackCandidatesBuffer<alpaka::DevCpu>& trackCandidatesInGPU = (*event->getTrackCandidates());
SDL::segmentsBuffer<alpaka::DevCpu>& segmentsInGPU = (*event->getSegments());

Expand Down
19 changes: 10 additions & 9 deletions RecoTracker/LSTCore/standalone/code/core/write_sdl_ntuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ void setPixelTripletOutputBranches(SDL::Event<SDL::Acc>* event);
void setGnnNtupleBranches(SDL::Event<SDL::Acc>* event);
void setGnnNtupleMiniDoublet(SDL::Event<SDL::Acc>* event, unsigned int MD);

std::tuple<int, float, float, float, int, std::vector<int>> parseTrackCandidate(SDL::Event<SDL::Acc>* event, unsigned int);
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parsepT5(SDL::Event<SDL::Acc>* event,
unsigned int);
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parsepT3(SDL::Event<SDL::Acc>* event,
unsigned int);
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parseT5(SDL::Event<SDL::Acc>* event,
unsigned int);
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parsepLS(SDL::Event<SDL::Acc>* event,
unsigned int);
std::tuple<int, float, float, float, int, std::vector<int>> parseTrackCandidate(SDL::Event<SDL::Acc>* event,
unsigned int);
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parsepT5(
SDL::Event<SDL::Acc>* event, unsigned int);
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parsepT3(
SDL::Event<SDL::Acc>* event, unsigned int);
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parseT5(
SDL::Event<SDL::Acc>* event, unsigned int);
std::tuple<float, float, float, std::vector<unsigned int>, std::vector<unsigned int>> parsepLS(
SDL::Event<SDL::Acc>* event, unsigned int);

// Print multiplicities
void printMiniDoubletMultiplicities(SDL::Event<SDL::Acc>* event);
Expand Down
5 changes: 4 additions & 1 deletion RecoTracker/LSTCore/standalone/code/rooutil/anautil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,10 @@ void RooUtil::Cutflow::fillCutflow(std::vector<TString>& cutlist, THist* h, THis
}

//_______________________________________________________________________________________________________
void RooUtil::Cutflow::fillCutflow_v2(std::vector<RooUtil::CutTree*>& cuttreelist, THist* h, THist* hraw, float wgtsyst) {
void RooUtil::Cutflow::fillCutflow_v2(std::vector<RooUtil::CutTree*>& cuttreelist,
THist* h,
THist* hraw,
float wgtsyst) {
for (unsigned int i = 0; i < cuttreelist.size(); ++i) {
RooUtil::CutTree* ct = cuttreelist[i];
// if (std::find(cutflow_nofill_cut_list.begin(), cutflow_nofill_cut_list.end(), ct->name) != cutflow_nofill_cut_list.end())
Expand Down
10 changes: 6 additions & 4 deletions RecoTracker/LSTCore/standalone/code/rooutil/anautil.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,18 @@ namespace RooUtil {
TString = "");
void bookVecHistogram(
TString,
std::pair<TString,
std::tuple<unsigned, float, float, std::function<std::vector<float>()>, std::function<std::vector<float>()>>>,
std::pair<
TString,
std::tuple<unsigned, float, float, std::function<std::vector<float>()>, std::function<std::vector<float>()>>>,
TString = "");
void bookHistogram(TString,
std::pair<TString, std::tuple<std::vector<float>, std::function<float()>>>,
TString = "");
void bookVecHistogram(
TString,
std::pair<TString,
std::tuple<std::vector<float>, std::function<std::vector<float>()>, std::function<std::vector<float>()>>>,
std::pair<
TString,
std::tuple<std::vector<float>, std::function<std::vector<float>()>, std::function<std::vector<float>()>>>,
TString = "");
void book2DHistogram(
TString,
Expand Down

0 comments on commit 4cd8924

Please sign in to comment.