|
[Rivet] Rivet analysis ATLAS_2010_S8914702Holger Schulz holger.schulz at durham.ac.ukWed Jul 20 10:10:56 BST 2016
Hi Michael, during testing we found that your analysis plugin crashes for certain events when trying to calculate the median pTDensity. Could I please ask you to have a look at these code snippets. // Get the jet pT densities vector< vector<double> > ptDensities(_eta_bins_areaoffset.size()-1); FastJets fastjets = apply<FastJets>(event, "KtJetsD05"); const shared_ptr<fastjet::ClusterSequenceArea> clust_seq_area = fastjets.clusterSeqArea(); for (const Jet& jet : fastjets.jets()) { const double area = clust_seq_area->area(jet); //< Implicit call to pseudojet() */// @todo Should be 1e-4?* if (area > *10e-4* && jet.abseta() < _eta_bins_areaoffset.back()) { ptDensities.at(getEtaBin(jet.abseta(), true)) += jet.pT()/area; } } // Now compute the median energy densities vector<double> ptDensity; for (size_t b = 0; b < _eta_bins_areaoffset.size()-1; ++b) { *if (ptDensities[b].size() >0 )* ptDensity += median(ptDensities[b]); } The red bit was added by us to prevent calculating the median of an empty vector --- do you remember what the logic in your analysis code was for cases like that? If you find the time, could you please comment on the blue bit as well? You can find the version of the code in the current release here: https://rivet.hepforge.org/hg/rivet/file/0175188f89df/src/Analyses/ATLAS_2010_S8914702.cc Cheers, Holger -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://www.hepforge.org/lists-archive/rivet/attachments/20160720/77e30154/attachment.html>
More information about the Rivet mailing list |