ATLAS Offline Software
ParticleSelectionAlg.cxx
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // ParticleSelectionAlg.cxx
8 // Implementation file for class ParticleSelectionAlg
9 // Author: Karsten Koeneke <karsten.koeneke@cern.ch>
11 
12 // EventUtils includes
13 #include "ParticleSelectionAlg.h"
14 
15 // FrameWork includes
16 #include "Gaudi/Property.h"
18 
19 // EDM includes
22 #include "xAODBase/IParticle.h"
28 #include "xAODMuon/MuonContainer.h"
32 #include "xAODJet/JetContainer.h"
34 #include "xAODPFlow/PFOContainer.h"
51 
53 // Public methods:
55 
56 // Constructors
59  ISvcLocator* pSvcLocator ) :
61  m_selTools(), // makes these tools public
62  m_evtInfoName("EventInfo"),
63  m_inCollKey(""),
64  m_outCollKey(""),
65  m_writeSplitAux(true),
66  m_outOwnPolicyName("VIEW_ELEMENTS"),
67  m_selection(""),
68  m_doCutFlow(false),
69  m_cutBKCName(name),
70  // m_trigDecisionTool("Trig::TrigDecisionTool/TrigDecisionTool"),
71  m_nEventsProcessed(0),
72  m_outOwnPolicy(SG::VIEW_ELEMENTS),
73  m_contType(UNKNOWN),
74  m_cutBKStartIdx(0),
75  m_selToolIdxOffset(),
76  m_idxSelParster(0)
77 {
78  declareProperty("EventInfo", m_evtInfoName, "Input container name");
79  declareProperty("InputContainer", m_inCollKey, "Input container name");
80  declareProperty("OutputContainer", m_outCollKey,
81  "The name of the output container with the deep copy of selected xAOD::IParticles");
82  declareProperty("WriteSplitOutputContainer", m_writeSplitAux,
83  "Decide if we want to write a fully-split AuxContainer such that we can remove any variables");
84  declareProperty("OutputContainerOwnershipPolicy", m_outOwnPolicyName,
85  "Defines the ownership policy of the output container (default: 'OWN_ELEMENTS'; also allowed: 'VIEW_ELEMENTS')");
86 
87  declareProperty("SelectionToolList", m_selTools, "The list of IAsgSelectionTools");
88  declareProperty("Selection", m_selection,
89  "The selection string that defines which xAOD::IParticles to select from the container");
90 
91  declareProperty("DoCutBookkeeping", m_doCutFlow,
92  "If true (deault: false), do the bookkeeping of how many particles passed which selection cuts");
93  declareProperty("CutBookkeeperContainer", m_cutBKCName,
94  "The name of the resulting xAOD::CutBookkeeperContainer");
95 }
96 
97 
98 
99 // Destructor
102 {}
103 
104 
105 
106 // Athena Algorithm's Hooks
109 {
110  ATH_MSG_DEBUG ("Initializing " << name() << "...");
111 
112  // Print out the used configuration
113  ATH_MSG_DEBUG ( " using EventInfo = " << m_evtInfoName );
114  ATH_MSG_DEBUG ( " using InputContainer = " << m_inCollKey );
115  ATH_MSG_DEBUG ( " using OutputContainer = " << m_outCollKey );
116  ATH_MSG_DEBUG ( " using WriteSplitOutputContainer = " << m_writeSplitAux );
117  ATH_MSG_DEBUG ( " using OutputContainerOwnershipPolicy = " << m_outOwnPolicyName );
118  ATH_MSG_DEBUG ( " using SelectionToolList = " << m_selTools );
119  ATH_MSG_DEBUG ( " using Selection = " << m_selection );
120  ATH_MSG_DEBUG ( " using DoCutBookkeeping = " << m_doCutFlow );
121  ATH_MSG_DEBUG ( " using CutBookkeeperContainer = " << m_cutBKCName );
122 
123 
124  // initialize proxy loaders for expression parsing
125  if ( !(m_selection.value().empty()) ){
127  }
128 
129  // initialize the counters
130  m_nEventsProcessed = 0;
131 
132  // Determine the ownership policy of the output container
133  if ( m_outOwnPolicyName.value() == "OWN_ELEMENTS" ) {
135  }
136  else if ( m_outOwnPolicyName.value() == "VIEW_ELEMENTS" ) {
138  }
139  else {
140  ATH_MSG_ERROR("Unrecognized ownership policy for the output container: " << m_outOwnPolicyName );
141  return StatusCode::FAILURE;
142  }
143 
144  // Retrieve all tools
145  ATH_CHECK( m_selTools.retrieve() );
146 
147  ATH_MSG_DEBUG ( "==> done with initialize " << name() << "..." );
148  return StatusCode::SUCCESS;
149 }
150 
151 
152 
154 {
155  ATH_MSG_DEBUG ("Finalizing " << name() << "...");
156 
157  // Release all tools and services
158  ATH_CHECK( m_selTools.release() );
159 
161 
162  return StatusCode::SUCCESS;
163 }
164 
165 
166 
168 {
169  ATH_MSG_DEBUG ("start " << name() << "...");
170 
171  // Nothing to be done here, if cut-flow bookkeeping was not requested
172  if (!m_doCutFlow){ return StatusCode::SUCCESS; }
173 
174  // Get some properties from the input meta data
175  std::string inputStreamName = "Stream";
177  std::vector<std::string> streamNameList;
178  inputMetaStore()->keys(clid, streamNameList);
179  if ( streamNameList.size() >=1 ){ inputStreamName = streamNameList[0]; }
180  // Get the processing cycle number that we need to set for us
181  int maxInputCycle = -1;
182  if ( inputMetaStore()->contains<xAOD::CutBookkeeperContainer>(m_cutBKCName.value()) ){
183  xAOD::CutBookkeeperContainer* inCutBKCont = nullptr;
184  ATH_CHECK( inputMetaStore()->retrieve(inCutBKCont, m_cutBKCName.value() ) );
185  if (inCutBKCont){
186  maxInputCycle = inCutBKCont->maxCycle();
187  }
188  }
189  if (maxInputCycle<0){ maxInputCycle = 0; }
190  else { maxInputCycle += 1; }
191 
192  // Check if we already have a container in the output meta-data store
193  xAOD::CutBookkeeperContainer* cutBKCont = nullptr;
194  if ( outputMetaStore()->contains<xAOD::CutBookkeeperContainer>(m_cutBKCName.value()) ){
195  ATH_CHECK( inputMetaStore()->retrieve(cutBKCont, m_cutBKCName.value() ) );
196  // Set the index where we will start having our CutBookkeepers in this container
197  m_cutBKStartIdx = cutBKCont->size();
198  }
199  else {
200  // Create and register the container that will hold the cut-flow information
201  cutBKCont = new xAOD::CutBookkeeperContainer();
202  // Take care of the peculiarities of the new xAOD EDM, i.e., create the needed AuxStore
204  cutBKCont->setStore( cutBKAuxCont ); //gives it a new associated aux container
205  ATH_CHECK( outputMetaStore()->record( cutBKCont, m_cutBKCName.value() ) );
206  ATH_CHECK( outputMetaStore()->record( cutBKAuxCont, m_cutBKCName.value()+"Aux." ) );
207  ATH_MSG_VERBOSE( "Recorded xAOD::CutBookkeeperContainer " << m_cutBKCName.value() << "Aux." );
208  }
209 
210  //------------- for the AsgSelectionTools --------------
211  // Now, register one CutBookkeeper per cut that will be applied.
212  // For each of the registered tools, get the TAccept and ask it for all known cuts.
213  for ( std::size_t toolIdx=0; toolIdx < m_selTools.size(); ++toolIdx ){
214  const ToolHandle<IAsgSelectionTool>& tool = m_selTools[toolIdx];
215  // Fill the index bookkeeping at what index in the CutBookkeeperContainer
216  // the CutBookkeepers for this tool start.
217  m_selToolIdxOffset.push_back( cutBKCont->size() );
218  // Get some needed quantities
219  const std::string toolName = tool->name();
220  const asg::AcceptInfo& acceptInfo = tool->getAcceptInfo();
221  const unsigned int nCuts = acceptInfo.getNCuts();
222  for ( unsigned int iCut=0; iCut<nCuts; ++iCut ){
223  // Get the name and description of this cut
224  const std::string cutName = acceptInfo.getCutName(iCut);
225  const std::string cutDescr = acceptInfo.getCutDescription(iCut);
226  // Create a new xAOD::CutBookkeeper and add it to the container
228  cutBKCont->push_back(cutBK);
229  // Now, set its properties
230  cutBK->setName(toolName+"_"+cutName);
231  cutBK->setDescription(cutDescr);
232  cutBK->setCutLogic(xAOD::CutBookkeeper::CutLogic::REQUIRE); // Each cut must be passed, thus REQUIRE, i.e, logical AND
233  cutBK->setInputStream(inputStreamName);
234  cutBK->setCycle(maxInputCycle);
235  }
236  }
237 
238  //------------- for the ExpressionParsing in this algorithm --------------
239  if ( !(m_selection.value().empty()) ){
240  // Create a new xAOD::CutBookkeeper and add it to the container
242  cutBKCont->push_back(cutBK);
243  // Now, set its properties
244  cutBK->setName(this->name());
245  cutBK->setDescription(m_selection.value());
246  cutBK->setCutLogic(xAOD::CutBookkeeper::CutLogic::REQUIRE); // Each cut must be passed, thus REQUIRE, i.e, logical AND
247  cutBK->setInputStream(inputStreamName);
248  cutBK->setCycle(maxInputCycle);
249  m_idxSelParster = cutBK->index();
250  }
251 
252  return StatusCode::SUCCESS;
253 }
254 
255 
256 
257 
259 {
260  // Increase the event counter
262  // Simple status message at the beginning of each event execute,
263  ATH_MSG_DEBUG ( "==> execute " << name() << " on " << m_nEventsProcessed << ". event..." );
264 
265 
266  // Figure out what type the input container has, if we didn't do it yet
267  if ( m_contType == UNKNOWN ){
268  if ( evtStore()->contains<xAOD::PhotonContainer>(m_inCollKey.value()) ){ m_contType = PHOTON; }
269  else if ( evtStore()->contains<xAOD::ElectronContainer>(m_inCollKey.value()) ){ m_contType = ELECTRON; }
270  else if ( evtStore()->contains<xAOD::MuonContainer>(m_inCollKey.value()) ){ m_contType = MUON; }
271  else if ( evtStore()->contains<xAOD::TauJetContainer>(m_inCollKey.value()) ){ m_contType = TAU; }
272  else if ( evtStore()->contains<xAOD::JetContainer>(m_inCollKey.value()) ){ m_contType = JET; }
273  else if ( evtStore()->contains<xAOD::TruthParticleContainer>(m_inCollKey.value()) ){ m_contType = TRUTHPARTICLE; }
274  else if ( evtStore()->contains<xAOD::CompositeParticleContainer>(m_inCollKey.value()) ){ m_contType = COMPOSITEPARTICLE; }
275  else if ( evtStore()->contains<xAOD::PFOContainer>(m_inCollKey.value()) ){ m_contType = PARITCLEFLOW; }
276  else if ( evtStore()->contains<xAOD::NeutralParticleContainer>(m_inCollKey.value()) ){ m_contType = NEUTRALPARTICLE; }
277  else if ( evtStore()->contains<xAOD::TrackParticleContainer>(m_inCollKey.value()) ){ m_contType = TRACKPARTICLE; }
278  else if ( evtStore()->contains<xAOD::ParticleContainer>(m_inCollKey.value()) ){ m_contType = PARTICLE; }
279  else if ( evtStore()->contains<xAOD::CaloClusterContainer>(m_inCollKey.value()) ){ m_contType = CALOCLUSTER; }
280  }
281  if ( m_contType == UNKNOWN ){
282  ATH_MSG_FATAL("We couldn't determine the type of the container... abort!");
283  return StatusCode::FAILURE;
284  }
285 
286  // Get the input container and create the output containers
287  const xAOD::IParticleContainer* inContainer = nullptr;
288  ATH_CHECK( evtStore()->retrieve( inContainer, m_inCollKey.value() ) );
289  ATH_MSG_DEBUG ( "Input collection = " << m_inCollKey.value()
290  << " retrieved from StoreGate which has " << inContainer->size() << " entries." );
291 
292  // --------------------------------------------------------------------------
293  // Do the expression parsing once per event already here
294  // --------------------------------------------------------------------------
295  std::vector<int> resultVec;
296  resultVec.reserve(inContainer->size());
297  if ( !(m_selection.value().empty()) ){
298  resultVec = m_parser->evaluateAsVector();
299  // Check that the lengths of the input container and the result vector are the same
300  if ( inContainer->size() != resultVec.size() ) {
301  ATH_MSG_ERROR("We got an input container, but its size (" << inContainer->size()
302  << ") doesn't match the size of the result vector: " << resultVec.size() );
303  return StatusCode::FAILURE;
304  }
305  ATH_MSG_VERBOSE("Have a container of size " << inContainer->size()
306  << " and a result vector of size " << resultVec.size() );
307  } // End: If expression parsing was requested in the first place
308 
309 
310  // --------------------------------------------------------------------------
311  // Do the heavy lifting of actually creating the new and reduced output container(s)
312  // --------------------------------------------------------------------------
313  if ( m_contType == PHOTON ){
314  ATH_CHECK( (this->selectParticles<xAOD::PhotonContainer,xAOD::PhotonAuxContainer>(inContainer,resultVec)) );
315  }
316  else if ( m_contType == ELECTRON ){
317  ATH_CHECK( (this->selectParticles<xAOD::ElectronContainer,xAOD::ElectronAuxContainer>(inContainer,resultVec)) );
318  }
319  else if ( m_contType == MUON ){
320  ATH_CHECK( (this->selectParticles<xAOD::MuonContainer,xAOD::MuonAuxContainer>(inContainer,resultVec)) );
321  }
322  else if ( m_contType == TAU ){
323  ATH_CHECK( (this->selectParticles<xAOD::TauJetContainer,xAOD::TauJetAuxContainer>(inContainer,resultVec)) );
324  }
325  else if ( m_contType == JET ){
326  ATH_CHECK( (this->selectParticles<xAOD::JetContainer,xAOD::JetAuxContainer>(inContainer,resultVec)) );
327  }
328  else if ( m_contType == TRUTHPARTICLE ){
329  ATH_CHECK( (this->selectParticles<xAOD::TruthParticleContainer,xAOD::TruthParticleAuxContainer>(inContainer,resultVec)) );
330  }
331  else if ( m_contType == COMPOSITEPARTICLE ){
332  ATH_CHECK( (this->selectParticles<xAOD::CompositeParticleContainer,xAOD::CompositeParticleAuxContainer>(inContainer,resultVec)) );
333  }
334  else if ( m_contType == PARITCLEFLOW ){
335  ATH_CHECK( (this->selectParticles<xAOD::PFOContainer,xAOD::PFOAuxContainer>(inContainer,resultVec)) );
336  }
337  else if ( m_contType == NEUTRALPARTICLE ){
338  ATH_CHECK( (this->selectParticles<xAOD::NeutralParticleContainer,xAOD::NeutralParticleAuxContainer>(inContainer,resultVec)) );
339  }
340  else if ( m_contType == TRACKPARTICLE ){
341  ATH_CHECK( (this->selectParticles<xAOD::TrackParticleContainer,xAOD::TrackParticleAuxContainer>(inContainer,resultVec)) );
342  }
343  else if ( m_contType == PARTICLE ){
344  ATH_CHECK( (this->selectParticles<xAOD::ParticleContainer,xAOD::ParticleAuxContainer>(inContainer,resultVec)) );
345  }
346  else if ( m_contType == CALOCLUSTER ){
347  ATH_CHECK( (this->selectParticles<xAOD::CaloClusterContainer,xAOD::CaloClusterAuxContainer>(inContainer,resultVec)) );
348  }
349 
350  return StatusCode::SUCCESS;
351 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
python.StoreID.UNKNOWN
int UNKNOWN
Definition: StoreID.py:16
ParticleSelectionAlg::m_cutBKCName
StringProperty m_cutBKCName
The name of the resulting xAOD::CutBookkeeperContainer.
Definition: ParticleSelectionAlg.h:102
ExpressionParserUserBase< ::AthAnalysisAlgorithm, 1 >::finalizeParser
StatusCode finalizeParser()
xAOD::CutBookkeeperContainer
CutBookkeeperContainer_v1 CutBookkeeperContainer
Define the latest version of the CutBookkeeperContainer class.
Definition: CutBookkeeperContainer.h:18
ParticleSelectionAlg::TAU
@ TAU
Definition: ParticleSelectionAlg.h:121
CutBookkeeper.h
xAOD::CutBookkeeperAuxContainer_v1
Auxiliary container for CutBookkeeper containers.
Definition: CutBookkeeperAuxContainer_v1.h:34
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
ParticleSelectionAlg::JET
@ JET
Definition: ParticleSelectionAlg.h:122
AthAnalysisAlgorithm
Definition: AthAnalysisAlgorithm.h:34
AthAnalysisAlgorithm::outputMetaStore
const ServiceHandle< StoreGateSvc > & outputMetaStore() const
Const accessor for the output metadata store.
Definition: AthAnalysisAlgorithm.h:53
xAOD::CutBookkeeper_v1::setCycle
void setCycle(int cycle)
Set the skimming cycle that this CutBookkeeper is running in.
Definition: CutBookkeeper_v1.cxx:209
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::CutBookkeeper_v1::setName
void setName(const std::string &name)
Set the name of this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:161
IParticle.h
ParticleSelectionAlg::m_selToolIdxOffset
std::vector< std::size_t > m_selToolIdxOffset
The list of pairs of the tool index of the AsgSelectionTools and the starting index of the correspond...
Definition: ParticleSelectionAlg.h:140
xAOD::CutBookkeeper_v1::setDescription
void setDescription(const std::string &description)
Set the description of this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:177
ParticleSelectionAlg::ParticleSelectionAlg
ParticleSelectionAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition: ParticleSelectionAlg.cxx:58
ParticleSelectionAlg::ELECTRON
@ ELECTRON
Definition: ParticleSelectionAlg.h:119
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
ParticleSelectionAlg::m_nEventsProcessed
unsigned long m_nEventsProcessed
Internal event counter.
Definition: ParticleSelectionAlg.h:110
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
IAugmentationTool.h
xAOD::CutBookkeeper_v1
Description of the class that is used to keep track of event counts.
Definition: CutBookkeeper_v1.h:29
ExpressionParserUserBase< ::AthAnalysisAlgorithm, 1 >::m_parser
std::conditional< NUM_PARSER==1, std::unique_ptr< ExpressionParsing::ExpressionParser >, std::array< std::unique_ptr< ExpressionParsing::ExpressionParser >, NUM_PARSER > >::type m_parser
Definition: ExpressionParserUser.h:100
ParticleSelectionAlg::m_contType
contType_t m_contType
The variable that holds the value that we find for the input container.
Definition: ParticleSelectionAlg.h:133
TruthParticleContainer.h
AuxContainerBase.h
PFOContainer.h
ParticleSelectionAlg::UNKNOWN
@ UNKNOWN
Definition: ParticleSelectionAlg.h:117
ParticleSelectionAlg::m_selTools
ToolHandleArray< IAsgSelectionTool > m_selTools
The list of IAsgSelectionTools.
Definition: ParticleSelectionAlg.h:72
CutBookkeeperAuxContainer.h
AthAnalysisAlgorithm::inputMetaStore
const ServiceHandle< StoreGateSvc > & inputMetaStore() const
Const accessor for the input metadata store.
Definition: AthAnalysisAlgorithm.h:49
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ParticleSelectionAlg::TRACKPARTICLE
@ TRACKPARTICLE
Definition: ParticleSelectionAlg.h:125
CaloClusterAuxContainer.h
CompositeParticleContainer.h
NeutralParticleAuxContainer.h
ParticleSelectionAlg::m_inCollKey
StringProperty m_inCollKey
Input container name.
Definition: ParticleSelectionAlg.h:78
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
ParticleSelectionAlg::execute
virtual StatusCode execute() override
Athena algorithm's execute hook.
Definition: ParticleSelectionAlg.cxx:258
EventStreamInfo.h
This file contains the class definition for the EventStreamInfo class.
asg::AcceptInfo::getCutName
const std::string & getCutName(unsigned int cutPosition) const
Get the name of a cut, based on the cut position (slow, avoid usage)
Definition: AcceptInfo.cxx:36
TauJetAuxContainer.h
ParticleAuxContainer.h
ParticleSelectionAlg::m_outOwnPolicyName
StringProperty m_outOwnPolicyName
Defines the ownership policy of the output container (default: 'VIEW_ELEMENTS'; also allowed: 'OWN_EL...
Definition: ParticleSelectionAlg.h:90
TruthParticleAuxContainer.h
MuonAuxContainer.h
ParticleSelectionAlg::CALOCLUSTER
@ CALOCLUSTER
Definition: ParticleSelectionAlg.h:129
ClassID_traits::ID
static const CLID & ID()
the CLID of T
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:50
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
ParticleSelectionAlg::TRUTHPARTICLE
@ TRUTHPARTICLE
Definition: ParticleSelectionAlg.h:126
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
PFOAuxContainer.h
asg::AcceptInfo
Definition: AcceptInfo.h:28
TrackParticleAuxContainer.h
ElectronContainer.h
ParticleSelectionAlg::PARITCLEFLOW
@ PARITCLEFLOW
Definition: ParticleSelectionAlg.h:123
SG::OWN_ELEMENTS
@ OWN_ELEMENTS
this data object owns its elements
Definition: OwnershipPolicy.h:17
ElectronAuxContainer.h
ParticleContainer.h
ParticleSelectionAlg::m_outOwnPolicy
SG::OwnershipPolicy m_outOwnPolicy
The internally used translation for the ownership policy.
Definition: ParticleSelectionAlg.h:113
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
asg::AcceptInfo::getNCuts
unsigned int getNCuts() const
Get the number of cuts defined.
Definition: AcceptInfo.h:46
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
IParticleContainer.h
xAOD::CutBookkeeperContainer_v1::maxCycle
int maxCycle() const
Get the maximum cycle number of any xAOD::CutBookkeepers in the container.
Definition: CutBookkeeperContainer_v1.cxx:200
ParticleSelectionAlg.h
xAOD::CutBookkeeperAuxContainer
CutBookkeeperAuxContainer_v1 CutBookkeeperAuxContainer
Define the latest version of the CutBookkeeperAuxContainer class.
Definition: CutBookkeeperAuxContainer.h:17
CutBookkeeperContainer.h
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ParticleSelectionAlg::COMPOSITEPARTICLE
@ COMPOSITEPARTICLE
Definition: ParticleSelectionAlg.h:127
ParticleSelectionAlg::m_outCollKey
StringProperty m_outCollKey
Output collection name (deep copies of the original ones)
Definition: ParticleSelectionAlg.h:81
xAOD::CutBookkeeperContainer_v1
Container that holds the Container of all CutBookkeepers.
Definition: CutBookkeeperContainer_v1.h:27
TauJetContainer.h
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
ParticleSelectionAlg::m_doCutFlow
bool m_doCutFlow
If true (deault: false), do the bookkeeping of how many particles passed which selection cuts.
Definition: ParticleSelectionAlg.h:98
ExpressionParserUser<::AthAnalysisAlgorithm >::initializeParser
StatusCode initializeParser(const ExpressionParsing::SelectionArg< 1 > &selection_string)
CompositeParticleAuxContainer.h
ExpressionParserUser
Definition: ExpressionParserUser.h:107
xAOD::CutBookkeeper_v1::setInputStream
void setInputStream(const std::string &inputstream)
Set the name of the current input-file stream object for this CutBookkeeper.
Definition: CutBookkeeper_v1.cxx:225
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ParticleSelectionAlg::NEUTRALPARTICLE
@ NEUTRALPARTICLE
Definition: ParticleSelectionAlg.h:124
xAOD::CutBookkeeper
CutBookkeeper_v1 CutBookkeeper
Define the latest version of the CutBookkeeper class.
Definition: CutBookkeeper.h:17
ParticleSelectionAlg::PHOTON
@ PHOTON
Definition: ParticleSelectionAlg.h:118
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
ParticleSelectionAlg::start
virtual StatusCode start() override
Athena algorithm's beginRun hook (called once before running over the events, after initialize)
Definition: ParticleSelectionAlg.cxx:167
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
xAOD::CutBookkeeper_v1::setCutLogic
void setCutLogic(CutLogic logic)
Set the cut logic of this CutBookkeeper, e.g., ACCEPT, REQUIRE, VETO.
Definition: CutBookkeeper_v1.cxx:199
MuonContainer.h
NeutralParticleContainer.h
PhotonAuxContainer.h
ParticleSelectionAlg::~ParticleSelectionAlg
virtual ~ParticleSelectionAlg()
Destructor:
Definition: ParticleSelectionAlg.cxx:101
ParticleSelectionAlg::MUON
@ MUON
Definition: ParticleSelectionAlg.h:120
JetContainer.h
ParticleSelectionAlg::m_evtInfoName
StringProperty m_evtInfoName
Name of the EventInfo object.
Definition: ParticleSelectionAlg.h:75
ParticleSelectionAlg::initialize
virtual StatusCode initialize() override
Athena algorithm's initalize hook.
Definition: ParticleSelectionAlg.cxx:108
ParticleSelectionAlg::PARTICLE
@ PARTICLE
Definition: ParticleSelectionAlg.h:128
CaloClusterContainer.h
JetAuxContainer.h
ParticleSelectionAlg::m_idxSelParster
std::size_t m_idxSelParster
Store the index of the CutBookKeeper in the CutBookkeeperContainer for the selection using the Expres...
Definition: ParticleSelectionAlg.h:144
ParticleSelectionAlg::m_writeSplitAux
BooleanProperty m_writeSplitAux
Decide if we want to write a fully-split AuxContainer such that we can remove any variables.
Definition: ParticleSelectionAlg.h:84
ParticleSelectionAlg::finalize
virtual StatusCode finalize() override
Athena algorithm's finalize hook.
Definition: ParticleSelectionAlg.cxx:153
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
PhotonContainer.h
ParticleSelectionAlg::m_cutBKStartIdx
std::size_t m_cutBKStartIdx
The starting index of where in the CutBookkeeperContainer our new CutBookkeepers start.
Definition: ParticleSelectionAlg.h:136
TrackParticleContainer.h
asg::AcceptInfo::getCutDescription
const std::string & getCutDescription(const std::string &cutName) const
Get the description of a cut, based on the cut name.
Definition: AcceptInfo.cxx:119
ParticleSelectionAlg::m_selection
StringProperty m_selection
The selection string that will select which xAOD::IParticles to keep from an xAOD::IParticleContainer...
Definition: ParticleSelectionAlg.h:94