Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Millepede integration #24

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Millepede integration #24

merged 1 commit into from
Feb 13, 2025

Conversation

YanzhaoW
Copy link
Owner

Integrate millepede to R3BRoot


Checklist:

Copy link

github-actions bot commented Jan 27, 2025

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v18.1.3) reports: 8 concern(s)
  • neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx:26:1: warning: [misc-include-cleaner]

    included header optional is not used directly

       26 | #include <optional>
          | ^~~~~~~~~~~~~~~~~~~
       27 | #include <string>
  • neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx:27:1: warning: [misc-include-cleaner]

    included header string is not used directly

       27 | #include <string>
          | ^~~~~~~~~~~~~~~~~
       28 | #include <vector>
  • neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx:28:1: warning: [misc-include-cleaner]

    included header vector is not used directly

       28 | #include <vector>
          | ^~~~~~~~~~~~~~~~~
       29 | 
  • neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx:61:9: warning: [bugprone-branch-clone]

    if with identical then and else branches

       61 |         if (const auto* r3b_dir = std::getenv("R3BROOTPATH"); r3b_dir != nullptr)
          |         ^
    /__w/R3BRoot/R3BRoot/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx:65:9: note: else branch starts here
       65 |         else
          |         ^
  • neuland/calibration/mille/PedeLauncher.cxx:30:20: warning: [misc-include-cleaner]

    no header providing "std::runtime_error" is directly included

       14 |         throw std::runtime_error(
          |                    ^
  • neuland/calibration/mille/PedeLauncher.cxx:33:38: warning: [misc-include-cleaner]

    no header providing "fmt::format" is directly included

       14 |         const auto exe_string = fmt::format("{}/{}", binary_directory_, executable_);
          |                                      ^
  • neuland/calibration/mille/PedeLauncher.cxx:34:33: warning: [misc-include-cleaner]

    no header providing "std::vector" is directly included

       14 |         auto launch_args = std::vector<std::string>{ "-i", steer_filename_ };
          |                                 ^
  • neuland/calibration/mille/PedeLauncher.cxx:34:45: warning: [misc-include-cleaner]

    no header providing "std::string" is directly included

       14 |         auto launch_args = std::vector<std::string>{ "-i", steer_filename_ };
          |                                             ^

Have any feedback or feature suggestions? Share it here.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v18.1.3

Only 1 out of 4 clang-tidy concerns fit within this pull request's diff.

Click here for the full clang-tidy patch
diff --git a/neuland/calibration/cal_to_hit/R3BNeulandCalToHitParTask.h b/neuland/calibration/cal_to_hit/R3BNeulandCalToHitParTask.h
index 469e052..5996532 100644
--- a/neuland/calibration/cal_to_hit/R3BNeulandCalToHitParTask.h
+++ b/neuland/calibration/cal_to_hit/R3BNeulandCalToHitParTask.h
@@ -22,0 +23 @@
+#include <cstdint>
diff --git a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
index 5c29b0d..e75b740 100644
--- a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
+++ b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
@@ -14,0 +15 @@
+#include "R3BException.h"
@@ -18,0 +20 @@
+#include <cstdlib>
diff --git a/neuland/calibration/mille/PedeLauncher.cxx b/neuland/calibration/mille/PedeLauncher.cxx
index d81aed4..05787bb 100644
--- a/neuland/calibration/mille/PedeLauncher.cxx
+++ b/neuland/calibration/mille/PedeLauncher.cxx
@@ -13,0 +14,3 @@
+#include <fmt/core.h>
+#include <string>
+#include <vector>

Used clang-format v18.1.3

No concerns from clang-format.

Have any feedback or feature suggestions? Share it here.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v18.1.3

Only 1 out of 4 clang-tidy concerns fit within this pull request's diff.

Click here for the full clang-tidy patch
diff --git a/neuland/calibration/cal_to_hit/R3BNeulandCalToHitParTask.h b/neuland/calibration/cal_to_hit/R3BNeulandCalToHitParTask.h
index 469e052..5996532 100644
--- a/neuland/calibration/cal_to_hit/R3BNeulandCalToHitParTask.h
+++ b/neuland/calibration/cal_to_hit/R3BNeulandCalToHitParTask.h
@@ -22,0 +23 @@
+#include <cstdint>
diff --git a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
index 7e8561f..0a50cea 100644
--- a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
+++ b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
@@ -14,0 +15 @@
+#include "R3BException.h"
@@ -18,0 +20 @@
+#include <cstdlib>
diff --git a/neuland/calibration/mille/PedeLauncher.cxx b/neuland/calibration/mille/PedeLauncher.cxx
index d81aed4..05787bb 100644
--- a/neuland/calibration/mille/PedeLauncher.cxx
+++ b/neuland/calibration/mille/PedeLauncher.cxx
@@ -13,0 +14,3 @@
+#include <fmt/core.h>
+#include <string>
+#include <vector>

Used clang-format v18.1.3

Click here for the full clang-format patch
diff --git a/neuland/calibration/mille/PedeLauncher.h b/neuland/calibration/mille/PedeLauncher.h
index 3497374..014c14b 100644
--- a/neuland/calibration/mille/PedeLauncher.h
+++ b/neuland/calibration/mille/PedeLauncher.h
@@ -38 +37,0 @@ namespace R3B::Millepede
-

Have any feedback or feature suggestions? Share it here.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v18.1.3

Only 1 out of 2 clang-tidy concerns fit within this pull request's diff.

Click here for the full clang-tidy patch
diff --git a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
index 434b7cb..facf6ac 100644
--- a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
+++ b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
@@ -21,2 +20,0 @@
-#include <fmt/format.h>
-#include <range/v3/algorithm.hpp>
diff --git a/neuland/calibration/mille/PedeLauncher.cxx b/neuland/calibration/mille/PedeLauncher.cxx
index d81aed4..05787bb 100644
--- a/neuland/calibration/mille/PedeLauncher.cxx
+++ b/neuland/calibration/mille/PedeLauncher.cxx
@@ -13,0 +14,3 @@
+#include <fmt/core.h>
+#include <string>
+#include <vector>

Used clang-format v18.1.3

Click here for the full clang-format patch
diff --git a/neuland/calibration/mille/PedeLauncher.h b/neuland/calibration/mille/PedeLauncher.h
index 3497374..014c14b 100644
--- a/neuland/calibration/mille/PedeLauncher.h
+++ b/neuland/calibration/mille/PedeLauncher.h
@@ -38 +37,0 @@ namespace R3B::Millepede
-

Have any feedback or feature suggestions? Share it here.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v18.1.3

Only 1 out of 2 clang-tidy concerns fit within this pull request's diff.

Click here for the full clang-tidy patch
diff --git a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
index 434b7cb..facf6ac 100644
--- a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
+++ b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
@@ -21,2 +20,0 @@
-#include <fmt/format.h>
-#include <range/v3/algorithm.hpp>
diff --git a/neuland/calibration/mille/PedeLauncher.cxx b/neuland/calibration/mille/PedeLauncher.cxx
index d81aed4..05787bb 100644
--- a/neuland/calibration/mille/PedeLauncher.cxx
+++ b/neuland/calibration/mille/PedeLauncher.cxx
@@ -13,0 +14,3 @@
+#include <fmt/core.h>
+#include <string>
+#include <vector>

Used clang-format v18.1.3

No concerns from clang-format.

Have any feedback or feature suggestions? Share it here.

@YanzhaoW YanzhaoW force-pushed the edwin_pede_integrate branch from eadcf7f to 728184e Compare January 28, 2025 21:11
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v18.1.3

Only 1 out of 2 clang-tidy concerns fit within this pull request's diff.

Click here for the full clang-tidy patch
diff --git a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
index 0792fe2..1583e15 100644
--- a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
+++ b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
@@ -22 +21,0 @@
-#include <range/v3/numeric.hpp>
diff --git a/neuland/calibration/mille/PedeLauncher.cxx b/neuland/calibration/mille/PedeLauncher.cxx
index d81aed4..05787bb 100644
--- a/neuland/calibration/mille/PedeLauncher.cxx
+++ b/neuland/calibration/mille/PedeLauncher.cxx
@@ -13,0 +14,3 @@
+#include <fmt/core.h>
+#include <string>
+#include <vector>

Used clang-format v18.1.3

No concerns from clang-format.

Have any feedback or feature suggestions? Share it here.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v18.1.3

Only 1 out of 2 clang-tidy concerns fit within this pull request's diff.

Click here for the full clang-tidy patch
diff --git a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
index 0792fe2..1583e15 100644
--- a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
+++ b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
@@ -22 +21,0 @@
-#include <range/v3/numeric.hpp>
diff --git a/neuland/calibration/mille/PedeLauncher.cxx b/neuland/calibration/mille/PedeLauncher.cxx
index d81aed4..05787bb 100644
--- a/neuland/calibration/mille/PedeLauncher.cxx
+++ b/neuland/calibration/mille/PedeLauncher.cxx
@@ -13,0 +14,3 @@
+#include <fmt/core.h>
+#include <string>
+#include <vector>

Used clang-format v18.1.3

No concerns from clang-format.

Have any feedback or feature suggestions? Share it here.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v18.1.3

Only 1 out of 2 clang-tidy concerns fit within this pull request's diff.

Click here for the full clang-tidy patch
diff --git a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
index 1583e15..4f819a5 100644
--- a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
+++ b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
@@ -22 +21,0 @@
-#include <range/v3/view.hpp>
diff --git a/neuland/calibration/mille/PedeLauncher.cxx b/neuland/calibration/mille/PedeLauncher.cxx
index d81aed4..05787bb 100644
--- a/neuland/calibration/mille/PedeLauncher.cxx
+++ b/neuland/calibration/mille/PedeLauncher.cxx
@@ -13,0 +14,3 @@
+#include <fmt/core.h>
+#include <string>
+#include <vector>

Used clang-format v18.1.3

No concerns from clang-format.

Have any feedback or feature suggestions? Share it here.

#include <optional>
#include <range/v3/algorithm.hpp>
#include <range/v3/numeric.hpp>
#include <range/v3/algorithm/all_of.hpp>
#include <range/v3/view.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostics

Please remove the line(s)

  • 22

github-actions[bot]

This comment was marked as outdated.

Copy link
Owner Author

@YanzhaoW YanzhaoW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v18.1.3

Only 4 out of 5 clang-tidy concerns fit within this pull request's diff.

Click here for the full clang-tidy patch
diff --git a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
index 589da2e..37ec0bf 100644
--- a/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
+++ b/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx
@@ -26,3 +25,0 @@
-#include <optional>
-#include <string>
-#include <vector>
diff --git a/neuland/calibration/mille/PedeLauncher.cxx b/neuland/calibration/mille/PedeLauncher.cxx
index d81aed4..81569b7 100644
--- a/neuland/calibration/mille/PedeLauncher.cxx
+++ b/neuland/calibration/mille/PedeLauncher.cxx
@@ -13,0 +14,4 @@
+#include <fmt/core.h>
+#include <stdexcept>
+#include <string>
+#include <vector>

Used clang-format v18.1.3

No concerns from clang-format.

Have any feedback or feature suggestions? Share it here.

Comment on lines +26 to +28
#include <optional>
#include <string>
#include <vector>
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostics

Please remove the line(s)

  • 26
  • 27
  • 28

@@ -12,15 +12,21 @@
******************************************************************************/

#include "R3BNeulandMillepede.h"
#include <R3BException.h>
#include <R3BNeulandCalToHitParTask.h>
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx:16:10: error: [clang-diagnostic-error]

'R3BDataMonitor.h' file not found

   16 | #include <R3BDataMonitor.h>
      |          ^~~~~~~~~~~~~~~~~~

@@ -52,6 +58,15 @@ namespace R3B::Neuland::Calibration
par_result_.set_filename(DEFAULT_RES_FILENAME);
pede_launcher_.set_steer_filename(pede_steer_filename_);
pede_launcher_.set_parameter_filename(parameter_filename_);
if (const auto* r3b_dir = std::getenv("R3BROOTPATH"); r3b_dir != nullptr)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx:61:9: warning: [bugprone-branch-clone]

if with identical then and else branches

   61 |         if (const auto* r3b_dir = std::getenv("R3BROOTPATH"); r3b_dir != nullptr)
      |         ^
/__w/R3BRoot/R3BRoot/neuland/calibration/cal_to_hit/engine/R3BNeulandMillepede.cxx:65:9: note: else branch starts here
   65 |         else
      |         ^

private:
boost::asio::io_service ios_;
std::string steer_filename_ = DEFAULT_STEER_FILENAME;
std::string parameter_file_;
std::string binary_directory_ = ".";
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy diagnostic

neuland/calibration/mille/PedeLauncher.h:36:10: error: [clang-diagnostic-error]

'cmath' file not found

   36 | #include <cmath>             // std::signbit
      |          ^~~~~~~

@YanzhaoW YanzhaoW force-pushed the edwin_pede_integrate branch 2 times, most recently from cdb8dea to 51405d7 Compare February 13, 2025 15:55
- add millepede2 as a submodule
- disable static analysis
- add calibration of predecessor
- add python script to check hit_par and change hit module par member names
- add input and output name for ana tasks
- fix the json object merging issue
@YanzhaoW YanzhaoW force-pushed the edwin_pede_integrate branch from 51405d7 to d34c9eb Compare February 13, 2025 18:10
@YanzhaoW YanzhaoW merged commit fd024b9 into edwin_dev Feb 13, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant