1 #ifndef L1Trigger_TrackFindingTracklet_interface_Util_h 2 #define L1Trigger_TrackFindingTracklet_interface_Util_h 10 #include <sys/types.h> 22 unsigned int radix = 1,
value = 0;
23 for (
int i = binary.length() - 1;
i >= 0;
i--) {
24 if (binary.at(
i) !=
'0' && binary.at(
i) !=
'1')
26 value += (binary.at(
i) -
'0') * radix;
43 constexpr
double dr = 0.18;
45 double bend =
delta / stripPitch;
49 inline double rinv(
double phi1,
double phi2,
double r1,
double r2) {
52 double dphi = phi2 - phi1;
55 return 2.0 *
sin(dphi) / dr /
sqrt(1.0 + 2 * r1 *
r2 * (1.0 -
cos(dphi)) / (dr * dr));
61 for (
char word : stubwordhex) {
97 << __FILE__ <<
" " << __LINE__ <<
" hex string format invalid: " << stubwordhex;
99 stubwordbin += hexword;
106 int ipower = round(
power);
124 if (errno == ENOENT) {
127 if (errno == ENOTDIR) {
133 return (
info.st_mode & S_IFDIR) ? 1 : 0;
170 out.open(
fname, std::ofstream::app);
Log< level::Info, true > LogVerbatim
Sin< T >::type sin(const T &t)
std::string hexFormat(const std::string &binary)
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
double rinv(double phi1, double phi2, double r1, double r2)
int dirExists(const std::string &path)
std::string convertHexToBin(const std::string &stubwordhex)
double bendstrip(double r, double rinv, double stripPitch)
std::ofstream openfile(const std::string &dir, const std::string &fname, const char *file, int line)