Loading [MathJax]/jax/input/TeX/config.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
36 AsgElectronLikelihoodTool::AsgElectronLikelihoodTool(
const std::string& myname)
39 , m_rootTool{
nullptr }
48 declareProperty(
"WorkingPoint", m_WorkingPoint =
"",
"The Working Point");
49 declareProperty(
"ConfigFile", m_configFile =
"",
"The config file to use");
52 declareProperty(
"inputPDFFileName",
54 "The input ROOT file name that holds the PDFs");
58 "usePVContainer", m_usePVCont =
true,
"Whether to use the PV container");
60 "nPVdefault", m_nPVdefault = 0,
"The default number of PVs if not counted");
61 declareProperty(
"useCaloSumsContainer",
62 m_useCaloSumsCont =
true,
63 "Whether to use the CaloSums container");
65 "fcalEtDefault", m_fcalEtDefault = 0,
"The default FCal sum ET");
66 declareProperty(
"skipDeltaPoverP",
67 m_skipDeltaPoverP =
false,
68 "If true, it wil skip the check of deltaPoverP");
69 declareProperty(
"useAverageMu",
71 "Whether to use average mu instead of NPV." );
82 std::string
configFile, PDFfilename, resolvedPDF;
93 return StatusCode::FAILURE;
99 return StatusCode::FAILURE;
111 if (!
env.Defined(
"inputPDFFileName")) {
113 "since none is specified in the config "
116 PDFfilename =
env.GetValue(
118 "ElectronPhotonSelectorTools/v1/ElectronLikelihoodPdfs.root");
119 if (PDFfilename.empty()) {
121 return StatusCode::FAILURE;
124 PDFfilename.insert(0,
"dev/");
129 if (!resolvedPDF.empty()) {
133 << PDFfilename <<
", config file = " <<
configFile);
134 return StatusCode::FAILURE;
168 env.GetValue(
"doRemoveF3AtHighEt",
false);
171 env.GetValue(
"doRemoveTRTPIDAtHighEt",
false);
174 env.GetValue(
"doSmoothBinInterpolation",
false);
178 env.GetValue(
"useOneExtraHighETLHBin",
false);
189 env.GetValue(
"doCentralityTransform",
false);
209 env.GetValue(
"DiscMaxForPileupTransform", 2.0);
211 env.GetValue(
"PileupMaxForPileupTransform", 50);
217 ATH_MSG_ERROR(
"Cannot use centrality transform and average mu "
218 <<
"at the same time as they affect the same variable");
219 return StatusCode::FAILURE;
223 return StatusCode::FAILURE;
244 ATH_MSG_ERROR(
"Could not initialize the TElectronLikelihoodTool! "
245 "Configuration details: "
248 <<
"\", resolved file = \"" << configFile
249 <<
"\", PDF file = \"" << PDFfilename
250 <<
"\", resolved file = \"" << resolvedPDF);
251 return StatusCode::FAILURE;
253 return StatusCode::SUCCESS;
276 ATH_MSG_ERROR(
"exiting because cluster is NULL " << cluster);
282 ATH_MSG_ERROR(
"Failed, cluster is missing samplings EMB2 and EME2");
286 const double energy = cluster->e();
287 const float eta = (cluster->etaBE(2));
291 "Failed, this is a forward electron! The AsgElectronLikelihoodTool is "
292 "only suitable for central electrons!");
298 et = (cosh(
el->trackParticle()->eta()) != 0.)
299 ?
energy / cosh(
el->trackParticle()->eta())
305 uint8_t nSiHitsPlusDeadSensors(0);
316 bool allFound =
true;
317 std::string notFoundList =
"";
322 notFoundList +=
"wtots1 ";
329 ambiguityBit = ambiguityTypeAcc(*
el);
332 notFoundList +=
"ambiguityType ";
340 nSiHitsPlusDeadSensors =
354 notFoundList +=
"deltaEta1 ";
359 "deltaEta1PearDistortion");
360 if (
acc.isAvailable(*
el)) {
364 notFoundList +=
"deltaEta1PearDistortion ";
371 notFoundList +=
"deltaPhiRescaled2 ";
386 "Skipping LH rectangular cuts! The following variables are missing: "
395 nSiHitsPlusDeadSensors,
423 ATH_MSG_ERROR(
"Input is not an electron and not caloOnly is set");
435 ATH_MSG_ERROR(
"Failed, cluster is missing samplings EMB2 and EME2");
439 const double energy = cluster->e();
440 const float eta = (cluster->etaBE(2));
443 "Failed, this is a forward electron! The AsgElectronLikelihoodTool is "
444 "only suitable for central electrons!");
451 uint8_t nSiHitsPlusDeadSensors(0);
468 bool allFound =
true;
469 std::string notFoundList =
"";
474 notFoundList +=
"wtots1 ";
479 "Skipping LH rectangular cuts! The following variables are missing: "
488 nSiHitsPlusDeadSensors,
517 ATH_MSG_ERROR(
"Failed, cluster is missing samplings EMB2 and EME2");
521 const double energy = cluster->e();
522 const float eta = cluster->etaBE(2);
526 "Failed, this is a forward electron! The AsgElectronLikelihoodTool is "
527 "only suitable for central electrons!");
533 et = (cosh(
el->trackParticle()->eta()) != 0.)
534 ?
energy / cosh(
el->trackParticle()->eta())
541 float trackqoverp(0.0);
546 double trans_TRT_PID(0.0);
550 bool allFound =
true;
551 std::string notFoundList =
"";
557 trackqoverp =
t->qOverP();
559 float vard0 =
t->definingParametersCovMatrix()(0, 0);
561 d0sigma = sqrtf(vard0);
570 notFoundList +=
"eProbabilityHT ";
574 const double tau = 15.0;
575 const double fEpsilon = 1.0e-30;
576 double pid_tmp = TRT_PID;
578 pid_tmp = 1.0 - 1.0e-15;
579 else if (pid_tmp <= fEpsilon)
581 trans_TRT_PID = -
log(1.0 / pid_tmp - 1.0) * (1. /
double(tau));
588 trans_TRT_PID = trans_TRT_PID_acc(*
el);
594 double refittedTrack_LMqoverp =
599 dpOverp = 1 - trackqoverp / (refittedTrack_LMqoverp);
602 notFoundList +=
"deltaPoverP ";
623 notFoundList +=
"Reta ";
628 notFoundList +=
"Rphi ";
633 notFoundList +=
"Rhad1 ";
638 notFoundList +=
"Rhad ";
643 notFoundList +=
"weta2 ";
648 notFoundList +=
"f1 ";
653 notFoundList +=
"Eratio ";
658 notFoundList +=
"f3 ";
665 notFoundList +=
"deltaEta1 ";
670 "deltaEta1PearDistortion");
671 if (
acc.isAvailable(*
el)) {
675 notFoundList +=
"deltaEta1PearDistortion ";
684 notFoundList +=
"deltaPhiRescaled2 ";
696 "Skipping LH calculation! The following variables are missing: "
738 ATH_MSG_ERROR(
"Input is not an electron and not Calo Only is required");
750 ATH_MSG_ERROR(
"Failed, cluster is missing samplings EMB2 and EME2");
754 const double energy = cluster->e();
755 const float eta = cluster->etaBE(2);
759 "Failed, this is a forward electron! The AsgElectronLikelihoodTool is "
760 "only suitable for central electrons!");
785 bool allFound =
true;
786 std::string notFoundList =
"";
791 notFoundList +=
"Reta ";
796 notFoundList +=
"Rphi ";
801 notFoundList +=
"Rhad1 ";
806 notFoundList +=
"Rhad ";
811 notFoundList +=
"weta2 ";
816 notFoundList +=
"f1 ";
821 notFoundList +=
"Eratio ";
826 notFoundList +=
"f3 ";
834 "Skipping LH calculation! The following variables are missing: "
871 return accept(Gaudi::Hive::currentContext(),
part);
906 if (doCentralityTransform)
923 unsigned int nVtx(0);
927 <<
" container, returning default nVtx");
930 for (
const auto *vxcand : *vtxCont) {
931 if (vxcand->nTrackParticles() >= 2)
947 return eventInfoDecor(0);
959 for (; es_itr != es_end; ++es_itr) {
960 double et = (*es_itr)->et();
961 const std::string
name = SummaryAcc (**es_itr);
970 const float eta)
const
981 "Failed, this is a forward electron! The AsgElectronLikelihoodTool is "
982 "only suitable for central electrons!");
987 if (std::abs(
eta) > 2.5) {
989 <<
eta <<
" seems like a fwd electron");
Extra patterns decribing particle interation process.
Const iterator class for DataVector/DataList.
Electron_v1 Electron
Definition of the current "egamma version".
std::size_t numberOfSiliconHitsAndDeadSensors(const xAOD::TrackParticle &tp)
return the number of Silicon hits plus dead sensors in the track particle
Helper class to provide type-safe access to aux data.
Scalar eta() const
pseudorapidity method
bool isPresent() const
Is the referenced container present in SG?
Helper class to provide constant type-safe access to aux data.
const uint16_t AuthorFwdElectron
Electron reconstructed by the Forward cluster-based algorithm.
@ LastMeasurement
Parameter defined at the position of the last measurement.
setEt setPhi setE277 setWeta2 setEta1 setE2tsts1 wstot
Class providing the definition of the 4-vector interface.
bool passBLayerRequirement(const xAOD::TrackParticle &tp)
return true if effective number of BL hits + outliers is at least one
@ wtots1
shower width is determined in a window detaxdphi = 0,0625 ×~0,2, corresponding typically to 20 strips...
@ f3
fraction of energy reconstructed in 3rd sampling
Description of a calorimeter cluster.
Handle class for reading a decoration on an object.
@ f1
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
::StatusCode StatusCode
StatusCode definition for legacy code.
MsgStream & msg() const
The standard message stream.
@ deltaPhiRescaled2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::vector< int > HelperInt(const std::string &input, TEnv &env)
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
#define ATH_MSG_WARNING(x)
const std::map< std::string, std::string > LHPointToConfFile
@ nPixHitsPlusDeadSensors
@ eProbabilityHT
Electron probability from High Threshold (HT) information [float].
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
@ Eratio
(emaxs1-e2tsts1)/(emaxs1+e2tsts1)
Class describing a TrackParticle.
Helper class to provide constant type-safe access to aux data.
@ deltaEta1
difference between the cluster eta (first sampling) and the eta of the track extrapolated to the firs...
constexpr int pow(int base, int exp) noexcept
std::vector< double > HelperDouble(const std::string &input, TEnv &env)
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
@ weta2
the lateral width is calculated with a window of 3x5 cells using the energy weighted sum over all cel...
std::string findConfigFile(const std::string &input, const std::map< std::string, std::string > &configmap)
std::size_t numberOfPixelHitsAndDeadSensors(const xAOD::TrackParticle &tp)
return the number of Pixel hits plus dead sensors in the track particle