22 return StatusCode::SUCCESS;
32 const std::string &
label )
const
46 std::vector< std::pair< const xAOD::Egamma*, const TrigCompositeUtils::Decision * >> pair_vec;
47 std::vector< std::pair< const xAOD::Egamma*, const TrigCompositeUtils::Decision * >> pair_iso_vec;
49 std::vector<asg::AcceptData> accept_vec;
50 std::vector<asg::AcceptData> accept_iso_vec;
52 std::vector<asg::AcceptData> emu_accept_vec;
53 std::vector<asg::AcceptData> emu_accept_iso_vec;
56 for(
auto pairObj : pairObjs ){
61 if(!((
passBits & TrigDefs::L1_isPassedAfterVeto) && ((
passBits & TrigDefs::EF_prescaled)==0))){
62 ATH_MSG_DEBUG(
"Prescaled trigger: " <<
info.trigger <<
" Skipping to normalize efficiencies");
67 if(
et <
info.etthr-5.0)
continue;
71 if(
et <
info.etthr-5.0)
continue;
75 bool pass_CaloIso = getIsolation_topoetcone20(pairObj.first)/getCluster_et(pairObj.first) < 0.065;
76 bool pass_trkIso = getIsolation_ptcone20(pairObj.first)/getCluster_et(pairObj.first) < 0.05;
78 if (!pass_CaloIso || !pass_trkIso){
93 emu_accept_vec.push_back( acceptData );
95 if( IsolatedDec(*pairObj.first) ){
96 emu_accept_iso_vec.push_back(acceptData);
102 pair_vec.push_back(pairObj);
104 accept_vec.push_back(acceptData);
106 if( IsolatedDec(*pairObj.first) ){
107 pair_iso_vec.push_back(pairObj);
108 accept_iso_vec.push_back(acceptData);
115 std::string
dirname=
"Efficiency";
116 std::string l2step =
"FastElectron";
117 if(
info.signature ==
"Electron" ){
118 l2step =
"FastElectron";
119 }
else if(
info.signature ==
"Photon" ){
120 l2step =
"FastPhoton";
157 const std::string &
level,
158 const std::string &pidword,
160 const std::vector< std::pair< const xAOD::Egamma *, const TrigCompositeUtils::Decision* >>& pairObjs,
161 const std::vector< asg::AcceptData >& acceptObjs ,
162 const std::string&
dirname )
const
164 const float etthr =
info.etthr;
165 const std::string trigger =
info.trigger;
168 std::vector<float> et_vec, highet_vec, pt_vec, eta_vec, phi_vec, avgmu_vec, npvtx_vec,et_slice0_vec,et_slice1_vec,et_slice2_vec,et_slice3_vec, ptvarcone20rel_vec, z0_vec, d0_vec;
169 std::vector<float> match_et_vec, match_highet_vec, match_pt_vec, match_eta_vec, match_phi_vec, match_avgmu_vec, match_npvtx_vec, match_ptvarcone20rel_vec, match_z0_vec, match_d0_vec;
170 std::vector<bool> et_passed_vec, et_failed_vec, highet_passed_vec, highet_failed_vec, pt_passed_vec, eta_passed_vec, eta_failed_vec, phi_passed_vec, avgmu_passed_vec, npvtx_passed_vec, ptvarcone20rel_passed_vec, z0_passed_vec, d0_passed_vec;
171 std::vector<bool> et_slice0_passed_vec,et_slice1_passed_vec,et_slice2_passed_vec,et_slice3_passed_vec;
191 auto match_ptvarcone20rel_col =
Monitored::Collection(
"match_ptvarcone20rel" , match_ptvarcone20rel_vec );
205 auto ptvarcone20rel_passed_col =
Monitored::Collection(
"ptvarcone20rel_passed" , ptvarcone20rel_passed_vec );
223 for(
auto pairObj : pairObjs ){
226 bool isPassed = acceptObjs[iObj].getCutResult(
level );
228 float ptvarcone20rel = -99.0;
231 const auto *
eg = pairObj.first;
240 ptvarcone20rel = getIsolation_ptvarcone20(
el)/
el->pt();
242 z0 = getTrack_z0(
el);
243 d0 = getTrack_d0(
el);
247 float eta =
eg->caloCluster()->etaBE(2);
248 float phi =
eg->phi();
256 et_vec.push_back(
et );
257 pt_vec.push_back(
pt );
258 highet_vec.push_back(
et );
261 eta_vec.push_back(
eta);
262 phi_vec.push_back(
phi);
263 avgmu_vec.push_back(avgmu);
264 npvtx_vec.push_back(npvtx);
265 ptvarcone20rel_vec.push_back(ptvarcone20rel);
266 z0_vec.push_back(
z0);
267 d0_vec.push_back(
d0);
271 et_slice0_vec.push_back(
et);
272 }
else if( abs(
eta) > 0.80 && abs(
eta) <= 1.37 ){
273 et_slice1_vec.push_back(
et);
274 }
else if( abs(
eta) > 1.37 && abs(
eta) <= 1.54 ){
275 et_slice2_vec.push_back(
et);
276 }
else if( abs(
eta) > 1.54 && abs(
eta) <= 2.50 ){
277 et_slice3_vec.push_back(
et);
281 match_et_vec.push_back(
et );
282 match_pt_vec.push_back(
pt );
283 match_highet_vec.push_back(
et );
286 match_eta_vec.push_back(
eta);
287 match_phi_vec.push_back(
phi);
288 match_avgmu_vec.push_back(avgmu);
289 match_npvtx_vec.push_back(npvtx);
290 match_ptvarcone20rel_vec.push_back(ptvarcone20rel);
291 match_z0_vec.push_back(
z0);
292 match_d0_vec.push_back(
d0);
295 et_passed_vec.push_back(
true );
296 et_failed_vec.push_back(
false );
297 pt_passed_vec.push_back(
true );
298 highet_passed_vec.push_back(
true );
299 highet_failed_vec.push_back(
false );
302 et_slice0_passed_vec.push_back(
true);
303 }
else if( abs(
eta) > 0.80 && abs(
eta) <= 1.37 ){
304 et_slice1_passed_vec.push_back(
true);
305 }
else if( abs(
eta) > 1.37 && abs(
eta) <= 1.54 ){
306 et_slice2_passed_vec.push_back(
true);
307 }
else if( abs(
eta) > 1.54 && abs(
eta) <= 2.50 ){
308 et_slice3_passed_vec.push_back(
true);
312 eta_passed_vec.push_back(
true );
313 eta_failed_vec.push_back(
false );
314 phi_passed_vec.push_back(
true );
315 avgmu_passed_vec.push_back(
true );
316 npvtx_passed_vec.push_back(
true );
317 ptvarcone20rel_passed_vec.push_back(
true );
318 z0_passed_vec.push_back(
true );
319 d0_passed_vec.push_back(
true );
324 et_passed_vec.push_back(
false );
325 et_failed_vec.push_back(
true );
326 pt_passed_vec.push_back(
false );
327 highet_passed_vec.push_back(
false );
328 highet_failed_vec.push_back(
true );
331 et_slice0_passed_vec.push_back(
false);
332 }
else if( abs(
eta) > 0.80 && abs(
eta) <= 1.37 ){
333 et_slice1_passed_vec.push_back(
false);
334 }
else if( abs(
eta) > 1.37 && abs(
eta) <= 1.54 ){
335 et_slice2_passed_vec.push_back(
false);
336 }
else if( abs(
eta) > 1.54 && abs(
eta) <= 2.50 ){
337 et_slice3_passed_vec.push_back(
false);
341 eta_passed_vec.push_back(
false );
342 eta_failed_vec.push_back(
true );
343 phi_passed_vec.push_back(
false );
344 avgmu_passed_vec.push_back(
false );
345 npvtx_passed_vec.push_back(
false );
346 ptvarcone20rel_passed_vec.push_back(
false );
347 z0_passed_vec.push_back(
false );
348 d0_passed_vec.push_back(
false );
356 fill(
monGroup, et_col, highet_col, pt_col, eta_col, phi_col, avgmu_col, npvtx_col, ptvarcone20rel_col, z0_col, d0_col,
357 match_et_col, match_highet_col, match_pt_col, match_eta_col, match_phi_col, match_avgmu_col, match_npvtx_col, match_ptvarcone20rel_col,match_z0_col,match_d0_col,
358 et_passed_col, et_failed_col, highet_passed_col, highet_failed_col, pt_passed_col, eta_passed_col, eta_failed_col, phi_passed_col, avgmu_passed_col, npvtx_passed_col, ptvarcone20rel_passed_col, z0_passed_col, d0_passed_col,
359 et_slice0_col,et_slice1_col,et_slice2_col,et_slice3_col,et_slice0_passed_col,et_slice1_passed_col,et_slice2_passed_col,et_slice3_passed_col);
368 const std::vector< asg::AcceptData >& acceptObjs )
const
373 for(
auto pairObj : pairObjs ){
376 bool isPassedL1Calo = acceptObjs[iObj].getCutResult(
"L1Calo");
377 bool isPassedL2Calo = acceptObjs[iObj].getCutResult(
"L2Calo");
378 bool isPassedL2 = acceptObjs[iObj].getCutResult(
"L2" );
379 bool isPassedEFCalo = acceptObjs[iObj].getCutResult(
"EFCalo");
380 bool isPassedHLT = acceptObjs[iObj].getCutResult(
"HLT" );
382 const auto *
eg = pairObj.first;
392 }
if(!isPassedL2Calo){
396 }
if(!isPassedEFCalo){
411 const std::string trigger =
info.trigger;
413 unsigned int condition=TrigDefs::Physics;
416 std::vector<const xAOD::Egamma*> eg_vec;
417 std::vector<const xAOD::Electron*> el_vec;
418 for(
auto pairObj: pairObjs )
420 eg_vec.push_back(pairObj.first);
423 el_vec.push_back(elOff);
437 std::vector<const xAOD::EmTauRoI*> l1_vec;
438 for(
auto &initRoi: initRois ){
439 if( !initRoi.link.isValid() )
continue;
440 const auto *feat =
match()->getL1Feature( initRoi.source );
441 if(feat) l1_vec.push_back(feat);
445 std::vector<const xAOD::eFexEMRoI*> l1_vec;
446 for(
auto &initRoi: initRois ){
447 if( !initRoi.link.isValid() )
continue;
448 const auto *feat =
match()->getL1eEMFeature( initRoi.source );
449 if(feat) l1_vec.push_back(feat);
459 std::vector<const xAOD::TrigEMCluster*> emCluster_vec;
461 for(
auto &featLinkInfo :
vec ){
462 if(! featLinkInfo.isValid() )
continue;
463 const auto *feat = *(featLinkInfo.link);
465 emCluster_vec.push_back(feat);
471 std::string
key =
match()->key(
"PrecisionCalo_Electron");
472 if(
info.signature ==
"Photon")
key =
match()->key(
"PrecisionCalo_Photon");
476 std::vector<const xAOD::CaloCluster* > clus_vec;
478 for(
auto &featLinkInfo :
vec ){
479 if(! featLinkInfo.isValid() )
continue;
480 const auto *feat = *(featLinkInfo.link);
482 clus_vec.push_back(feat);
487 if (
info.signature ==
"Electron" ){
491 std::string
key =
match()->key(
"FastElectrons");
494 std::vector<const xAOD::TrigElectron*> el_vec;
497 for(
auto &featLinkInfo :
vec ){
498 if(! featLinkInfo.isValid() )
continue;
499 const auto *feat = *(featLinkInfo.link);
501 el_vec.push_back(feat);
507 std::string
key =
match()->key(
"Electrons_GSF");
511 std::vector<const xAOD::Electron*> el_vec;
512 std::vector<const xAOD::Egamma*> eg_vec;
514 for(
auto &featLinkInfo :
vec ){
515 if(! featLinkInfo.isValid() )
continue;
516 const auto *feat = *(featLinkInfo.link);
518 el_vec.push_back(feat);
519 eg_vec.push_back(feat);
524 }
else if (
info.signature ==
"Photon"){
527 std::string
key =
match()->key(
"FastPhotons");
528 std::vector<const xAOD::TrigPhoton*> ph_vec;
531 for(
auto &featLinkInfo :
vec ){
532 if(! featLinkInfo.isValid() )
continue;
533 const auto *feat = *(featLinkInfo.link);
535 ph_vec.push_back(feat);
542 std::vector<const xAOD::Egamma*> ph_vec;
544 for(
auto &featLinkInfo :
vec ){
545 if(! featLinkInfo.isValid() )
continue;
546 const auto *feat = *(featLinkInfo.link);
548 ph_vec.push_back(feat);
566 std::vector<float> eta_vec, phi_vec, energy_vec, roi_et_vec, emIso_vec, hadCore_vec;
575 for(
const auto *
l1 : l1_vec )
578 eta_vec.push_back(
l1->eta() );
579 phi_vec.push_back(
l1->phi() );
586 fill(
monGroup, eta_col, phi_col, energy_col, roi_et_col, emIso_col, hadCore_col );
595 std::vector<float> eta_vec, phi_vec, et_vec, wstot_vec, reta_vec, rhad_vec;
605 for(
const auto *
l1 : l1_vec )
609 eta_vec.push_back(
l1->eta() );
610 phi_vec.push_back(
l1->phi() );
611 wstot_vec.push_back(
l1->Wstot() );
612 reta_vec.push_back(
l1->Reta() );
613 rhad_vec.push_back(
l1->Rhad() );
616 fill(
monGroup, eta_col, phi_col, et_col, wstot_col, reta_col, rhad_col );
626 std::vector<float> et_vec,highet_vec, eta_vec, phi_vec;
633 for (
const auto *emCluster : emCluster_vec )
635 if(!emCluster)
continue;
638 eta_vec.push_back( emCluster->eta() );
639 phi_vec.push_back( emCluster->phi() );
654 std::vector<float> et_vec, eta_vec, phi_vec, highet_vec;
661 for (
const auto *
el : el_vec )
666 eta_vec.push_back(
el->eta() );
667 phi_vec.push_back(
el->phi() );
678 std::vector<float> et_vec, eta_vec, phi_vec, highet_vec;
685 for (
const auto *ph : ph_vec )
690 eta_vec.push_back( ph->eta() );
691 phi_vec.push_back( ph->phi() );
704 std::vector<float> energyBE0_vec, energyBE1_vec, energyBE2_vec, energyBE3_vec,
705 energy_vec, et_vec, eta_vec, phi_vec, eta_calo_vec, phi_calo_vec, highet_vec;
721 for (
const auto *clus : clus_vec )
723 double tmpeta = -999.;
726 double tmpphi = -999.;
737 eta_vec.push_back( clus->eta() );
738 phi_vec.push_back( clus->phi() );
739 eta_calo_vec.push_back( tmpeta );
740 phi_calo_vec.push_back( tmpphi );
745 fill(
monGroup, energyBE0_col, energyBE1_col, energyBE2_col, energyBE3_col,
746 energy_col, et_col, eta_col, phi_col, eta_calo_col, phi_calo_col, highet_col);
757 auto monGroup =
getGroup( trigger + ( online ?
"_Distributions_HLT" :
"_Distributions_Offline") );
759 std::vector<float> Rhad_vec, Rhad1_vec, Reta_vec, Rphi_vec, weta1_vec, weta2_vec,
760 f1_vec, f3_vec, eratio_vec, et_vec, highet_vec , eta_vec, phi_vec, topoetcone20_vec, topoetcone40_shift_vec,
761 topoetcone20_rel_vec, topoetcone40_shift_rel_vec;
780 auto topoetcone40_shift_rel_col =
Monitored::Collection(
"topoetcone40_shift_rel", topoetcone40_shift_rel_vec );
782 for (
const auto *
eg : eg_vec ){
786 Rhad_vec.push_back( getShowerShape_Rhad(
eg));
787 Rhad1_vec.push_back( getShowerShape_Rhad(
eg));
788 Reta_vec.push_back( getShowerShape_Reta(
eg));
789 Rphi_vec.push_back( getShowerShape_Rphi(
eg));
790 weta1_vec.push_back( getShowerShape_weta1(
eg));
791 weta2_vec.push_back( getShowerShape_weta2(
eg));
792 f1_vec.push_back( getShowerShape_f1(
eg));
793 f3_vec.push_back( getShowerShape_f3(
eg));
794 eratio_vec.push_back( getShowerShape_Eratio(
eg));
797 eta_vec.push_back(
eg->eta());
798 phi_vec.push_back(
eg->phi());
800 topoetcone40_shift_vec.push_back( (getIsolation_topoetcone40(
eg)-2450)/
Gaudi::Units::GeV );
803 topoetcone20_rel_vec.push_back( getIsolation_topoetcone20(
eg)/
eg->pt());
804 topoetcone40_shift_rel_vec.push_back( (getIsolation_topoetcone40(
eg)-2450)/
eg->pt() );
809 fill(
monGroup, Rhad_col, Rhad1_col, Reta_col, Rphi_col, weta1_col, weta2_col,
810 f1_col, f3_col, eratio_col, et_col, highet_col , eta_col, phi_col, topoetcone20_col, topoetcone40_shift_col,
811 topoetcone20_rel_col, topoetcone40_shift_rel_col );
821 auto monGroup =
getGroup( trigger + ( online ?
"_Distributions_HLT" :
"_Distributions_Offline") );
823 std::vector<float> deta1_vec, deta1_EMECA_vec, deta1_EMECC_vec, deta1_EMEBA_vec, deta1_EMEBC_vec, deta2_vec, dphi2_vec,
824 dphiresc_vec, eprobht_vec, npixhits_vec, nscthits_vec, charge_vec, ptcone20_vec, ptvarcone20_vec, z0_vec, d0_vec, d0sig_vec,
825 pt_vec,pt_trk_vec, ptcone20_rel_vec, ptvarcone20_rel_vec, eta_vec, mu_vec;
853 for (
const auto *
eg : eg_vec ){
858 if(
eg->caloCluster()) cleta=
eg->caloCluster()->eta();
859 else cleta=
eg->eta();
861 deta1_vec.push_back( getCaloTrackMatch_deltaEta1(
eg));
863 if(cleta > 1.375 && cleta < 3.2)
864 deta1_EMECA_vec.push_back( getCaloTrackMatch_deltaEta1(
eg));
865 if(cleta < -1.375 && cleta > -3.2)
866 deta1_EMECC_vec.push_back( getCaloTrackMatch_deltaEta1(
eg));
867 if(cleta > 0 && cleta < 1.375)
868 deta1_EMEBA_vec.push_back( getCaloTrackMatch_deltaEta1(
eg));
869 if(cleta < 0 && cleta > -1.375)
870 deta1_EMEBC_vec.push_back( getCaloTrackMatch_deltaEta1(
eg));
872 deta2_vec.push_back( getCaloTrackMatch_deltaEta2(
eg));
873 dphi2_vec.push_back( getCaloTrackMatch_deltaPhi2(
eg));
874 dphiresc_vec.push_back( getCaloTrackMatch_deltaPhiRescaled2(
eg));
875 eprobht_vec.push_back( getTrackSummaryFloat_eProbabilityHT(
eg));
876 npixhits_vec.push_back( getTrackSummary_numberOfPixelHits(
eg));
877 nscthits_vec.push_back( getTrackSummary_numberOfSCTHits(
eg));
878 charge_vec.push_back(
eg->charge());
884 z0_vec.push_back( getTrack_z0(
eg));
885 d0_vec.push_back( getTrack_d0(
eg));
889 eta_vec.push_back(
eg->eta());
892 mu_vec.push_back( avgmu );
895 ptcone20_rel_vec.push_back( getIsolation_ptcone20(
eg)/
eg->pt());
896 ptvarcone20_rel_vec.push_back( getIsolation_ptvarcone20(
eg)/
eg->pt());
902 fill(
monGroup, deta1_col, deta1_EMECA_col, deta1_EMECC_col, deta1_EMEBA_col, deta1_EMEBC_col, deta2_col, dphi2_col,
903 dphiresc_col, eprobht_col, npixhits_col, nscthits_col, charge_col, ptcone20_col, ptvarcone20_col, z0_col, d0_col, d0sig_col,
904 pt_col, ptcone20_rel_col, ptvarcone20_rel_col, eta_col, mu_col,pt_trk_col);
918 std::vector< std::pair< const xAOD::Egamma*, const xAOD::EmTauRoI * >> pair_l1_vec;
919 std::vector< std::pair< const xAOD::Egamma*, const TrigCompositeUtils::Decision * >> pair_eg_vec;
920 const std::string trigger =
info.trigger;
923 for(
auto pairObj : pairObjs ){
926 const auto *feat = pairObj.second;
933 const auto *
l1 =
match()->getL1Feature( feat );
937 if(
et <
info.etthr-5.0)
continue;
938 if(!pidnameDec(*
eg))
continue;
939 pair_eg_vec.emplace_back(
el,feat);
940 if(
l1) pair_l1_vec.emplace_back(
eg,
l1 );
944 if(
et <
info.etthr-5.0)
continue;
945 pair_eg_vec.emplace_back(
eg,feat);
946 if(
l1) pair_l1_vec.emplace_back(
eg,
l1 );
958 if (
info.signature==
"Electron"){
961 else if (
info.signature==
"Photon"){
971 const std::vector< std::pair< const xAOD::Egamma*, const xAOD::EmTauRoI * >>& pairObjs )
const
975 std::vector<float> eta_vec, res_et_vec;
981 for (
const auto & pairObj : pairObjs){
982 const auto *off = pairObj.first;
983 const auto *
l1 = pairObj.second;
987 eta_vec.push_back(
l1->eta() );
988 res_et_vec.push_back( (
l1->emClus()-
getEt(eloff))/
getEt(eloff) ) ;
1001 const std::vector< std::pair< const xAOD::Egamma*, const xAOD::EmTauRoI * >>& pairObjs )
const
1005 std::vector<float> eta_vec, res_et_vec;
1011 for (
const auto & pairObj : pairObjs){
1012 const auto *off = pairObj.first;
1013 const auto *
l1 = pairObj.second;
1017 eta_vec.push_back(
l1->eta() );
1029 const std::vector< std::pair< const xAOD::Egamma*, const TrigCompositeUtils::Decision * >>& pairObjs,
1035 std::vector<float> res_pt_vec, res_et_vec, res_phi_vec, res_eta_vec, res_deta1_vec, res_deta2_vec, res_dphi2_vec, res_dphiresc_vec,
1036 res_z0_vec, res_d0_vec, res_d0sig_vec, res_eprobht_vec, res_npixhits_vec, res_nscthits_vec, res_Rhad_vec, res_Rhad1_vec, res_Reta_vec,
1037 res_Rphi_vec, res_weta1_vec, res_weta2_vec, res_wtots1_vec, res_f1_vec, res_f3_vec, res_eratio_vec, res_ethad_vec, res_ethad1_vec,
1038 et_vec, eta_vec, mu_vec;
1039 std::vector<float> res_ptcone20_vec, res_ptcone20_rel_vec, res_ptvarcone20_vec, res_ptvarcone20_rel_vec;
1040 std::vector<float> res_etInEta0_vec, res_etInEta1_vec, res_etInEta2_vec, res_etInEta3_vec;
1084 auto res_ptvarcone20_rel_col =
Monitored::Collection(
"res_ptvarcone20_rel" , res_ptvarcone20_rel_vec );
1092 std::string
key =
match()->key(
"Electrons_GSF");
1096 for (
const auto & pairObj : pairObjs ){
1103 float maxDeltaR=0.05;
1105 for(
auto &featLinkInfo :
vec ){
1106 if(! featLinkInfo.isValid() )
continue;
1107 const auto *feat = *(featLinkInfo.link);
1109 float deltaR =
dR( off->
eta(), off->
phi(), feat->eta(), feat->phi() );
1120 const float onl_eta=
onl->eta();
1121 const float feta = abs(onl_eta);
1124 const float dummy=-999;
1126 eta_vec.push_back( onl_eta );
1127 et_vec.push_back( onl_et );
1128 mu_vec.push_back( avgmu );
1130 val_off=getTrack_pt(off);
1132 res_pt_vec.push_back( (getTrack_pt(off)-val_off)/val_off );
1139 res_et_vec.push_back( (
getEt(
onl)-val_off)/val_off );
1141 res_etInEta0_vec.push_back((
getEt(
onl)-val_off)/val_off);
1142 else if( feta >=1.37 && feta <= 1.52 )
1143 res_etInEta1_vec.push_back((
getEt(
onl)-val_off)/val_off);
1144 else if( feta >= 1.55 && feta < 1.8 )
1145 res_etInEta2_vec.push_back((
getEt(
onl)-val_off)/val_off);
1146 else if( feta >= 1.8 && feta < 2.45 )
1147 res_etInEta3_vec.push_back((
getEt(
onl)-val_off)/val_off);
1152 res_eta_vec.push_back( (onl_eta-val_off)/val_off );
1154 res_eta_vec.push_back(
dummy );
1159 res_phi_vec.push_back( (
onl->phi()-val_off)/val_off );
1161 res_phi_vec.push_back(
dummy );
1164 val_off=getShowerShape_ethad(off);
1166 res_ethad_vec.push_back((getShowerShape_ethad(
onl)-val_off)/val_off);
1168 res_ethad_vec.push_back(
dummy );
1171 val_off=getShowerShape_ethad1(off);
1173 res_ethad1_vec.push_back((getShowerShape_ethad1(
onl)-val_off)/val_off);
1175 res_ethad1_vec.push_back(
dummy);
1178 val_off=getShowerShape_Rhad(off);
1180 res_Rhad_vec.push_back( (getShowerShape_Rhad(
onl)-val_off)/val_off );
1182 res_Rhad_vec.push_back(
dummy );
1185 val_off=getShowerShape_Rhad1(off);
1187 res_Rhad1_vec.push_back( (getShowerShape_Rhad1(
onl)-val_off)/val_off );
1189 res_Rhad1_vec.push_back(
dummy );
1192 val_off=getShowerShape_Reta(off);
1194 res_Reta_vec.push_back( (getShowerShape_Reta(
onl)-val_off)/val_off );
1196 res_Reta_vec.push_back(
dummy );
1199 val_off=getShowerShape_Rphi(off);
1201 res_Rphi_vec.push_back( (getShowerShape_Rphi(
onl)-val_off)/val_off );
1203 res_Rphi_vec.push_back( (getShowerShape_Rphi(
onl)-val_off)/val_off );
1206 val_off=getShowerShape_weta1(off);
1208 res_weta1_vec.push_back( (getShowerShape_weta1(
onl)-val_off)/val_off );
1210 res_weta1_vec.push_back(
dummy );
1213 val_off=getShowerShape_weta2(off);
1215 res_weta2_vec.push_back( (getShowerShape_weta2(
onl)-val_off)/val_off );
1217 res_weta2_vec.push_back(
dummy );
1220 val_off=getShowerShape_wtots1(off);
1222 res_wtots1_vec.push_back( (getShowerShape_wtots1(
onl)-val_off)/val_off );
1224 res_wtots1_vec.push_back(
dummy );
1227 val_off=getShowerShape_f1(off);
1229 res_f1_vec.push_back( (getShowerShape_f1(
onl)-val_off)/val_off );
1231 res_f1_vec.push_back(
dummy );
1234 val_off=getShowerShape_f3(off);
1236 res_f3_vec.push_back( (getShowerShape_f3(
onl)-val_off)/val_off );
1238 res_f3_vec.push_back(
dummy );
1241 val_off=getShowerShape_Eratio(off);
1243 res_eratio_vec.push_back( (getShowerShape_Eratio(
onl)-val_off)/val_off );
1245 res_eratio_vec.push_back(
dummy );
1253 val_off=getTrack_pt(off);
1255 res_pt_vec.push_back( (getTrack_pt(
onl)-val_off)/val_off );
1257 res_pt_vec.push_back(
dummy );
1262 res_et_vec.push_back( (
getEt(
onl)-val_off)/val_off );
1264 res_et_vec.push_back(
dummy );
1267 val_off=getCaloTrackMatch_deltaEta1(off);
1269 res_deta1_vec.push_back( (getCaloTrackMatch_deltaEta1(
onl)-val_off)/val_off );
1271 res_deta1_vec.push_back(
dummy );
1274 val_off=getCaloTrackMatch_deltaEta2(off);
1275 res_deta2_vec.push_back( (getCaloTrackMatch_deltaEta2(
onl)-val_off)/val_off );
1276 val_off=getCaloTrackMatch_deltaPhi2(off);
1278 res_dphi2_vec.push_back( (getCaloTrackMatch_deltaPhi2(
onl)-val_off)/val_off );
1280 res_dphi2_vec.push_back(
dummy );
1283 val_off=getCaloTrackMatch_deltaPhiRescaled2(off);
1284 res_dphiresc_vec.push_back( (getCaloTrackMatch_deltaPhiRescaled2(
onl)-val_off)/val_off );
1286 val_off=getTrack_z0(off);
1288 res_z0_vec.push_back( getTrack_z0(
onl)-val_off );
1290 res_z0_vec.push_back(
dummy );
1294 val_off=getTrack_d0(off);
1296 res_d0_vec.push_back( getTrack_d0(
onl)-val_off );
1298 res_d0_vec.push_back(
dummy );
1305 res_d0sig_vec.push_back(
dummy );
1309 val_off=getTrackSummaryFloat_eProbabilityHT(off);
1310 res_eprobht_vec.push_back( (getTrackSummaryFloat_eProbabilityHT(
onl)-val_off) );
1311 res_npixhits_vec.push_back( getTrackSummary_numberOfPixelHits(
onl)-getTrackSummary_numberOfPixelHits(
onl) );
1312 res_nscthits_vec.push_back( getTrackSummary_numberOfSCTHits(
onl)-getTrackSummary_numberOfSCTHits(
onl) );
1319 float val_off=getIsolation_ptcone20(off);
1321 res_ptcone20_vec.push_back((getIsolation_ptcone20(
onl)-val_off)/val_off);
1323 const float reliso_onl=getIsolation_ptcone20(
onl)/
getEt(
onl);
1324 const float reliso_off=getIsolation_ptcone20(off)/
getEt(off);
1325 res_ptcone20_rel_vec.push_back((reliso_onl-reliso_off)/reliso_off);
1327 res_ptcone20_rel_vec.push_back(
dummy);
1330 res_ptcone20_vec.push_back(
dummy);
1331 res_ptcone20_rel_vec.push_back(
dummy);
1335 val_off=getIsolation_ptvarcone20(off);
1338 res_ptvarcone20_vec.push_back((getIsolation_ptvarcone20(
onl)-val_off)/val_off);
1339 const float reliso_onl=getIsolation_ptvarcone20(
onl)/
getEt(
onl);
1340 const float reliso_off=getIsolation_ptvarcone20(off)/
getEt(off);
1341 res_ptvarcone20_rel_vec.push_back((reliso_onl-reliso_off)/reliso_off);
1343 res_ptvarcone20_rel_vec.push_back(
dummy);
1346 res_ptvarcone20_vec.push_back(
dummy);
1347 res_ptvarcone20_rel_vec.push_back(
dummy);
1390 res_ptcone20_rel_col ,
1391 res_ptvarcone20_col ,
1392 res_ptvarcone20_rel_col ,
1407 const std::vector< std::pair< const xAOD::Egamma*, const TrigCompositeUtils::Decision * >>& pairObjs,
1413 std::vector<float> res_phi_vec, res_eta_vec, res_Rhad_vec, res_Rhad1_vec, res_Reta_vec, res_ethad_vec, res_ethad1_vec,
1414 res_Rphi_vec, res_weta1_vec, res_weta2_vec, res_wtots1_vec, res_f1_vec, res_f3_vec, res_eratio_vec, et_vec, eta_vec, mu_vec;
1416 std::vector<float> res_et_vec, res_et_cnv_vec, res_et_uncnv_vec;
1417 std::vector<float> res_etInEta0_vec, res_etInEta1_vec, res_etInEta2_vec, res_etInEta3_vec;
1418 std::vector<float> res_cnv_etInEta0_vec, res_cnv_etInEta1_vec, res_cnv_etInEta2_vec, res_cnv_etInEta3_vec;
1419 std::vector<float> res_uncnv_etInEta0_vec, res_uncnv_etInEta1_vec, res_uncnv_etInEta2_vec, res_uncnv_etInEta3_vec;
1423 std::vector<float> res_topoetcone20_vec, res_topoetcone20_rel_vec;
1457 auto res_uncnv_etInEta0_col =
Monitored::Collection(
"res_uncnv_etInEta0" , res_uncnv_etInEta0_vec);
1458 auto res_uncnv_etInEta1_col =
Monitored::Collection(
"res_uncnv_etInEta1" , res_uncnv_etInEta1_vec);
1459 auto res_uncnv_etInEta2_col =
Monitored::Collection(
"res_uncnv_etInEta2" , res_uncnv_etInEta2_vec);
1460 auto res_uncnv_etInEta3_col =
Monitored::Collection(
"res_uncnv_etInEta3" , res_uncnv_etInEta3_vec);
1464 auto res_topoetcone20_rel_col =
Monitored::Collection(
"res_topoetcone20_rel" , res_topoetcone20_rel_vec );
1474 for (
const auto & pairObj : pairObjs ){
1481 float maxDeltaR=0.05;
1483 for(
auto &featLinkInfo :
vec ){
1484 if(! featLinkInfo.isValid() )
continue;
1485 const auto *feat = *(featLinkInfo.link);
1487 float deltaR =
dR( off->
eta(), off->
phi(), feat->eta(), feat->phi() );
1499 const float onl_eta=
onl->eta();
1500 const float feta = abs(onl_eta);
1502 const float dummy=-999;
1505 et_vec.push_back( onl_et );
1506 eta_vec.push_back( onl_eta );
1507 mu_vec.push_back( avgmu );
1510 val_off=getCluster_et(off);
1512 res_et_vec.push_back( (getCluster_et(
onl)-val_off)/val_off );
1514 res_etInEta0_vec.push_back((getCluster_et(
onl)-val_off)/val_off);
1515 else if( feta >=1.37 && feta <= 1.52 )
1516 res_etInEta1_vec.push_back((getCluster_et(
onl)-val_off)/val_off);
1517 else if( feta >= 1.55 && feta < 1.8 )
1518 res_etInEta2_vec.push_back((getCluster_et(
onl)-val_off)/val_off);
1519 else if( feta >= 1.8 && feta < 2.45 )
1520 res_etInEta3_vec.push_back((getCluster_et(
onl)-val_off)/val_off);
1523 res_et_cnv_vec.push_back((getCluster_et(
onl)-val_off)/val_off);
1525 res_cnv_etInEta0_vec.push_back((getCluster_et(
onl)-val_off)/val_off);
1526 else if( feta >=1.37 && feta <= 1.52 )
1527 res_cnv_etInEta1_vec.push_back((getCluster_et(
onl)-val_off)/val_off);
1528 else if( feta >= 1.55 && feta < 1.8 )
1529 res_cnv_etInEta2_vec.push_back((getCluster_et(
onl)-val_off)/val_off);
1530 else if( feta >= 1.8 && feta < 2.45 )
1531 res_cnv_etInEta3_vec.push_back((getCluster_et(
onl)-val_off)/val_off);
1533 res_et_uncnv_vec.push_back((getCluster_et(
onl)-val_off)/val_off);
1535 res_uncnv_etInEta0_vec.push_back((getCluster_et(
onl)-val_off)/val_off);
1536 else if( feta >=1.37 && feta <= 1.52 )
1537 res_uncnv_etInEta1_vec.push_back((getCluster_et(
onl)-val_off)/val_off);
1538 else if( feta >= 1.55 && feta < 1.8 )
1539 res_uncnv_etInEta2_vec.push_back((getCluster_et(
onl)-val_off)/val_off);
1540 else if( feta >= 1.8 && feta < 2.45 )
1541 res_uncnv_etInEta3_vec.push_back((getCluster_et(
onl)-val_off)/val_off);
1547 res_eta_vec.push_back( (onl_eta-val_off)/val_off ) ;
1549 res_eta_vec.push_back(
dummy ) ;
1554 res_phi_vec.push_back( (
onl->phi()-val_off)/val_off );
1556 res_phi_vec.push_back(
dummy );
1559 val_off=getShowerShape_ethad(off);
1561 res_ethad_vec.push_back((getShowerShape_ethad(
onl)-val_off)/val_off);
1563 res_ethad_vec.push_back(
dummy);
1566 val_off=getShowerShape_ethad1(off);
1568 res_ethad1_vec.push_back((getShowerShape_ethad1(
onl)-val_off)/val_off);
1570 res_ethad1_vec.push_back(
dummy);
1573 val_off=getShowerShape_Rhad(off);
1575 res_Rhad_vec.push_back( (getShowerShape_Rhad(
onl)-val_off)/val_off );
1577 res_Rhad_vec.push_back(
dummy );
1580 val_off=getShowerShape_Rhad1(off);
1582 res_Rhad1_vec.push_back( (getShowerShape_Rhad1(
onl)-val_off)/val_off );
1584 res_Rhad1_vec.push_back(
dummy );
1587 val_off=getShowerShape_Reta(off);
1589 res_Reta_vec.push_back( (getShowerShape_Reta(
onl)-val_off)/val_off );
1591 res_Reta_vec.push_back(
dummy );
1594 val_off=getShowerShape_Rphi(off);
1596 res_Rphi_vec.push_back( (getShowerShape_Rphi(
onl)-val_off)/val_off );
1598 res_Rphi_vec.push_back(
dummy );
1601 val_off=getShowerShape_weta1(off);
1603 res_weta1_vec.push_back( (getShowerShape_weta1(
onl)-val_off)/val_off );
1605 res_weta1_vec.push_back(
dummy );
1608 val_off=getShowerShape_weta2(off);
1610 res_weta2_vec.push_back( (getShowerShape_weta2(
onl)-val_off)/val_off );
1612 res_weta2_vec.push_back(
dummy);
1615 val_off=getShowerShape_wtots1(off);
1617 res_wtots1_vec.push_back( (getShowerShape_wtots1(
onl)-val_off)/val_off );
1619 res_wtots1_vec.push_back(
dummy );
1622 val_off=getShowerShape_f1(off);
1624 res_f1_vec.push_back( (getShowerShape_f1(
onl)-val_off)/val_off );
1626 res_f1_vec.push_back(
dummy );
1629 val_off=getShowerShape_f3(off);
1631 res_f3_vec.push_back( (getShowerShape_f3(
onl)-val_off)/val_off );
1633 res_f3_vec.push_back(
dummy );
1636 val_off=getShowerShape_Eratio(off);
1638 res_eratio_vec.push_back( (getShowerShape_Eratio(
onl)-val_off)/val_off);
1640 res_eratio_vec.push_back(
dummy);
1644 if(
info.isolated ){
1646 float val_off=getIsolation_topoetcone20(off);
1647 float etonl=
onl->pt();
1648 float etoff=off->
pt();
1650 res_topoetcone20_vec.push_back((getIsolation_topoetcone20(
onl)-val_off)/val_off);
1651 if (etonl > 0. && etoff > 0.) {
1652 const float reliso_onl=getIsolation_topoetcone20(
onl)/etonl;
1653 const float reliso_off=getIsolation_topoetcone20(off)/etoff;
1654 res_topoetcone20_rel_vec.push_back((reliso_onl-reliso_off)/reliso_off);
1656 res_topoetcone20_rel_vec.push_back(
dummy);
1659 res_topoetcone20_vec.push_back(
dummy);
1660 res_topoetcone20_rel_vec.push_back(
dummy);
1688 res_topoetcone20_col ,
1689 res_topoetcone20_rel_col ,
1695 res_cnv_etInEta0_col,
1696 res_cnv_etInEta1_col,
1697 res_cnv_etInEta2_col,
1698 res_cnv_etInEta3_col,
1700 res_uncnv_etInEta0_col,
1701 res_uncnv_etInEta1_col,
1702 res_uncnv_etInEta2_col,
1703 res_uncnv_etInEta3_col
1712 const std::vector< std::pair< const xAOD::Egamma*, const TrigCompositeUtils::Decision * >>& pairObjs )
const
1719 std::vector<float> res_et_vec, res_phi_vec, res_eta_vec, res_Rhad_vec, res_Rhad1_vec, res_Reta_vec, res_ethad_vec, res_ethad1_vec,
1720 res_Rphi_vec, res_weta2_vec, res_f1_vec, res_f3_vec, res_eratio_vec, et_vec, eta_vec;
1740 for (
const auto & pairObj : pairObjs ){
1747 float maxDeltaR=0.05;
1749 for(
auto &featLinkInfo :
vec ){
1750 if(! featLinkInfo.isValid() )
continue;
1751 const auto *feat = *(featLinkInfo.link);
1753 float deltaR =
dR( off->
eta(), off->
phi(), feat->eta(), feat->phi() );
1763 et_vec.push_back(
onl->et()*1
e-3);
1764 eta_vec.push_back(
onl->eta());
1765 const float dummy=-999;
1771 res_et_vec.push_back(((
onl->et())-val_off)/val_off);
1773 res_et_vec.push_back(
dummy);
1778 res_eta_vec.push_back((
onl->eta()-val_off)/val_off);
1780 res_eta_vec.push_back(
dummy);
1785 res_phi_vec.push_back((
onl->phi()-val_off)/val_off);
1787 res_phi_vec.push_back((
onl->phi()-val_off)/val_off);
1795 elonl_ethad /= TMath::CosH(
onl->eta() );
1796 val_off=getShowerShape_ethad(off);
1798 res_ethad_vec.push_back((elonl_ethad-val_off)/val_off);
1800 res_ethad_vec.push_back(
dummy);
1803 val_off=getShowerShape_ethad1(off);
1805 res_ethad1_vec.push_back(( (
onl->ehad1()/TMath::Abs(
onl->eta()) )-val_off)/val_off);
1807 res_ethad1_vec.push_back(
dummy);
1810 float elonl_Rhad = elonl_ethad /
onl->energy() ;
1811 val_off=getShowerShape_Rhad(off);
1813 res_Rhad_vec.push_back(( elonl_Rhad-val_off)/val_off);
1815 res_Rhad_vec.push_back(
dummy);
1818 float elonl_Rhad1 =
onl->ehad1() /
onl->energy() ;
1819 val_off=getShowerShape_Rhad1(off);
1821 res_Rhad1_vec.push_back(( elonl_Rhad1-val_off)/val_off);
1823 res_Rhad1_vec.push_back(
dummy);
1826 float onl_reta= 999.0;
1827 if ( fabsf (
onl->e277() ) > 0.01 ) onl_reta =
onl->e237() /
onl->e277();
1828 val_off=getShowerShape_Reta(off);
1830 res_Reta_vec.push_back( (onl_reta -val_off)/val_off);
1832 res_Reta_vec.push_back(
dummy);
1835 val_off=getShowerShape_weta2(off);
1837 res_weta2_vec.push_back(( (
onl->weta2())-val_off)/val_off);
1839 res_weta2_vec.push_back(
dummy);
1843 onl_f1 /=
onl->energy();
1844 val_off=getShowerShape_f1(off);
1846 res_f1_vec.push_back(( (onl_f1)-val_off)/val_off);
1848 res_f1_vec.push_back(
dummy);
1852 onl_f3 /=
onl->energy();
1853 val_off=getShowerShape_f3(off);
1855 res_f3_vec.push_back(( (onl_f3)-val_off)/val_off);
1857 res_f3_vec.push_back(
dummy);
1860 float onl_eratio = 999.0;
1861 if ( fabsf(
onl->emaxs1() +
onl->e2tsts1()) > 0.01 )
1862 onl_eratio = (
onl->emaxs1() -
onl->e2tsts1()) / (
onl->emaxs1() +
onl->e2tsts1());
1863 val_off=getShowerShape_Eratio(off);
1865 res_eratio_vec.push_back(( (onl_eratio)-val_off)/val_off);
1867 res_eratio_vec.push_back(
dummy);