 |
ATLAS Offline Software
|
Go to the documentation of this file.
40 ATH_MSG_INFO(
"Data will be corrected for sagitta bias with CB calibration");
44 }
else if (
m_calibMode == MuonCalibTool::correctData_IDMS) {
45 ATH_MSG_INFO(
"Data will be corrected for sagitta bias with ID+MS calibration");
46 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");
50 }
else if (
m_calibMode == MuonCalibTool::notCorrectData_IDMS) {
51 ATH_MSG_INFO(
"Data will be untouched. Instead an additional systematic will be added with ID+MS calibration");
52 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");
56 else if (
m_calibMode == MuonCalibTool::notCorrectData_CB) {
57 ATH_MSG_INFO(
"Data will be untouched. Instead an additional systematic will be added with CB calibration");
61 else if (
m_calibMode == MuonCalibTool::userDefined) {
66 << MuonCalibTool::correctData_CB <<
") correctData_IDMS ("
67 << MuonCalibTool::correctData_IDMS <<
") or notCorrectData_IDMS ("
68 << MuonCalibTool::notCorrectData_IDMS <<
") or notCorrectData_CB ("
69 << MuonCalibTool::notCorrectData_CB <<
")");
70 return StatusCode::FAILURE;
87 addSubtool (*selectionTool);
124 return StatusCode::FAILURE;
130 return StatusCode::FAILURE;
134 return StatusCode::SUCCESS;
147 ATH_MSG_VERBOSE(
"Muon Type = " <<
mu(
acc.muonTypeAcc) <<
" ( 0: Combined, 1: StandAlone, 2: SegmentTagged, 3: CaloTagged, 4: SiliconAssociatedForwardMuon)");
198 if ((
mu(
acc.muonTypeAcc) != xAOD::Muon::SiliconAssociatedForwardMuon))
263 inTrk.
charge() / (res_pt * std::cosh(inTrk.
eta())));
274 "Non-null pointer received. "
275 "There's a possible memory leak!");
281 output->makePrivateStore(input);
294 return sys.find(systematic) !=
sys.end();
311 if(
code != StatusCode::SUCCESS)
return code;
314 if(
code != StatusCode::SUCCESS)
return code;
318 if(
code != StatusCode::SUCCESS)
return code;
364 double Primary_eta =
mu(
acc.etaAcc);
365 double Primary_phi =
mu(
acc.phiAcc);
373 loc_ptid = id_pt(
mu.getXAODObject()) *
MeVtoGeV;
374 loc_ptms = ms_pt(
mu.getXAODObject()) *
MeVtoGeV;
375 loc_ptcb = cb_pt(
mu.getXAODObject()) *
MeVtoGeV;
380 auto CB_track =
mu(
acc.combinedTrackParticleLinkAcc);
381 auto ID_track =
mu(
acc.inDetTrackParticleLinkAcc).opt_value();
382 auto ME_track =
mu(
acc.extrapolatedMuonSpectrometerTrackParticleLinkAcc);
406 double denominator = (loc_ptcb)*std::sqrt(sigmaID * sigmaID + sigmaMS * sigmaMS);
435 double Primary_eta =
mu(
acc.etaAcc);
436 double Primary_phi =
mu(
acc.phiAcc);
470 auto CB_track =
mu(
acc.combinedTrackParticleLinkAcc);
471 auto ID_track =
mu(
acc.inDetTrackParticleLinkAcc).opt_value();
472 auto ME_track =
mu(
acc.extrapolatedMuonSpectrometerTrackParticleLinkAcc);
475 if (
mu(
acc.muonTypeAcc) == xAOD::Muon::SiliconAssociatedForwardMuon)
477 if (CB_track)
charge = CB_track.value()(
acc.trkChargeAcc);
532 TRandom3 loc_random3;
538 const UInt_t seed = 1 + std::abs(muonObj.
CB.
phi) * 1E6 + std::abs(muonObj.
CB.
eta) * 1E3 +
eventNumber;
539 loc_random3.SetSeed(seed);
541 muonObj.
rnd_g0 = loc_random3.Gaus(0, 1);
542 muonObj.
rnd_g1 = loc_random3.Gaus(0, 1);
543 muonObj.
rnd_g2 = loc_random3.Gaus(0, 1);
544 muonObj.
rnd_g3 = loc_random3.Gaus(0, 1);
545 muonObj.
rnd_g4 = loc_random3.Gaus(0, 1);
559 constexpr
unsigned int last_run_16 = 320000;
560 constexpr
unsigned int last_run_17 = 342000;
561 constexpr
unsigned int last_run_18 = 370000;
562 constexpr
unsigned int last_run_22 = 440614;
563 constexpr
unsigned int last_run_23 = 456750;
564 constexpr
unsigned int last_run_24 = 999999;
566 static const std::set<int> MCperiods1516{284500};
567 static const std::set<int> MCperiods17{300000, 304000, 305000};
568 static const std::set<int> MCperiods18{310000};
569 static const std::set<int> MCperiods22{330000, 410000};
570 static const std::set<int> MCperiods23{450000};
571 static const std::set<int> MCperiods24{470000};
573 static const std::set<int> MCperiodsRun4{350000, 350060, 350140, 350200};
576 unsigned int run = 0;
578 else run = evtInfo(
acc.runNumberAcc);
581 if (
acc.acc_rnd.isAvailable(evtInfo))
582 run =
acc.acc_rnd(evtInfo);
585 "No random runnumber could be found although the tool is configured to assign the years based on it. Please make sure "
586 "to apply the prwTool before-hand or consider to set the property 'useRandomRunNumber' to false.");
591 if (!isData && (!
m_useRndRun || !
acc.acc_rnd.isAvailable(evtInfo))) {
592 if (MCperiods1516.count(
run)) {
593 ATH_MSG_DEBUG(
"The current run " <<
run <<
" corresponds to data mc20a / data15-16");
595 }
else if (MCperiods17.count(
run)) {
596 ATH_MSG_DEBUG(
"The current run " <<
run <<
" corresponds to data mc20d / data17");
598 }
else if (MCperiods18.count(
run)) {
599 ATH_MSG_DEBUG(
"The current run " <<
run <<
" corresponds to data mc20e / data18");
601 }
else if (MCperiods22.count(
run)) {
602 ATH_MSG_DEBUG(
"The current run " <<
run <<
" corresponds to data mc21 / mc23a / data22");
604 }
else if (MCperiods23.count(
run)) {
605 ATH_MSG_DEBUG(
"The current run " <<
run <<
" corresponds to data mc23c / mc23d / data23");
607 }
else if (MCperiods24.count(
run)) {
608 ATH_MSG_DEBUG(
"The current run " <<
run <<
" corresponds to data mc23e / data24");
610 }
else if (MCperiodsRun4.count(
run)) {
618 if (
run < last_run_16) {
621 }
else if (
run <= last_run_17) {
624 }
else if (
run <= last_run_18) {
627 }
else if (
run <= last_run_22) {
630 }
else if (
run < last_run_23) {
633 }
else if (
run < last_run_24) {
638 static std::atomic<bool> warningPrinted {
false};
639 if (!warningPrinted) {
640 ATH_MSG_WARNING(
"Could not assign run-number " <<
run <<
" to a specific year of data-taking, using default year 24");
641 warningPrinted =
true;
656 throw std::runtime_error(
"OutOfValidityRange in applyCorrection");
659 throw std::runtime_error(
"Error in applyCorrection");
668 auto eventInfo =
acc.m_eventInfoCol(
event);
std::vector< Identifier > ID
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.
constexpr double muonMassInMeV
the mass of the muon (in MeV)
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.
a class representing a single optional object (electron, muons, etc.)
#define ATH_MSG_VERBOSE(x)
a class representing a continuous sequence of objects (a.k.a. a container)
@ IS_SIMULATION
true: simulation, false: data
Select isolated Photons, Electrons and Muons.
StatusCode registerSystematics(const IReentrantSystematicsTool &tool)
effects: register all the systematics from the tool
#define AmgSymMatrix(dim)
float d0() const
Returns the parameter.
std::optional< ResolutionCategory > raw_mst_category
int calib_charge
Value of the track-charge (after calibration)
@ OutOfValidityRange
Input object is out of validity range.
@ Error
Some error happened during the object correction.
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.
a class representing a single object (electron, muons, etc.)
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.
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.