Index: contrib/contribs/ConstituentSubtractor/trunk/VERSION =================================================================== --- contrib/contribs/ConstituentSubtractor/trunk/VERSION (revision 1228) +++ contrib/contribs/ConstituentSubtractor/trunk/VERSION (revision 1229) @@ -1,2 +1,2 @@ -1.4.1 +1.4.2 Index: contrib/contribs/ConstituentSubtractor/trunk/ConstituentSubtractor.hh =================================================================== --- contrib/contribs/ConstituentSubtractor/trunk/ConstituentSubtractor.hh (revision 1228) +++ contrib/contribs/ConstituentSubtractor/trunk/ConstituentSubtractor.hh (revision 1229) @@ -1,310 +1,311 @@ // $Id$ // // ConstituentSubtractor package // Questions/comments: berta@ipnp.troja.mff.cuni.cz, Martin.Spousta@cern.ch, David.W.Miller@uchicago.edu // // Copyright (c) 2014-, Peter Berta, Martin Spousta, David W. Miller, Rupert Leitner // //---------------------------------------------------------------------- // This file is part of FastJet contrib. // // It is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at // your option) any later version. // // It is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public // License for more details. // // You should have received a copy of the GNU General Public License // along with this code. If not, see . //---------------------------------------------------------------------- #ifndef __FASTJET_CONTRIB_CONSTITUENTSUBTRACTOR_HH__ #define __FASTJET_CONTRIB_CONSTITUENTSUBTRACTOR_HH__ #include #include #include #include #include #include #include #include "fastjet/tools/Transformer.hh" // to derive Subtractor from Transformer #include "fastjet/LimitedWarning.hh" #include FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh namespace contrib{ //------------------------------------------------------------------------ /// \class ConstituentSubtractor /// A class to perform subtraction of background, e.g. pileup, from a set of particles at particle-level. The output is a jet or the whole event with corrected constituents. /// /// This class corrects the input particles for background contamination with the algorithm described in: /// Peter Berta, Martin Spousta, David W. Miller, Rupert Leitner [arXiv:1403.3108] /// /// For individual jet background subtraction, see example.cc /// For whole event background subtraction before jet clustering, see example_whole_event.cc /// /// The distance used for matching between particle i and ghost k is defined as: /// deltaR_{i,k}=pT_i * sin(theta_i)^polarAngleExp * sqrt((y_i-y_k)^2 + (phi_i-phi_k)^2) /// /// The class accounts for position-dependent (in rapidity-azimuth plane) background densities, rho and rho_m. The user is encouraged to use them. /// -/// For the treatment of massive particles, choose one of the following options (currently the default option is 3): +/// +/// For the treatment of massive particles, choose one of the following options (currently the default option is 3): /// 1. Keep the original mass and rapidity. Not recommended since jet mass is wrongly reconstructed. Use this function: /// subtractor.set_keep_original_masses(); /// 2. Keep the original mass and pseudo-rapidity. Not recommended since jet mass is wrongly reconstructed. Use these two functions: /// subtractor.set_keep_original_masses(); /// subtractor.set_fix_pseudorapidity(true); -/// 3. Set all masses to zero. Keep rapidity unchanged. This is recommended and is the default option, nothing needs to be specified. Observed the best performance for high pt large-R jets. -/// 4. Set all masses to zero. Keep pseudo-rapidity unchanged. Also recommended, almost the same performance as for option 1. Use function: +/// 3. Set all masses to zero. Keep rapidity unchanged. This is recommended and is the default option, nothing needs to be specified. Observed the best performance for high pt large-R jets. +/// 4. Set all masses to zero. Keep pseudo-rapidity unchanged. Also recommended, almost the same performance as for option 3. Use function: /// subtractor.set_fix_pseudorapidity(true); -/// 5a. Do correction of m_delta=sqrt(p_T^2+m^2)-p_t using the same background estimator as for rho. Use this function: -/// subtractor.set_common_bge_for_rho_and_rhom(); // this must be used after set_background_estimator function. +/// 5a. Do correction of m_delta=sqrt(p_T^2+m^2)-p_t using the same background estimator as for rho. Use this function: +/// subtractor.set_common_bge_for_rho_and_rhom(); // this must be used after set_background_estimator function. /// 5b. Do correction of m_delta=sqrt(p_T^2+m^2)-p_t using a separate background estimator - you need to specify it as an additional parameter in function set_background_estimator -/// 6. Same as 3a or 3b just keep pseudo-rapidity unchanged. Additionally use: +/// 6. Same as 5a or 5b just keep pseudo-rapidity unchanged. Additionally use: /// subtractor.set_fix_pseudorapidity(true); -/// 7. Scale fourmomentum. Also recommended - observed better performance than the mass correction and slightly worse than setting the masses to zero. Use: +/// 7. Keep rapidity and pseudo-rapidity fixed (scale fourmomentum). Also recommended - observed better performance than the mass correction. Use: /// subtractor.set_scale_fourmomentum(true); class ConstituentSubtractor : public fastjet::Transformer{ public: enum Distance { deltaR, /// deltaR=sqrt((y_i-y_j)^2+(phi_i-phi_j)^2)), longitudinal Lorentz invariant angle /// angle between two momenta in Euclidean space }; /// /// default ctor ConstituentSubtractor(); /// /// Constructor that takes a pointer to a background estimator for rho and optionally a pointer to a background estimator for rho_m. If the latter is not supplied, rho_m is assumed to always be zero (this behaviour can be changed by calling use_common_bge_for_rho_and_rhom). ConstituentSubtractor(fastjet::BackgroundEstimatorBase *bge_rho, fastjet::BackgroundEstimatorBase *bge_rhom=0, double alpha=0, double max_distance=-1, Distance distance=deltaR); /// /// Constructor that takes an externally supplied value for rho and rho_m. ConstituentSubtractor(double rho, double rhom=0, double alpha=0, double max_distance=-1, Distance distance=deltaR); /// /// default dtor virtual ~ConstituentSubtractor(){} /// /// initialization. use it before event loop. virtual void initialize(); /// /// Common description for jet-by-jet, event-wide, and iterative CS void description_common(std::ostringstream &descr) const; /// /// a description of what this class does virtual std::string description() const; /// /// action of the correction on a given jet. The output is PseudoJet object with subtracted constituents virtual fastjet::PseudoJet result(const fastjet::PseudoJet &jet) const; /// /// do the constituent subtraction for the input particles using the provided background proxies. The output is a vector with corrected particles - particles with zero corrected pt and mass are removed by default. The user can modify this behaviour by using functions set_remove_particles_with_zero_pt_and_mass. std::vector do_subtraction(std::vector const &particles, std::vector const &backgroundProxies,std::vector *remaining_backgroundProxies=0) const; /// /// this version should be not used. Use the version below. virtual std::vector subtract_event(std::vector const &particles, double max_eta); /// /// do the subtraction of the whole event - more user-friendly approach. The particles with |eta|>max_eta are discarded at the beginning, i.e. they are not used, nor returned. The ghosts are added automatically inside this function up to max_eta. virtual std::vector subtract_event(std::vector const &particles, std::vector const *hard_proxies=nullptr); /// /// do the subtraction of the whole event using the tracking information for charged particles, i.e. the 4-momenta of charged particles from signal vertex, and 4-momenta of charged particles from background. The user can set the scaling of charged particles from background and signal using parameters charged_background_scale (CBS) and charged_signal_scale (CSS). These scales are useful if one assumes correlation between charged and neutral particles or in case the inputs from calorimeter are miscalibrated wrt tracks. In case CBS=CSS=0, the input charged particles are not used. In case CBS=CSS=1, the input charged particles are not scaled. Recommending to try several combinations for CBS and CSS from range [0.8, 1.5]. It is no more necessary to provide background estimator. The GridMedianBackgroundEstimator is used - probably more flexibility will be added in the future. The rescaling function for background estimator can be also provided - the rescaling function will be used for the event after subtracting charged scaled particles. The particles with |eta|>max_eta are discarded at the beginning, i.e. they are not used, nor returned. std::vector subtract_event_using_charged_info(std::vector const &particles, double charged_background_scale, std::vector const &charged_background, double charged_signal_scale, std::vector const &charged_signal, double max_eta); void set_rescaling(fastjet::FunctionOfPseudoJet *rescaling); /// /// set the grid size (not area) for the background estimation with GridMedianBackgroundEstimator when using charged info void set_grid_size_background_estimator(double const &grid_size_background_estimator); /// /// Set the pointer to a background estimator for rho and optionally a pointer to a background estimator for rho_m. If the latter is not supplied, rho_m is assumed to always be zero (this behaviour can be changed by calling use_common_bge_for_rho_and_rhom). void set_background_estimator(fastjet::BackgroundEstimatorBase *bge_rho, fastjet::BackgroundEstimatorBase *bge_rhom=0); /// /// Set the scalar background densities rho and rho_m. void set_scalar_background_density(double rho, double rhom=0); /// /// When only one background estimator, bge_rho, is specified, calling this function with argument true, causes rho_m to be calculated from the same background estimator as rho, instead of being set to zero. Currently this only works if the estimator is a JetMedianBackgroundEstimator or other estimator which has such function. void set_common_bge_for_rho_and_rhom(); /// /// This function should not be used anymore (instead the function above should be used without any parameter). When used with "true", then it has the same behaviour as set_common_bge_for_rho_and_rhom() above. By default, no mass subtraction is done, so it makes no sense to use this function with "false". void set_common_bge_for_rho_and_rhom(bool value); /// /// By using this function, the original masses of particles are kept. By default, the masses of all particles are set to zero. If you do not want to set the masses to zero but you want to do the subtraction for the mass part, use the function set_common_bge_for_rho_and_rhom or specify background estimator for rho_m. void set_keep_original_masses(bool value=true); /// /// When two background estimators are used (one for rho, the second for rho_m), setting this to true will result in rho_m being estimated using bge_rhom->rho_m() instead of bge_rhom->rho(). /// void set_use_bge_rhom_rhom(bool value=true); /// /// This function should be currently used only when using subtract_event_using_charged_info. With this function, the user specifies if also the mass term sqrt(pT^2+m^2)-pT should be corrected during the subtraction procedure. This is automatically set when calling functions set_common_bge_for_rho_and_rhom, set_scalar_background_density or set_use_bge_rhom_rhom void set_do_mass_subtraction(); /// /// set to true, if you want to remove particles which have zero both, pt and mass. By default, these particles are removed. void set_remove_particles_with_zero_pt_and_mass(bool value=true); /// /// set to true, if you want to remove all zero pt particles - this means removing also particles with zero delta_m (massive particles with zero pt). By default, the zero pt particles with non-zero delta_m are not removed. void set_remove_all_zero_pt_particles(bool value=true); /// /// function to change the alpha-parameter figuring in the distance measure deltaR. The larger the alpha, the more are preferred to be corrected the low pt particles. The default value is 0, i.e. by default the standard deltaR definition is used: deltaR=sqrt(deltay^2 + deltaphi^2) void set_alpha(double alpha); /// /// function to change the parameter polarAngleExp void set_polarAngleExp(double polarAngleExp); /// /// function to change the parameter ghost_area void set_ghost_area(double ghost_area); /// /// function to change the distance type void set_distance_type(Distance distance); /// /// function to change the free parameter max_distance. The distance is defined by enum Distance. The particle-ghost pairs with distance>max_distance are not used. When max_distance<=0, the max_distance parameter is not used (no upper limit on distance). The default value is -1, i.e. by default there is no upper limit for possible distance values. void set_max_distance(double max_distance); /// /// function to change the free parameter max_distance. It is the same as the set_max_distance function. It is added back for backward-comptibility (since it was replaced in ConstituentSubtractor version 1.1.3 with function set_max_distance). It should be not used. void set_max_standardDeltaR(double max_distance); /// /// function to return the maximal deltaR distance used in the subtraction double get_max_distance(); /// /// This function returns true if the first argument is smaller than the second argument, otherwise returns false. The comparison is done only on the first element in the two pairs. This function is used to sort in ascending order the deltaR values for each pair particle-ghost while keeping track of particles and ghosts static bool _function_used_for_sorting(std::pair > const &i,std::pair > const &j); /// /// function used for sorting of Pseudojets according to eta static bool _rapidity_sorting(fastjet::PseudoJet const &i,fastjet::PseudoJet const &j); /// /// Function to construct massless ghosts in the whole eta-phi space up to max_eta void construct_ghosts_uniformly(double max_eta); /// /// Function to return vector of ghosts std::vector get_ghosts(); /// /// Function to set the maximal eta value for subraction void set_max_eta(double max_eta); /// /// Function to return vector of areas associated to ghosts std::vector get_ghosts_area(); /// /// Set ghost selector - this allows to perform Constituent Subtraction in certain phase space when using the event-wide correction. Only ghosts which pass the selector are used in the correction. No selection is done on particles (i.e. the user needs to perform the selection before applying ConstituentSubtractor if he/she wishes). The default behaviour is to not use any selector. The user should remember that the max_eta restriction is applied in any case, e.g. when using the function "subtract_event(particles)", then ghosts are distributed to maximal eta max_eta and particles outside this region are discarded. void set_ghost_selector(fastjet::Selector* selector); /// /// Set particle selector - if specified, only particles which pass this selector are corrected. The other particles are copied to the final corrected vector without modification void set_particle_selector(fastjet::Selector* selector); /// /// Use this function if you want to use the information about hard particle proxies in the subtraction procedure (typically the charged tracks from primary vertex and/or high pt calorimeter clusters). The parameters of this function are the "nearby_hard_radius" and "nearby_hard_factor". If there is at least one hard particle proxy within Distance specified by the nearby_hard_radius parameter, then the CS distance is multiplied by nearby_hard_factor. void set_use_nearby_hard(double const &nearby_hard_radius, double const &nearby_hard_factor); void set_fix_pseudorapidity(bool fixed_pseudorapidity); void set_scale_fourmomentum(bool scale_fourmomentum); protected: std::vector get_background_proxies_from_ghosts(std::vector const &ghosts,std::vector const &ghosts_area) const; void clear_ghosts(); /// /// helper functions to find the minimal and maximal indeces for the vector of particles - useful to make the CS procedure faster unsigned int _find_index_after(double const &value, std::vector const &vec) const; unsigned int _find_index_before(double const &value, std::vector const &vec) const; /// /// function to get the trabsformed distance double _get_transformed_distance(double const &distance) const; fastjet::BackgroundEstimatorBase *_bge_rho, *_bge_rhom; bool _common_bge, _rhom_from_bge_rhom; double _rho, _rhom; bool _externally_supplied_rho_rhom, _do_mass_subtraction; Distance _distance; double _alpha; double _polarAngleExp; double _max_distance; bool _remove_particles_with_zero_pt_and_mass; bool _remove_all_zero_pt_particles; bool _use_max_distance; double _ghost_area; double _grid_size_phi; double _grid_size_rap; bool _ghosts_constructed; bool _ghosts_rapidity_sorted; int _n_ghosts_phi; double _max_eta; bool _masses_to_zero; bool _use_nearby_hard; double _nearby_hard_radius; double _nearby_hard_factor; bool _fix_pseudorapidity=false; bool _scale_fourmomentum=false; std::vector const *_hard_proxies=nullptr; const double _zero_pt=1e-40; // This pt value is considered as zero. It is used for particles with zero pt after correction in case the user wants to return all particles. By default, such particles are discarded in case their corrected mass is also zero. The user can use the function "set_remove_zero_pt_and_mass_particles" to keep such partiles. const double _zero_mass=1e-50; // This mass value is considered as zero. It is used for particles with zero mass after correction std::vector _ghosts; std::vector _ghosts_area; std::vector _ghosts_rapidities; // used for uniform grid double _grid_size_background_estimator; fastjet::Selector *_ghost_selector=nullptr; fastjet::Selector *_particle_selector=nullptr; fastjet::FunctionOfPseudoJet *_rescaling; static LimitedWarning _warning_unused_rhom; }; } // namespace contrib FASTJET_END_NAMESPACE #endif // __FASTJET_CONTRIB_CONSTITUENTSUBTRACTOR_HH__ Index: contrib/contribs/ConstituentSubtractor/trunk/ChangeLog =================================================================== --- contrib/contribs/ConstituentSubtractor/trunk/ChangeLog (revision 1228) +++ contrib/contribs/ConstituentSubtractor/trunk/ChangeLog (revision 1229) @@ -1,471 +1,483 @@ +2019-07-04 Peter Berta + + * VERSION: + - Set version number to 1.4.2 + + * example_event_wide.cc + * example_iterative.cc + * ConstituentSubtractor.hh + - Updated information about the treatment of massive inputs. No changes in the code + + + 2019-06-21 Peter Berta * VERSION: - Set version number to 1.4.1 * ConstituentSubtractor.cc * ConstituentSubtractor.hh - Updated the treatment of additional background estimator for rho_m. Currently in ConstituentSubtractor, only such rho_m background estimators are supported which have member function rho_m(), i.e. the result from member function has_rho_m() is true (which is available since fastjet version 30100). 2019-06-19 Peter Berta * VERSION: - Set version number to 1.4.0 * ConstituentSubtractor.cc * ConstituentSubtractor.hh - Added more possibilities for treatment of massive particles and information about them - Using value _zero_pt=1e-40 for particles with corrected pt of 0 and value _zero_mass=1e-50 for particles with corrected mass of 0. - Added possibility to use particle selector - all particles which pass the particle selector are corrected, while the particles which do not pass, are returned unmodified - Updated description * IterativeConstituentSubtractor.cc - Updated description - Added possibility to use particle selector * example_event_wide.ref * example_event_wide.cc - Renamed from example_whole_event.cc(ref) - Now setting the masses to zero - Added example to use particle selector - Added detailed explanation what options are available for massive particles * example_iterative.ref * example_iterative.cc - Added detailed explanation what options are available for massive particles - Now setting the masses to zero in the ICS correction - Added example how to use particle selector * example_jet_by_jet.ref * example_jet_by_jet.cc - Renamed from example.cc(ref) - Now setting the masses to zero 2019-03-28 Peter Berta * VERSION: - Set version number to 1.3.2 * ConstituentSubtractor.cc * ConstituentSubtractor.hh - Added functions for possible usage of information about hard proxies - Added function to set if the user wants to keep the original masses (i.e. no mass subtraction and no setting to zero). By default, the masses are set to zero. - Added instructions, how can the masses be treated, at the beggining of ConstituentSubtractor.hh - Added new function set_common_bge_for_rho_and_rhom() which should be used when the user wants to do mass subtraction with the same background estimator as for pt subtraction. This replaces the set_common_bge_for_rho_and_rhom(bool value=true) function which should be not used anymore. Currently both function give the same results. The function set_common_bge_for_rho_and_rhom(bool value=true) will be removed in the future. - Updated ConstituentSubtractor::description - Speed optimization * IterativeConstituentSubtractor.cc * IterativeConstituentSubtractor.hh - Added functions for possible usage of information about hard proxies * example_whole_event_iterative.cc * example_whole_event.cc - Added information how can the masses be treated and examples - Added examples how to use the information about hard proxies * example.cc * example_background_rescaling.cc * example_whole_event_using_charged_info.cc - Usage of new function set_common_bge_for_rho_and_rhom() * example_whole_event.ref * example.ref * example_whole_event_using_charged_info.ref - Updated references because the ConstituentSubtractor::description was updated 2018-06-28 Peter Berta * VERSION: - Set version number to 1.3.1 * example_whole_event_iterative.cc * example_whole_event.cc * example_background_rescaling.cc * example_background_rescaling.ref - updated comments 2018-06-25 Peter Berta * VERSION: - Set version number to 1.3.0 * ConstituentSubtractor.cc * ConstituentSubtractor.hh - Removed the functions related to the so-called "sequential" correction (renamed and put it in IterativeConstituentSubtractor.hh/.cc) - Added function with name "initialize" and "set_max_eta" which should be used for the whole event correction, see example example_whole_event.cc * example_whole_event.cc - Updated usage of the whole event correction. The users are encouraged to update to this new usage. So far the old and new usage have the same behaviour. * example_whole_event_sequential.cc * example_whole_event_sequential.ref - Removed. * IterativeConstituentSubtractor.cc * IterativeConstituentSubtractor.hh * example_whole_event_iterative.cc * example_whole_event_iterative.ref - New files * Makefile - Added the compilation of the two new files and updated name for the example 2018-06-12 Peter Berta * VERSION: - Set version number to 1.2.8 * ConstituentSubtractor.cc * ConstituentSubtractor.hh - Added new function: clean_ghosts. Now when setting new selector, the current ghosts are removed - then when doing subtraction, new ghosts are constructed. - Updated sequential CS: - Added possibility to perform CS procedure any number of times (previously only twice). Now, the maximal distance and alphas should be specified as vectors using function "set_sequential_parameters" - Added possibility to remove the unsubtracted ghosts (proxies) from the previous CS procedure for the next application of CS procedure * example_whole_event_sequential.cc * example_whole_event_sequential.ref * Makefile - Added example for the sequential CS 2018-05-04 Peter Berta * VERSION: - Set version number to 1.2.7 * ConstituentSubtractor.cc * ConstituentSubtractor.hh - Added possibility to perform whole event correction in a certain phase space defined by input Selector - Added possibity to change the grid size for GridMedianBackgroundEstimator when using charged info - the default value is now 0.5 - Faster correction in case the distance is ConstituentSubtractor::angle * example_whole_event.cc * example_whole_event_using_charged_info.cc - Updated examples * example_whole_event.ref * example_whole_event_using_charged_info.ref - Updated references to correspond to updated examples 2018-05-03 Peter Berta * VERSION: - Set version number to 1.2.6 * example.cc * example_whole_event.cc * example_background_rescaling.cc * example_whole_event_using_charged_info.cc * functions.hh - Updated examples and added more comments * example.ref * example_whole_event.ref * example_background_rescaling.ref * example_whole_event_using_charged_info.ref - Updated references to correspond to updated examples 2018-04-11 Peter Berta * VERSION: - Set version number to 1.2.5 * ConstituentSubtractor.cc - Fixed bug causing seg fault in ATLAS. The seg fault happened very rarely for events in which the particle with minimal or maximal rapidity had had rapidity of special value (dependent on the parameters of ConstituentSubtractor). * functions.hh - In read_event added possibility to read event in format (pt, rap, phi, pid, charge) assuming zero masses. 2017-12-18 Peter Berta * VERSION: - Set version number to 1.2.4 * ConstituentSubtractor.cc * ConstituentSubtractor.hh - Added function set_remove_zero_pt_and_mtMinusPt_particles. When set to true, all particles are kept in the output. If set to false (default), the particles with zero pt and zero mtMinusPt are removed. * Makefile - Added back the test example_whole_event_using_charged_info. * example_whole_event_using_charged_info.cc * example_whole_event_using_charged_info.ref - using set_remove_zero_pt_and_mtMinusPt_particles(false), printing more digits for the output, and changed the reference. Now this test is successful also for Gavin Salam. 2017-09-08 Peter Berta * VERSION: - Set version number to 1.2.3 * ConstituentSubtractor.cc - In the previous version the zero pt massive corrected particles had pt set to 1e-200. This caused a warning when the active area was used during clustering. Now, the zero pt is set to 1e-50, which removed the warning. * Makefile - Temporarily removed the test example_whole_event_using_charged_info. The reason is that it gives different output particles when running on MacOS 10.12.6, Apple LLVM version 8.1.0 (clang-802.0.42) as Gavin Salam found. The difference is tiny: one zero pt and zero mass particle appears additionally when running on MAC, which has no impact on the performance of the correction. 2017-08-21 Peter Berta * VERSION: - Set version number to 1.2.2 * ConstituentSubtractor.cc * ConstituentSubtractor.hh - Added function set_max_standardDeltaR for backward compatibility. It was replaced in version 1.1.3 by function set_max_distance. In this version, it does the same as the function set_max_distance. - Further speed improvement for whole event subtraction (especially for small _max_distance parameters, such as 0.25) 2017-08-07 Peter Berta * VERSION: - Set version number to 1.2.1 * ConstituentSubtractor.cc - Fixed bug for the distance enum ConstituentSubtractor::angle. Previously, the optimized rapidity ranges were used also for this distance type which was wrong. Now, the whole rapidity range is used (without optimization). - Checking if ghosts are constructed for the jet-by-jet subtraction. In case they are constructed, error is thrown since such ConstituentSubtractor should be used only for whole event subtraction, and not jet-by-jet. 2017-07-20 Peter Berta * VERSION: - Set version number to 1.2.0 * ConstituentSubtractor.cc * ConstituentSubtractor.hh - Important change for the output corrected particles in case of correction of massive particles. The corrected zero pt particles with non-zero corrected delta_m (massive particles in rest) are now included in the output. Previously, all the zero pt corrected particles were discarded. Now, only the zero pt and zero delta_m corrected particles are discarded. The corrected particles with zero pt and non-zero delta_m are kept (their pt is set to very small value (1e-200 GeV)). This should have better performance for jet energy and jet mass. If the user wants, he/she can still discard those zero pt particles in his/her own code, e.g. by requiring particles with pt > 1e-100 GeV. - Implemented changes to significantly increase the speed of the CS algorithm for the whole event subtraction. The performance is exactly the same. Only the speed is much higher. For small values of _max_distance parameter, the speed is now ~10-times higher. For larger values of the _max_distance parameter, the speed is ~2-times higher. * RescalingClasses.cc * RescalingClasses.hh: - Added new rescaling classes: - BackgroundRescalingYPhiFromRoot - rescaling of background using Root TH2 histogram binned in rapidity vs azimuth - BackgroundRescalingYPhiUsingVectorForY - rescaling of background for heavy ions - using eliptic flow parameters and rapidity dependence recorded in a vector - BackgroundRescalingYPhiUsingVectors - rescaling of background using objcet vector > containing the rapidity vs azimuth dependence * example_background_rescaling.cc - Added more examples for usage of rescaling classes * example_background_rescaling.ref * example.ref * example_whole_event.ref * example_whole_event_using_charged_info.ref - Updated example outputs due to the inclusion of massive zero pt corrected particles in the output. 2017-07-11 Peter Berta * VERSION: - Set version number to 1.1.6 * ConstituentSubtractor.cc * ConstituentSubtractor.hh - Implemented suggestion from Marta Verweij: - Added new functions: "get_ghosts" and "get_ghosts_area". They return the vector of ghosts and the corresponding ghost areas used for whole event subtraction. - Changed the function "construct_ghosts_uniformly" to be public - Now the user does not need to provide the BackgroundEstimator to CS, but he/she can do background estimation independently and then assign the estimated background to ghosts. The procedure is the following: - construct the ghosts with function "construct_ghosts_uniformly" - get them with functions "get_ghosts" and "get_ghosts_area" - do background estimation independently and assign the corresponding background estimates to ghosts - use the function "do_subtraction" to subtract the modified ghosts from real particles. * RescalingClasses.cc * RescalingClasses.hh: - Added new rescaling class template BackgroundRescalingYFromRootPhi - useful mainly for heavy ion events. The rapidity dependance is taken from a Root TH1 object provided by the user. The next parameters are used to parametrize the eliptic flow. * example_background_rescaling.cc - Added example for usage of the new rescaling class BackgroundRescalingYFromRootPhi (commented at the beginning of the macro). 2017-01-25 Gavin Salam * VERSION: updated VERSION to 1.1.5 * Makefile: - resolved issue with make fragile-shared, caused by repeated SRCS lines in the Makefile. Also removed other duplicates. 2017-01-20 Peter Berta * VERSION: - Set version number to 1.1.4 * ConstituentSubtractor.cc - fixed rounding issues for zero masses, when doing the correction of term mtMinusPt - more precise evaluation of corrected 4-momenta, which affected the mass of corrected particles with low masses - added new function set_do_mass_subtraction * ConstituentSubtractor.hh - fixed initialization of member variable "_do_mass_subtraction" - added new function set_do_mass_subtraction * example_whole_event.ref, example_whole_event.cc: - updated reference file. Added also all corrected particles. * example_whole_event_using_charged_info.ref, example_whole_event_using_charged_info.cc: - updated reference file. Added also all corrected particles. 2016-11-14 Peter Berta * VERSION: - Set version number to 1.1.3 * ConstituentSubtractor.cc * ConstituentSubtractor.hh: - Fixed bug in "do_subtraction" function for the unsubtracted background proxies. - Added new function "sequential_subtraction" - for testing purposes so far, example will be added later. The ConstituentSubtraction is performed twice: first with small maximal allowed deltaR distance, then the background proxies are again uniformly redistributed and the ConstituentSubtraction runs second time with higher allowed maximal deltaR - Added new function "set_distance_type". With this function, the user can change the definition of distance between particles and background proxies. There are two possibilities using enums Distance: deltaR (longitudinal Lorentz invariant distance in rapidity vs. phi) or angle (in Euclidean space). The default distance is deltaR, i.e. the same definition of distance as in previous versions. * Makefile: - Removed dependence on Root. Using template in RescalingClasses now. * RescalingClasses.cc * RescalingClasses.hh: - Removed dependence on Root for the rescaling using TH1 histogram. Using template now. Also the name of the class changed. Old name: BackgroundRescalingYTH1. New name: BackgroundRescalingYFromRoot - Changed the name of the rescaling class for heavy ion events. Old name: BackgroundRescalingYPhiHeavyIon. New name: BackgroundRescalingYPhi. Also the description of the rescaling function is updated. * example_rescaling_using_TH1.cc * example_rescaling_using_TH1.ref: - Removed * example_background_rescaling.cc * example_background_rescaling.ref: - Added new example for usage of Heavy Ion background rescaling function - The file example_background_rescaling.cc contains also commented example for usage of rapidity rescaling according to root's TH1 distribution * example_whole_event.cc: - Updated this example with usage of the "set_distance_type" function. 2016-03-11 Peter Berta * VERSION: set version number to 1.1.2 * Makefile: - added CXXFLAGS and LDFLAGS in case the "ROOTSYS" variable is defined from ROOT. In case it is not defined, the standard usage still works, just the RescalingClasses are not compiled. * RescalingClasses.cc: * RescalingClasses.hh: - New files: contain classes for rho estimation rescaling. Two classes were added: - BackgroundRescalingYTH1 - input is a TH1 object (stabdard histogram in ROOT) containg the actual rapidity dependence of backgound pt - BackgroundRescalingYPhiHeavyIon - input are 8 parameters. The first four parameters parametrize the elliptic flow. The next four parameters parametrize the rapidity dependence using two Gaussian distributions * example_rescaling_using_TH1.cc: * example_rescaling_using_TH1.ref: - New files: example in which the ConstituentSubtractor is used for the whole event subtraction using rapidity rescaling for the rho estimation. The input for rapidity rescaling is a TH1 object 2016-02-09 Peter Berta * VERSION: set version number to 1.1.1 * ConstituentSubtractor.hh: * ConstituentSubtractor.cc: - Faster algorithm for subtraction in the "do_subtraction" member function. - New member function: subtract_event_using_charged_info - whole event subtraction - 4 additional inputs: two vectors of PseudoJets for charged background and charged signal, and two doubles, charged background scale (CBS) and charged signal scale (CSS) - the scales CBS and CSS scale the input charged particles. Useful if one assumes correlation between charged and neutral particles or in case the inputs from calorimeter are miscalibrated wrt tracks. In case CBS=CSS=0, the input charged particles are not used. In case CBS=CSS=1, the input charged particles are not scaled. Recommending to try several combinations for CBS and CSS from range [0.8, 1.5]. - the background estimation is built in this function using GridMedianBackgroundEstimator with possibility to rescale - see example file "example_whole_event_using_charged_info.cc" for usage * example_whole_event_using_charged_info.cc: * example_whole_event_using_charged_info.ref: - New files: example in which the ConstituentSubtractor is used for the whole event subtraction using tracking information for charged particles * functions.h: - Updated function "read_event". Now, obtaining also the vectors of charged particles originating from signal and background. 2015-11-05 Peter Berta * VERSION: set version number to 1.1.0 * Makefile: - added "-fPIC" CXX flag * ConstituentSubtractor.hh: * ConstituentSubtractor.cc: - updated output for result(PseudoJet): copying the "user_index" from the input jet and its constituents to the output corrected jet and its constituents - discarded the original max_deltaR parameter, and replaced it by parameter max_standardDeltaR defined as standardDeltaR=sqrt(deltay^2 + deltaphi^2). This new parameter restricts the usage of ghost-particle pairs which have too large distance standardDeltaR, i.e. not the distance deltaR which is the standardDeltaR multiplied by other factors as in the previous version. - added a new multiplicative factor (sin(theta_i))^polarAngleExp into the definition of distance for a ghost-particle pair. Angle theta_i is the polar angle of partile i. The polarAngleExp is a free parameter with default value polarAngleExp=0, i.e. the default definition of deltaR has not changed wrt previous version. It can be changed using set_polarAngleExp member function - changed the structure of the package and its member functions - the standard usage with result(PseudoJet) is the same and it gives the same results as in previous version - new member functions are available to simplify the whole event subtraction: subtract_event, set_background_estimator, set_scalar_background_density, see example file example_whole_event.cc - similar changes as in GenericSubtractor due to FJ>=3.1: - added set_common_bge_for_rho_and_rhom() and removed use_common_bge_for_rho_and_rhom() - added set_use_bge_rhom_rhom() to tweak how rho_m is obtained when ConstituentSubtractor has been constructed with two estimators - altered common_bge_for_rho_and_rhom() and added use_bge_rhom_rhom() to retrieve the behaviour - added a warning when rhom is non-zero and unused - Updated the terminology: - ghosts - soft particles distributed with high density - background proxies - particles used in the "do_subtraction" member function. They can be obtained from ghosts or in other way. Previously, these particles were also called "ghosts" * example_whole_event.cc: * example_whole_event.ref: -new files: example in which the ConstituentSubtractor is used for the whole event * functions.h: -new file: contains useful functions for the example files * example.hh: -removed. Content moved to file functions.h 2014-04-06 Peter Berta * VERSION Release of version 1.0.0 Index: contrib/contribs/ConstituentSubtractor/trunk/example_event_wide.cc =================================================================== --- contrib/contribs/ConstituentSubtractor/trunk/example_event_wide.cc (revision 1228) +++ contrib/contribs/ConstituentSubtractor/trunk/example_event_wide.cc (revision 1229) @@ -1,182 +1,182 @@ // $Id$ // //---------------------------------------------------------------------- // Example on how to do pileup correction on the whole event // // run it with // ./example_whole_event < ../data/Pythia-Zp2jets-lhc-pileup-1ev.dat //---------------------------------------------------------------------- // //---------------------------------------------------------------------- // This file is part of FastJet contrib. // // It is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at // your option) any later version. // // It is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public // License for more details. // // You should have received a copy of the GNU General Public License // along with this code. If not, see . //---------------------------------------------------------------------- #include "fastjet/ClusterSequence.hh" #include "fastjet/Selector.hh" #include "fastjet/tools/GridMedianBackgroundEstimator.hh" #include "ConstituentSubtractor.hh" // In external code, this should be fastjet/contrib/ConstituentSubtractor.hh #include "functions.hh" using namespace std; using namespace fastjet; //---------------------------------------------------------------------- int main(){ // set up before event loop: double max_eta=4; // specify the maximal pseudorapidity for the input particles. It is used for the subtraction. Particles with eta>|max_eta| are removed and not used during the subtraction (they are not returned). The same parameter should be used for the GridMedianBackgroundEstimator as it is demonstrated in this example. If JetMedianBackgroundEstimator is used, then lower parameter should be used (to avoid including particles outside this range). double max_eta_jet=3; // the maximal pseudorapidity for selected jets. Not used for the subtraction - just for the final output jets. // background estimator GridMedianBackgroundEstimator bge_rho(max_eta,0.5); // maximal pseudo-rapidity cut is used inside ConstituentSubtraction, but in GridMedianBackgroundEstimator, the range is specified by maximal rapidity cut. Therefore, it is important to apply the same pseudo-rapidity cut also for particles used for background estimation (using function "set_particles") and also derive the rho dependence on rapidity using this max pseudo-rapidity cut to get the correct rescaling function! contrib::ConstituentSubtractor subtractor; subtractor.set_distance_type(contrib::ConstituentSubtractor::deltaR); // free parameter for the type of distance between particle i and ghost k. There are two options: "deltaR" or "angle" which are defined as deltaR=sqrt((y_i-y_k)^2+(phi_i-phi_k)^2) or Euclidean angle between the momenta subtractor.set_max_distance(0.3); // free parameter for the maximal allowed distance between particle i and ghost k subtractor.set_alpha(1); // free parameter for the distance measure (the exponent of particle pt). The larger the parameter alpha, the more are favoured the lower pt particles in the subtraction process subtractor.set_ghost_area(0.01); // free parameter for the density of ghosts. The smaller, the better - but also the computation is slower. subtractor.set_max_eta(max_eta); // parameter for the maximal eta cut subtractor.set_background_estimator(&bge_rho); // specify the background estimator to estimate rho. You can use also specify background estimator for the mass term as an additional parameter // For the treatment of massive particles, choose one of the following options (currently the default option is 3): // 1. Keep the original mass and rapidity. Not recommended since jet mass is wrongly reconstructed. Use this function: // subtractor.set_keep_original_masses(); // 2. Keep the original mass and pseudo-rapidity. Not recommended since jet mass is wrongly reconstructed. Use these two functions: // subtractor.set_keep_original_masses(); - // subtractor.set_fix_pseudorapidity(true); + // subtractor.set_fix_pseudorapidity(true); // 3. Set all masses to zero. Keep rapidity unchanged. This is recommended and is the default option, nothing needs to be specified. Observed the best performance for high pt large-R jets. - // 4. Set all masses to zero. Keep pseudo-rapidity unchanged. Also recommended, almost the same performance as for option 1. Use function: + // 4. Set all masses to zero. Keep pseudo-rapidity unchanged. Also recommended, almost the same performance as for option 3. Use function: // subtractor.set_fix_pseudorapidity(true); // 5a. Do mass subtraction using the same background estimator as for rho. Use this function: // subtractor.set_common_bge_for_rho_and_rhom(); // this must be used after set_background_estimator function. // 5b. Do mass subtraction using a separate background estimator - you need to specify it as an additional parameter in function set_background_estimator - // 6. Same as 3a or 3b just keep pseudo-rapidity unchanged. Additionally use: + // 6. Same as 5a or 5b just keep pseudo-rapidity unchanged. Additionally use: // subtractor.set_fix_pseudorapidity(true); - // 7. Scale fourmomentum. Also recommended - observed better performance than the mass correction and slightly worse than setting the masses to zero. Use: + // 7. Keep rapidity and pseudo-rapidity fixed (scale fourmomentum). Also recommended - observed better performance than the mass correction. Use: // subtractor.set_scale_fourmomentum(true); // example selector for ConstituentSubtractor: //Selector sel_CS_correction = SelectorPhiRange(0,3) * SelectorEtaMin(-1.5) * SelectorEtaMax(0); // subtractor.set_ghost_selector(&sel_CS_correction); // uncomment in case you want to use ghost selector. Only ghosts fulfilling this selector will be constructed. No selection on input particles is done. The selection on input particles is the responsibility of the user, or the user can use the "set_particle_selector" function. However, the maximal eta cut (specified with "set_max_eta" function) is done always for both, ghosts and input particles. // subtractor.set_particle_selector(&sel_CS_correction); // uncomment in case you want to use particle selector. Only particles fulfilling this selector will be corrected. The other particles will be unchanged. However, the maximal eta cut (specified with "set_max_eta" function) is done always for both, ghosts and input particles. Selector sel_max_pt = SelectorPtMax(15); subtractor.set_particle_selector(&sel_max_pt); // only particles with pt<15 will be corrected - the other particles will be copied without any changes. // If you want to use the information about hard proxies (typically charged tracks from primary vertex and/or high pt calorimeter clusters), then use this line: //subtractor.set_use_nearby_hard(0.2,2); // In this example, if there is a hard proxy within deltaR distance of 0.2, then the CS distance is multiplied by factor of 2, i.e. such particle is less favoured in the subtraction procedure. If you uncomment this line, then also uncomment line 106. subtractor.initialize(); // print info (optional) cout << subtractor.description() << endl; // in event loop: // read in input particles vector hard_event, full_event; vector *hard_event_charged=new vector; vector *background_event_charged=new vector; read_event(hard_event, full_event, hard_event_charged, background_event_charged); hard_event = SelectorAbsEtaMax(max_eta)(hard_event); full_event = SelectorAbsEtaMax(max_eta)(full_event); cout << "# read an event with " << hard_event.size() << " signal particles and " << full_event.size() - hard_event.size() << " background particles with pseudo-rapidity |eta|<4" << endl; // jet definition and selector for jets JetDefinition jet_def(antikt_algorithm, 0.7); Selector sel_jets = SelectorNHardest(3) * SelectorAbsEtaMax(max_eta_jet); // clustering of the hard-scatter event and uncorrected event ClusterSequence clust_seq_hard(hard_event, jet_def); ClusterSequence clust_seq_full(full_event, jet_def); vector hard_jets = sel_jets(clust_seq_hard.inclusive_jets()); vector full_jets = sel_jets(clust_seq_full.inclusive_jets()); bge_rho.set_particles(full_event); // the correction of the whole event with ConstituentSubtractor vector corrected_event=subtractor.subtract_event(full_event); // if you want to use the information about hard proxies, use this version: // vector corrected_event=subtractor.subtract_event(full_event,hard_event_charged); // here all charged hard particles are used for hard proxies. In real experiment, this corresponds to charged tracks from primary vertex. Optionally, one can add among the hard proxies also high pt calorimeter clusters after some basic pileup correction. // clustering of the corrected event ClusterSequence clust_seq_corr(corrected_event, jet_def); vector corrected_jets = sel_jets(clust_seq_corr.inclusive_jets()); ios::fmtflags f( cout.flags() ); cout << setprecision(4) << fixed; cout << endl << "Corrected particles in the whole event:" << endl; for (unsigned int i=0; i|max_eta| are removed and not used during the subtraction (they are not returned). The same parameter should be used for the GridMedianBackgroundEstimator as it is demonstrated in this example. If JetMedianBackgroundEstimator is used, then lower parameter should be used (to avoid including particles outside this range). double max_eta_jet=3; // the maximal pseudorapidity for selected jets. Not important for the subtraction. // background estimator GridMedianBackgroundEstimator bge_rho(max_eta,0.5); // maximal pseudo-rapidity cut is used inside ConstituentSubtraction, but in GridMedianBackgroundEstimator, the range is specified by maximal rapidity cut. Therefore, it is important to apply the same pseudo-rapidity cut also for particles used for background estimation (using function "set_particles") and also derive the rho dependence on rapidity using this max pseudo-rapidity cut to get the correct rescaling function! contrib::IterativeConstituentSubtractor subtractor; subtractor.set_distance_type(contrib::ConstituentSubtractor::deltaR); // free parameter for the type of distance between particle i and ghost k. There are two options: "deltaR" or "angle" which are defined as deltaR=sqrt((y_i-y_k)^2+(phi_i-phi_k)^2) or Euclidean angle between the momenta vector max_distances; max_distances.push_back(0.15); max_distances.push_back(0.2); vector alphas; alphas.push_back(1); alphas.push_back(1); subtractor.set_parameters(max_distances,alphas); // in this example, 2 CS corrections will be performed: 1. correction with max_distance of 0.1 and alpha of 0, 2. correction with max_distance of 0.15 and alpha of 0. After the first correction, the scalar sum of pt from remaining ghosts is evaluated and redistributed uniformly accross the event. subtractor.set_ghost_removal(true); // set to true if the ghosts (proxies) which were not used in the previous CS procedure should be removed for the next CS procedure subtractor.set_ghost_area(0.004); // parameter for the density of ghosts. The smaller, the better - but also the computation is slower. subtractor.set_max_eta(max_eta); // parameter for maximal |eta| cut. It is specified above. subtractor.set_background_estimator(&bge_rho); // specify the background estimator to estimate rho. You can use also specify background estimator for the mass term as an additional parameter // For the treatment of massive particles, choose one of the following options (currently the default option is 3): // 1. Keep the original mass and rapidity. Not recommended since jet mass is wrongly reconstructed. Use this function: // subtractor.set_keep_original_masses(); // 2. Keep the original mass and pseudo-rapidity. Not recommended since jet mass is wrongly reconstructed. Use these two functions: // subtractor.set_keep_original_masses(); // subtractor.set_fix_pseudorapidity(true); - // 3. Set all masses to zero. Keep rapidity unchanged. This is recommended and is the default option, nothing needs to be specified. Observed the best performance for high pt large-R jets. - // 4. Set all masses to zero. Keep pseudo-rapidity unchanged. Also recommended, almost the same performance as for option 1. Use function: + // 3. Set all masses to zero. Keep rapidity unchanged. This is recommended and is the default option, nothing needs to be specified. Observed the best performance for high pt large-R jets. + // 4. Set all masses to zero. Keep pseudo-rapidity unchanged. Also recommended, almost the same performance as for option 3. Use function: // subtractor.set_fix_pseudorapidity(true); // 5a. Do mass subtraction using the same background estimator as for rho. Use this function: // subtractor.set_common_bge_for_rho_and_rhom(); // this must be used after set_background_estimator function. // 5b. Do mass subtraction using a separate background estimator - you need to specify it as an additional parameter in function set_background_estimator - // 6. Same as 3a or 3b just keep pseudo-rapidity unchanged. Additionally use: + // 6. Same as 5a or 5b just keep pseudo-rapidity unchanged. Additionally use: // subtractor.set_fix_pseudorapidity(true); - // 7. Scale fourmomentum. Also recommended - observed better performance than the mass correction and slightly worse than setting the masses to zero. Use: - // subtractor.set_scale_fourmomentum(true); + // 7. Keep rapidity and pseudo-rapidity fixed (scale fourmomentum). Also recommended - observed better performance than the mass correction. Use: + // subtractor.set_scale_fourmomentum(true); // Example selector for ConstituentSubtractor: //Selector sel_CS_correction = SelectorPhiRange(0,3) * SelectorEtaMin(-1.5) * SelectorEtaMax(0); // subtractor.set_ghost_selector(&sel_CS_correction); // uncomment in case you want to use ghost selector. Only ghosts fulfilling this selector will be constructed. No selection on input particles is done. The selection on input particles is the responsibility of the user, or the user can use the "set_particle_selector" function. However, the maximal eta cut (specified with "set_max_eta" function) is done always for both, ghosts and input particles. // subtractor.set_particle_selector(&sel_CS_correction); // uncomment in case you want to use particle selector. Only particles fulfilling this selector will be corrected. The other particles will be unchanged. However, the maximal eta cut (specified with "set_max_eta" function) is done always for both, ghosts and input particles. Selector sel_max_pt = SelectorPtMax(15); subtractor.set_particle_selector(&sel_max_pt); // only particles with pt<15 will be corrected - the other particles will be copied without any changes. // If you want to use the information about hard proxies (typically charged tracks from primary vertex and/or high pt calorimeter clusters), then use the following lines: /*vector nearby_hard_radii; nearby_hard_radii.push_back(0.2); nearby_hard_radii.push_back(0.2); vector nearby_hard_factors; nearby_hard_factors.push_back(2); nearby_hard_factors.push_back(5); subtractor.set_nearby_hard_parameters(nearby_hard_radii,nearby_hard_factors); // In this example, during the first iteration, if there is a hard proxy within deltaR distance of 0.2, then the CS distance is multiplied by factor of 2, i.e. such particle is less favoured in the subtraction procedure. Similarly in the second iteration. If you uncomment these lines, then also uncomment line 120. */ subtractor.initialize(); // this is new compared to previous usages of ConstituentSubtractor! It should be used after specifying all the parameters and before event loop. // print info (optional) cout << subtractor.description() << endl; // in event loop // read in input particles vector hard_event, full_event; vector *hard_event_charged=new vector; vector *background_event_charged=new vector; read_event(hard_event, full_event, hard_event_charged, background_event_charged); hard_event = SelectorAbsEtaMax(max_eta)(hard_event); full_event = SelectorAbsEtaMax(max_eta)(full_event); cout << "# read an event with " << hard_event.size() << " signal particles and " << full_event.size() - hard_event.size() << " background particles with pseudo-rapidity |eta|<4" << endl; // jet definition and selector for jets JetDefinition jet_def(antikt_algorithm, 0.7); Selector sel_jets = SelectorNHardest(3) * SelectorAbsEtaMax(max_eta_jet); // clustering of the hard-scatter event and uncorrected event ClusterSequence clust_seq_hard(hard_event, jet_def); ClusterSequence clust_seq_full(full_event, jet_def); vector hard_jets = sel_jets(clust_seq_hard.inclusive_jets()); vector full_jets = sel_jets(clust_seq_full.inclusive_jets()); bge_rho.set_particles(full_event); // the correction of the whole event with ConstituentSubtractor vector corrected_event=subtractor.subtract_event(full_event); // Do not use max_eta parameter here!!! It makes nothing and this parameter will be removed from here. // if you want to use the information about hard proxies, use this version: // vector corrected_event=subtractor.subtract_event(full_event,hard_event_charged); // here all charged hard particles are used for hard proxies. In real experiment, this corresponds to charged tracks from primary vertex. Optionally, one can add among the hard proxies also high pt calorimeter clusters after some basic pileup correction. // clustering of the corrected event ClusterSequence clust_seq_corr(corrected_event, jet_def); vector corrected_jets = sel_jets(clust_seq_corr.inclusive_jets()); ios::fmtflags f( cout.flags() ); cout << setprecision(4) << fixed; cout << endl << "Corrected particles in the whole event:" << endl; for (unsigned int i=0; i >, and rapidity vs azimuth dependence for heavy ions where the rapidity dependence is taken from a vector. 2017/07/11: release of version 1.1.6: - added new functions "get_ghosts" and "get_ghosts_area". - now the user can modify the ghosts outside the CS after constructing them with function "construct_ghosts_uniformly" and getting them with "get_ghosts" and "get_ghosts_area" - added new rescaling class useful for heavy ion events. Now the rapidity dependence can be taken from a Root TH1 object. 2017/01/20: release of version 1.1.4: - fixed few bugs concerning the correction of masses 2016/11/14: release of version 1.1.3: - updated rho rescaling functions - new function for pileup subtraction: sequential_subtraction - possibility to change the computation of distance between particles and background proxies 2016/03/11: release of version 1.1.2: - added two FunctionOfPseudojet classes for rho rescaling: one using root TH1 rapidity parametrization, and the other for heavy ions rapidity-azimuth parametrization 2016/02/09: release of version 1.1.1: - faster algortihm for subtraction - added new function for Constituent Subtraction using tracking information 2015/11/05: release of version 1.1.0: - added FastJet v3.1 rho_m support - simplified way for Constituent Subtraction of the whole event - updated the meaning of parameter max_deltaR - added new parameter to the definition of the distance - added examples for the whole event subtraction 2014/04/06: release of version 1.0.0