Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class GRPObject
void setL3Current(o2::units::Current_t v) { mL3Current = v; }
void setDipoleCurrent(o2::units::Current_t v) { mDipoleCurrent = v; }
void setFieldUniformity(bool v) { mUniformField = v; }
int8_t getNominalL3Field();
/// getter/setter for data taking period name
const std::string& getDataPeriod() const { return mDataPeriod; }
void setDataPeriod(const std::string v) { mDataPeriod = v; }
Expand Down Expand Up @@ -158,14 +159,17 @@ class GRPObject
bool mUniformField = false; ///< uniformity of magnetic field
float mBeamEnergyPerZ = 0.f; ///< beam energy per charge (i.e. sqrt(s)/2 for pp)

int8_t mNominalL3Field = 0; //!< Nominal L3 field deduced from mL3Current
bool mNominalL3FieldValid = false; //!< Has the field been computed (for caching)

int mBeamAZ[beamDirection::NBeamDirections] = {0, 0}; ///< A<<16+Z for each beam

int mRun = 0; ///< run identifier
int mFill = 0; ///< fill identifier
std::string mDataPeriod = ""; ///< name of the period
std::string mLHCState = ""; ///< machine state

ClassDefNV(GRPObject, 5);
ClassDefNV(GRPObject, 6);
};

//______________________________________________
Expand All @@ -176,6 +180,18 @@ inline float GRPObject::getBeamZ2A(beamDirection b) const
return a ? getBeamZ(b) / static_cast<float>(a) : 0.f;
}

//______________________________________________
inline int8_t GRPObject::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