21 m_guessValHist(nullptr),
22 m_numberOfFieldIsOnEstimates(0),
23 m_numberOfFieldEstimates(0),
24 m_updateFieldEstimate(
true),
26 m_guessValHist =
new TH1F(
"FieldEstimations",
"Field estimations from tracks and muons", 200, -4.5, 4.5);
41 if (TMath::Abs(
z) < 724) {
44 return TEveVector(0, 0, field);
46 if (
m_simpleModel || (
R > 461.0 &&
R < 490.5) || (
R > 534.5 &&
R < 597.5) || (
R > 637.0 &&
R < 700.0))
47 return TEveVector(0, 0, -field / 3.8 * 1.2);
53 return TEveVector(0, 0, field);
55 return TEveVector(
x /
R * field / 3.8 * 2.0,
y /
R * field / 3.8 * 2.0, 0);
57 return TEveVector(-
x /
R * field / 3.8 * 2.0, -
y /
R * field / 3.8 * 2.0, 0);
60 if (((TMath::Abs(
z) > 724) && (TMath::Abs(
z) < 786)) || ((TMath::Abs(
z) > 850) && (TMath::Abs(
z) < 910)) ||
61 ((TMath::Abs(
z) > 975) && (TMath::Abs(
z) < 1003))) {
63 return TEveVector(
x /
R * field / 3.8 * 2.0,
y /
R * field / 3.8 * 2.0, 0);
65 return TEveVector(-
x /
R * field / 3.8 * 2.0, -
y /
R * field / 3.8 * 2.0, 0);
68 return TEveVector(0, 0, 0);
145 const static float currentToField = 3.8 / 18160;
146 bool available =
false;
167 event->getByLabel(
dcsTag, dcsStatus);
169 if (dcsStatus.
isValid() && !dcsStatus->empty()) {
171 for (std::vector<DcsStatus>::const_iterator
i = dcsStatus->begin();
i < dcsStatus->end(); ++
i)
172 sum += (*i).magnetCurrent();
175 m_eventField = currentToField * sum / dcsStatus->size();
int m_numberOfFieldEstimates
int m_numberOfFieldIsOnEstimates
bool getByLabel(std::type_info const &, char const *, char const *, char const *, void *) const override
void resetFieldEstimate() const
void guessFieldIsOn(bool guess) const
TEveVector GetField(Float_t x, Float_t y, Float_t z) const override
bool m_updateFieldEstimate
Float_t GetMaxFieldMag() const override
void setFFFieldMag(float)
Float_t GetFieldMag() const
void checkFieldInfo(const edm::EventBase *)
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
void guessField(float estimate) const
fwlite::Run const & getRun() const