Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
26 ATH_MSG_ERROR(
"OutputDecorKeys should not be configured manually!");
27 return StatusCode::FAILURE;
30 ATH_MSG_ERROR(
"JetCaloQualityToolFE needs to have its input jet container name configured!");
31 return StatusCode::FAILURE;
37 if(calcN ==
"LArQuality"){
40 else if(calcN ==
"HECQuality"){
43 else if(calcN ==
"NegativeE"){
46 else if(calcN ==
"AverageLArQF"){
49 else if(calcN ==
"Timing"){
52 else if(calcN ==
"Centroid"){
55 else if(calcN ==
"BchCorrCell"){
59 if(calcN ==
"Centroid"){
71 s << std::setprecision(0) << std::fixed <<
"OotFracClusters" << timeCut;
77 std::ostringstream sout;
78 sout <<
"N" << fracCut <<
"Constituents";
90 return StatusCode::SUCCESS;
102 return StatusCode::SUCCESS;
107 std::vector<const xAOD::CaloCluster*>
clusters;
114 for (
size_t i = 0;
i <
jet.numConstituents();
i++ ) {
128 ATH_MSG_VERBOSE(
" Constituents are ParticleFlow objects stored as FlowElements.");
129 for (
size_t i = 0;
i <
jet.numConstituents();
i++ ) {
137 if(cluster !=
nullptr){
146 for (
size_t i = 0;
i <
jet.numConstituents();
i++ ) {
157 if(index_pfo<0)
continue;
168 if(!cluster){
continue;}
189 float sum_E_square = 0.0;
191 float sum_badLarQ = 0.0;
192 float sum_badHECQ = 0.0;
193 float sum_e_HEC = 0.0;
194 float sum_e_neg = 0.0;
195 float sum_avg_lar_q = 0.0;
196 float sum_timing = 0.0;
197 float centroid_x = 0.0, centroid_y = 0.0, centroid_z = 0.0;
198 float sum_e_bad_cells = 0.0;
200 std::vector<float> sum_OOT;
203 std::vector<int> counter_Nfrac;
206 std::vector<float> cluster_energies;
215 sum_E_square += cluster_E*cluster_E;
217 cluster_energies.push_back(cluster_E);
225 sum_badLarQ += bad_frac*cluster_E;
231 sum_badHECQ += bad_frac*e_HEC;
239 sum_e_neg += cluster_E - e_pos;
244 double avg_lar_q=0.0;
246 sum_avg_lar_q += avg_lar_q*cluster_E*cluster_E;
251 double x = 0.0,
y = 0.0,
z = 0.0;
256 centroid_x +=
x*cluster_E;
257 centroid_y +=
y*cluster_E;
258 centroid_z +=
z*cluster_E;
263 double cells_bad_E = 0.0;
265 sum_e_bad_cells += cells_bad_E;
273 sum_timing +=
timing*cluster_E*cluster_E;
279 sum_OOT[j] += cluster_E;
288 std::sort(cluster_energies.rbegin(),cluster_energies.rend());
290 for(
size_t iFracCut = 0; iFracCut <
m_thresholdCuts.size(); iFracCut++){
295 for(
unsigned int iClus = 0; iClus < cluster_energies.size(); iClus++){
296 tmp_sum += cluster_energies[iClus];
300 counter_Nfrac[iFracCut] =
counter;
310 if(calcN ==
"LArQuality"){
311 decHandle(
jet) = sum_E != 0. ? sum_badLarQ/sum_E : 0.;
313 else if(calcN ==
"HECQuality"){
314 decHandle(
jet) = sum_e_HEC != 0. ? sum_badHECQ/sum_e_HEC : 0.;
316 else if(calcN ==
"NegativeE"){
317 decHandle(
jet) = sum_e_neg;
319 else if(calcN ==
"AverageLArQF"){
320 decHandle(
jet) = sum_E_square != 0. ? sum_avg_lar_q/sum_E_square : 0.;
322 else if(calcN ==
"Timing"){
323 decHandle(
jet) = sum_E_square != 0. ? sum_timing/sum_E_square : 0.;
325 else if(calcN ==
"Centroid"){
326 decHandle(
jet) = sum_E_square != 0. ? sqrt(centroid_x*centroid_x+centroid_y*centroid_y+centroid_z*centroid_z)/sum_E_square : 0.;
328 else if(calcN ==
"BchCorrCell"){
335 decHandle_timing(
jet) = sum_E != 0. ? sum_OOT[iCut]/sum_E : 0. ;
338 for(
size_t iFracCut = 0; iFracCut <
m_thresholdCuts.size(); iFracCut++){
342 decHandle_frac(
jet) = counter_Nfrac[iFracCut];
flt_t time() const
Access cluster time.
std::string find(const std::string &s)
return a remapped string
@ CENTER_X
Cluster Centroid ( )
std::size_t nOtherObjects() const
@ AVG_LAR_Q
Sum(E_cell_LAr^2 Q_cell_LAr)/Sum(E_cell_LAr^2)
virtual Type::ObjectType type() const =0
The type of the object as a simple enumeration.
#define ATH_MSG_VERBOSE(x)
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
@ CENTER_Z
Cluster Centroid ( )
Description of a calorimeter cluster.
::StatusCode StatusCode
StatusCode definition for legacy code.
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Handle class for adding a decoration to an object.
signal_t signalType() const
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
size_t index() const
Return the index of this element within its container.
@ ENG_BAD_CELLS
Total em-scale energy of bad cells in this cluster.
float eSample(const CaloSample sampling) const
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
const xAOD::IParticle * otherObject(std::size_t i) const
virtual double e() const
The total energy of the particle.
@ CENTER_Y
Cluster Centroid ( )
@ ENG_POS
Total positive Energy of this cluster.
std::vector< const xAOD::IParticle * > otherObjects() const
A detector object made of other lower level object(s)
@ BADLARQ_FRAC
Energy fraction of LAr cells with quality larger than a given cut.