|
ATLAS Offline Software
|
Applies the generator level filter for jet candidates.
More...
#include <xAODJetFilter.h>
|
| xAODJetFilter (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual StatusCode | filterInitialize () override |
|
virtual StatusCode | filterEvent () override |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
Gaudi::Property< double > | m_userEta {this, "EtaRange", 2.7, " "} |
|
Gaudi::Property< double > | m_userThresh {this, "JetThreshold", 17000., " "} |
|
Gaudi::Property< double > | m_stop {this, "SeedThreshold", 1000., " "} |
|
Gaudi::Property< double > | m_cone {this, "ConeSize", 0.4, " "} |
|
Gaudi::Property< int > | m_gride {this, "GridSizeEta",2, " "} |
|
Gaudi::Property< int > | m_gridp {this, "GridSizePhi",2, " "} |
|
Gaudi::Property< int > | m_userNumber {this, "JetNumber",1, " "} |
|
Gaudi::Property< bool > | m_type {this, "JetType",true, " "} |
|
Applies the generator level filter for jet candidates.
- Author
- I Hinchliffe, May 2002
Definition at line 17 of file xAODJetFilter.h.
◆ StoreGateSvc_t
◆ xAODJetFilter()
xAODJetFilter::xAODJetFilter |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ATLAS_NOT_CONST_THREAD_SAFE() [1/2]
HepMC::GenEvent* event GenBase::ATLAS_NOT_CONST_THREAD_SAFE |
( |
| ) |
|
|
inlineinherited |
Access the current signal event (first in the McEventCollection)
- Note
- This function will make a new McEventCollection if there is not already a valid one and MakeMcEvent=True.
Definition at line 76 of file GenBase.h.
78 ATH_MSG_ERROR(
"McEventCollection is empty during first event access");
79 return *(
events()->begin());
◆ ATLAS_NOT_CONST_THREAD_SAFE() [2/2]
◆ cmTomm()
void GenBase::cmTomm |
( |
HepMC::GenEvent * |
evt | ) |
|
|
protectedinherited |
Scale event lengths by x 10.
Definition at line 78 of file GenBase.cxx.
79 for (HepMC::GenEvent::vertex_iterator vtx =
evt->vertices_begin(); vtx !=
evt->vertices_end(); ++vtx) {
80 const HepMC::FourVector fv((*vtx)->position().x() * 10,
81 (*vtx)->position().y() * 10,
82 (*vtx)->position().z() * 10,
83 (*vtx)->position().t() * 10);
84 (*vtx)->set_position(fv);
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ event_const()
const HepMC::GenEvent* GenBase::event_const |
( |
| ) |
const |
|
inlineinherited |
Access the current signal event (const)
Definition at line 83 of file GenBase.h.
85 ATH_MSG_ERROR(
"Const McEventCollection is empty during first event access");
◆ events_const() [1/2]
◆ events_const() [2/2]
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode GenFilter::execute |
( |
| ) |
|
|
virtualinherited |
- Todo:
- Probably the filter should only look at the first event... right?
Reimplemented from GenBase.
Definition at line 29 of file GenFilter.cxx.
32 return StatusCode::FAILURE;
35 ATH_MSG_WARNING(
"More than one event in current McEventCollection -- which is valid?");
51 sc = StatusCode::FAILURE;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ filterEvent()
StatusCode xAODJetFilter::filterEvent |
( |
| ) |
|
|
overridevirtual |
Implements GenFilter.
Definition at line 54 of file xAODJetFilter.cxx.
62 etgridused[
ip][
ie] =
false;
70 ATH_MSG_ERROR(
"No TruthParticle collection with name " <<
"TruthGen" <<
" found in StoreGate!");
71 return StatusCode::FAILURE;
76 unsigned int nPart = xTruthParticleContainer->
size();
77 for (
unsigned int iPart = 0; iPart < nPart; ++iPart) {
80 if (
part->isGenStable()) {
81 if ((
part->pdgId() != 13) && (
part->pdgId() != -13) &&
82 (
part->pdgId() != 12) && (
part->pdgId() != -12) &&
83 (
part->pdgId() != 14) && (
part->pdgId() != -14) &&
84 (
part->pdgId() != 16) && (
part->pdgId() != -16) &&
85 (std::abs(
part->eta()) <=
96 return StatusCode::FAILURE;
110 double ethigh = 2. *
m_stop;
119 for (
int ip0 = 0; ip0 <
m_grphi; ++ip0) {
120 if (etgrid[ip0][ie0] > ethigh && !etgridused[ip0][ie0]) {
121 ethigh = etgrid[ip0][ie0];
131 CLHEP::HepLorentzVector FoundJet;
143 sum =
sum + etgrid[ip1][etahigh - 1];
144 sum1 = sum1 + etgrid[ip1][etahigh + 1];
156 sum1 = sum1 + etgrid[(phihigh + 1) %
m_grphi][ie1];
159 phihigh = (phihigh + 1) %
m_grphi;
171 if (!etgridused[ip1][ie1])
172 sum =
sum + etgrid[ip1][ie1];
173 if (!etgridused[ip1][ie1 + 1])
174 sum1 = sum1 + etgrid[ip1][ie1 + 1];
175 if (!etgridused[ip1 + 1][ie1])
176 sum2 = sum2 + etgrid[(ip1 + 1) %
m_grphi][ie1];
177 if (!etgridused[ip1 + 1][ie1 + 1])
178 sum3 = sum3 + etgrid[(ip1 + 1) %
m_grphi][ie1 + 1];
181 if (
sum < sum1 && sum2 < sum1 && sum3 < sum1)
182 etahigh = etahigh + 1;
183 if (
sum < sum2 && sum1 <= sum2 && sum3 < sum2)
184 phihigh = (phihigh + 1) %
m_grphi;
185 if (
sum < sum3 && sum2 <= sum3 && sum1 <= sum3) {
186 etahigh = etahigh + 1;
187 phihigh = (phihigh + 1) %
m_grphi;
198 return StatusCode::FAILURE;
214 if (!etgridused[ip1][ie1]) {
215 etgridused[ip1][ie1] =
true;
216 jetpx = jetpx + etgrid[ip1][ie1] *
218 jetpy = jetpy + etgrid[ip1][ie1] *
220 jetpz = jetpz + etgrid[ip1][ie1] *
228 FoundJet.setPx(jetpx);
229 FoundJet.setPy(jetpy);
230 FoundJet.setPz(jetpz);
232 if (std::abs(FoundJet.pseudoRapidity()) <
m_userEta) {
233 m_Jets.push_back(FoundJet);
240 <<
" Number of jets found = " <<
m_Jets.size() <<
" \n ");
244 <<
" Rapidity " <<
m_Jets[0].
P().pseudoRapidity()
248 <<
" Rapidity " <<
m_Jets[1].
P().pseudoRapidity()
253 <<
m_Jets[
m_Jets.size() - 1].P().pseudoRapidity() <<
" Phi "
260 return StatusCode::SUCCESS;
263 setFilterPassed(
false);
265 return StatusCode::SUCCESS;
◆ filterFinalize()
virtual StatusCode GenFilter::filterFinalize |
( |
| ) |
|
|
inlinevirtualinherited |
Reimplemented in xAODM4MuIntervalFilter, xAODParticleDecayFilter, MuDstarFilter, BoostedHadTopAndTopPair, xAODDecaysFinalStateFilter, xAODBSignalFilter, xAODLeptonFilter, TrimuMassRangeFilter, xAODLeptonPairFilter, LeptonFilter, BSignalFilter, DecaysFinalStateFilter, LeptonPairFilter, xAODHTFilter, MultiParticleFilter, xAODHeavyFlavorHadronFilter, DiBjetFilter, FourLeptonInvMassFilter, ParentChildwStatusFilter, xAODTauFilter, xAODXtoVVDecayFilterExtended, VBFHbbEtaSortingFilter, xAODTTbarWithJpsimumuFilter, ParticleDecayFilter, xAODChargedTracksWeightFilter, xAODDiLeptonMassFilter, xAODMultiBjetFilter, xAODMultiCjetFilter, HeavyFlavorHadronFilter, TauFilter, TTbarPlusHeavyFlavorFilter, MultiBjetFilter, XtoVVDecayFilterExtended, ChargedTracksWeightFilter, TTbarWithJpsimumuFilter, DiLeptonMassFilter, HTFilter, QCDTruthJetFilter, QCDTruthMultiJetFilter, M4MuIntervalFilter, and MultiCjetFilter.
Definition at line 47 of file GenFilter.h.
47 {
return StatusCode::SUCCESS; }
◆ filterInitialize()
StatusCode xAODJetFilter::filterInitialize |
( |
| ) |
|
|
overridevirtual |
◆ finalize()
StatusCode GenFilter::finalize |
( |
| ) |
|
|
inherited |
Definition at line 56 of file GenFilter.cxx.
59 return StatusCode::SUCCESS;
◆ GeVToMeV()
void GenBase::GeVToMeV |
( |
HepMC::GenEvent * |
evt | ) |
|
|
protectedinherited |
Scale event energies/momenta by x 1000.
- Todo:
- Add HepMC units awareness and do it differently when HepMC provides this functionality directly (and reference-based FourVector accessors)
Definition at line 58 of file GenBase.cxx.
59 for (HepMC::GenEvent::particle_iterator
p =
evt->particles_begin();
p !=
evt->particles_end(); ++
p) {
60 const HepMC::FourVector fv((*p)->momentum().px() * 1000,
61 (*p)->momentum().py() * 1000,
62 (*p)->momentum().pz() * 1000,
63 (*p)->momentum().e() * 1000);
64 (*p)->set_momentum(fv);
65 (*p)->set_generated_mass(1000 * (*p)->generated_mass());
◆ initialize()
StatusCode GenFilter::initialize |
( |
| ) |
|
|
virtualinherited |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ MeVToGeV()
void GenBase::MeVToGeV |
( |
HepMC::GenEvent * |
evt | ) |
|
|
protectedinherited |
Scale event energies/momenta by x 1/1000.
Definition at line 68 of file GenBase.cxx.
69 for (HepMC::GenEvent::particle_iterator
p =
evt->particles_begin();
p !=
evt->particles_end(); ++
p) {
70 const HepMC::FourVector fv((*p)->momentum().px() / 1000,
71 (*p)->momentum().py() / 1000,
72 (*p)->momentum().pz() / 1000,
73 (*p)->momentum().e() / 1000);
74 (*p)->set_momentum(fv);
75 (*p)->set_generated_mass((*p)->generated_mass() / 1000);
◆ mmTocm()
void GenBase::mmTocm |
( |
HepMC::GenEvent * |
evt | ) |
|
|
protectedinherited |
Scale event lengths by x 1/10.
Definition at line 87 of file GenBase.cxx.
88 for (HepMC::GenEvent::vertex_iterator vtx =
evt->vertices_begin(); vtx !=
evt->vertices_end(); ++vtx) {
89 const HepMC::FourVector fv((*vtx)->position().x() / 10,
90 (*vtx)->position().y() / 10,
91 (*vtx)->position().z() / 10,
92 (*vtx)->position().t() / 10);
93 (*vtx)->set_position(fv);
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ nFailed()
int GenFilter::nFailed |
( |
| ) |
const |
|
inlineinherited |
◆ nNeeded()
int GenFilter::nNeeded |
( |
| ) |
const |
|
inlineinherited |
◆ nPassed()
int GenFilter::nPassed |
( |
| ) |
const |
|
inlineinherited |
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ particleData()
const HepPDT::ParticleData* GenBase::particleData |
( |
int |
pid | ) |
const |
|
inlineinherited |
Access an element in the particle data table.
Definition at line 126 of file GenBase.h.
◆ particleTable()
const HepPDT::ParticleDataTable& GenBase::particleTable |
( |
| ) |
const |
|
inlineinherited |
Get a particle data table.
Definition at line 118 of file GenBase.h.
◆ partPropSvc()
Access the particle property service.
Definition at line 113 of file GenBase.h.
◆ pdt()
const HepPDT::ParticleDataTable& GenBase::pdt |
( |
| ) |
const |
|
inlineinherited |
Shorter alias to get a particle data table.
Definition at line 123 of file GenBase.h.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_cone
Gaudi::Property<double> xAODJetFilter::m_cone {this, "ConeSize", 0.4, " "} |
◆ m_detStore
◆ m_edeta
double xAODJetFilter::m_edeta {} |
|
private |
◆ m_edphi
double xAODJetFilter::m_edphi {} |
|
private |
◆ m_emaxeta
double xAODJetFilter::m_emaxeta {} |
|
private |
◆ m_etaRange
double xAODJetFilter::m_etaRange {} |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_greta
const int xAODJetFilter::m_greta = 200 |
|
staticprivate |
◆ m_gride
Gaudi::Property<int> xAODJetFilter::m_gride {this, "GridSizeEta",2, " "} |
◆ m_gridp
Gaudi::Property<int> xAODJetFilter::m_gridp {this, "GridSizePhi",2, " "} |
◆ m_grphi
const int xAODJetFilter::m_grphi = 105 |
|
staticprivate |
◆ m_Jets
std::vector<McObj> xAODJetFilter::m_Jets |
|
private |
◆ m_mcEventKey
std::string GenBase::m_mcEventKey {} |
|
protectedinherited |
StoreGate key for the MC event collection (defaults to GEN_EVENT)
Definition at line 137 of file GenBase.h.
◆ m_mcevents_const
Const handle to the MC event collection.
Definition at line 163 of file GenBase.h.
◆ m_mkMcEvent
BooleanProperty GenBase::m_mkMcEvent {this, "MakeMcEvent", false, "Create a new MC event collection if it doesn't exist"} |
|
protectedinherited |
Flag to determine if a new MC event collection should be made if it doesn't exist.
Definition at line 139 of file GenBase.h.
◆ m_netacell
int xAODJetFilter::m_netacell {} |
|
private |
◆ m_netacell2
int xAODJetFilter::m_netacell2 {} |
|
private |
◆ m_nFail
◆ m_nNeeded
◆ m_nPass
◆ m_nphicell
int xAODJetFilter::m_nphicell {} |
|
private |
◆ m_nphicell2
int xAODJetFilter::m_nphicell2 {} |
|
private |
◆ m_ppSvc
ServiceHandle<IPartPropSvc> GenBase::m_ppSvc {this, "PartPropSvc", "PartPropSvc"} |
|
privateinherited |
Handle on the particle property service.
Definition at line 160 of file GenBase.h.
◆ m_stop
Gaudi::Property<double> xAODJetFilter::m_stop {this, "SeedThreshold", 1000., " "} |
◆ m_type
Gaudi::Property<bool> xAODJetFilter::m_type {this, "JetType",true, " "} |
◆ m_userEta
Gaudi::Property<double> xAODJetFilter::m_userEta {this, "EtaRange", 2.7, " "} |
◆ m_userNumber
Gaudi::Property<int> xAODJetFilter::m_userNumber {this, "JetNumber",1, " "} |
◆ m_userThresh
Gaudi::Property<double> xAODJetFilter::m_userThresh {this, "JetThreshold", 17000., " "} |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
Gaudi::Property< int > m_userNumber
Scalar phi() const
phi method
const_pointer_type cptr()
Dereference the pointer.
Scalar perp() const
perp method - perpenticular length
const McEventCollection * events_const() const
Access the current event's McEventCollection (const)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Gaudi::Property< double > m_userEta
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::vector< McObj > m_Jets
virtual StatusCode filterEvent()=0
const std::string & key() const
Return the StoreGate ID for the referenced object.
virtual StatusCode filterInitialize()
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Property< double > m_cone
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
ServiceHandle< IPartPropSvc > m_ppSvc
Handle on the particle property service.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadHandleKey< McEventCollection > m_mcevents_const
Const handle to the MC event collection.
Class describing a truth particle in the MC record.
#define CHECK(...)
Evaluate an expression and check for errors.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Gaudi::Property< int > m_gride
virtual void renounce()=0
const HepPDT::ParticleDataTable & particleTable() const
Get a particle data table.
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
virtual StatusCode filterFinalize()
Gaudi::Property< double > m_stop
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
Gaudi::Property< double > m_userThresh
const HepPDT::ParticleDataTable & pdt() const
Shorter alias to get a particle data table.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
filterPassed
now, add a sequencer: it will only execute seqalg1 and 2 and never 3
Gaudi::Property< bool > m_type
Gaudi::Property< int > m_gridp
GenFilter(const std::string &name, ISvcLocator *pSvcLocator)
const boost::regex rr(r_r)
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual StatusCode initialize() override
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.