|
ATLAS Offline Software
|
Implementation of the Beam Background Identification Method.
More...
#include <BeamBackgroundFiller.h>
|
| BeamBackgroundFiller (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~BeamBackgroundFiller ()=default |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute (const EventContext &ctx) const override |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. More...
|
|
virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
|
virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
virtual bool | filterPassed (const EventContext &ctx) const |
|
virtual void | setFilterPassed (bool state, const EventContext &ctx) 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 |
|
|
SG::ReadHandleKeyArray< Trk::SegmentCollection > | m_segmentKeys |
| ReadHandleKey for Trk::SegmentCollection from CSC. More...
|
|
SG::ReadHandleKey< xAOD::CaloClusterContainer > | m_caloClusterContainerReadHandleKey |
| ReadHandleKey for CaloClusterContainer. More...
|
|
SG::ReadHandleKey< xAOD::JetContainer > | m_jetContainerReadHandleKey |
| ReadHandleKey for JetContainer. More...
|
|
SG::WriteHandleKey< BeamBackgroundData > | m_beamBackgroundDataWriteHandleKey |
|
ToolHandle< Muon::IMuonSegmentSelectionTool > | m_segmentSelector {this, "SegmentSelector",""} |
|
Gaudi::Property< double > | m_thetaCutNCB {this, "cutThetaNCB", 5. * Gaudi::Units::deg} |
| Inclanation cut between the segment position and its direction. More...
|
|
Gaudi::Property< double > | m_cutDphiSegAC {this,"cutPhi", 4.* Gaudi::Units::deg} |
|
Gaudi::Property< double > | m_clusEnergyCut {this,"clustEnergy", 10. *Gaudi::Units::GeV} |
| Minimum cut on the cluster energy to be considered. More...
|
|
Gaudi::Property< double > | m_clusRadiusLow {this, "cutRadiusLow", 881. * Gaudi::Units::mm} |
|
Gaudi::Property< double > | m_clusRadiusHigh {this,"cutRadiusHigh", 4250. * Gaudi::Units::mm} |
|
Gaudi::Property< double > | m_cutDphiClusSeg {this, "cutDphiClusSeg", 4.* Gaudi::Units::deg} |
|
Gaudi::Property< double > | m_cutDradClusSeg {this,"cutDrClusSet", 40. * Gaudi::Units::cm} |
|
Gaudi::Property< double > | m_cutMuonTime {this, "cutMuonTime", 25.} |
|
Gaudi::Property< double > | m_cutClusTime {this,"cutClusTime", 2.5} |
|
Gaudi::Property< double > | m_cutTimeDiffAC {this,"cutTimeDiffAC", 25.} |
|
Gaudi::Property< double > | m_cutDrdz {this,"cutDrdz", 0.15} |
|
ServiceHandle< Muon::IMuonEDMHelperSvc > | m_edmHelperSvc |
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc |
|
DataObjIDColl | m_extendedExtraObjects |
| Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
|
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Implementation of the Beam Background Identification Method.
This implementation defines the selection criteria for identifying beam background muons, and looks for them based on several methods. The result are stored in BeamBackgroundData.
- Author
- David Salek David.nosp@m..Sal.nosp@m.ek@ce.nosp@m.rn.c.nosp@m.h
- Revision
- 693115
- Date
- 2015-09-04 09:22:39 +0200 (Fri, 04 Sep 2015)
Definition at line 37 of file BeamBackgroundFiller.h.
◆ StoreGateSvc_t
◆ BeamBackgroundFiller()
BeamBackgroundFiller::BeamBackgroundFiller |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~BeamBackgroundFiller()
virtual BeamBackgroundFiller::~BeamBackgroundFiller |
( |
| ) |
|
|
virtualdefault |
◆ cardinality()
unsigned int AthReentrantAlgorithm::cardinality |
( |
| ) |
const |
|
overridevirtualinherited |
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 55 of file AthReentrantAlgorithm.cxx.
◆ ClusterShapeMethod()
void BeamBackgroundFiller::ClusterShapeMethod |
( |
Cache & |
cache | ) |
const |
|
private |
This function is the implementation of the "Cluster-Shape Method".
The shape of the cluster is described by the variable dr/dz which is the ratio of the standard deviation of the radial position of the contianed cells and the standard deviation of the z-position of the contained cells. Only the clusters matched with muon segments are checked.
Definition at line 574 of file BeamBackgroundFiller.cxx.
575 cache.m_numClusterShape = 0;
576 cache.m_drdzClus.clear();
578 for (
unsigned int clusIndex = 0; clusIndex < cache.m_indexClus.size();
586 rClus = rClus / cosh(clus->
eta());
587 double zClus = rClus * sinh(clus->
eta());
599 for (; firstCell != lastCell; ++firstCell) {
602 if (
cell->time() == 0.)
604 if (
cell->energy() < 100.)
611 const double rCell = dde->
r();
612 const double zCell = dde->
z();
613 dr =
dr + (rCell - rClus) * (rCell - rClus);
614 dz = dz + (zCell - zClus) * (zCell - zClus);
619 dr = sqrt(
dr / nCell);
620 dz = sqrt(dz / nCell);
625 cache.m_drdzClus.push_back(drdz);
631 for (
unsigned int segIndex = 0; segIndex < cache.m_indexSeg.size();
633 if (!(cache.m_matchMatrix[clusIndex][segIndex] & 1))
635 cache.m_matchMatrix[clusIndex][segIndex] =
636 cache.m_matchMatrix[clusIndex][segIndex] |
638 cache.m_resultSeg[segIndex] = cache.m_resultSeg[segIndex] |
639 cache.m_matchMatrix[clusIndex][segIndex];
641 cache.m_resultClus[clusIndex] =
643 cache.m_numClusterShape++;
◆ 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);
◆ 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.
◆ 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.
◆ 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]
◆ execute()
StatusCode BeamBackgroundFiller::execute |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
◆ 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 & AthReentrantAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 79 of file AthReentrantAlgorithm.cxx.
86 return Algorithm::extraOutputDeps();
◆ FillBeamBackgroundData()
This function stores all the results in BeamBackgroundData.
Definition at line 713 of file BeamBackgroundFiller.cxx.
717 writeHandle->SetNumSegment(cache.m_numSegment);
718 writeHandle->SetNumSegmentEarly(cache.m_numSegmentEarly);
719 writeHandle->SetNumSegmentACNoTime(cache.m_numSegmentACNoTime);
720 writeHandle->SetNumSegmentAC(cache.m_numSegmentAC);
721 writeHandle->SetNumMatched(cache.m_numMatched);
722 writeHandle->SetNumNoTimeLoose(cache.m_numNoTimeLoose);
723 writeHandle->SetNumNoTimeMedium(cache.m_numNoTimeMedium);
724 writeHandle->SetNumNoTimeTight(cache.m_numNoTimeTight);
725 writeHandle->SetNumOneSidedLoose(cache.m_numOneSidedLoose);
726 writeHandle->SetNumOneSidedMedium(cache.m_numOneSidedMedium);
727 writeHandle->SetNumOneSidedTight(cache.m_numOneSidedTight);
728 writeHandle->SetNumTwoSidedNoTime(cache.m_numTwoSidedNoTime);
729 writeHandle->SetNumTwoSided(cache.m_numTwoSided);
730 writeHandle->SetNumClusterShape(cache.m_numClusterShape);
731 writeHandle->SetNumJet(cache.m_numJet);
734 for (
unsigned int i = 0;
i < cache.m_indexSeg.size();
i++) {
735 decision |= cache.m_resultSeg[
i];
737 for (
unsigned int i = 0;
i < cache.m_indexClus.size();
i++) {
738 decision |= cache.m_resultClus[
i];
740 writeHandle->SetDecision(decision);
742 writeHandle->SetDirection(cache.m_direction);
744 writeHandle->FillIndexSeg(cache.m_indexSeg);
745 writeHandle->FillResultSeg(&cache.m_resultSeg);
746 writeHandle->FillIndexClus(cache.m_indexClus);
747 writeHandle->FillMatchMatrix(&cache.m_matchMatrix);
749 writeHandle->FillResultClus(&cache.m_resultClus);
750 writeHandle->FillIndexJet(cache.m_indexJet);
751 writeHandle->FillDrdzClus(&cache.m_drdzClus);
753 writeHandle->FillIndexJet(cache.m_indexJet);
754 writeHandle->FillResultJet(&cache.m_resultJet);
757 << cache.m_numSegment <<
" " << cache.m_numSegmentEarly <<
" "
758 << cache.m_numSegmentACNoTime <<
" " << cache.m_numSegmentAC);
761 << cache.m_numMatched <<
" " << cache.m_numNoTimeLoose <<
" "
762 << cache.m_numNoTimeMedium <<
" " << cache.m_numNoTimeTight
763 <<
" " << cache.m_numOneSidedLoose <<
" "
764 << cache.m_numOneSidedMedium <<
" " << cache.m_numOneSidedTight
765 <<
" " << cache.m_numTwoSidedNoTime <<
" "
766 << cache.m_numTwoSided <<
" " << cache.m_numClusterShape);
◆ FillMatchMatrix()
void BeamBackgroundFiller::FillMatchMatrix |
( |
const EventContext & |
ctx, |
|
|
Cache & |
cache |
|
) |
| const |
|
private |
This function selects the muon segments with the direction parallel to the beam pipe and calorimeter clusters above certain energy threshold.
Matching matrix is created to store the results of beam background identification for each cluster and segment
Select only the segements from the EI station
match in phi
Definition at line 79 of file BeamBackgroundFiller.cxx.
87 if(!ncbSegmentHandle.isPresent()) {
88 throw std::runtime_error(
"Could not load the " +
key.key() +
" segment container");
90 unsigned int ncbCounter = 0;
91 for (
const Trk::Segment *ncbSegment : *ncbSegmentHandle) {
97 ATH_MSG_WARNING(
"Found a muon segment in the container which pretends not to be a muon segment..");
110 constexpr
int highestSegQual = 3;
115 cache.m_indexSeg.push_back(segLink);
119 cache.m_resultSeg.assign(cache.m_indexSeg.size(), 0);
123 if (!caloClusterContainerReadHandle.isPresent()){
124 throw std::runtime_error(
"Failed to load the calorimeter cluster container");
141 unsigned int caloClusterCounter = 0;
142 for (
const xAOD::CaloCluster* thisCaloCluster : *caloClusterContainerReadHandle) {
143 ++caloClusterCounter;
145 for (
auto lay : caloLayers){
146 eClus +=thisCaloCluster->eSample(lay);
158 rClus = rClus / std::cosh(thisCaloCluster->eta());
166 const double phiClus = thisCaloCluster->phi();
169 std::vector<int> matchedSegmentsPerCluster(cache.m_indexSeg.size(), 0);
172 for (
unsigned int j = 0; j < cache.m_indexSeg.size(); j++) {
176 const double phiSeg = globalPos.phi();
182 <<
"Segment: "<<
Amg::toString(globalPos)<<
", phi: "<<globalPos.phi()
183 <<
" --- Cluster: "<<phiClus);
187 const double rSeg = globalPos.perp();
191 <<
"Segment: "<<
Amg::toString(globalPos)<<
", phi: "<<globalPos.perp()
192 <<
" --- Cluster: "<<rClus);
195 matchedSegmentsPerCluster[j] = 1;
205 clusLink.
toIndexedElement(*caloClusterContainerReadHandle, caloClusterCounter - 1);
206 cache.m_indexClus.push_back(std::move(clusLink));
207 cache.m_matchMatrix.push_back(std::move(matchedSegmentsPerCluster));
208 ++cache.m_numMatched;
211 cache.m_resultClus.assign(cache.m_indexClus.size(), 1);
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ FindFakeJets()
void BeamBackgroundFiller::FindFakeJets |
( |
const EventContext & |
ctx, |
|
|
Cache & |
cache |
|
) |
| const |
|
private |
This function checks whether the matched clusters are contained in any jets.
If yes, the jet is marked as fake jet and the corresponding result of the Beam Background Identification Method is stored (using the OR condition if more than one cluster is found within one jet)
Definition at line 655 of file BeamBackgroundFiller.cxx.
658 cache.m_indexJet.clear();
659 cache.m_resultJet.clear();
665 if (!jetContainerReadHandle.isValid()) {
671 unsigned int jetCounter = 0;
672 for (
const auto *thisJet : *jetContainerReadHandle) {
673 bool isFakeJet =
false;
680 for (; constIt != constItE; ++constIt) {
686 for (
unsigned int clusIndex = 0; clusIndex < cache.m_indexClus.size();
690 if (jetConst == clus) {
692 resultJet = resultJet | cache.m_resultClus[clusIndex];
700 cache.m_indexJet.push_back(jetLink);
701 cache.m_resultJet.push_back(resultJet);
◆ GetSegmentTime()
Need to check how to translate the bcid bitmaps into timings
Definition at line 216 of file BeamBackgroundFiller.cxx.
218 unsigned int nMeas{0};
234 constexpr
double tdcBinSize = 0.78125;
235 time += tdcBinSize * mdtPrd->
tdc();
◆ initialize()
StatusCode BeamBackgroundFiller::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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.
◆ isClonable()
bool AthReentrantAlgorithm::isClonable |
( |
| ) |
const |
|
overridevirtualinherited |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, InDet::SiSPGNNTrackMaker, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ OneSidedMethod()
void BeamBackgroundFiller::OneSidedMethod |
( |
Cache & |
cache | ) |
const |
|
private |
This function is the implementation of the "No-Time Method" and the "One-Sided Method".
The "One-Sided Method" compares the time of the calorimeter cluster with the expected time. The expected time is calculated based on the direction of the beam background muon which is reconstructed from the position and time of the muon segment. The "No-Time Method" does not use the time information of the muon segment thus the direction of the beam background muon is not known. Therefore, the cluster time is compared to two expected time values (corresponding to both A->C and C->A directions).
Definition at line 361 of file BeamBackgroundFiller.cxx.
363 for (
unsigned int clusIndex = 0; clusIndex < cache.m_indexClus.size();
372 rClus = rClus / std::cosh(clus->
eta());
373 double zClus = rClus * std::sinh(clus->
eta());
374 double tClus = clus->
time();
377 double expectedClusterTimeAC = -(zClus + std::hypot(rClus, zClus)) * inv_c;
378 double expectedClusterTimeCA = -(-zClus + std::hypot(rClus, zClus)) * inv_c;
380 for (
unsigned int segIndex = 0; segIndex < cache.m_indexSeg.size(); segIndex++) {
388 double zSeg = globalPos.z();
394 double inTime = -(-std::abs(zSeg) + globalPos.mag()) * inv_c;
395 double early = -(std::abs(zSeg) + globalPos.mag()) * inv_c;
403 if ((zSeg > 0 && timeStatus == 2) || (zSeg < 0 && timeStatus == 1))
405 if ((zSeg > 0 && timeStatus == 1) || (zSeg < 0 && timeStatus == 2))
410 if (std::abs(tClus - expectedClusterTimeAC) <
m_cutClusTime ||
424 if (direction == 1) {
425 if (std::abs(tClus - expectedClusterTimeAC) <
m_cutClusTime) {
434 }
else if (direction == -1) {
435 if (std::abs(tClus - expectedClusterTimeCA) <
m_cutClusTime) {
446 cache.m_resultClus[clusIndex] |= cache.m_matchMatrix[clusIndex][segIndex];
447 cache.m_resultSeg[segIndex] |= cache.m_matchMatrix[clusIndex][segIndex];
451 cache.m_numNoTimeLoose++;
453 cache.m_numNoTimeMedium++;
455 cache.m_numNoTimeTight++;
458 cache.m_numOneSidedLoose++;
460 cache.m_numOneSidedMedium++;
462 cache.m_numOneSidedTight++;
◆ 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.
◆ renounce()
◆ renounceArray()
◆ SegmentMethod()
void BeamBackgroundFiller::SegmentMethod |
( |
Cache & |
cache | ) |
const |
|
private |
This function looks at the segments found by the FillMatchMatrix function.
The following results are set:
- number of segments with the direciton parallel to the beam pipe (all the segments in the matching matrix)
- number of such segments with early time
- number of segment pairs on side A and C
- number of segment pairs on side A and C with the corresponding time difference
take only the segments on side A (z > 0)
Definition at line 261 of file BeamBackgroundFiller.cxx.
263 for (
unsigned int segIndex = 0; segIndex < cache.m_indexSeg.size(); ++segIndex) {
268 double zSeg = globalPos.z();
277 cache.m_numSegment++;
282 double inTime = -(-std::abs(zSeg) + globalPos.mag()) * inv_c;
283 double early = -(std::abs(zSeg) + globalPos.mag()) * inv_c;
289 if (timeStatus == 2) {
290 cache.m_numSegmentEarly++;
296 unsigned int segIndexA = segIndex;
299 int timeStatusA = timeStatus;
301 double phiSegA = globalPos.phi();
303 for (
unsigned int segIndexC = 0; segIndexC < cache.m_indexSeg.size(); segIndexC++) {
308 double zSegC = globalPos.z();
320 double inTime = -(-std::abs(zSegC) + globalPos.mag()) * inv_c;
321 double early = -(std::abs(zSegC) + globalPos.mag()) * inv_c;
327 double phiSegC = globalPos.phi();
333 cache.m_numSegmentACNoTime++;
337 if (timeStatusA == 0 || timeStatusC == 0)
342 cache.m_numSegmentAC++;
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ sysExecute()
StatusCode AthReentrantAlgorithm::sysExecute |
( |
const EventContext & |
ctx | ) |
|
|
overridevirtualinherited |
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Definition at line 67 of file AthReentrantAlgorithm.cxx.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ sysInitialize()
StatusCode AthReentrantAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.
Reimplemented in InputMakerBase, and HypoBase.
Definition at line 96 of file AthReentrantAlgorithm.cxx.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ TwoSidedMethod()
void BeamBackgroundFiller::TwoSidedMethod |
( |
Cache & |
cache | ) |
const |
|
private |
This function is the implementation of the "Two-Sided No-Time Method" and the "Two-Sided Method" that looks at the clusters matched with at least one muon segment on side A and one muon segment on side C.
In case of the "Two-Sided Method", corresponding time difference of the muon segments is required and the direction of the beam background muon is also stored.
Definition at line 475 of file BeamBackgroundFiller.cxx.
478 for (
unsigned int clusIndex = 0; clusIndex < cache.m_indexClus.size(); clusIndex++) {
480 for (
unsigned int segIndexA = 0; segIndexA < cache.m_indexSeg.size(); segIndexA++) {
488 double zSegA = globalPos.z();
497 double inTime = -(-std::abs(zSegA) + globalPos.mag()) * inv_c;
498 double early = -(std::abs(zSegA) + globalPos.mag()) * inv_c;
505 for (
unsigned int segIndexC = 0; segIndexC < cache.m_indexSeg.size(); segIndexC++) {
513 double zSegC = globalPos.z();
524 double inTime = -(-std::abs(zSegC) + globalPos.mag()) * inv_c;
525 double early = -(std::abs(zSegC) + globalPos.mag()) * inv_c;
535 cache.m_resultSeg[segIndexA] |= cache.m_matchMatrix[clusIndex][segIndexA];
536 cache.m_resultSeg[segIndexC] |= cache.m_matchMatrix[clusIndex][segIndexC];
538 if (timeStatusA == 0 || timeStatusC == 0)
545 cache.m_resultSeg[segIndexA] |= cache.m_matchMatrix[clusIndex][segIndexA];
546 cache.m_resultSeg[segIndexC] |= cache.m_matchMatrix[clusIndex][segIndexC];
549 if (timeStatusA == 2)
551 if (timeStatusC == 2)
556 cache.m_resultClus[clusIndex] |= cache.m_matchMatrix[clusIndex][segIndexA];
560 cache.m_numTwoSidedNoTime++;
562 cache.m_numTwoSided++;
◆ updateVHKA()
◆ m_beamBackgroundDataWriteHandleKey
Initial value:{
this, "BeamBackgroundKey", "BeamBackgroundData",
"WriteHandleKey for BeamBackgroundData"}
Definition at line 126 of file BeamBackgroundFiller.h.
◆ m_caloClusterContainerReadHandleKey
◆ m_clusEnergyCut
Gaudi::Property<double> BeamBackgroundFiller::m_clusEnergyCut {this,"clustEnergy", 10. *Gaudi::Units::GeV} |
|
private |
◆ m_clusRadiusHigh
Gaudi::Property<double> BeamBackgroundFiller::m_clusRadiusHigh {this,"cutRadiusHigh", 4250. * Gaudi::Units::mm} |
|
private |
◆ m_clusRadiusLow
Gaudi::Property<double> BeamBackgroundFiller::m_clusRadiusLow {this, "cutRadiusLow", 881. * Gaudi::Units::mm} |
|
private |
◆ m_cutClusTime
Gaudi::Property<double> BeamBackgroundFiller::m_cutClusTime {this,"cutClusTime", 2.5} |
|
private |
◆ m_cutDphiClusSeg
Gaudi::Property<double> BeamBackgroundFiller::m_cutDphiClusSeg {this, "cutDphiClusSeg", 4.* Gaudi::Units::deg} |
|
private |
◆ m_cutDphiSegAC
Gaudi::Property<double> BeamBackgroundFiller::m_cutDphiSegAC {this,"cutPhi", 4.* Gaudi::Units::deg} |
|
private |
◆ m_cutDradClusSeg
Gaudi::Property<double> BeamBackgroundFiller::m_cutDradClusSeg {this,"cutDrClusSet", 40. * Gaudi::Units::cm} |
|
private |
◆ m_cutDrdz
Gaudi::Property<double> BeamBackgroundFiller::m_cutDrdz {this,"cutDrdz", 0.15} |
|
private |
◆ m_cutMuonTime
Gaudi::Property<double> BeamBackgroundFiller::m_cutMuonTime {this, "cutMuonTime", 25.} |
|
private |
◆ m_cutTimeDiffAC
Gaudi::Property<double> BeamBackgroundFiller::m_cutTimeDiffAC {this,"cutTimeDiffAC", 25.} |
|
private |
◆ m_detStore
◆ m_edmHelperSvc
Initial value:{
this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface"}
Definition at line 155 of file BeamBackgroundFiller.h.
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects |
|
privateinherited |
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 153 of file AthReentrantAlgorithm.h.
◆ m_idHelperSvc
Initial value:{
this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
Definition at line 158 of file BeamBackgroundFiller.h.
◆ m_jetContainerReadHandleKey
Initial value:{
this, "jetContainerKey", "AntiKt4EMTopoJets",
"ReadHandleKey for JetContainer"}
ReadHandleKey for JetContainer.
Definition at line 121 of file BeamBackgroundFiller.h.
◆ m_segmentKeys
◆ m_segmentSelector
◆ m_thetaCutNCB
Gaudi::Property<double> BeamBackgroundFiller::m_thetaCutNCB {this, "cutThetaNCB", 5. * Gaudi::Units::deg} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
@ CENTER_MAG
Cluster Centroid ( )
SG::ReadHandleKey< xAOD::JetContainer > m_jetContainerReadHandleKey
ReadHandleKey for JetContainer.
void SegmentMethod(Cache &cache) const
This function looks at the segments found by the FillMatchMatrix function.
flt_t time() const
Access cluster time.
Gaudi::Property< double > m_cutDphiSegAC
Gaudi::Property< double > m_clusRadiusHigh
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version)
Class to represent MM measurements.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClusterContainerReadHandleKey
ReadHandleKey for CaloClusterContainer.
void FillBeamBackgroundData(SG::WriteHandle< BeamBackgroundData > &beamBackgroundDataWriteHandle, Cache &cache) const
This function stores all the results in BeamBackgroundData.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Gaudi::Property< double > m_cutDphiClusSeg
Gaudi::Property< double > m_cutDradClusSeg
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
bool toIndexedElement(BaseConstReference data, index_type elemID, IProxyDict *sg=0)
Set the link to an element given by index and pointer to container.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual bool type(PrepRawDataType type) const =0
Interface method checking the type.
std::vector< size_t > vec
#define ATH_MSG_VERBOSE(x)
Property holding a SG store/key/clid from which a ReadHandle is made.
@ u
Enums for curvilinear frames.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Property< double > m_cutDrdz
Gaudi::Property< double > m_thetaCutNCB
Inclanation cut between the segment position and its direction.
double GetSegmentTime(const Muon::MuonSegment &pMuonSegment) const
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
Gaudi::Property< double > m_cutTimeDiffAC
Description of a calorimeter cluster.
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
AthReentrantAlgorithm()
Default constructor:
Gaudi::Property< double > m_cutMuonTime
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
virtual double eta() const
The pseudorapidity ( ) of the particle.
Gaudi::Property< double > m_clusRadiusLow
Class representing clusters from the CSC.
::StatusCode StatusCode
StatusCode definition for legacy code.
void FindFakeJets(const EventContext &ctx, Cache &cache) const
This function checks whether the matched clusters are contained in any jets.
const std::vector< const Trk::MeasurementBase * > & containedMeasurements() const
returns the vector of Trk::MeasurementBase objects
void ClusterShapeMethod(Cache &cache) const
This function is the implementation of the "Cluster-Shape Method".
double time() const
Returns the time.
#define CHECK(...)
Evaluate an expression and check for errors.
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
Gaudi::Property< double > m_cutClusTime
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
const IParticle * rawConstituent() const
Access the real underlying IParticle.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Gaudi::Property< double > m_clusEnergyCut
Minimum cut on the cluster energy to be considered.
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink implementation for ROOT usage.
Identifier identify() const
return the identifier
int tdc() const
Returns the TDC (typically range is 0 to 2500).
Type::ObjectType type() const
The full 4-momentum of the particle.
virtual StatusCode sysInitialize() override
Override sysInitialize.
short int time() const
Returns the time (in ns)
Class to represent measurements from the Monitored Drift Tubes.
Eigen::Matrix< double, 3, 1 > Vector3D
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
SG::WriteHandleKey< BeamBackgroundData > m_beamBackgroundDataWriteHandleKey
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
ToolHandle< Muon::IMuonSegmentSelectionTool > m_segmentSelector
void FillMatchMatrix(const EventContext &ctx, Cache &cache) const
This function selects the muon segments with the direction parallel to the beam pipe and calorimeter ...
Data object for each calorimeter readout cell.
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
const_cell_iterator cell_end() const
void OneSidedMethod(Cache &cache) const
This function is the implementation of the "No-Time Method" and the "One-Sided Method".
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
StIndex
enum to classify the different station layers in the muon spectrometer
A vector of jet constituents at the scale used during jet finding.
virtual const Amg::Vector3D & globalPosition() const override final
global position
SG::ReadHandleKeyArray< Trk::SegmentCollection > m_segmentKeys
ReadHandleKey for Trk::SegmentCollection from CSC.
void TwoSidedMethod(Cache &cache) const
This function is the implementation of the "Two-Sided No-Time Method" and the "Two-Sided Method" that...
Class to represent sTgc measurements.
const_iterator to loop over cells belonging to a cluster
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const Amg::Vector3D & globalDirection() const
global direction