Project
Loading...
Searching...
No Matches
Digitizer.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
12#ifndef O2_MCH_SIMULATION_DIGITIZER_H
13#define O2_MCH_SIMULATION_DIGITIZER_H
14
15#include <map>
16#include <memory>
17#include <random>
18
19#include <gsl/span>
20
25#include "MCHSimulation/Hit.h"
29
30namespace o2::mch
31{
36{
37 public:
41 Digitizer(geo::TransformationCreator transformationCreator);
42
44 void setFirstTFOrbit(uint32_t firstTFOrbit);
45
47 void processHits(gsl::span<const Hit> hits, const InteractionRecord& collisionTime, int evID, int srcID);
48
50 void addNoise(const InteractionRecord& firstIR, const InteractionRecord& lastIR);
51
56 size_t digitize(std::vector<ROFRecord>& rofs, std::vector<Digit>& digits, dataformats::MCLabelContainer& labels);
57
59 void clear();
60
61 private:
62 std::mt19937 mRandom;
63
64 std::map<int, std::unique_ptr<DEDigitizer>> mDEDigitizers;
65};
66
67} // namespace o2::mch
68#endif
Definition of a container to keep Monte Carlo truth external to simulation objects.
Definition of the MCH ROFrame record.
void addNoise(const InteractionRecord &firstIR, const InteractionRecord &lastIR)
Definition Digitizer.cxx:42
void setFirstTFOrbit(uint32_t firstTFOrbit)
Definition Digitizer.cxx:28
void processHits(gsl::span< const Hit > hits, const InteractionRecord &collisionTime, int evID, int srcID)
Definition Digitizer.cxx:35
size_t digitize(std::vector< ROFRecord > &rofs, std::vector< Digit > &digits, dataformats::MCLabelContainer &labels)
Definition Digitizer.cxx:49
std::function< o2::math_utils::Transform3D(int detElemId)> TransformationCreator
std::vector< Digit > digits