|
ATLAS Offline Software
|
Go to the documentation of this file.
74 const IInterface*
p) :
76 m_v0Tools(
"Trk::V0Tools"),
77 m_muSelectionTool(
"CP::MuonSelectionTool/MuonSelectionTool") {
79 declareInterface<DerivationFramework::IAugmentationTool>(
this);
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;
156 return StatusCode::SUCCESS;
162 constexpr
float errConst = -9999999;
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) {
337 bool blindedMuCalcMass(
true);
339 std::string bname =
m_hypoName+
"_MUCALC_mass";
342 passedMuCalcMassCut =
massCuts(mucalcAcc(**bcandItr));
345 passedMuCalcMassCut =
false;
346 blindedMuCalcMass =
false;
347 ATH_MSG_INFO(
"MUCALC mass not available: " << bname <<
" !");
358 if ( blindedMass && blindedMuCalcMass ) {
361 if ( allMuonsTight ) {
362 nInBlindedRegionAllMuonsTight++;
370 if ( !(passedMassCut || passedMuCalcMassCut) ) {
393 for (
int ipv=0; ipv<npVtx; ++ipv) {
405 for (
int ipv=0; ipv<npVtx; ++ipv) {
409 && allMuonsTight) ) {
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;
473 muons,
int maxMuonsToCheck)
const {
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 =
497 return flagAcc.
isAvailable(em) && flagAcc(em) != 0;
503 bool passVal)
const {
506 flagDec(em) = passVal;
515 bool passVal)
const {
def retrieve(aClass, aKey=None)
bool setMass(const float val)
Set given invariant mass and its error.
Select_Bmumu(const std::string &t, const std::string &n, const IInterface *p)
StatusCode finalize() override
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)
Base class for elements of a container that can have aux data.
ElementLink< xAOD::VertexContainer > VertexLink
bool pass(const SG::AuxElement &em, const std::string &hypo) const
double m_blindMassMin
blinding mass range
StatusCode initialize() override
initialization and finalization
std::vector< VertexLink > VertexLinkVector
virtual StatusCode addBranches() const override
: augmentation and selection Retrieved vertices are augmented with usual information.
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.
float mass() const
Get invariant mass and its error.
double m_massMin
invariant mass range
pv_type
: Enum type of the PV
double m_massMax
invariant mass range
Helper class to provide type-safe access to aux data.
(Non-const) Iterator class for DataVector/DataList.
bool setPass(bool passVal)
get the pass flag for this hypothesis
::StatusCode StatusCode
StatusCode definition for legacy code.
const xAOD::Vertex * precedingVertex(const size_t index)
Returns pointer to a preceding vertex.
double m_chi2Max
max chi2 cut
: B-physcis xAOD helpers.
void ProcessVertex(xAOD::BPhysHypoHelper &, xAOD::BPhysHelper::pv_type) const
bool m_doCutBlinded
enable cutting blinded vertices
#define CHECK(...)
Evaluate an expression and check for errors.
ElementLink implementation for ROOT usage.
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
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
float chiSquared() const
Returns the of the vertex fit as float.
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
std::string m_hypoName
job options
int nPrecedingVertices()
: Links to preceding vertices
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
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
const std::vector< const xAOD::Muon * > & muons()
Returns linked muons.
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.
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
bool setMassErr(const float val)
invariant mass error
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Base class for elements of a container that can have aux data.
ToolHandle< Trk::V0Tools > m_v0Tools
tools
bool setPass(const SG::AuxElement &em, const std::string &hypo, bool passVal) const