93 m_h_rdoID =
new TH1F(
"h_rdoID",
"rdoID", 100, 0, 25e17);
98 m_h_rdoWord =
new TH1F(
"h_rdoWord",
"rdoWord", 100, 0, 17e6);
102 m_h_barrelEndcap =
new TH1F(
"h_barrelEndcap",
"Barrel or Endcap", 100, -3, 3);
106 m_h_layerDisk =
new TH1F(
"h_layerDisk",
"Barrel layer or Endcap disk", 100, 0, 10);
110 m_h_phiModule =
new TH1F(
"h_phiModule",
"Phi module", 100, 0, 60);
114 m_h_etaModule =
new TH1F(
"h_etaModule",
"Eta module", 121, -60, 60);
118 m_h_side =
new TH1F(
"h_side",
"Side", 100, 0, 1.5);
122 m_h_strip =
new TH1F(
"h_strip",
"Strip", 100, 0, 800);
126 m_h_row =
new TH1F(
"h_row",
"Row", 100, 0, 4.5);
130 m_h_groupSize =
new TH1F(
"h_groupSize",
"Group size", 100, 0, 150);
134 m_h_phi_v_eta =
new TH2F(
"h_phi_v_eta",
"Phi module vs eta module", 100, -7, 7, 100, 0, 60);
138 m_h_brlLayer =
new TH1F(
"h_brlLayer",
"Barrel layer", 100, 0, 10);
142 m_h_brlPhiMod =
new TH1F(
"h_brlPhiMod",
"Barrel phi module", 100, 0, 60);
146 m_h_brlEtaMod =
new TH1F(
"h_brlEtaMod",
"Barrel eta module", 121, -60, 60);
150 m_h_brlSide =
new TH1F(
"h_brlSide",
"Barrel side", 100, 0, 1.5);
154 m_h_brlStrip =
new TH1F(
"h_brlStrip",
"Barrel strip", 100, 0, 800);
158 m_h_brlGroupSize =
new TH1F(
"h_brlGroupSize",
"Barrel group size", 100, 0, 150);
162 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);
166 m_h_ecDisk =
new TH1F(
"h_ecDisk",
"Endcap disk", 100, 0, 10);
170 m_h_ecPhiMod =
new TH1F(
"h_ecPhiMod",
"Endcap phi module", 100, 0, 60);
174 m_h_ecEtaMod =
new TH1F(
"h_ecEtaMod",
"Endcap eta module", 21, 0, 20);
178 m_h_ecSide =
new TH1F(
"h_ecSide",
"Endcap side", 100, 0, 1.5);
182 m_h_ecStrip =
new TH1F(
"h_ecStrip",
"Endcap strip", 100, 0, 800);
186 m_h_ecGroupSize =
new TH1F(
"h_ecGroupSize",
"Endcap group size", 100, 0, 150);
190 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);
194 m_h_sdoID =
new TH1F(
"h_sdoID",
"sdoID", 100, 0, 1e18);
198 m_h_sdoWord =
new TH1F(
"h_sdoWord",
"sdoWord", 100, 0, 1e7);
206 m_h_layerDisk_sdo =
new TH1F(
"h_layerDisk_sdo",
"Barrel layer or Endcap disk (SDO)", 100, 0, 10);
214 m_h_etaModule_sdo =
new TH1F(
"h_etaModule_sdo",
"Eta module (SDO)", 121, -60, 60);
218 m_h_side_sdo =
new TH1F(
"h_side_sdo",
"Side (SDO)", 100, 0, 1.5);
222 m_h_strip_sdo =
new TH1F(
"h_strip_sdo",
"Strip (SDO)", 100, 0, 800);
226 m_h_row_sdo =
new TH1F(
"h_row_sdo",
"Row (SDO)", 100, 0, 4.5);
230 m_h_barcode =
new TH1F(
"h_barcode",
"Barcode (SDO)", 100, 0, 2.2e5);
234 m_h_eventIndex =
new TH1F(
"h_eventIndex",
"Event index (SDO)", 100, 0, 10);
238 m_h_charge =
new TH1F(
"h_charge",
"Charge (SDO)", 100, 0, 6e6);
242 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);
246 m_h_belowThresh_brl =
new TH1F(
"h_belowThresh_brl",
"Below threshold strips - Barrel; # below threshold strips; layer", 8, -0.5, 7.5);
250 m_h_belowThresh_ec =
new TH1F(
"h_belowThresh_ec",
"Below threshold strips - Endcap; # below threshold strips; layer", 8, -0.5, 7.5);
254 m_h_disabled_brl =
new TH1F(
"h_disabled_brl",
"Disabled strips - Barrel; # disabled strips; layer", 8, -0.5, 7.5);
258 m_h_disabled_ec =
new TH1F(
"h_disabled_ec",
"Disabled strips - Endcap; # disabled strips; layer", 8, -0.5, 7.5);
262 for (
unsigned int layer=0; layer<4; layer++) {
263 m_h_brl_strip_perLayer.emplace_back(
new TH1F((
"h_brl_strip_perLayer"+std::to_string(layer)).c_str(), (
"Strip index - Barrel - Layer "+std::to_string(layer)).c_str(), 1300, 0, 1300));
268 for (
unsigned int layer=0; layer<9; layer++) {
269 m_h_ec_strip_perLayer.emplace_back(
new TH1F((
"h_ec_strip_perLayer"+std::to_string(layer)).c_str(), (
"Strip index - Barrel - Layer "+std::to_string(layer)).c_str(), 1300, 0, 1300));
274 m_h_globalXY =
new TH2F(
"h_globalXY",
"h_globalXY; x [mm]; y [mm]",2200,-1100.,1100.,2200,1100.,1100.);
276 m_h_globalZR =
new TH2F(
"h_globalZR",
"h_globalZR; z [mm]; r [mm]",6800,-3400.,3400.,1100,0.,1100.);
278 m_h_globalX =
new TH1F(
"h_globalX",
"h_globalX; x [mm]",2200,-1100.,1100.);
280 m_h_globalY =
new TH1F(
"h_globalY",
"h_globalY; y [mm]",2200,-1100.,1100.);
282 m_h_globalZ =
new TH1F(
"h_globalZ",
"h_globalZ; z [mm]",6800,-3400.,3400.);
286 std::string xy_name =
"h_ITk_xy";
287 auto xy = std::make_unique<TH2D>(xy_name.c_str(), xy_name.c_str(), 2200, -1100, 1100, 2200, -1100, 1100);
291 std::string zr_name =
"h_ITk_zr";
292 auto zr = std::make_unique<TH2D>(zr_name.c_str(), zr_name.c_str(), 6800, -3400, 3400, 1100, 0, 1100);
296 m_h_truthMatchedRDOs =
new TH1F(
"h_TruthMatchedITkStripRDOs",
"h_TruthMatchedITkStripRDOs", 4, 1, 5);
297 TString truthMatchBinLables[4] = {
"All RDOs",
"Truth Matched",
"HS Matched",
"Unmatched" };
298 for(
unsigned int ibin = 1; ibin < 5; ibin++) {
303 return StatusCode::SUCCESS;
355 const HepMC::GenEvent* hardScatterEvent(
nullptr);
356 bool doTruthMatching =
true;
357 if (mcEventCollection->size()==0){
358 ATH_MSG_WARNING(
"Failed to retrieve a nonzero sized truth event collection, disabling truthMatching");
359 doTruthMatching =
false;
361 if(doTruthMatching) hardScatterEvent = mcEventCollection->at(0);
368 for ( ; rdoCont_itr != rdoCont_end; ++rdoCont_itr ) {
373 for ( ; rdo_itr != rdo_end; ++rdo_itr ) {
376 bool findMatch =
false;
378 InDetSimDataCollection::const_iterator iter = (*simDataMapSCT).find((*rdo_itr)->identify());
380 if ( iter != (*simDataMapSCT).end() ) {
382 const std::vector< InDetSimData::Deposit >& deposits = sdo.
getdeposits();
383 std::vector< InDetSimData::Deposit >::const_iterator nextdeposit = deposits.begin();
384 std::vector< InDetSimData::Deposit >::const_iterator lastdeposit = deposits.end();
385 for( ; nextdeposit!=lastdeposit; ++nextdeposit) {
387 if(particleLink.
isValid() && !findMatch){
398 const Identifier rdoID((*rdo_itr)->identify());
399 const unsigned int rdoWord((*rdo_itr)->getWord());
400 const int sctBrlEc(
m_sctID->barrel_ec(rdoID));
401 const int sctLayerDisk(
m_sctID->layer_disk(rdoID));
402 const int sctPhiMod(
m_sctID->phi_module(rdoID));
403 const int sctEtaMod(
m_sctID->eta_module(rdoID));
404 const int sctSide(
m_sctID->side(rdoID));
405 const int sctStrip(
m_sctID->strip(rdoID));
406 const int sctRow(
m_sctID->row(rdoID));
407 const int sctGroupSize((*rdo_itr)->getGroupSize());
409 const unsigned long long rdoID_int = rdoID.
get_compact();
425 std::pair<Amg::Vector3D, Amg::Vector3D> endsOfStrip = detEl->
endsOfStrip(localPos);
433 m_globalX1->push_back(endsOfStrip.second.x());
434 m_globalY1->push_back(endsOfStrip.second.y());
435 m_globalZ1->push_back(endsOfStrip.second.z());
442 float stripradius0 = sqrt(endsOfStrip.first.x()*endsOfStrip.first.x()+endsOfStrip.first.y()*endsOfStrip.first.y());
443 float stripradius1 = sqrt(endsOfStrip.second.x()*endsOfStrip.second.x()+endsOfStrip.second.y()*endsOfStrip.second.y());
445 m_h_globalXY->Fill(endsOfStrip.first.x(),endsOfStrip.first.y());
446 m_h_globalXY->Fill(endsOfStrip.second.x(),endsOfStrip.second.y());
450 m_h_globalZR->Fill(endsOfStrip.second.z(),stripradius1);
466 m_side->push_back(sctSide);
467 m_row->push_back(sctRow);
494 else if (abs(sctBrlEc) == 2) {
512 InDetSimDataCollection::const_iterator sdo_itr(simDataMapSCT->begin());
513 const InDetSimDataCollection::const_iterator sdo_end(simDataMapSCT->end());
515 std::vector<int> barcode_vec;
516 std::vector<int> eventIndex_vec;
517 std::vector<float> charge_vec;
518 for ( ; sdo_itr != sdo_end; ++sdo_itr ) {
521 const unsigned long long sdoID_int = sdoID.
get_compact();
522 const int sdoWord(sdo.
word());
523 const int sctBrlEc_sdo(
m_sctID->barrel_ec(sdoID));
524 const int sctLayerDisk_sdo(
m_sctID->layer_disk(sdoID));
525 const int sctPhiMod_sdo(
m_sctID->phi_module(sdoID));
526 const int sctEtaMod_sdo(
m_sctID->eta_module(sdoID));
527 const int sctSide_sdo(
m_sctID->side(sdoID));
528 const int sctStrip_sdo(
m_sctID->strip(sdoID));
529 const int sctRow_sdo(
m_sctID->row(sdoID));
550 else if (abs(sctBrlEc_sdo)==2)
557 else if (abs(sctBrlEc_sdo)==2)
574 const std::vector<InDetSimData::Deposit>& deposits = sdo.
getdeposits();
575 std::vector<InDetSimData::Deposit>::const_iterator dep_itr(deposits.begin());
576 const std::vector<InDetSimData::Deposit>::const_iterator dep_end(deposits.end());
578 for ( ; dep_itr != dep_end; ++dep_itr ) {
582 const float charge((*dep_itr).second);
592 barcode_vec.push_back(bar);
593 eventIndex_vec.push_back(eventIx);
594 charge_vec.push_back(
charge);
600 eventIndex_vec.clear();
609 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.