|
ATLAS Offline Software
|
#include <Select_Bmumu.h>
|
| Select_Bmumu (const std::string &t, const std::string &n, const IInterface *p) |
|
StatusCode | initialize () override |
| initialization and finalization More...
|
|
StatusCode | finalize () override |
|
virtual StatusCode | addBranches () const override |
| : augmentation and selection Retrieved vertices are augmented with usual information. More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual bool | addEvent (const std::string &name, double weight=1.) const |
|
virtual bool | addToCounter (const std::string &name, uint64_t counts=1, double weight=1.) const |
|
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 |
|
|
void | ProcessVertex (xAOD::BPhysHypoHelper &, xAOD::BPhysHelper::pv_type) const |
|
bool | massCuts (float mass) const |
|
bool | massInBlindedRegion (float mass) const |
|
bool | checkAllMuonsTight (const std::vector< const xAOD::Muon * > &muons, int maxMuonsToCheck=-1) const |
|
bool | pass (const SG::AuxElement &em, const std::string &hypo) const |
|
bool | setPass (const SG::AuxElement &em, const std::string &hypo, bool passVal) const |
|
bool | setPassIfNotAvailable (SG::AuxElement &em, const std::string &hypo, bool passVal) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Definition at line 54 of file Select_Bmumu.h.
◆ NameIdMap_t
◆ StoreGateSvc_t
◆ Select_Bmumu()
DerivationFramework::Select_Bmumu::Select_Bmumu |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
Definition at line 72 of file Select_Bmumu.cxx.
79 declareInterface<DerivationFramework::IAugmentationTool>(
this);
◆ addBranches()
StatusCode DerivationFramework::Select_Bmumu::addBranches |
( |
| ) |
const |
|
overridevirtual |
: augmentation and selection Retrieved vertices are augmented with usual information.
Selection is performed and each candidate is decorated with the Char_t flag named "passed_"+name() to indicate whether if the candidate passed the selection. This flag is then used by the event selection tool and by the vertex thinning tool.
Implements DerivationFramework::IAugmentationTool.
Definition at line 234 of file Select_Bmumu.cxx.
246 std::vector<xAOD::VertexContainer*> subCandConts;
247 std::vector<xAOD::VertexAuxContainer*> subCandAuxConts;
255 subCandConts.push_back(subCandCont);
256 subCandAuxConts.push_back(subCandAuxCont);
260 for (
unsigned int isub=0; isub < subCandConts.size(); ++isub) {
262 if ( subCandCont != NULL ) {
264 it != subCandCont->
end(); ++
it) {
277 "xAOD::VertexContainer !!");
290 int nPassMassCuts = 0;
291 int nPassChi2Cut = 0;
292 int nPassPrecVtxCut = 0;
293 int nInBlindedRegion = 0;
294 int nInBlindedRegionAllMuonsTight = 0;
296 for (; bcandItr!=bcandContainer->
end(); ++bcandItr) {
308 if ( !bcand.setMassErr(massErr) )
337 bool blindedMuCalcMass(
true);
339 std::string bname =
m_hypoName+
"_MUCALC_mass";
341 if ( mucalcAcc.isAvailable(**bcandItr) ) {
342 passedMuCalcMassCut =
massCuts(mucalcAcc(**bcandItr));
345 passedMuCalcMassCut =
false;
346 blindedMuCalcMass =
false;
347 ATH_MSG_INFO(
"MUCALC mass not available: " << bname <<
" !");
350 bool passedMassCut =
massCuts(bcand.mass());
358 if ( blindedMass && blindedMuCalcMass ) {
361 if ( allMuonsTight ) {
362 nInBlindedRegionAllMuonsTight++;
370 if ( !(passedMassCut || passedMuCalcMassCut) ) {
371 bcand.setPass(
false);
377 if ( bcand.vtx()->chiSquared() >
m_chi2Max) {
378 bcand.setPass(
false);;
384 int npVtx = bcand.nPrecedingVertices();
393 for (
int ipv=0; ipv<npVtx; ++ipv) {
401 bcand.setPass(
false);;
405 for (
int ipv=0; ipv<npVtx; ++ipv) {
406 setPass(*bcand.precedingVertex(ipv),
409 && allMuonsTight) ) {
410 setPass(*bcand.precedingVertex(ipv),
432 if ( bcandContainer->
size() > 0 )
addEvent(
"eventsWithCands");
433 if ( nPassMassCuts > 0 )
addEvent(
"massCutEvents");
434 if ( nPassChi2Cut > 0 )
addEvent(
"chi2CutEvents");
435 if ( nPassPrecVtxCut > 0 )
addEvent(
"precVtxCutEvents");
443 addToCounter(
"blindedRegionCandidates", nInBlindedRegion);
445 addToCounter(
"blindedRegionCandidatesWithAllMuonsTight",
446 nInBlindedRegionAllMuonsTight);
451 return StatusCode::SUCCESS;
◆ addEvent()
bool DerivationFramework::CfAthAlgTool::addEvent |
( |
const std::string & |
name, |
|
|
double |
weight = 1. |
|
) |
| const |
|
virtualinherited |
◆ addToCounter()
bool DerivationFramework::CfAthAlgTool::addToCounter |
( |
const std::string & |
name, |
|
|
uint64_t |
counts = 1 , |
|
|
double |
weight = 1. |
|
) |
| const |
|
virtualinherited |
◆ checkAllMuonsTight()
bool DerivationFramework::Select_Bmumu::checkAllMuonsTight |
( |
const std::vector< const xAOD::Muon * > & |
muons, |
|
|
int |
maxMuonsToCheck = -1 |
|
) |
| const |
|
private |
Definition at line 472 of file Select_Bmumu.cxx.
476 int ncheckMax = muons.size();
477 if ( maxMuonsToCheck > -1 ) {
478 ncheckMax =
std::min((
int)muons.size(), maxMuonsToCheck);
480 for (
int imu=0; imu < ncheckMax; ++imu) {
481 xAOD::Muon::Quality muQuality =
◆ 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()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ 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
◆ finalize()
StatusCode DerivationFramework::Select_Bmumu::finalize |
( |
| ) |
|
|
override |
◆ getCounter()
CutIdentifier DerivationFramework::CfAthAlgTool::getCounter |
( |
const std::string & |
name | ) |
const |
|
protectedinherited |
Definition at line 128 of file CfAthAlgTool.cxx.
134 throw std::runtime_error(
"cutFlowSvc()->registerFilter is no longer supported. code an alternative here");
138 throw std::runtime_error(
"cutFlowSvc()->registerCut is no longer supported. code an alternative here");
◆ getCounterIdByName()
CutIdentifier DerivationFramework::CfAthAlgTool::getCounterIdByName |
( |
const std::string & |
name | ) |
const |
|
protectedinherited |
◆ getCounterNameById()
std::string DerivationFramework::CfAthAlgTool::getCounterNameById |
( |
CutIdentifier |
id | ) |
const |
|
protectedinherited |
◆ initialize()
StatusCode DerivationFramework::Select_Bmumu::initialize |
( |
| ) |
|
|
override |
initialization and finalization
Definition at line 107 of file Select_Bmumu.cxx.
122 ATH_MSG_ERROR(
"initialize(): number of elements for options "
123 <<
"SubDecVtxContNames and SubDecVtxHypoCondNames does not "
132 <<
") < SubDecVtxHypoCondNames ("
134 <<
") ... appending to the first.");
138 ATH_MSG_INFO(
"initialize(): SubDecVtxHypoFlagNames[" <<
i <<
"] = "
146 <<
") > SubDecVtxHypoCondNames ("
148 <<
") ! Configuration error!");
150 return StatusCode::SUCCESS;
◆ 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.
◆ interfaceID()
static const InterfaceID& DerivationFramework::IAugmentationTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
AlgTool interface methods.
Definition at line 31 of file IAugmentationTool.h.
31 {
return IID_IAugmentationTool; }
◆ massCuts()
bool DerivationFramework::Select_Bmumu::massCuts |
( |
float |
mass | ) |
const |
|
private |
◆ massInBlindedRegion()
bool DerivationFramework::Select_Bmumu::massInBlindedRegion |
( |
float |
mass | ) |
const |
|
private |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ 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.
◆ pass()
Definition at line 494 of file Select_Bmumu.cxx.
497 return flagAcc.isAvailable(em) && flagAcc(em) != 0;
◆ ProcessVertex()
◆ renounce()
◆ renounceArray()
◆ setPass()
bool DerivationFramework::Select_Bmumu::setPass |
( |
const SG::AuxElement & |
em, |
|
|
const std::string & |
hypo, |
|
|
bool |
passVal |
|
) |
| const |
|
private |
◆ setPassIfNotAvailable()
bool DerivationFramework::Select_Bmumu::setPassIfNotAvailable |
( |
SG::AuxElement & |
em, |
|
|
const std::string & |
hypo, |
|
|
bool |
passVal |
|
) |
| const |
|
private |
◆ sysInitialize()
StatusCode DerivationFramework::CfAthAlgTool::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_bid
◆ m_bidisset
bool DerivationFramework::CfAthAlgTool::m_bidisset |
|
mutableprivateinherited |
◆ m_blindMassMax
double DerivationFramework::Select_Bmumu::m_blindMassMax |
|
private |
◆ m_blindMassMin
double DerivationFramework::Select_Bmumu::m_blindMassMin |
|
private |
◆ m_blindOnlyAllMuonsTight
bool DerivationFramework::Select_Bmumu::m_blindOnlyAllMuonsTight |
|
private |
only blind candidates with all tight muons
Definition at line 106 of file Select_Bmumu.h.
◆ m_chi2Max
double DerivationFramework::Select_Bmumu::m_chi2Max |
|
private |
◆ m_ctbasename
std::string DerivationFramework::CfAthAlgTool::m_ctbasename |
|
privateinherited |
◆ m_cutFlowSvc
◆ m_detStore
◆ m_do3d
bool DerivationFramework::Select_Bmumu::m_do3d |
|
private |
◆ m_doBlinding
bool DerivationFramework::Select_Bmumu::m_doBlinding |
|
private |
◆ m_doCutBlinded
bool DerivationFramework::Select_Bmumu::m_doCutBlinded |
|
private |
◆ m_DoVertexType
int DerivationFramework::Select_Bmumu::m_DoVertexType |
|
private |
Allows user to skip certain vertexes - bitwise test 7==all(111)
Definition at line 100 of file Select_Bmumu.h.
◆ m_evtStore
◆ m_hypoName
std::string DerivationFramework::Select_Bmumu::m_hypoName |
|
private |
job options
name of the mass hypothesis. E.g. Jpis, Upsi, etc. Will be used as a prefix for decorations
Definition at line 93 of file Select_Bmumu.h.
◆ m_inputVtxContainerName
std::string DerivationFramework::Select_Bmumu::m_inputVtxContainerName |
|
private |
◆ m_massHypo
double DerivationFramework::Select_Bmumu::m_massHypo |
|
private |
◆ m_massMax
double DerivationFramework::Select_Bmumu::m_massMax |
|
private |
◆ m_massMin
double DerivationFramework::Select_Bmumu::m_massMin |
|
private |
◆ m_mctn
◆ m_muSelectionTool
◆ m_subDecVtxContNames
std::vector<std::string> DerivationFramework::Select_Bmumu::m_subDecVtxContNames |
|
private |
◆ m_subDecVtxHypoCondNames
std::vector<std::string> DerivationFramework::Select_Bmumu::m_subDecVtxHypoCondNames |
|
private |
hypo names for sub-decays to be considered
Definition at line 110 of file Select_Bmumu.h.
◆ m_subDecVtxHypoFlagNames
std::vector<std::string> DerivationFramework::Select_Bmumu::m_subDecVtxHypoFlagNames |
|
private |
names of hypo flags set on sub-decays if passing
Definition at line 111 of file Select_Bmumu.h.
◆ m_trkMasses
std::vector<double> DerivationFramework::Select_Bmumu::m_trkMasses |
|
private |
◆ m_useMuCalcMass
bool DerivationFramework::Select_Bmumu::m_useMuCalcMass |
|
private |
◆ m_v0Tools
ToolHandle<Trk::V0Tools> DerivationFramework::Select_Bmumu::m_v0Tools |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
double m_massHypo
vertex mass hypothesis
bool setTau3dErr(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0, const tau_type tauType=BPhysHypoHelper::TAU_CONST_MASS)
proper decay time error
bool m_doBlinding
enable blinding range
Temporary container used until we have I/O for AuxStoreInternal.
std::vector< double > m_trkMasses
track mass hypotheses
Helper class to provide type-safe access to aux data.
bool m_do3d
add 3d proper time
bool setTauErr(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0, const tau_type tauType=BPhysHypoHelper::TAU_CONST_MASS)
proper decay time error
bool massInBlindedRegion(float mass) const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
bool pass(const SG::AuxElement &em, const std::string &hypo) const
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
double m_blindMassMin
blinding mass range
virtual void setOwner(IDataHandleHolder *o)=0
ToolHandle< CP::IMuonSelectionTool > m_muSelectionTool
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
bool m_useMuCalcMass
also check against MUCALC mass
#define BPHYS_CHECK(EXP)
Useful CHECK macro.
double m_massMin
invariant mass range
double m_massMax
invariant mass range
Helper class to provide type-safe access to aux data.
(Non-const) Iterator class for DataVector/DataList.
double m_chi2Max
max chi2 cut
void ProcessVertex(xAOD::BPhysHypoHelper &, xAOD::BPhysHelper::pv_type) const
std::pair< std::vector< unsigned int >, bool > res
bool m_doCutBlinded
enable cutting blinded vertices
#define CHECK(...)
Evaluate an expression and check for errors.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
uint32_t CutIdentifier
InstanceIdentifier is a unique identifer used for every AthFilterAlgorithm instance.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
bool setTau3d(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0, const tau_type tauType=BPhysHypoHelper::TAU_CONST_MASS)
proper decay time
const xAOD::Vertex * vtx() const
Getter method for the cached xAOD::Vertex.
std::vector< std::string > m_subDecVtxHypoFlagNames
names of hypo flags set on sub-decays if passing
virtual StatusCode sysInitialize() override
Perform system initialization for an algorithm.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
std::vector< std::string > m_subDecVtxContNames
names of sub-decay vertex containers
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
std::string m_hypoName
job options
int m_DoVertexType
Allows user to skip certain vertexes - bitwise test 7==all(111)
const xAOD::Vertex * pv(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Get the refitted collision vertex of type pv_type.
bool m_blindOnlyAllMuonsTight
only blind candidates with all tight muons
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::vector< std::string > m_subDecVtxHypoCondNames
hypo names for sub-decays to be considered
std::string m_inputVtxContainerName
name of the input container name
bool massCuts(float mass) const
bool setTau(const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0, const tau_type tauType=BPhysHypoHelper::TAU_CONST_MASS)
: Set the proper decay time and error.
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>
bool setPassIfNotAvailable(SG::AuxElement &em, const std::string &hypo, bool passVal) const
double m_blindMassMax
blinding mass range
bool checkAllMuonsTight(const std::vector< const xAOD::Muon * > &muons, int maxMuonsToCheck=-1) const
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
ToolHandle< Trk::V0Tools > m_v0Tools
tools
bool setPass(const SG::AuxElement &em, const std::string &hypo, bool passVal) const