2017-02-01 RecSys v21r1

This version uses Gaudi v28r1, LHCb v42r1 and Lbcom v20r1 (and LCG_87 with ROOT 6.08.02)

This version is released on master branch.

New or improved functionality

[MR !427] Import RichFuture functional packages from future branch
Requires LHCb!512
[MR !448] RichFuture - Improved pmt support
Predicted pixel signal algorithm now uses the new `DeRichPD` pixel area access methods added in LHCb!522 . This means this algorithm now transparently takes HPD/PMT differences into account.
Update track CK theta resolution algorithm - see MR message for detailed description of this change
[MR !457] Update RecSummaryAlg to use the new RichFuture decoded data via the TES when available, instead of the provider.
Requires LHCb!527
[MR !456] RichFuture - Add track and cluster GEC cuts, and 'OnlineBrunel' mode.
[MR !460] RichFuture - Use the new IMirrorSegFinderLookUpTable interface.
Based on LHCb!529 and Lbcom!115.
[MR !463] Fix an infrequent DLL warning from Rich Future Global PID
Fixes "WARNING Rich::Future::Rec::GlobalPID::WriteRichPIDs:: Track has non-zero best deltaLL value StatusCode=FAILURE"
[MR !423] [LHCBPS-1681] Replace temporary version of Track1DTabFunc (temporarily added in !394)
The ghost probability (Tr/TrackTools/*/TrackNNGhostId.* and Tr/TrackTools/*/Run2GhostId.*) used the 1D tabulated function from RichDet which is being replaced (LHCb!451). This MR is a standalone implementation of a 1 dimensional tabulated function for the ghost probability, taking into account that (from run2 onwards) the tabulation binning is equidistant in y [sic].
[MR !471] Updated PatLongLivedParams for new resolution studies
[MR !470] Added function to PatDebugTTTruthTool that checks if track is downstream reconstructible

Code speedups

[MR !401] Get rid of unnecessary if in PatAddTTCoord
[MR !424] PatMatchTool speedup
Improve timing of PatMatchTool by buffering the state in the inner loop. Gains about 45% according to callgrind.
[MR !453] Speedup in PrMatchToolNN
Change double to float
Sort states according to extrapolated y-position
Use binary searches to only calculate chi2 and MVA value for close states.
Do some C++11 changes
Use new method for Gaudi::Property.
[MR !459] Tr/TrackTools/src/UpgradeGhostId.cpp: Reserve sufficiently large vector for MLP observables
Based on https://indico.cern.ch/event/600120/contributions/2444101/attachments/1398576/2133160/Ghost_Probability_for_upgrade.pdf it seems there is a lot of time to be gained by pre-allocating sufficient memory for the vector of observables.
[MR !479] Speed up (factor 10) the RICH future emitted photon yield algorithm

Bug fixes

[MR !389] CaloSelectCluster.h: Fix uninitialized pointer
[MR !469] Fix VeloTrackMonitorNT
Bug fix: the arguments for the position function of VeloClusterPosition should be the global point of the hit, not the track first state as it used to be.

Monitoring changes

[MR !418] RichTools: improve debug
[MR !414] Update current RichRecoQC to ignore MC type when deciding the assumed type, to be consistent with real data
[MR !442] Add new RICH Future MC truth Cherenkov resolution monitor
Relies on LHCb!517
[MR !462] Rich future monitors renamed to match current
To ease deployment of the new RICH sequence at the pit, the monitor names are updated to match those used in the old sequence, as then the DQ and monitoring will be blind to the change.
Also This add a 'Tight' resolution monitor, that uses restrictive track cuts to get a cleaned up sample, used for the n-1 calibration online.

Changes to tests

[MR !420] LumiAlgs lumi2reader test: update reference to follow Gaudi v28r1

Thread safety

[MR !440] Changes to Tf/FastVelo and Tf/PatVelo to make the code thread safe
Remove mutable variables giving state to PatVeloSpaceTool
Adapt FastVeloTracking and HitManager to use the new TES object defined in LHCb!516 rather than the deleted DeVeloSensor::Tell1EventInfo.
See also LHCBPS-1680
[MR !454] Make VeloHitManager, TrackVelodEdxCharge and VeloClusterPosition thread safe
Removed unnecessary mutables from VeloHitManager
Made TrackVelodEdxCharge counters thread safe
Removed unnecessary internal state from VeloClusterPosition tool.
See also LHCBPS-1680

Code modernisations and cleanups

[MR !428] Fully qualify enum values (see LHCb!513)
[MR !386] Modernize HltMonitors
replace BOOST_FOREACH with range-based for loop
replace boost/assign/list_of with (implicit) std::initializer_list
do not implement derived methods that just call their base class version
prefer STL algorithms over raw loops
prefer implicit destructors
remove obsolete SVN/CVS keywords
prefer lambda callbacks over member function callbacks
prefer .empty() over comparison with ""
[MR !430] Modernize HitManagers & hit comparison operators
Always sort hits in hitmanagers as they are added, avoid sorting on demand, and make it impossible to use inconsistent comparisons.
Replace templated binary comparisons classes with non-templated classes, with templated operator() instead.
Make sure that the same comparison classes can be used for std::sort and std::lower_bound
replace BOOST_FOREACH with range-based for loop
[MR !385] Modernize PrAlgorithms
prefer auto
remove use of BOOST_FOREACH
prefer range-based for loops
prefer implicit destructors
prefer direct member initialization
prefer emplace_back over push_back
prefer inheriting from extends over virtual inheritance
add final
remove inclusion of unused header Event/TrackFunctor.h
prefer assignement over hard-wired set of push_backs
[MR !384] Modernize PatAlgorithms,PatKernel,TsaAlgorithms,TsaKernel
prefer implicit destructors
add final
prefer auto
avoid deprecated std::binary_function
prefer non-template comparison class with templated operator()
replace boost/array with std::array
prefer call-by-value-followed-by-move over call-by-const-ref-followed-by-copy
prefer removing items from vectors over copying selected items
[MR !433] Modernize PatAlgorithms
prefer implicit destructors
prefer Gaudi::Property
remove obsolete CVS/SVN keywords
prefer inheriting constructors (requires on !432)
prefer standalone function in anonymous namespace over member functions which do not interact with their class
prefer STL algorithms
prefer assignment of std::initializer_list over repeated push_backs
[MR !446] Modernize RecInterfaces
prefer DeclareInterface
prefer inheritance of extend_interfaces over virtual inheritance
prefer struct
remove obsolete CVS/SVN keywords
[MR !383] Modernize TrackInterfaces, TrackExtrapolators, TrackKernel, TrackTools, TrackUtils
prefer STL algorithms over raw loops
prefer auto
add ( ) around ?:
prefer inheriting from extends over virtual inheritance
prefer inheriting from extend_interfaces over virtual inheritance
prefer DeclareInterfaceID over explicit interface ID definition
prefer struct over class when there are only public methods
remove include of unused Event/TrackFunctor.h
prefer std::make_unique
add final
[MR !432] Modernize TrackInterfaces
prefer struct
prefer extend_interfaces
prefer DeclareInterfaceID
make ISTSpilloverTool const correct
[MR !382] Modernize TrackCheckers
replace BOOST_FOREACH with range-based for loop
do not cast if not neccesary
do not include unused header "Event/TrackFunctor.h"
[MR !438] Modernize TrackExtrapolators
prefer Gaudi::Property
prefer direct member initialization
prefer inherited constructors
remove disable of warnings for Intel compiler (warning should be fixed by 'using' statement)
prefer std::make_unique over standalone equivalent
prefer implicit destructors
do not cache msgLevel(MSG::DEBUG)
[MR !437] Modernize TrackProjectors
prefer Gaudi::Property
prefer inheriting from extends over explicit virtual inheritance
prefer direct member initialization
prefer inherited constructors
remove obsolete SVN/CVS keywords
[MR !436] Modernize TrackTools
prefer inheriting constructors
prefer implicit destructors
prefer Gaudi::Property
prefer direct member initialization
prefer standalone functions in anonymous namespace over member functions that do not access any class data and/or methods
prefer STL algorithms over raw loops
prefer std::unique_ptr over raw pointers + explicit delete
prefer switch over if-then-elseif-elseif-else
prefer range-based for loops
move loop invariants out of loop body
remove obsolete SVN/CVS keywords
prefer auto
add final
prefer emplace_back
prefer inheriting from extends over virtual inheritance
prefer std::initializer_list over boost::assign
prefer std::unique_ptr and move semantics over std::shared_ptr and copy
prefer std::make_unique
prefer range-based for loops over BOOST_FOREACH
do not cache msgLevel(MSG::DEBUG)
[MR !447] Modernize TrackIDs
prefer std::numeric_limits over boost equivalent
prefer direct member initialization
prefer static_assert over BOOST_STATIC_ASSERT
prefer table lookup over if-else-if as table can be re-used for inverse lookup -- which is now guaranteed consistent and needs less source code ( note: generated code is equivalent, see https://godbolt.org/g/cCzjsm )
[MR !435] Modernize TrackUtils
prefer auto
prefer implicit destructors
prefer range-based for loops, avoid BOOST_FOREACH
add final
prefer direct member initialization
avoid boost/lambda
prefer insert followed by inplace-merge over set_union
prefer adjacent_find over unique so the fixup required can start at the first duplication
prefer lambda over boost/bind
[MR !434] Modernize TfKernel and TfTools
remove const from resetUsedFlagOfHits
add resetUsedFlagOfHits to hit creators
prefer Gaudi::Property
avoid use of protected data members
use single precision dummy r-t relation
[MR !443] RecAlgs: Prefer Gaudi::Property
[MR !444] LumiAlgs: Prefer Gaudi::Property
[MR !439] Prefer Gaudi::Property in RichFuture
Also convert `#ifdef` header guards to cleaner `#pragma once`.
[MR !397] Remove cmt directories as CMT is no longer supported as from Gaudi v28r0
[MR !410] Fix misleading indentation warnings
Fix misleading indentation warnings in PatAlgorithms, TrackMonitors, PrAlgorithms
TrackExtrapolators, RichRecPhotonTools, RichFutureRecPhotonAlgorithms: suppress compilation warnings from Eigen
[MR !441] Improved a doxygen comment in PatLongLivedParams, which was not particularly helpful...
[MR !429] Remove whitespaces at end of line