|
ATLAS Offline Software
|
Go to the documentation of this file.
58 std::sort (viewCopy->begin(), viewCopy->end(), [] (
const xAOD::IParticle *
a,
const xAOD::IParticle *
b) {return CxxUtils::fpcompare::greater (a->pt(), b->pt());});
77 return StatusCode::SUCCESS;
81 auto deepCopy = std::make_unique<Type> ();
82 auto aux = std::make_unique<xAOD::AuxContainerBase> ();
83 deepCopy->setStore (aux.get());
84 deepCopy->reserve (viewCopy->size());
87 typename Type::value_type pcopy =
new typename Type::base_value_type();
88 deepCopy->push_back (pcopy);
98 return StatusCode::SUCCESS;
109 if( !
evtStore()->contains< xAOD::IParticleContainer >(
name ) ) {
111 return StatusCode::SUCCESS;
121 &AsgViewFromSelectionAlg::executeTemplate<xAOD::ElectronContainer>;
126 &AsgViewFromSelectionAlg::executeTemplate<xAOD::PhotonContainer>;
131 &AsgViewFromSelectionAlg::executeTemplate<xAOD::JetContainer>;
135 &AsgViewFromSelectionAlg::executeTemplate<xAOD::MuonContainer>;
140 &AsgViewFromSelectionAlg::executeTemplate<xAOD::TauJetContainer>;
145 &AsgViewFromSelectionAlg::executeTemplate<xAOD::DiTauJetContainer>;
150 &AsgViewFromSelectionAlg::executeTemplate<xAOD::TrackParticleContainer>;
155 &AsgViewFromSelectionAlg::executeTemplate<xAOD::TruthParticleContainer>;
159 ANA_MSG_ERROR (
"unknown type contained in AsgViewFromSelectionAlg, please extend it");
160 return StatusCode::FAILURE;
171 return StatusCode::SUCCESS;
187 ANA_MSG_ERROR (
"ignore property can't have more properties than selection property");
188 return StatusCode::FAILURE;
195 std::unique_ptr<ISelectionReadAccessor>
accessor;
200 return StatusCode::SUCCESS;
212 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
Gaudi::Property< std::vector< std::string > > m_selection
SysReadHandle< xAOD::IParticleContainer > m_inputHandle
the input collection we run on
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
StatusCode initialize() override
Gaudi::Property< std::vector< SelectionType > > m_ignore
Gaudi::Property< bool > m_allowMissing
Allow the input container to be missing.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
DataVector adapter that acts like it holds const pointers.
StatusCode executeMissing(const CP::SystematicSet &sys)
The version of execute for missing input containers.
uint32_t SelectionType
the type for selection decorations that are meant to hold a asg::AcceptData
Class to wrap a set of SystematicVariations.
StatusCode executeFindType(const CP::SystematicSet &sys)
the version of execute to find the type
const std::vector< CP::SystematicSet > & systematicsVector() const
the list of systematics to loop over
SysListHandle m_systematicsList
the systematics list we run
Class providing the definition of the 4-vector interface.
Select isolated Photons, Electrons and Muons.
SysWriteHandle< xAOD::IParticleContainer > m_outputHandle
the output view container we produce
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Gaudi::Property< bool > m_sortPt
Sort the output (view) container by pT.
::StatusCode initialize()
intialize this property
virtual StatusCode registerCopy(const std::string &fromName, const std::string &toName) const =0
register a (shallow) copy from one object to the next
::StatusCode StatusCode
StatusCode definition for legacy code.
Workaround x86 precision issues for FP inequality comparisons.
StatusCode execute() override
Gaudi::Property< std::size_t > m_sizeLimit
Gaudi::Property< bool > m_deepCopy
Perform a deep copy for creating the output container.
StatusCode makeSelectionReadAccessor(const std::string &expr, std::unique_ptr< ISelectionReadAccessor > &accessor, bool defaultToChar)
make the ISelectionReadAccessor for the given name
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
constexpr SelectionType selectionAccept()
the selection decoration to apply for objects that are selected
std::vector< std::pair< std::unique_ptr< ISelectionReadAccessor >, SelectionType > > m_accessors
the list of accessors and cut ignore list
StatusCode executeTemplate(const CP::SystematicSet &sys)
the templated version of execute for a single systematic
StatusCode(AsgViewFromSelectionAlg::* m_function)(const CP::SystematicSet &sys)
const ISystematicsSvc & service() const
the service we use