|
ATLAS Offline Software
|
Go to the documentation of this file.
37 ATH_MSG_INFO(
"Data will be corrected for sagitta bias with CB calibration");
41 }
else if (
m_calibMode == MuonCalibTool::correctData_IDMS) {
42 ATH_MSG_INFO(
"Data will be corrected for sagitta bias with ID+MS calibration");
43 if (
m_isRun3.value())
ATH_MSG_WARNING(
"You are using the ID+MS calibration which is currenlty not recommended from the MCP group in Run3. Please refer to the MCP documentation page");
47 }
else if (
m_calibMode == MuonCalibTool::notCorrectData_IDMS) {
48 ATH_MSG_INFO(
"Data will be untouched. Instead an additional systematic will be added with ID+MS calibration");
49 if (
m_isRun3.value())
ATH_MSG_WARNING(
"You are using the ID+MS calibration which is currenlty not recommended from the MCP group in Run3. Please refer to the MCP documentation page");
53 else if (
m_calibMode == MuonCalibTool::notCorrectData_CB) {
54 ATH_MSG_INFO(
"Data will be untouched. Instead an additional systematic will be added with CB calibration");
58 else if (
m_calibMode == MuonCalibTool::userDefined) {
63 << MuonCalibTool::correctData_CB <<
") correctData_IDMS ("
64 << MuonCalibTool::correctData_IDMS <<
") or notCorrectData_IDMS ("
65 << MuonCalibTool::notCorrectData_IDMS <<
") or notCorrectData_CB ("
66 << MuonCalibTool::notCorrectData_CB <<
")");
67 return StatusCode::FAILURE;
117 return StatusCode::FAILURE;
120 if (
registry.registerSystematics(*
this) != StatusCode::SUCCESS)
123 return StatusCode::FAILURE;
126 return StatusCode::SUCCESS;
131 ATH_MSG_VERBOSE(
"Muon Type = " <<
mu.muonType() <<
" ( 0: Combined, 1: StandAlone, 2: SegmentTagged, 3: CaloTagged, 4: SiliconAssociatedForwardMuon)");
178 ATH_MSG_DEBUG(
"Checking Output Muon Info for data - Pt_ID: " << acc_id_pt(
mu));
179 ATH_MSG_DEBUG(
"Checking Output Muon Info for data - Pt_MS: " << acc_me_pt(
mu));
180 ATH_MSG_DEBUG(
"Checking Output Muon Info for data - Pt_CB: " <<
mu.pt());
190 if ((
mu.muonType() != xAOD::Muon::SiliconAssociatedForwardMuon))
255 inTrk.
charge() / (res_pt * std::cosh(inTrk.
eta())));
266 "Non-null pointer received. "
267 "There's a possible memory leak!");
286 return sys.find(systematic) !=
sys.end();
303 if(
code != StatusCode::SUCCESS)
return code;
306 if(
code != StatusCode::SUCCESS)
return code;
310 if(
code != StatusCode::SUCCESS)
return code;
350 double Primary_eta =
mu.eta();
351 double Primary_phi =
mu.phi();
368 const xAOD::TrackParticle* ME_track =
mu.trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle);
370 if(CB_track) loc_ptcb = CB_track->
pt() *
MeVtoGeV;
371 if(ID_track) loc_ptid = ID_track->
pt() *
MeVtoGeV;
372 if(ME_track) loc_ptms = ME_track->
pt() *
MeVtoGeV;
392 double denominator = (loc_ptcb)*std::sqrt(sigmaID * sigmaID + sigmaMS * sigmaMS);
422 double Primary_eta =
mu.eta();
423 double Primary_phi =
mu.phi();
459 const xAOD::TrackParticle *ME_track =
mu.trackParticle(xAOD::Muon::ExtrapolatedMuonSpectrometerTrackParticle);
462 if (
mu.muonType() == xAOD::Muon::SiliconAssociatedForwardMuon)
517 TRandom3 loc_random3;
524 const UInt_t seed = 1 + std::abs(muonObj.
CB.
phi) * 1E6 + std::abs(muonObj.
CB.
eta) * 1E3 +
eventNumber;
525 loc_random3.SetSeed(seed);
527 muonObj.
rnd_g0 = loc_random3.Gaus(0, 1);
528 muonObj.
rnd_g1 = loc_random3.Gaus(0, 1);
529 muonObj.
rnd_g2 = loc_random3.Gaus(0, 1);
530 muonObj.
rnd_g3 = loc_random3.Gaus(0, 1);
531 muonObj.
rnd_g4 = loc_random3.Gaus(0, 1);
546 constexpr
unsigned int last_run_16 = 320000;
547 constexpr
unsigned int last_run_17 = 342000;
548 constexpr
unsigned int last_run_18 = 370000;
549 constexpr
unsigned int last_run_22 = 440614;
550 constexpr
unsigned int last_run_23 = 456750;
551 constexpr
unsigned int last_run_24 = 999999;
553 static const std::set<int> MCperiods1516{284500};
554 static const std::set<int> MCperiods17{300000, 304000, 305000};
555 static const std::set<int> MCperiods18{310000};
556 static const std::set<int> MCperiods22{330000, 410000};
557 static const std::set<int> MCperiods23{450000};
558 static const std::set<int> MCperiods24{470000};
560 static const std::set<int> MCperiodsRun4{350000, 350060, 350140, 350200};
564 unsigned int run = 0;
570 run = acc_rnd(*evtInfo);
573 "No random runnumber could be found although the tool is configured to assign the years based on it. Please make sure "
574 "to apply the prwTool before-hand or consider to set the property 'useRandomRunNumber' to false.");
580 if (MCperiods1516.count(
run)) {
581 ATH_MSG_DEBUG(
"The current run " <<
run <<
" corresponds to data mc20a / data15-16");
583 }
else if (MCperiods17.count(
run)) {
584 ATH_MSG_DEBUG(
"The current run " <<
run <<
" corresponds to data mc20d / data17");
586 }
else if (MCperiods18.count(
run)) {
587 ATH_MSG_DEBUG(
"The current run " <<
run <<
" corresponds to data mc20e / data18");
589 }
else if (MCperiods22.count(
run)) {
590 ATH_MSG_DEBUG(
"The current run " <<
run <<
" corresponds to data mc21 / mc23a / data22");
592 }
else if (MCperiods23.count(
run)) {
593 ATH_MSG_DEBUG(
"The current run " <<
run <<
" corresponds to data mc23c / mc23d / data23");
595 }
else if (MCperiods24.count(
run)) {
596 ATH_MSG_DEBUG(
"The current run " <<
run <<
" corresponds to data mc23e / data24");
598 }
else if (MCperiodsRun4.count(
run)) {
606 if (
run < last_run_16) {
609 }
else if (
run <= last_run_17) {
612 }
else if (
run <= last_run_18) {
615 }
else if (
run <= last_run_22) {
618 }
else if (
run < last_run_23) {
621 }
else if (
run < last_run_24) {
626 static std::atomic<bool> warningPrinted {
false};
627 if (!warningPrinted) {
628 ATH_MSG_WARNING(
"Could not assign run-number " <<
run <<
" to a specific year of data-taking, using default year 24");
629 warningPrinted =
true;
virtual double pt() const override final
The transverse momentum ( ) of the particle.
std::vector< Identifier > ID
uint64_t eventNumber() const
The current event's event number.
Helper class to provide type-safe access to aux data.
float charge() const
Returns the charge.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Class to wrap a set of SystematicVariations.
float z0() const
Returns the parameter.
void setDefiningParameters(float d0, float z0, float phi0, float theta, float qOverP)
Set the defining parameters.
Helper class to provide constant type-safe access to aux data.
#define ATH_MSG_VERBOSE(x)
@ IS_SIMULATION
true: simulation, false: data
Select isolated Photons, Electrons and Muons.
#define AmgSymMatrix(dim)
float d0() const
Returns the parameter.
uint32_t runNumber() const
The current event's run number.
int calib_charge
Value of the track-charge (after calibration)
@ OutOfValidityRange
Input object is out of validity range.
Helper class to provide type-safe access to aux data.
double rnd_g0
Random numbers helping for the calibration.
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
const double eta
Value of the track-eta.
float phi0() const
Returns the parameter, which has range to .
Muon_v1 Muon
Reference the current persistent version:
const double phi
Value of the track-phi.
double charge(const T &p)
double calib_pt
Smeared track pt.
@ Ok
The correction was done successfully.
#define ATH_MSG_WARNING(x)
This module implements the central registry for handling systematic uncertainties with CP tools.
Return value from object correction CP tools.
ResolutionCategory raw_mst_category
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Class describing a TrackParticle.
Basic object to cache all relevant information from the track.
float theta() const
Returns the parameter, which has range 0 to .
bool eventType(EventType type) const
Check for one particular bitmask value.
static SystematicRegistry & getInstance()
Get the singleton instance of the registry for the curren thread.