an algorithm to merge truth jet collections in the overlay store
More...
#include <MergeTruthJetsTool.h>
|
ServiceHandle< PileUpMergeSvc > | m_pMergeSvc {this, "PileUpMergeSvc", "PileUpMergeSvc", ""} |
|
Gaudi::Property< std::string > | m_inputJetCollKey {this, "InputTruthJetCollKey", "AntiKt4TruthJets", ""} |
|
Gaudi::Property< std::string > | m_inTimeOutputJetCollKey {this, "InTimeOutputTruthJetCollKey", "InTimeAntiKt4TruthJets", ""} |
|
Gaudi::Property< std::string > | m_outOfTimeOutputJetCollKey {this, "OutOfTimeTruthJetCollKey", "OutOfTimeAntiKt4TruthJets", ""} |
|
Gaudi::Property< double > | m_inTimePtCut {this, "InTimePtCut", 10.0*Gaudi::Units::GeV, ""} |
|
Gaudi::Property< double > | m_outOfTimePtCut {this, "OutOfTimePtCut", 15.0*Gaudi::Units::GeV, ""} |
|
Gaudi::Property< bool > | m_activateFilter {this, "ActivateFilter", false, ""} |
|
Gaudi::Property< bool > | m_includeSignalJets {this, "IncludeSignalJets", false, ""} |
|
std::unique_ptr< xAOD::JetContainer > | m_inTimeOutputJetContainer {} |
|
std::unique_ptr< xAOD::JetAuxContainer > | m_inTimeOutputJetAuxContainer {} |
|
std::unique_ptr< xAOD::JetContainer > | m_outOfTimeOutputJetContainer {} |
|
std::unique_ptr< xAOD::JetAuxContainer > | m_outOfTimeOutputJetAuxContainer {} |
|
bool | m_first_event {true} |
|
double | m_signal_max_pT {-1.0} |
|
double | m_pileup_max_pT {-1.0} |
|
an algorithm to merge truth jet collections in the overlay store
Definition at line 24 of file MergeTruthJetsTool.h.
◆ MergeTruthJetsTool()
MergeTruthJetsTool::MergeTruthJetsTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ filterPassed()
virtual bool PileUpToolBase::filterPassed |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ initialize()
StatusCode MergeTruthJetsTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
◆ mergeEvent()
StatusCode MergeTruthJetsTool::mergeEvent |
( |
const EventContext & |
ctx | ) |
|
|
finaloverridevirtual |
called at the end of the subevts loop.
Not (necessarily) able to access SubEvents
Definition at line 94 of file MergeTruthJetsTool.cxx.
102 <<
". Therefore filtering this hard-scatter event." );
113 ATH_CHECK( evtStore()->record( std::move(
117 return StatusCode::SUCCESS;
◆ prepareEvent()
StatusCode MergeTruthJetsTool::prepareEvent |
( |
const EventContext & |
ctx, |
|
|
unsigned int |
nInputEvents |
|
) |
| |
|
finaloverridevirtual |
called before the subevts loop.
Not (necessarily) able to access SubEvents
Definition at line 25 of file MergeTruthJetsTool.cxx.
28 ATH_MSG_DEBUG (
"prepareEvent: there are " << nInputEvents <<
" subevents in this event." );
39 return StatusCode::SUCCESS;
◆ processAllSubEvents() [1/2]
StatusCode MergeTruthJetsTool::processAllSubEvents |
( |
const EventContext & |
ctx | ) |
|
|
finaloverridevirtual |
Merge the Truth JetContainers using the PileUpMergeSvc.
Reimplemented from PileUpToolBase.
Definition at line 120 of file MergeTruthJetsTool.cxx.
135 TruthJetList truthList;
137 if (!truthList.empty()) {
139 TruthJetList::const_iterator jetColl_iter(truthList.begin());
140 const TruthJetList::const_iterator endOfJetColls(truthList.end());
141 while (jetColl_iter!=endOfJetColls) {
144 if (
static_cast<int>((jetColl_iter)->
first.time())==0) {
152 ATH_MSG_VERBOSE (
"Don't include signal events in output Truth Jet Containers.");
159 ATH_MSG_VERBOSE (
"highest jet pT in the current background event = " << pileup_this_pT);
164 const float timeOfBCID(
static_cast<float>((jetColl_iter)->
first.time()));
175 ATH_MSG_DEBUG (
"processAllSubEvents: TruthJetList is empty" );
179 ATH_MSG_ERROR (
"processAllSubEvents: Can not find TruthJetList" );
185 <<
". Therefore filtering this hard-scatter event." );
195 ATH_CHECK( evtStore()->record( std::move(
199 return StatusCode::SUCCESS;
◆ processAllSubEvents() [2/2]
virtual StatusCode IPileUpTool::processAllSubEvents |
|
inherited |
dummy implementation to allow compilation while all Digitization packages are migrated to use this new interface.
◆ processBunchXing()
called for each active bunch-crossing to process current SubEvents bunchXing is in ns
Reimplemented from PileUpToolBase.
Definition at line 42 of file MergeTruthJetsTool.cxx.
48 while (iEvt != eSubEvents) {
51 bunchXing, iEvt).isSuccess()) {
53 if ( !inputJetContainer ) {
55 return StatusCode::FAILURE;
57 ATH_MSG_DEBUG (
"processBunchXing: bunch Crossing = " << bunchXing <<
" JetContainer size = " << inputJetContainer->size());
67 ATH_MSG_VERBOSE (
"Don't include signal events in output Truth Jet Containers.");
74 ATH_MSG_VERBOSE (
"highest jet pT in the current background event = " << pileup_this_pT);
79 const float timeOfBCID(
static_cast<float>(iEvt->time()));
84 ATH_MSG_DEBUG (
"processBunchXing: No JetContainers found." );
91 return StatusCode::SUCCESS;
◆ processJetContainer()
JetContainer Loop.
Definition at line 203 of file MergeTruthJetsTool.cxx.
208 for (
const xAOD::Jet *origTruthJet : *inputJetContainer) {
210 if (!origTruthJet || origTruthJet->pt()<ptCut) {
211 ATH_MSG_VERBOSE(
"processJetContainer: Jet with pT = " << origTruthJet->pt() <<
" GeV failed ptCut of " << ptCut <<
"GeV." );
214 if (max_pT<origTruthJet->
pt()) max_pT=origTruthJet->pt();
215 ATH_MSG_VERBOSE(
"processJetContainer: Jet with pT = " << origTruthJet->pt() <<
" GeV passed ptCut of " << ptCut <<
"GeV." );
218 ATH_MSG_ERROR (
"Failed to find Truth jet pT for Jet in a BCID at time = " << timeOfBCID );
220 if (!outputJetContainer)
continue;
222 outputJetContainer->
push_back(outputTruthJet);
223 *outputTruthJet = *origTruthJet;
224 if (timingAccessor.isAvailable(*origTruthJet)) {
225 timingAccessor(*outputTruthJet) = timeOfBCID + timingAccessor(*origTruthJet);
227 timingAccessor(*outputTruthJet) = timeOfBCID;
230 eventNumberAccessor(*outputTruthJet) =
eventNumber;
◆ resetFilter()
virtual void MergeTruthJetsTool::resetFilter |
( |
| ) |
|
|
inlinefinaloverridevirtual |
◆ toProcess()
virtual bool PileUpToolBase::toProcess |
( |
int |
bunchXing | ) |
const |
|
inlineoverridevirtualinherited |
◆ m_activateFilter
Gaudi::Property<bool> MergeTruthJetsTool::m_activateFilter {this, "ActivateFilter", false, ""} |
|
private |
◆ m_filterPassed
bool PileUpToolBase::m_filterPassed {true} |
|
protectedinherited |
◆ m_first_event
bool MergeTruthJetsTool::m_first_event {true} |
|
private |
◆ m_firstXing
Gaudi::Property<int> PileUpToolBase::m_firstXing |
|
protectedinherited |
Initial value:{this, "FirstXing", -999,
"First bunch-crossing in which det is live"}
Definition at line 54 of file PileUpToolBase.h.
◆ m_includeSignalJets
Gaudi::Property<bool> MergeTruthJetsTool::m_includeSignalJets {this, "IncludeSignalJets", false, ""} |
|
private |
◆ m_inputJetCollKey
Gaudi::Property<std::string> MergeTruthJetsTool::m_inputJetCollKey {this, "InputTruthJetCollKey", "AntiKt4TruthJets", ""} |
|
private |
◆ m_inTimeOutputJetAuxContainer
◆ m_inTimeOutputJetCollKey
Gaudi::Property<std::string> MergeTruthJetsTool::m_inTimeOutputJetCollKey {this, "InTimeOutputTruthJetCollKey", "InTimeAntiKt4TruthJets", ""} |
|
private |
◆ m_inTimeOutputJetContainer
◆ m_inTimePtCut
Gaudi::Property<double> MergeTruthJetsTool::m_inTimePtCut {this, "InTimePtCut", 10.0*Gaudi::Units::GeV, ""} |
|
private |
◆ m_lastXing
Gaudi::Property<int> PileUpToolBase::m_lastXing |
|
protectedinherited |
Initial value:{this, "LastXing", 999,
"Last bunch-crossing in which det is live"}
Definition at line 56 of file PileUpToolBase.h.
◆ m_outOfTimeOutputJetAuxContainer
◆ m_outOfTimeOutputJetCollKey
Gaudi::Property<std::string> MergeTruthJetsTool::m_outOfTimeOutputJetCollKey {this, "OutOfTimeTruthJetCollKey", "OutOfTimeAntiKt4TruthJets", ""} |
|
private |
◆ m_outOfTimeOutputJetContainer
std::unique_ptr< xAOD::JetContainer > MergeTruthJetsTool::m_outOfTimeOutputJetContainer {} |
|
private |
◆ m_outOfTimePtCut
Gaudi::Property<double> MergeTruthJetsTool::m_outOfTimePtCut {this, "OutOfTimePtCut", 15.0*Gaudi::Units::GeV, ""} |
|
private |
◆ m_pileup_max_pT
double MergeTruthJetsTool::m_pileup_max_pT {-1.0} |
|
private |
◆ m_pMergeSvc
◆ m_signal_max_pT
double MergeTruthJetsTool::m_signal_max_pT {-1.0} |
|
private |
◆ m_vetoPileUpTruthLinks
Gaudi::Property<int> PileUpToolBase::m_vetoPileUpTruthLinks |
|
protectedinherited |
Initial value:{this, "VetoPileUpTruthLinks", true,
"Ignore links to suppressed pile-up truth"}
Definition at line 58 of file PileUpToolBase.h.
The documentation for this class was generated from the following files: