Project
Loading...
Searching...
No Matches
FastMultEst.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
15
16#ifndef ALICEO2_ITS_FASTMULTEST_
17#define ALICEO2_ITS_FASTMULTEST_
18
26#include <gsl/span>
27#include <array>
28
29namespace o2::its
30{
31
33
37
38 float mult = 0.;
39 float noisePerChip = 0.;
40 float cov[3] = {0.};
41 float chi2 = 0.;
42 int nLayersUsed = 0;
45
47 int selectROFs(const std::array<gsl::span<const o2::itsmft::ROFRecord>, NLayers>& rofs,
48 const std::array<gsl::span<const o2::itsmft::CompClusterExt>, NLayers>& clus,
49 const gsl::span<const o2::itsmft::PhysTrigger> trig,
50 uint32_t firstTForbit,
51 bool doStaggering,
52 const ROFOverlapTableN::View& overlapView,
53 ROFMaskTableN& sel);
54 void selectROFsWithVertices(const auto& vertices, const ROFOverlapTableN::View& overlapView, ROFMaskTableN& sel) const
55 {
56 const auto& multEstConf = FastMultEstConfig::Instance();
57 if (!multEstConf.isVtxMultCutRequested()) {
58 return;
59 }
60
61 for (const auto& vertex : vertices) {
62 if (!multEstConf.isPassingVtxMultCut(vertex.getNContributors())) {
63 const auto& timestamp{vertex.getTimeStamp()};
64 for (int layer = 0; layer < NLayers; ++layer) {
65 uint32_t startROF = sel.getLayer(layer).getROF(timestamp.lower());
66 uint32_t endROF = sel.getLayer(layer).getROF(timestamp.upper());
67 for (uint32_t rof = startROF; rof <= endROF; ++rof) {
68 sel.setROFsEnabled(layer, rof, 0);
69 }
70 }
71 }
72 }
73 }
74
75 int countClustersOnLayer(const gsl::span<const o2::itsmft::CompClusterExt>& clusters) const;
76 float process(int nClusters)
77 {
79 }
80 float processNoiseFree(int nClusters);
82 float process(const gsl::span<const o2::itsmft::CompClusterExt>& clusters)
83 {
85 }
86 static bool sSeedSet;
87};
88
89} // namespace o2::its
90
91#endif
Definition of the ITSMFT compact cluster.
uint64_t vertex
Definition RawEventData.h:9
Configuration parameters for ITS fast multiplicity estimator.
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to process
Definition of the ITSMFT ROFrame (trigger) record.
Definition Physics trigger record extracted from the ITS/MFT stream.
int nClusters
static constexpr int NLayers
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
ROFOverlapTable< NLayers > ROFOverlapTableN
Definition FastMultEst.h:35
FastMultEst()
state of the gRandom before
static uint32_t getCurrentRandomSeed()
void selectROFsWithVertices(const auto &vertices, const ROFOverlapTableN::View &overlapView, ROFMaskTableN &sel) const
Definition FastMultEst.h:54
ROFMaskTable< NLayers > ROFMaskTableN
Definition FastMultEst.h:36
float process(const gsl::span< const o2::itsmft::CompClusterExt > &clusters)
Definition FastMultEst.h:82
float processNoiseFree(int nClusters)
int countClustersOnLayer(const gsl::span< const o2::itsmft::CompClusterExt > &clusters) const
int selectROFs(const std::array< gsl::span< const o2::itsmft::ROFRecord >, NLayers > &rofs, const std::array< gsl::span< const o2::itsmft::CompClusterExt >, NLayers > &clus, const gsl::span< const o2::itsmft::PhysTrigger > trig, uint32_t firstTForbit, bool doStaggering, const ROFOverlapTableN::View &overlapView, ROFMaskTableN &sel)
float process(int nClusters)
Definition FastMultEst.h:76
int nLayersUsed
retained for compatibility; set to zero in single-layer mode
Definition FastMultEst.h:42
uint32_t lastRandomSeed
number of layers used by estimator (0/1 in single-layer mode)
Definition FastMultEst.h:43
float cov[3]
imposed noise per chip (when enabled by configuration)
Definition FastMultEst.h:40
float noisePerChip
estimated signal clusters multiplicity on the selected multiplicity layer
Definition FastMultEst.h:39
float chi2
retained for compatibility; set to zero in single-layer mode
Definition FastMultEst.h:41
static bool sSeedSet
Definition FastMultEst.h:86
static constexpr int NLayers
Definition FastMultEst.h:34
float processNoiseImposed(int nClusters)
std::vector< Cluster > clusters