143 m_h_rdoID =
new TH1F(
"h_rdoID",
"rdoID", 100, 0, 1e18);
147 m_h_rdoWord =
new TH1F(
"h_rdoWord",
"rdoWord", 100, 0, 1e7);
151 m_h_barrelEndcap =
new TH1F(
"h_barrelEndcap",
"Barrel or Endcap", 100, -3, 3);
155 m_h_layerDisk =
new TH1F(
"h_layerDisk",
"Barrel layer or Endcap disk", 100, 0, 10);
159 m_h_phiModule =
new TH1F(
"h_phiModule",
"Phi module", 100, 0, 60);
163 m_h_etaModule =
new TH1F(
"h_etaModule",
"Eta module", 100, -7, 7);
167 m_h_side =
new TH1F(
"h_side",
"Side", 100, 0, 1.5);
171 m_h_strip =
new TH1F(
"h_strip",
"Strip", 100, 0, 800);
175 m_h_groupSize =
new TH1F(
"h_groupSize",
"Group size", 100, 0, 150);
179 m_h_phi_v_eta =
new TH2F(
"h_phi_v_eta",
"Phi module vs eta module", 100, -7, 7, 100, 0, 60);
183 m_h_brlLayer =
new TH1F(
"h_brlLayer",
"Barrel layer", 100, 0, 10);
187 m_h_brlPhiMod =
new TH1F(
"h_brlPhiMod",
"Barrel phi module", 100, 0, 60);
191 m_h_brlEtaMod =
new TH1F(
"h_brlEtaMod",
"Barrel eta module", 100, -7, 7);
195 m_h_brlSide =
new TH1F(
"h_brlSide",
"Barrel side", 100, 0, 1.5);
199 m_h_brlStrip =
new TH1F(
"h_brlStrip",
"Barrel strip", 100, 0, 800);
203 m_h_brlGroupSize =
new TH1F(
"h_brlGroupSize",
"Barrel group size", 100, 0, 150);
207 m_h_brl_phi_v_eta =
new TH2F(
"h_brl_phi_v_eta",
"Barrel phi module vs eta module", 100, -7, 7, 100, 0, 60);
211 m_h_ecDisk =
new TH1F(
"h_ecDisk",
"Endcap disk", 100, 0, 10);
215 m_h_ecPhiMod =
new TH1F(
"h_ecPhiMod",
"Endcap phi module", 100, 0, 60);
219 m_h_ecEtaMod =
new TH1F(
"h_ecEtaMod",
"Endcap eta module", 100, -7, 7);
223 m_h_ecSide =
new TH1F(
"h_ecSide",
"Endcap side", 100, 0, 1.5);
227 m_h_ecStrip =
new TH1F(
"h_ecStrip",
"Endcap strip", 100, 0, 800);
231 m_h_ecGroupSize =
new TH1F(
"h_ecGroupSize",
"Endcap group size", 100, 0, 150);
235 m_h_ec_phi_v_eta =
new TH2F(
"h_ec_phi_v_eta",
"Endcap phi module vs eta module", 100, -7.5, 7.5, 100, 0, 60);
239 m_h_sdoID =
new TH1F(
"h_sdoID",
"sdoID", 100, 0, 1e18);
243 m_h_sdoWord =
new TH1F(
"h_sdoWord",
"sdoWord", 100, 0, 1e7);
251 m_h_layerDisk_sdo =
new TH1F(
"h_layerDisk_sdo",
"Barrel layer or Endcap disk (SDO)", 100, 0, 10);
263 m_h_side_sdo =
new TH1F(
"h_side_sdo",
"Side (SDO)", 100, 0, 1.5);
267 m_h_strip_sdo =
new TH1F(
"h_strip_sdo",
"Strip (SDO)", 100, 0, 800);
271 m_h_barcode =
new TH1F(
"h_barcode",
"Barcode (SDO)", 100, 0, 2.2e5);
275 m_h_eventIndex =
new TH1F(
"h_eventIndex",
"Event index (SDO)", 100, 0, 10);
279 m_h_charge =
new TH1F(
"h_charge",
"Charge (SDO)", 100, 0, 6e6);
283 m_h_phi_v_eta_sdo =
new TH2F(
"h_phi_v_eta_sdo",
"Phi module vs eta module (SDO)", 100, -7, 7, 100, 0, 60);
288 TString truthMatchBinLables[4] = {
"All RDOs",
"Truth Matched",
"HS Matched",
"Unmatched" };
289 for(
unsigned int ibin = 1; ibin < 5; ibin++) {
296 return StatusCode::SUCCESS;
335 const HepMC::GenEvent* hardScatterEvent(
nullptr);
336 bool doTruthMatching =
true;
337 if ((!mcEventCollection.
isValid())||mcEventCollection->size()==0){
338 ATH_MSG_WARNING(
"Failed to retrieve a nonzero sized truth event collection, disabling truthMatching");
339 doTruthMatching =
false;
341 if(doTruthMatching) hardScatterEvent = mcEventCollection->at(0);
348 for ( ; rdoCont_itr != rdoCont_end; ++rdoCont_itr ) {
353 for ( ; rdo_itr != rdo_end; ++rdo_itr ) {
356 bool findMatch =
false;
358 InDetSimDataCollection::const_iterator iter = (*simDataMapSCT).find((*rdo_itr)->identify());
360 if ( iter != (*simDataMapSCT).end() ) {
362 const std::vector< InDetSimData::Deposit >& deposits = sdo.
getdeposits();
363 std::vector< InDetSimData::Deposit >::const_iterator nextdeposit = deposits.begin();
364 std::vector< InDetSimData::Deposit >::const_iterator lastdeposit = deposits.end();
365 for( ; nextdeposit!=lastdeposit; ++nextdeposit) {
367 if(particleLink.
isValid() && !findMatch){
378 const Identifier rdoID((*rdo_itr)->identify());
379 const unsigned int rdoWord((*rdo_itr)->getWord());
380 const int sctBrlEc(
m_sctID->barrel_ec(rdoID));
381 const int sctLayerDisk(
m_sctID->layer_disk(rdoID));
382 const int sctPhiMod(
m_sctID->phi_module(rdoID));
383 const int sctEtaMod(
m_sctID->eta_module(rdoID));
384 const int sctSide(
m_sctID->side(rdoID));
385 const int sctStrip(
m_sctID->strip(rdoID));
386 const int sctGroupSize((*rdo_itr)->getGroupSize());
388 const unsigned long long rdoID_int = rdoID.
get_compact();
395 m_side->push_back(sctSide);
419 else if (std::abs(sctBrlEc) == 2) {
435 InDetSimDataCollection::const_iterator sdo_itr(simDataMapSCT->begin());
436 const InDetSimDataCollection::const_iterator sdo_end(simDataMapSCT->end());
438 std::vector<int> barcode_vec;
439 std::vector<int> eventIndex_vec;
440 std::vector<float> charge_vec;
441 for (; sdo_itr != sdo_end; ++sdo_itr) {
444 const unsigned long long sdoID_int = sdoID.
get_compact();
445 const int sdoWord(sdo.
word());
446 const int sctBrlEc_sdo(
m_sctID->barrel_ec(sdoID));
447 const int sctLayerDisk_sdo(
m_sctID->layer_disk(sdoID));
448 const int sctPhiMod_sdo(
m_sctID->phi_module(sdoID));
449 const int sctEtaMod_sdo(
m_sctID->eta_module(sdoID));
450 const int sctSide_sdo(
m_sctID->side(sdoID));
451 const int sctStrip_sdo(
m_sctID->strip(sdoID));
480 const std::vector<InDetSimData::Deposit>& deposits = sdo.
getdeposits();
481 std::vector<InDetSimData::Deposit>::const_iterator dep_itr(deposits.begin());
482 const std::vector<InDetSimData::Deposit>::const_iterator dep_end(deposits.end());
484 for (; dep_itr != dep_end; ++dep_itr) {
488 const float charge((*dep_itr).second);
498 barcode_vec.push_back(bar);
499 eventIndex_vec.push_back(eventIx);
500 charge_vec.push_back(
charge);
506 eventIndex_vec.clear();
515 return StatusCode::SUCCESS;
a link optimized in size for a GenParticle in a McEventCollection
HepMC::ConstGenParticlePtr cptr() const
Dereference.
index_type eventIndex() const
Return the event number of the referenced GenEvent.