Project
Loading...
Searching...
No Matches
DigitizerTask.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
16
17#ifndef ALICEO2_MFT_DIGITIZERTASK_H
18#define ALICEO2_MFT_DIGITIZERTASK_H
19
20#include <cstdio>
21#include <memory>
22#include "FairTask.h"
23#include "Rtypes.h"
24
30
31class TBranch;
32
33namespace o2
34{
35namespace mft
36{
37class DigitizerTask : public FairTask
38{
40
41 public:
43
44 ~DigitizerTask() override;
45
46 InitStatus Init() override;
47
48 void Exec(Option_t* option) override;
49 void FinishTask() override;
50
51 Digitizer& getDigitizer() { return mDigitizer; }
53 const o2::itsmft::DigiParams& getDigiParams() const { return mDigitizer.getParams(); }
54
55 void setContinuous(bool v) { mDigitizer.getParams().setContinuous(v); }
56 bool isContinuous() const { return mDigitizer.getParams().isContinuous(); }
57 void setFairTimeUnitInNS(double tinNS) { mFairTimeUnitInNS = tinNS < 1. ? 1. : tinNS; }
58 double getFairTimeUnitInNS() const { return mFairTimeUnitInNS; }
59 void setAlpideROFramLength(float l) { mDigitizer.getParams().setROFrameLength(l); }
60 float getAlpideROFramLength() const { return mDigitizer.getParams().getROFrameLength(); }
61
62 void setQEDInput(TBranch* qed, float timebin, UChar_t srcID);
63
64 private:
65 void processQEDBackground(double tMax);
66
67 double mFairTimeUnitInNS = 1;
68 Int_t mSourceID = 0;
69 Int_t mEventID = 0;
70 Digitizer mDigitizer;
71
72 const std::vector<o2::itsmft::Hit>* mHitsArray = nullptr;
73
74 TBranch* mQEDBranch = nullptr;
75 const std::vector<o2::itsmft::Hit>* mHitsArrayQED = nullptr;
76 float mQEDEntryTimeBinNS = 0.f;
77 double mLastQEDTimeNS = 0.;
78 int mLastQEDEntry = -1;
79 UChar_t mQEDSourceID = 0;
80
81 std::vector<o2::itsmft::Digit> mDigitsArray;
82 std::vector<o2::itsmft::Digit>* mDigitsArrayPtr = &mDigitsArray;
83
85 o2::dataformats::MCTruthContainer<o2::MCCompLabel>* mMCTruthArrayPtr = &mMCTruthArray;
86
87 ClassDefOverride(DigitizerTask, 1);
88};
89} // namespace mft
90} // namespace o2
91
92#endif
Simulation parameters for the ALIPIDE chip.
Definition of the ITSMFT Hit class.
Definition of the ITS digitizer.
Definition of a container to keep Monte Carlo truth external to simulation objects.
A container to hold and manage MC truth information/labels.
bool isContinuous() const
Definition DigiParams.h:52
void setROFrameLength(float ns)
float getROFrameLength() const
Definition DigiParams.h:58
void setContinuous(bool v)
Definition DigiParams.h:51
o2::itsmft::DigiParams & getParams()
Definition Digitizer.h:59
double getFairTimeUnitInNS() const
float getAlpideROFramLength() const
void FinishTask() override
Digitizer & getDigitizer()
const o2::itsmft::DigiParams & getDigiParams() const
InitStatus Init() override
Init function.
o2::itsmft::DigiParams & getDigiParams()
void setFairTimeUnitInNS(double tinNS)
void setQEDInput(TBranch *qed, float timebin, UChar_t srcID)
void setAlpideROFramLength(float l)
bool isContinuous() const
void Exec(Option_t *option) override
void setContinuous(bool v)
const GLdouble * v
Definition glcorearb.h:832
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...