11 ISvcLocator* pSvcLocator ) :
13 m_dataAccessSvc(
"TrigCaloDataAccessSvc/TrigCaloDataAccessSvc",
name )
24 return StatusCode::SUCCESS;
33 std::vector<const TileCell*>
mbts;
37 for (
size_t i=0;
i<
mbts.size(); ++
i)
43 const EventIDBase eventInfo = context.eventID();
47 uint32_t eventn = eventInfo.event_number();
51 float max_diff=-999.0;
52 float max_diff_restricted_et=-999.0;
53 float max_diff_restricted_samp=-999.0;
57 float mean_diff_n=0.0;
58 float mean_diff_restricted_et=0.0;
59 float mean_sum1_restricted_et=0.0;
60 float mean_sum2_restricted_et=0.0;
61 float mean_diff_restricted_et_n=0.0;
62 float mean_diff_restricted_samp=0.0;
63 float mean_sum1_restricted_samp=0.0;
64 float mean_sum2_restricted_samp=0.0;
65 float mean_diff_restricted_samp_n=0.0;
66 for(
auto offcell : *off ) {
68 if ( offcell->caloDDE()->is_tile() )
continue;
69 for (
auto hltcell :
c) {
71 if ( hltdde && hltdde->
is_tile() )
continue;
72 if (
id == hltcell->ID() ) {
74 if ( offcell->et() > 5
e3 )
75 ATH_MSG_DEBUG(
"CHECK Cell " << hltcell->energy() <<
" " << offcell->energy() <<
" " << hltcell->eta() <<
" " << hltcell->phi() <<
" " << samp);
76 float diff = hltcell->energy() - offcell->energy();
77 float diff_et = hltcell->et() - offcell->et();
79 if (
diff > max_diff ) max_diff =
diff;
81 mean_sum1 += hltcell->energy();
82 mean_sum2 += offcell->energy();
85 ATH_MSG_DEBUG(
"CHECK Diff et " << diff_et <<
" " << hltcell->energy() <<
" " << offcell->energy() <<
" " << hltcell->eta() <<
" " << hltcell->phi() <<
" " << samp);
87 ATH_MSG_DEBUG(
"CHECK Diff " <<
diff <<
" " << hltcell->energy() <<
" " << offcell->energy() <<
" " << hltcell->eta() <<
" " << hltcell->phi() <<
" " << samp);
88 if ( offcell->et() < 3
e3 ) {
89 if (
diff > max_diff_restricted_et ) max_diff_restricted_et =
diff;
90 mean_sum1_restricted_et+=hltcell->energy();
91 mean_sum2_restricted_et+=offcell->energy();
92 mean_diff_restricted_et+=
diff;
93 mean_diff_restricted_et_n++;
96 if (
diff > max_diff_restricted_samp ) max_diff_restricted_samp =
diff;
97 mean_sum1_restricted_samp+=hltcell->energy();
98 mean_sum2_restricted_samp+=offcell->energy();
99 mean_diff_restricted_samp+=
diff;
100 mean_diff_restricted_samp_n++;
106 ATH_MSG_DEBUG(
"RESULTS : " <<
bcid <<
" " << eventn <<
" " << max_diff <<
" " << max_diff_restricted_et <<
" " << mean_diff <<
" " << mean_diff_n <<
" " << mean_diff_restricted_et <<
" " << mean_diff_restricted_et_n <<
" " << mean_diff_restricted_samp <<
" " << mean_diff_restricted_samp_n <<
" " << mean_sum1 <<
" " << mean_sum2 <<
" " << mean_sum1_restricted_et <<
" " << mean_sum2_restricted_et <<
" " << mean_sum1_restricted_samp <<
" " << mean_sum2_restricted_samp);
109 return StatusCode::SUCCESS;