FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

add helper to get nominal field by jgrosseo · Pull Request #10256 · AliceO2Group/AliceO2 · GitHub

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .h  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class GRPMagField
o2::units::Current_t getL3Current() const { return mL3Current; }
o2::units::Current_t getDipoleCurrent() const { return mDipoleCurrent; }
bool getFieldUniformity() const { return mUniformField; }
int8_t getNominalL3Field();
void setL3Current(o2::units::Current_t v) { mL3Current = v; }
void setDipoleCurrent(o2::units::Current_t v) { mDipoleCurrent = v; }
void setFieldUniformity(bool v) { mUniformField = v; }
Expand All @@ -50,10 +51,23 @@ class GRPMagField
o2::units::Current_t mL3Current = 0.f; ///< signed current in L3
o2::units::Current_t mDipoleCurrent = 0.f; ///< signed current in Dipole
bool mUniformField = false; ///< uniformity of magnetic field
int8_t mNominalL3Field = 0; //!< Nominal L3 field deduced from mL3Current
bool mNominalL3FieldValid = false; //!< Has the field been computed (for caching)

ClassDefNV(GRPMagField, 1);
ClassDefNV(GRPMagField, 2);
};

inline int8_t GRPMagField::getNominalL3Field()
{
// compute nominal L3 field in kG

if (mNominalL3FieldValid == false) {
mNominalL3Field = std::lround(5.f * mL3Current / 30000.f);
mNominalL3FieldValid = true;
}
return mNominalL3Field;
}

} // namespace parameters
} // namespace o2

Expand Down

Back | FazBrowse Home | New Git URL