|
ATLAS Offline Software
|
#include <PFSubtractionTool.h>
|
ToolHandle< IEFlowCellEOverPTool > | m_theEOverPTool {this, "eflowCellEOverPTool", "eflowCellEOverPTool", "Energy Flow E/P Values and Shower Parameters Tool"} |
| Tool for getting e/p values and hadronic shower cell ordering principle parameters. More...
|
|
std::unique_ptr< eflowEEtaBinnedParameters > | m_binnedParameters |
|
std::unique_ptr< PFMatch::TrackEtaPhiInFixedLayersProvider > | m_trkpos |
| Track position provider to be used to preselect clusters. More...
|
|
ToolHandle< PFTrackClusterMatchingTool > | m_theMatchingTool {this, "PFTrackClusterMatchingTool", "PFTrackClusterMatchingTool/CalObjBldMatchingTool", "The track-cluster matching tool"} |
| Default track-cluster matching tool. More...
|
|
ToolHandle< PFTrackClusterMatchingTool > | m_theMatchingToolForPull_015 {this, "PFTrackClusterMatchingTool_015", "PFTrackClusterMatchingTool/PFPullMatchingTool_015", "The 0.15 track-cluster matching tool to calculate the pull"} |
|
ToolHandle< PFTrackClusterMatchingTool > | m_theMatchingToolForPull_02 {this, "PFTrackClusterMatchingTool_02", "PFTrackClusterMatchingTool/PFPullMatchingTool_02", "The 0.2 track-cluster matching tool to calculate the pull"} |
|
Gaudi::Property< bool > | m_recoverSplitShowers {this,"RecoverSplitShowers",false,"Toggle whether we are recovering split showers or not"} |
| Toggle whether we are recovering split showers or not. More...
|
|
Gaudi::Property< int > | m_nClusterMatchesToUse {this, "nClusterMatchesToUse", 1, "Number of clusters to match to each track"} |
| Number of clusters to match to each track if not doing recover split shower subtraction. More...
|
|
Gaudi::Property< bool > | m_isHLLHC {this, "isHLLHC", false, "Toggle whether we have the HLLHC setup"} |
| Toggle whether we have the HLLHC setup. More...
|
|
Gaudi::Property< bool > | m_calcEOverP {this, "CalcEOverP", false, "Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed"} |
| Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed. More...
|
|
Gaudi::Property< double > | m_consistencySigmaCut {this, "ConsistencySigmaCut", 1.0, "Parameter that controls whether a track, in a track-cluster system, will be processed by the split shower recovery algorithm"} |
| Parameter that controls whether a track, in a track-cluster system, will be processed by the split shower recovery algorithm. More...
|
|
Gaudi::Property< double > | m_subtractionSigmaCut {this, "SubtractionSigmaCut", 1.5, "Parameter that controls whether to use retain remaining calorimeter energy in track-cluster system, after charged shower subtraction"} |
| Parameter that controls whether to use retain remaining calorimeter energy in track-cluster system, after charged shower subtraction. More...
|
|
Gaudi::Property< bool > | m_addCPData {this,"addCPData",false,"Toggle whether to decorate FlowElements with addutional data for Combined Performance studies "} |
| Toggle whether to decorate eflowRecTrack with addutional data for Combined Performance studies. More...
|
|
PFCalcRadialEnergyProfiles | m_pfCalc {} |
|
PFSubtractionStatusSetter | m_pfSubtractionStatusSetter {} |
|
PFSubtractionEnergyRatioCalculator | m_pfSubtractionEnergyRatioCalculator {} |
|
eflowSubtract::Subtractor | m_subtractor {} |
|
ToolHandle< PFEnergyPredictorTool > | m_NNEnergyPredictorTool {this, "NNEnergyPredictorTool", "","Tool for getting predictiing the energy using an ONNX model "} |
| Tool for getting predictiing the energy using an ONNX model. More...
|
|
Gaudi::Property< bool > | m_useNNEnergy {this, "useNNEnergy", false, "Toggle whether we use the neural net energy"} |
| Toggle whether we use the neural net energy. More...
|
|
Gaudi::Property< bool > | m_useTruthMatching {this, "useTrackClusterTruthMatching", false, "Toggle whether to cheat and use truth information for track-cluster matching"} |
| Toggle whether to cheat and use truth information for track-cluster matching - only for performance studies! More...
|
|
Gaudi::Property< bool > | m_useTruthForChargedShowerSubtraction {this, "useTruthForChargedShowerSubtraction", false, "Toggle whether we use truth information for the charged shower subtraction or not"} |
| Toggle whether we use truth information for the charged shower subtraction or not. More...
|
|
Gaudi::Property< bool > | m_useFullCellTruthSubtraction {this,"useFullCellTruthSubtraction",false,"Toggle whether we fully remove a cell with a truth deposit or reweight it based on truth contribution"} |
| Toggle whether we fully remove a cell with a truth deposit or reweight it based on truth contribution. More...
|
|
ToolHandle< PFSimulateTruthShowerTool > | m_theTruthShowerSimulator {this, "PFSimulateTruthShowerTool", "", "The truth shower simulator"} |
|
SG::ReadDecorHandleKey< xAOD::CaloClusterContainer > | m_caloClusterReadDecorHandleKeyNLeadingTruthParticles {this,"CaloClusterReadDecorHandleKey_NLeadingTruthParticles",""} |
| Read handle key to decorate CaloCluster with threeN leading truth particle barcode and energy. More...
|
|
Gaudi::Property< bool > | m_useLegacyEBinIndex {this, "useLegacyEBinIndex", true, "Toggle whether we use the legacy energy bin index"} |
| Further discussion about why this flag exists can be found in https://its.cern.ch/jira/browse/ATLJETMET-1692 and https://indico.cern.ch/event/1388633/contributions/5837876/attachments/2809591/4903439/PFlow_EOverP_Feb2024.pdf The Jira report discusses assorted problems with the treatment of energy bin indexes for the lookup of e/p values. More...
|
|
Definition at line 34 of file PFSubtractionTool.h.
◆ PFSubtractionTool()
PFSubtractionTool::PFSubtractionTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~PFSubtractionTool()
PFSubtractionTool::~PFSubtractionTool |
( |
| ) |
|
|
default |
◆ addSubtractedCells()
Definition at line 592 of file PFSubtractionTool.cxx.
594 unsigned int numTracks = thisEflowCaloObject.
nTracks();
596 for (
unsigned int iTrack = 0; iTrack < numTracks; ++iTrack){
598 for (
auto thisPair : clusterList){
◆ canAnnihilate()
bool PFSubtractionTool::canAnnihilate |
( |
double |
expectedEnergy, |
|
|
double |
sigma, |
|
|
double |
clusterEnergy |
|
) |
| const |
|
private |
◆ execute()
◆ finalize()
StatusCode PFSubtractionTool::finalize |
( |
| ) |
|
◆ initialize()
StatusCode PFSubtractionTool::initialize |
( |
| ) |
|
Definition at line 27 of file PFSubtractionTool.cxx.
37 ATH_MSG_ERROR(
"Failed to get TrackPositionProvider for cluster preselection!");
38 return StatusCode::FAILURE;
60 return StatusCode::SUCCESS;
◆ isEOverPFail()
bool PFSubtractionTool::isEOverPFail |
( |
double |
expectedEnergy, |
|
|
double |
sigma, |
|
|
double |
clusterEnergy |
|
) |
| const |
|
private |
Definition at line 554 of file PFSubtractionTool.cxx.
556 if ((expectedEnergy == 0) && (clusterEnergy > 0))
return false;
◆ matchAndCreateEflowCaloObj()
unsigned int PFSubtractionTool::matchAndCreateEflowCaloObj |
( |
PFData & |
data | ) |
const |
|
private |
This matches ID tracks and CaloClusters, and then creates eflowCaloObjects.
No point to do anything if e/p reference bin does not exist
Add cluster matches needed for pull calculation (in eflowCaloObject::simulateShowers) which is used to determine whether to run the charged shower subtraction or not. / Clusters in both a cone of 0.15 and 0.2 are needed for this. / The clusters in a cone of 0.2 are also used as the matched cluster list for recover split showers mode.
Start loop from nCaloObj, which should be zero on a first pass
Definition at line 97 of file PFSubtractionTool.cxx.
100 unsigned int nMatches(0);
103 const unsigned int nCaloObj =
data.caloObjects->size();
104 const EventContext &ctx = Gaudi::Hive::currentContext();
107 for (
auto *thisEfRecTrack :
data.tracks)
110 if (!thisEfRecTrack->hasBin()) {
111 std::unique_ptr<eflowCaloObject> thisEflowCaloObject = std::make_unique<eflowCaloObject>();
112 thisEflowCaloObject->
addTrack(thisEfRecTrack);
113 data.caloObjects->push_back(std::move(thisEflowCaloObject));
123 std::vector<eflowTrackClusterLink*> bestClusters;
124 std::vector<float> deltaRPrime;
133 TruthLink truthLink = truthLinkAccessor(*(thisEfRecTrack->getTrack()));
136 if (truthLink.
isValid()) trackMatchedTruthParticle = *truthLink;
138 if (trackMatchedTruthParticle){
142 if (!caloClusterReadDecorHandleNLeadingTruthParticles.isValid()){
143 ATH_MSG_WARNING(
"Failed to retrieve CaloCluster decoration with key " << caloClusterReadDecorHandleNLeadingTruthParticles.key());
146 for (
auto * thisCluster :
data.clusters){
151 std::string::size_type
pos = decorHandleName.find(
".");
152 std::string decorName = decorHandleName.substr(
pos+1);
156 std::vector<std::pair<unsigned int, double > > barCodeTruthPairs =
accessor(*(thisCluster->getCluster()));
158 for (
auto &barCodeTruthPair : barCodeTruthPairs){
159 if (barCodeTruthPair.first ==
barcode){
161 bestClusters.push_back(thisLink);
168 else ATH_MSG_WARNING(
"Track with pt, eta and phi " << thisEfRecTrack->getTrack()->pt() <<
", " << thisEfRecTrack->getTrack()->eta() <<
" and " << thisEfRecTrack->getTrack()->phi() <<
" does not have a valid truth pointer");
176 for (
auto &matchpair : bestClusters_02)
179 float distancesq = matchpair.second;
181 if (distancesq < 0.15 * 0.15)
185 thisEfRecTrack->addAlternativeClusterMatch(trackClusterLink,
"cone_015");
187 thisEfRecTrack->addAlternativeClusterMatch(trackClusterLink,
"cone_02");
192 for (
auto thePair : matchedClusters) {
194 if (
m_addCPData) deltaRPrime.push_back(std::sqrt(thePair.second));
198 const std::vector<eflowTrackClusterLink*>* matchedClusters_02 = thisEfRecTrack->getAlternativeClusterMatches(
"cone_02");
199 if (!matchedClusters_02)
continue;
200 else bestClusters = *matchedClusters_02;
203 if (bestClusters.empty())
continue;
207 for (
auto *thisClusterLink : bestClusters ) {
209 ATH_MSG_DEBUG(
"Matched this track to cluster with e,pt, eta and phi " << thisCluster->
e() <<
", " << thisCluster->
pt() <<
", " << thisCluster->
eta() <<
" and " << thisCluster->
phi());
217 for (
auto *trkClusLink : bestClusters){
223 if (
std::find(
data.clusters.begin(),
data.clusters.end(), trkClusLink->getCluster()) ==
data.clusters.end()) {
230 thisEfRecTrack->addClusterMatch(trackClusterLink);
232 thisEfRecTrack->addDeltaRPrime(deltaRPrime[
linkIndex]);
240 std::vector<eflowRecCluster *>
clusters(
data.clusters.begin(),
data.clusters.end());
243 ATH_MSG_DEBUG(
"Created " << nCaloObjects <<
" eflowCaloObjects.");
245 for (
auto thisEFlowCaloObject : *(
data.caloObjects)){
246 ATH_MSG_DEBUG(
"This eflowCaloObject has " << thisEFlowCaloObject->nTracks() <<
" tracks and " << thisEFlowCaloObject->nClusters() <<
" clusters ");
247 for (
unsigned int count = 0;
count < thisEFlowCaloObject->nTracks();
count++){
249 ATH_MSG_DEBUG(
"Have track with e, pt, eta and phi of " << thisTrack->
e() <<
", " << thisTrack->
pt() <<
", " << thisTrack->
eta() <<
" and " << thisTrack->
phi());
251 for (
unsigned int count = 0;
count < thisEFlowCaloObject->nClusters();
count++){
253 ATH_MSG_DEBUG(
"Have cluster with e, pt, eta and phi of " << thisCluster->
e() <<
", " << thisCluster->
pt() <<
", " << thisCluster->
eta() <<
" and " << thisCluster->
phi());
258 const double gaussianRadius = 0.032;
259 const double gaussianRadiusError = 1.0e-3;
260 const double maximumRadiusSigma = 3.0;
268 for (
unsigned int iCalo = nCaloObj; iCalo <
data.caloObjects->size(); ++iCalo) {
276 else return nCaloObj;
◆ performSubtraction() [1/2]
void PFSubtractionTool::performSubtraction |
( |
const unsigned int & |
startingPoint, |
|
|
PFData & |
data |
|
) |
| const |
|
private |
Definition at line 279 of file PFSubtractionTool.cxx.
280 unsigned int nEFCaloObs =
data.caloObjects->size();
281 for (
unsigned int iCalo = startingPoint; iCalo < nEFCaloObs; ++iCalo) {
◆ performSubtraction() [2/2]
void PFSubtractionTool::performSubtraction |
( |
eflowCaloObject & |
thisEflowCaloObject | ) |
const |
|
private |
Definition at line 287 of file PFSubtractionTool.cxx.
291 unsigned int nClusters = thisEflowCaloObject.
nClusters();
292 unsigned int nTrackMatches = thisEflowCaloObject.
nTracks();
294 ATH_MSG_DEBUG(
"Have got an eflowCaloObject with " << nClusters <<
" clusters and " << nTrackMatches <<
" track matches");
297 for (
unsigned int iTrack = 0; iTrack < nTrackMatches; ++iTrack){
307 if (nTrackMatches < 1)
return;
315 if (
isEOverPFail(expectedEnergy, expectedSigma, clusterEnergy))
return;
318 const std::vector<std::pair<eflowTrackClusterLink *, std::pair<float, float>>> &matchedTrackList = thisEflowCaloObject.
efRecLink();
320 ATH_MSG_DEBUG(
"Matched Track List has size " << matchedTrackList.size());
324 for (
unsigned int iTrack = 0; iTrack < nTrackMatches; ++iTrack)
327 ATH_MSG_DEBUG(
"eflowCaloObject has track match with E, pt and eta " << thisTrack->
e() <<
", " << thisTrack->
pt() <<
" and " << thisTrack->
eta());
331 ATH_MSG_DEBUG(
"About to perform subtraction for this eflowCaloObject");
333 bool wasAnnihilated =
false;
338 if (
canAnnihilate(expectedEnergy, expectedSigma, clusterEnergy)){
340 wasAnnihilated =
true;
342 std::vector<std::pair<xAOD::CaloCluster *, bool>> clusterList;
343 std::map<xAOD::CaloCluster *, double> clusterEnergyMap;
344 unsigned nCluster = thisEflowCaloObject.
nClusters();
345 for (
unsigned iCluster = 0; iCluster < nCluster; ++iCluster){
349 ATH_MSG_DEBUG(
"We are going to annihilate. ExpectedEnergy, expectedSigma and clusterEnergy are " << expectedEnergy <<
", " << expectedSigma <<
" and " << clusterEnergy);
351 for (
auto thisPair : clusterList)
352 ATH_MSG_DEBUG(
"Annihilating cluster with E and eta " << thisPair.first->e() <<
" and " << thisPair.first->eta());
359 Subtractor::annihilateClusters(clusterList);
362 for (
auto thisPair : clusterList)
363 ATH_MSG_DEBUG(
"Have Annihilated cluster with E and eta " << thisPair.first->e() <<
" and " << thisPair.first->eta());
366 for (
unsigned iTrack = 0; iTrack < thisEflowCaloObject.
nTracks(); ++iTrack){
367 eflowRecTrack *thisEfRecTrack = (matchedTrackList[iTrack].first)->getTrack();
375 for (
unsigned iTrack = 0; iTrack < thisEflowCaloObject.
nTracks(); ++iTrack){
382 if (!thisEfRecTrack->
hasBin())
continue;
388 ATH_MSG_DEBUG(
"Am not in dense environment for this eflowCaloObject");
391 std::vector<eflowRecCluster *> matchedClusters;
393 matchedClusters.reserve(
links.size());
394 for (
auto* thisEFlowTrackClusterLink :
links)
395 matchedClusters.push_back(thisEFlowTrackClusterLink->getCluster());
398 matchedClusters.end(),
402 for (
auto* thisClus : matchedClusters)
404 "Haved matched cluster "
405 << thisClus->getCluster()->index() <<
" with e,pt, eta and phi of "
406 << thisClus->getCluster()->e() <<
", "
407 << thisClus->getCluster()->pt() <<
", "
408 << thisClus->getCluster()->eta() <<
" and "
409 << thisClus->getCluster()->phi() <<
" will be subtracted");
413 std::vector<std::pair<xAOD::CaloCluster *, bool>> clusterSubtractionList;
414 clusterSubtractionList.reserve(matchedClusters.size());
415 std::map<xAOD::CaloCluster *, double> clusterEnergyMap;
416 for (
auto *thisEFlowRecCluster : matchedClusters){
418 clusterSubtractionList.emplace_back(thisCluster,
false);
419 clusterEnergyMap[thisCluster] = thisCluster->
e();
422 ATH_MSG_DEBUG(
"Have filled clusterSubtractionList for this eflowCaloObject");
424 unsigned int trackIndex = thisEfRecTrack->
getTrack()->
index();
427 auto sumClusEnergy = [](
double accumulator, std::pair<xAOD::CaloCluster *, bool> thisPair){
return accumulator += thisPair.first->e();};
428 double totalClusterEnergy =
std::accumulate(clusterSubtractionList.begin(),clusterSubtractionList.end(),0.0,sumClusEnergy);
434 for (
auto thisPair : clusterSubtractionList)
435 ATH_MSG_DEBUG(
"Annihilating cluster with E and eta " << thisPair.first->e() <<
" and " << thisPair.first->eta());
440 Subtractor::annihilateClusters(clusterSubtractionList);
443 std::vector<std::pair<float, float>> clusterSubtractedEnergyRatios;
454 totalClusterEnergy =
std::accumulate(clusterSubtractionList.begin(),clusterSubtractionList.end(),0.0,sumClusEnergy);
460 for (
auto thisPair : clusterSubtractionList){
461 ATH_MSG_DEBUG(
"Annihilating remnant cluster with E and eta " << thisPair.first->e() <<
" and " << thisPair.first->eta());
465 std::vector<std::pair<float, float>> clusterSubtractedEnergyRatios;
471 std::vector<std::pair<float, float>> clusterSubtractedEnergyRatios;
478 ATH_MSG_DEBUG(
"Have subtracted charged shower for this eflowRecTrack");
◆ performTruthSubtraction() [1/2]
void PFSubtractionTool::performTruthSubtraction |
( |
eflowCaloObject & |
thisEflowCaloObject | ) |
const |
|
private |
Definition at line 501 of file PFSubtractionTool.cxx.
503 for (
unsigned iTrack = 0; iTrack < thisEflowCaloObject.
nTracks(); ++iTrack){
508 if (!thisEfRecTrack->
hasBin())
continue;
518 for (
auto thisLink :
links){
529 for (; theCell != lastCell; theCell++){
533 double oldCellEnergy = theCell->
energy()*(theCell.
weight());
534 double subtractedCellWeight = (oldCellEnergy - truthEnergy)/oldCellEnergy;
540 float oldEnergy = thisCluster->
e();
542 if (0.0 != oldEnergy) {
543 float energyAdjustment = thisCluster->
e() / oldEnergy;
544 thisCluster->
setRawE(thisCluster->
rawE() * energyAdjustment);
◆ performTruthSubtraction() [2/2]
void PFSubtractionTool::performTruthSubtraction |
( |
PFData & |
data | ) |
const |
|
private |
Definition at line 488 of file PFSubtractionTool.cxx.
492 unsigned int nEFCaloObs =
data.caloObjects->size();
494 for (
unsigned int iCalo = 0; iCalo < nEFCaloObs; ++iCalo) {
◆ printAllClusters()
Definition at line 577 of file PFSubtractionTool.cxx.
579 for (
const auto *thisEFRecCluster : recClusterContainer){
580 if (thisEFRecCluster->getTrackMatches().empty()) {
584 std::vector<eflowTrackClusterLink*> theTrackLinks = thisEFRecCluster->getTrackMatches();
585 for (
auto *thisTrack : theTrackLinks){
◆ printCluster()
◆ printTrack()
◆ m_addCPData
Gaudi::Property<bool> PFSubtractionTool::m_addCPData {this,"addCPData",false,"Toggle whether to decorate FlowElements with addutional data for Combined Performance studies "} |
|
private |
◆ m_binnedParameters
◆ m_calcEOverP
Gaudi::Property<bool> PFSubtractionTool::m_calcEOverP {this, "CalcEOverP", false, "Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed"} |
|
private |
Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed.
Definition at line 90 of file PFSubtractionTool.h.
◆ m_caloClusterReadDecorHandleKeyNLeadingTruthParticles
◆ m_consistencySigmaCut
Gaudi::Property<double> PFSubtractionTool::m_consistencySigmaCut {this, "ConsistencySigmaCut", 1.0, "Parameter that controls whether a track, in a track-cluster system, will be processed by the split shower recovery algorithm"} |
|
private |
Parameter that controls whether a track, in a track-cluster system, will be processed by the split shower recovery algorithm.
Definition at line 93 of file PFSubtractionTool.h.
◆ m_isHLLHC
Gaudi::Property<bool> PFSubtractionTool::m_isHLLHC {this, "isHLLHC", false, "Toggle whether we have the HLLHC setup"} |
|
private |
◆ m_nClusterMatchesToUse
Gaudi::Property<int> PFSubtractionTool::m_nClusterMatchesToUse {this, "nClusterMatchesToUse", 1, "Number of clusters to match to each track"} |
|
private |
Number of clusters to match to each track if not doing recover split shower subtraction.
Definition at line 84 of file PFSubtractionTool.h.
◆ m_NNEnergyPredictorTool
ToolHandle<PFEnergyPredictorTool> PFSubtractionTool::m_NNEnergyPredictorTool {this, "NNEnergyPredictorTool", "","Tool for getting predictiing the energy using an ONNX model "} |
|
private |
◆ m_pfCalc
◆ m_pfSubtractionEnergyRatioCalculator
◆ m_pfSubtractionStatusSetter
◆ m_recoverSplitShowers
Gaudi::Property<bool> PFSubtractionTool::m_recoverSplitShowers {this,"RecoverSplitShowers",false,"Toggle whether we are recovering split showers or not"} |
|
private |
Toggle whether we are recovering split showers or not.
Definition at line 81 of file PFSubtractionTool.h.
◆ m_subtractionSigmaCut
Gaudi::Property<double> PFSubtractionTool::m_subtractionSigmaCut {this, "SubtractionSigmaCut", 1.5, "Parameter that controls whether to use retain remaining calorimeter energy in track-cluster system, after charged shower subtraction"} |
|
private |
Parameter that controls whether to use retain remaining calorimeter energy in track-cluster system, after charged shower subtraction.
Definition at line 96 of file PFSubtractionTool.h.
◆ m_subtractor
◆ m_theEOverPTool
ToolHandle<IEFlowCellEOverPTool> PFSubtractionTool::m_theEOverPTool {this, "eflowCellEOverPTool", "eflowCellEOverPTool", "Energy Flow E/P Values and Shower Parameters Tool"} |
|
private |
Tool for getting e/p values and hadronic shower cell ordering principle parameters.
Definition at line 66 of file PFSubtractionTool.h.
◆ m_theMatchingTool
◆ m_theMatchingToolForPull_015
◆ m_theMatchingToolForPull_02
◆ m_theTruthShowerSimulator
ToolHandle<PFSimulateTruthShowerTool> PFSubtractionTool::m_theTruthShowerSimulator {this, "PFSimulateTruthShowerTool", "", "The truth shower simulator"} |
|
private |
◆ m_trkpos
◆ m_useFullCellTruthSubtraction
Gaudi::Property<bool> PFSubtractionTool::m_useFullCellTruthSubtraction {this,"useFullCellTruthSubtraction",false,"Toggle whether we fully remove a cell with a truth deposit or reweight it based on truth contribution"} |
|
private |
Toggle whether we fully remove a cell with a truth deposit or reweight it based on truth contribution.
Definition at line 121 of file PFSubtractionTool.h.
◆ m_useLegacyEBinIndex
Gaudi::Property<bool> PFSubtractionTool::m_useLegacyEBinIndex {this, "useLegacyEBinIndex", true, "Toggle whether we use the legacy energy bin index"} |
|
private |
◆ m_useNNEnergy
Gaudi::Property<bool> PFSubtractionTool::m_useNNEnergy {this, "useNNEnergy", false, "Toggle whether we use the neural net energy"} |
|
private |
◆ m_useTruthForChargedShowerSubtraction
Gaudi::Property<bool> PFSubtractionTool::m_useTruthForChargedShowerSubtraction {this, "useTruthForChargedShowerSubtraction", false, "Toggle whether we use truth information for the charged shower subtraction or not"} |
|
private |
Toggle whether we use truth information for the charged shower subtraction or not.
Definition at line 118 of file PFSubtractionTool.h.
◆ m_useTruthMatching
Gaudi::Property<bool> PFSubtractionTool::m_useTruthMatching {this, "useTrackClusterTruthMatching", false, "Toggle whether to cheat and use truth information for track-cluster matching"} |
|
private |
Toggle whether to cheat and use truth information for track-cluster matching - only for performance studies!
Definition at line 115 of file PFSubtractionTool.h.
The documentation for this class was generated from the following files:
This class extends the information about a xAOD::CaloCluster.
virtual double phi() const
The azimuthal angle ( ) of the particle.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
unsigned nClusters() const
char data[hepevt_bytes_allocation_ATLAS]
double getExpectedEnergy() const
This class calculates the LHED (Layer of Highest Energy Density) in a cluster or group of clusters.
const std::vector< std::pair< eflowTrackClusterLink *, std::pair< float, float > > > & efRecLink() const
std::string find(const std::string &s)
return a remapped string
Helper class to provide type-safe access to aux data.
bool isInDenseEnvironment() const
static void fillClustersToRecover(PFData &data)
void addTrackMatch(eflowTrackClusterLink *trackMatch)
void calculateSubtractedEnergyRatios(const std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusterSubtractionList, std::map< xAOD::CaloCluster *, double > &clusterEnergyMap, std::vector< std::pair< float, float >> &clusterSubtractedEnergyRatios) const
For each xAOD::CaloCluster in clusterSubtractionList we calculate the ratio of new to old energy afte...
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
void markAllTracksAnnihStatus(eflowCaloObject &thisEflowCaloObject) const
Set the ratio of new to old cluster energy, to zero, for all cluster matched to all tracks attached t...
double getCellTruthEnergy(const CaloCell *cell) const
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
weight_t weight() const
Accessor for weight associated to this cell.
const_iterator begin() const
const begin method
unsigned index() const
Accessor for the index of the cell in the CaloCellContainer.
An internal EDM object which stores information about systems of associated tracks and calorimeter cl...
void subtractTracksFromClusters(eflowRecTrack *efRecTrack, std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusterSubtractionList, const bool &addCPData) const
Stores pointers to an eflowRecTrack and an eflowRecCluster.
bool isValid() const
Test to see if the link can be dereferenced.
static std::unique_ptr< IPositionProvider > Get(const std::string &positionType)
double energy() const
get energy (data member)
void addSubtractedCaloCell(ElementLink< CaloCellContainer > theCellLink, const double &weight)
double getExpectedVariance() const
void addTrack(eflowRecTrack *track)
This class extends the information about a xAOD::Track.
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
const std::vector< eflowTrackClusterLink * > & getClusterMatches() const
Description of a calorimeter cluster.
const eflowRecTrack * efRecTrack(int i) const
void setRawE(flt_t)
Set Energy for signal state UNCALIBRATED.
bool removeCell(const CaloCell *ptr)
Method to remove a cell to the cluster (slow!) (Beware: Kinematics not updated!)
Handle class for reading a decoration on an object.
virtual double eta() const
The pseudorapidity ( ) of the particle.
bool isSubtracted() const
Class describing a truth particle in the MC record.
void calculate(const PFData &data) const
void markSubtractionStatus(const std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusterList, std::vector< std::pair< float, float >> &clusterSubtractedEnergyRatios, eflowCaloObject &thisEflowCaloObject, unsigned int trackIndex) const
Set the ratio of new to old cluster energy for each cluster matched to a track with trackIndex.
void calculateSubtractedEnergyRatiosForAnnih(const std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusterSubtractionList, std::map< xAOD::CaloCluster *, double > &clusterEnergyMap, std::vector< std::pair< float, float >> &clusterSubtractedEnergyRatios) const
If we have decided to annihiliate all clusters in clusterSubtractionList we use this function to set ...
double getEExpect() const
MsgStream & msg() const
The standard message stream.
void setRawEta(flt_t)
Set for signal state UNCALIBRATED.
xAOD::CaloCluster * getCluster()
size_t index() const
Return the index of this element within its container.
int barcode() const
Barcode.
eflowCellSubtractionFacilitator m_facilitator
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
static eflowTrackClusterLink * getInstance(eflowRecTrack *track, eflowRecCluster *cluster, const EventContext &ctx=Gaudi::Hive::currentContext())
virtual double pt() const
The transverse momentum ( ) of the particle (negative for negative-energy clusters)
const xAOD::TrackParticle * getTrack() const
static unsigned int makeTrkCluCaloObjects(eflowRecTrackContainer *eflowTrackContainer, eflowRecClusterContainer *eflowClusterContainer, eflowCaloObjectContainer *caloObjectContainer)
static void fillClustersToConsider(PFData &data, eflowRecClusterContainer &recClusterContainer)
virtual double e() const override final
The total energy of the particle.
const_iterator end() const
const end method
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
static void fillTracksToConsider(PFData &data, eflowRecTrackContainer &recTrackContainer)
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
const eflowRecCluster * efRecCluster(int i) const
double getVarEExpect() const
CaloClusterCellLink * getOwnCellLinks()
Get a pointer to the owned CaloClusterCellLink object (non-const version)
static void calculateKine(xAOD::CaloCluster *clu, const bool useweight=true, const bool updateLayers=true, const bool useGPUCriteria=false)
Helper class to calculate cluster kinematics based on cells.
double getClusterEnergy() const
@ linkIndex
link index for multiple track and vertex matches
Class describing a TrackParticle.
static void fillTracksToRecover(PFData &data)
void reweight(const weight_t newWeight)
Update the weight.
const_iterator to loop over cells belonging to a cluster
virtual double e() const
The total energy of the particle.
void simulateShower(eflowLayerIntegrator *integrator, const eflowEEtaBinnedParameters *binnedParameters, const PFEnergyPredictorTool *energyP, bool useLegacyEnergyBinIndexing)
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
void setRawPhi(flt_t)
Set for signal state UNCALIBRATED.
static void annihilateClusters(std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusters)