11 template<
typename InputIterator,
typename AccumulateType,
typename BinaryOperation,
typename Predicate>
13 accumulate_if(InputIterator first,
const InputIterator last,
14 AccumulateType init, BinaryOperation&& binary_op,Predicate&& predicate){
16 if (predicate(*first))
init = binary_op(init, *first);
21 enum TupleItem{ ThisLayer, NumLayers, NumHits};
23 using OneDetail = std::tuple<int, int, int>;
24 using DetailVector = std::vector<OneDetail>;
27 int addUp(
int l,
const std::pair < Trk::DetectorRegion, DetailVector > & p){
28 for (
const auto &t:
p.second){
35 return [
r](
const std::pair < Trk::DetectorRegion, DetailVector > &
p){
40 auto fromStrips
ATLAS_THREAD_SAFE =[](
const std::pair < Trk::DetectorRegion, DetailVector > &
p) {
44 auto fromPixels
ATLAS_THREAD_SAFE =[](
const std::pair < Trk::DetectorRegion, DetailVector > &
p) {
53const std::vector < std::pair < Trk::DetectorRegion, std::vector < std::tuple <int , int , int> > > > &
61 if (thisRegion==region) {
62 for (
auto& [thisLayer, nLayers,
nHits] : thisHitInfoVector) {
63 if (thisLayer==layer) {
77 std::vector < std::tuple <int, int, int> > counts = {{layer, 1, hit}};
84 if (thisRegion==region) {
85 for (
auto& [thisLayer, nLayers,
nHits] : thisHitInfoVector) {
86 if (thisLayer==layer) {
static const uint32_t nHits
Define macros for attributes used to control the static checker.
#define ATLAS_THREAD_SAFE
int getStripContributions()
int getContributionFromRegion(Trk::DetectorRegion region)
const std::vector< std::pair< Trk::DetectorRegion, std::vector< std::tuple< int, int, int > > > > & getHitInfo()
int getAllContributions()
int getPixelContributions()
int getHits(Trk::DetectorRegion region, int layer)
void addHit(Trk::DetectorRegion region, int layer, int etaModule, int hit=1)
This class containes the detailed information on the contributing layers and regions to the hit count...
std::vector< std::pair< Trk::DetectorRegion, std::vector< std::tuple< int, int, int > > > > m_detailedHitInfo
int getHitsFromRegion(Trk::DetectorRegion region)
l
Printing final latex table to .tex output file.
init(v_theApp, v_rootStream=None)