44 m_h_word1 =
new TH1F(
"h_word1",
"word 1", 100, 0, 4.5e7);
48 m_h_word2 =
new TH1F(
"h_word2",
"word 2", 100, 0, 10);
52 m_h_chan =
new TH1F(
"h_chan",
"channel ID", 100, 0, 20);
56 m_h_pulse1Pos =
new TH1F(
"h_pulse1Pos",
"pulse 1 position", 100, 0, 70);
60 m_h_pulse1Width =
new TH1F(
"h_pulse1Width",
"pulse 1 width", 100, 0, 30);
64 m_h_pulse2Pos =
new TH1F(
"h_pulse2Pos",
"pulse 2 position", 100, 0, 70);
68 m_h_pulse2Width =
new TH1F(
"h_pulse2Width",
"pulse 2 width", 100, 0, 30);
72 m_h_sdoID =
new TH1F(
"h_sdoID",
"sdoID", 100, 0, 10);
76 m_h_sdoWord =
new TH1F(
"h_sdoWord",
"sdoWord", 100, 0, 10);
80 m_h_barcode =
new TH1F(
"h_barcode",
"Barcode (SDO)", 100, 0, 2.2e9);
84 m_h_eventIndex =
new TH1F(
"h_eventIndex",
"Event index (SDO)", 100, 0, 1000);
88 m_h_charge =
new TH1F(
"h_charge",
"Charge (SDO)", 100, 0, 10);
92 return StatusCode::SUCCESS;
120 const EventContext& ctx{Gaudi::Hive::currentContext()};
129 for ( ; rdoCont_itr != rdoCont_end; ++rdoCont_itr ) {
134 for ( ; rdo_itr != rdo_end; ++rdo_itr ) {
135 const int word1((*rdo_itr)->getWord1());
136 const int word2((*rdo_itr)->getWord2());
137 const int chan((*rdo_itr)->getChannel());
138 const int pulse1Pos((*rdo_itr)->getPulse1Position());
139 const int pulse1Width((*rdo_itr)->getPulse1Width());
140 const int pulse2Pos((*rdo_itr)->getPulse2Position());
141 const int pulse2Width((*rdo_itr)->getPulse2Width());
142 const int LVL1A((*rdo_itr)->getLVL1A());
143 const int BCID((*rdo_itr)->getBCID());
144 const int LVL1ID((*rdo_itr)->getLVL1ID());
145 const int err((*rdo_itr)->getError());
157 m_err->push_back(err);
175 InDetSimDataCollection::const_iterator sdo_itr(simDataMapBCM->begin());
176 const InDetSimDataCollection::const_iterator sdo_end(simDataMapBCM->end());
178 std::vector<int> barcode_vec;
179 std::vector<int> eventIndex_vec;
180 std::vector<float> charge_vec;
181 for ( ; sdo_itr != sdo_end; ++sdo_itr ) {
185 const unsigned long long sdoID_int = sdoID.
get_compact();
186 const int sdoWord(sdo.
word());
195 const std::vector<InDetSimData::Deposit>& deposits = sdo.
getdeposits();
196 std::vector<InDetSimData::Deposit>::const_iterator dep_itr(deposits.begin());
197 const std::vector<InDetSimData::Deposit>::const_iterator dep_end(deposits.end());
199 for ( ; dep_itr != dep_end; ++dep_itr ) {
203 const float charge((*dep_itr).second);
213 barcode_vec.push_back(bar);
214 eventIndex_vec.push_back(eventIx);
215 charge_vec.push_back(
charge);
221 eventIndex_vec.clear();
228 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
double charge(const T &p)
Handle class for reading from StoreGate.
const ServiceHandle< ITHistSvc > & histSvc() const
The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a...
std::vector< int > * m_pulse2Pos
std::vector< int > * m_word1
virtual StatusCode execute() override final
std::vector< int > * m_pulse2Width
Gaudi::Property< std::string > m_ntupleFileName
Gaudi::Property< std::string > m_ntupleDirName
std::vector< unsigned long long > * m_sdoID
std::vector< int > * m_LVL1ID
std::vector< int > * m_pulse1Pos
std::vector< std::vector< int > > * m_barcode_vec
std::vector< int > * m_LVL1A
std::vector< int > * m_barcode
std::vector< std::vector< float > > * m_charge_vec
std::vector< int > * m_err
std::vector< float > * m_charge
std::vector< int > * m_eventIndex
Gaudi::Property< std::string > m_ntupleTreeName
SG::ReadHandleKey< InDetSimDataCollection > m_inputTruthKey
std::vector< std::vector< int > > * m_eventIndex_vec
std::vector< int > * m_pulse1Width
Gaudi::Property< std::string > m_path
std::vector< int > * m_word2
virtual StatusCode initialize() override final
SG::ReadHandleKey< BCM_RDO_Container > m_inputKey
std::vector< int > * m_sdoWord
std::vector< int > * m_BCID
std::vector< int > * m_chan
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
a link optimized in size for a GenParticle in a McEventCollection
index_type eventIndex() const
Return the event number of the referenced GenEvent.
value_type get_compact() const
Get the compact id.
const std::vector< Deposit > & getdeposits() const
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.