Skip to content
Snippets Groups Projects
Commit 8bf373af authored by William Keaton Balunas's avatar William Keaton Balunas Committed by Frank Winklmeier
Browse files

JetCalibTools: Fix infinite loop in smearing correction

JetCalibTools: Fix infinite loop in smearing correction
parent 7379ad37
No related branches found
No related tags found
20 merge requests!59674InDetPerformanceMonitoring with LumiBlock selection,!59383cppcheck in trigger code: Prefer prefix ++/-- operators for non-primitive types.,!58990Draft:Fixing bug in FTF config when running with Reco_tf,!58835DataQualityConfigurations: Modify L1Calo config for web display,!58791DataQualityConfigurations: Modify L1Calo config for web display,!58373Modification of V2.3 processing to work well with all clients,!58289New NVSI calibration,!58286New NVSI calibration,!58106Update NVSI example algorithm,!57937Draft: New nighlty test for trigger with a Run 4 single muon RDO,!57841Edits to ZDC signal processing in preparation for analysis of data from LHCf run,!57590Fixing LAr DT dumper,!57584Draft: LAr DB fixes,!57316ATR-26311 and ATR-25754 moving one dimuon and few egamma chains from dev to phys or MC,!57090ATLASRECTS-7305: fixes for large cluster building,!56828Draft: [trigEGam] Integration beteween mongroups and TrigEgammaMonitoring,!56523Draft: Proposal for CA-Based AODFix,!56301JetCalibTools: Fix infinite loop in smearing correction,!56154tauRecTools: fix conditional decoration in TauIDVarCalculator,!55609Add Athena TEvent-based file access
This commit is part of merge request !56828. Comments created here will be created in the context of that merge request.
...@@ -432,13 +432,14 @@ StatusCode JetSmearingCorrection::calibrate(xAOD::Jet& jet, JetEventInfo&) const ...@@ -432,13 +432,14 @@ StatusCode JetSmearingCorrection::calibrate(xAOD::Jet& jet, JetEventInfo&) const
unsigned long seed = static_cast<unsigned long>(1.e5*fabs(jet.phi())); unsigned long seed = static_cast<unsigned long>(1.e5*fabs(jet.phi()));
// SetSeed(0) uses the clock, so avoid this // SetSeed(0) uses the clock, so avoid this
if(seed == 0) seed = 45583453; // arbitrary number which the seed couldn't otherwise be if(seed == 0) seed = 45583453; // arbitrary number which the seed couldn't otherwise be
TRandom3* rng = getTLSRandomGen(seed);
// Get the Gaussian-distributed random number // Get the Gaussian-distributed random number
// Force this to be a positive value // Force this to be a positive value
// Negative values should be extraordinarily rare, but they do exist // Negative values should be extraordinarily rare, but they do exist
double smearingFactor = -1; double smearingFactor = -1;
while (smearingFactor < 0) while (smearingFactor < 0)
smearingFactor = getTLSRandomGen(seed)->Gaus(1.,sigmaSmear); smearingFactor = rng->Gaus(1.,sigmaSmear);
// Apply the smearing factor to the jet as appropriate // Apply the smearing factor to the jet as appropriate
xAOD::JetFourMom_t calibP4 = jet.jetP4(); xAOD::JetFourMom_t calibP4 = jet.jetP4();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment