an algorithm to copy in the overlayed store the calib hits from the signal event
More...
#include <MergeCalibHitsTool.h>
|
| | MergeCalibHitsTool (const std::string &type, const std::string &name, const IInterface *parent) |
| virtual StatusCode | initialize () override final |
| | called before the event loop
|
| virtual StatusCode | prepareEvent (const EventContext &ctx, unsigned int nInputEvents) override final |
| | called before the subevts loop.
|
| virtual StatusCode | mergeEvent (const EventContext &ctx) override final |
| | called at the end of the subevts loop.
|
| virtual StatusCode | processBunchXing (int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents) override final |
| | called for each active bunch-crossing to process current SubEvents bunchXing is in ns
|
| virtual StatusCode | processAllSubEvents (const EventContext &ctx) override final |
| | return false if not interested in certain xing times (in ns) implemented by default in PileUpToolBase as FirstXing<=bunchXing<=LastXing
|
an algorithm to copy in the overlayed store the calib hits from the signal event
$Id:
- Author
- Guillaume Unal (from Paolo's MergeMcEventCollection)
Definition at line 25 of file MergeCalibHitsTool.h.
◆ MergeCalibHitsTool()
| MergeCalibHitsTool::MergeCalibHitsTool |
( |
const std::string & | type, |
|
|
const std::string & | name, |
|
|
const IInterface * | parent ) |
◆ filterPassed()
| virtual bool PileUpToolBase::filterPassed |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ initialize()
| StatusCode MergeCalibHitsTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
called before the event loop
Reimplemented from PileUpToolBase.
Definition at line 17 of file MergeCalibHitsTool.cxx.
17 {
19
21
22
30 }
31 else {
39 }
41 return StatusCode::SUCCESS;
42}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
◆ mergeEvent()
| StatusCode MergeCalibHitsTool::mergeEvent |
( |
const EventContext & | ctx | ) |
|
|
finaloverridevirtual |
called at the end of the subevts loop.
Not (necessarily) able to access SubEvents
Definition at line 113 of file MergeCalibHitsTool.cxx.
113 {
117 ATH_MSG_ERROR (
" Cannot record new calibration hit in overlayed event " );
118 return StatusCode::FAILURE;
119 }
120 }
121 return StatusCode::SUCCESS;
122}
◆ prepareEvent()
| StatusCode MergeCalibHitsTool::prepareEvent |
( |
const EventContext & | ctx, |
|
|
unsigned int | nInputEvents ) |
|
finaloverridevirtual |
called before the subevts loop.
Not (necessarily) able to access SubEvents
Definition at line 45 of file MergeCalibHitsTool.cxx.
45 {
47 ATH_MSG_VERBOSE(
"prepareEvent: there are " << nInputEvents <<
" subevents in this event.");
49
53 }
54 return StatusCode::SUCCESS;
55}
◆ processAllSubEvents()
| StatusCode MergeCalibHitsTool::processAllSubEvents |
( |
const EventContext & | ctx | ) |
|
|
finaloverridevirtual |
return false if not interested in certain xing times (in ns) implemented by default in PileUpToolBase as FirstXing<=bunchXing<=LastXing
Propagate the Calib Hit Containers to the output StoreGate
Reimplemented from PileUpToolBase.
Definition at line 124 of file MergeCalibHitsTool.cxx.
124 {
126
127
129
131
133
134
136 ,hitCont).isSuccess()) || !hitCont) {
137 ATH_MSG_DEBUG (
" Cannot find calibrationHit from PileUp service " );
138 continue;
139 }
140
141
143
144
145 int nhit=0;
146 ATH_MSG_DEBUG (
" Start loop over calibration hits of signal event " );
147 for (const CaloCalibrationHit* hit : *hitCont) {
148 nhit++;
149 newContainer->
push_back(
new CaloCalibrationHit(*hit));
150 }
151
152 ATH_MSG_DEBUG (
" Number of hits found in this container " << nhit );
153
154
156 ATH_MSG_ERROR (
" Cannot record new calibration hit in overlayed event " );
157 return StatusCode::FAILURE;
158 }
159
160 }
161
162 return StatusCode::SUCCESS;
163}
CaloCalibrationHitContainer
◆ processBunchXing()
called for each active bunch-crossing to process current SubEvents bunchXing is in ns
Reimplemented from PileUpToolBase.
Definition at line 57 of file MergeCalibHitsTool.cxx.
60{
62 while (iEvt != eSubEvents) {
63
65 ATH_MSG_VERBOSE (
" Have already seen a SubEvent marked as Signal! Don't need to look at any others! " );
66 break;
67 }
68
71 }
72 else {
73
74 ++iEvt;
75 continue;
76 }
77
78
83 bunchXing, iEvt).isSuccess()){
85 continue;
86 }
87
88
91 }
92
93 int nhit=0;
94 ATH_MSG_VERBOSE (
" Start loop over calibration hits of signal event " );
97 while(calibhititer != calibhitend) {
98 ++nhit;
100 ++calibhititer;
101 }
102
104 << " container = " << nhit );
105 }
106
108 ++iEvt;
109 }
110
111 return StatusCode::SUCCESS;
112}
boost::transform_iterator< make_const, typename CONT::const_iterator > const_iterator
const_iterator end() const
const_iterator begin() const
@ Signal
The signal event.
◆ resetFilter()
| virtual void PileUpToolBase::resetFilter |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ toProcess()
| virtual bool PileUpToolBase::toProcess |
( |
int | bunchXing | ) |
const |
|
inlineoverridevirtualinherited |
◆ m_CalibrationHitContainer
| std::vector<std::string> MergeCalibHitsTool::m_CalibrationHitContainer |
|
private |
◆ m_filterPassed
| bool PileUpToolBase::m_filterPassed {true} |
|
protectedinherited |
◆ m_firstSubEvent
| bool MergeCalibHitsTool::m_firstSubEvent {true} |
|
private |
◆ m_firstXing
| Gaudi::Property<int> PileUpToolBase::m_firstXing |
|
protectedinherited |
Initial value:{this, "FirstXing", -999,
"First bunch-crossing in which det is live"}
Definition at line 54 of file PileUpToolBase.h.
54 {this, "FirstXing", -999,
55 "First bunch-crossing in which det is live"};
◆ m_lastXing
| Gaudi::Property<int> PileUpToolBase::m_lastXing |
|
protectedinherited |
Initial value:{this, "LastXing", 999,
"Last bunch-crossing in which det is live"}
Definition at line 56 of file PileUpToolBase.h.
56 {this, "LastXing", 999,
57 "Last bunch-crossing in which det is live"};
◆ m_oldFormat
| Gaudi::Property<bool> MergeCalibHitsTool::m_oldFormat {this, "OldFormat", false, ""} |
|
private |
◆ m_outputContainers
◆ m_pMergeSvc
◆ m_vetoPileUpTruthLinks
| Gaudi::Property<int> PileUpToolBase::m_vetoPileUpTruthLinks |
|
protectedinherited |
Initial value:{this, "VetoPileUpTruthLinks", true,
"Ignore links to suppressed pile-up truth"}
Definition at line 58 of file PileUpToolBase.h.
58 {this, "VetoPileUpTruthLinks", true,
59 "Ignore links to suppressed pile-up truth"};
The documentation for this class was generated from the following files: