Project
Loading...
Searching...
No Matches
Strip.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//
13// TOF strip class: it will be used to store the digits at TOF that
14// fall in the same strip
15//
16
17#ifndef ALICEO2_TOF_STRIP_H_
18#define ALICEO2_TOF_STRIP_H_
19
20#include <TOFBase/Digit.h>
21#include <TObject.h>
22#include <exception>
23#include <map>
24#include <sstream>
25#include <vector>
26#include "MathUtils/Cartesian.h"
27
28namespace o2
29{
30namespace tof
31{
32
38
39class Strip
40{
41
42 public:
44 Strip() = default;
45
47 ~Strip() = default;
48
52 Strip(Int_t index);
53
56 Strip(const Strip& ref) = default;
57
60 void clear() { mDigits.clear(); }
61
65 void init(Int_t index)
66 //, const o2::math_utils::Transform3D* mat)
67 {
69 //mMat = mat;
70 }
71
74 Int_t getStripIndex() const { return mStripIndex; }
75
78 Int_t getNumberOfDigits() const { return mDigits.size(); }
79
81 o2::tof::Digit* findDigit(ULong64_t key);
82
83 Int_t addDigit(Int_t channel, Int_t tdc, Int_t tot, uint64_t bc, Int_t lbl = 0, uint32_t triggerorbit = 0, uint16_t triggerbunch = 0, float geanttime = 0, double t0 = 0); // returns the MC label
84
85 void fillOutputContainer(std::vector<o2::tof::Digit>& digits);
86
87 static int mDigitMerged;
88 std::map<ULong64_t, o2::tof::Digit>& getDigitMap() { return mDigits; }
89
90 protected:
91 Int_t mStripIndex = -1;
92 std::map<ULong64_t, o2::tof::Digit> mDigits;
93
95};
96
98{
99 // finds the digit corresponding to global key
100 auto digitentry = mDigits.find(key);
101 return digitentry != mDigits.end() ? &(digitentry->second) : nullptr;
102}
103
104} // namespace tof
105} // namespace o2
106
107#endif /* defined(ALICEO2_TOF_STRIP_H_) */
uint64_t bc
Definition RawEventData.h:5
unsigned short int uint16_t
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 Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
StringRef key
TOF digit implementation.
Definition Digit.h:31
Container for similated points connected to a given TOF strip This will be used in order to allow a m...
Definition Strip.h:40
Strip(const Strip &ref)=default
Int_t mStripIndex
Strip ID.
Definition Strip.h:91
void fillOutputContainer(std::vector< o2::tof::Digit > &digits)
Definition Strip.cxx:60
std::map< ULong64_t, o2::tof::Digit > & getDigitMap()
Definition Strip.h:88
Int_t addDigit(Int_t channel, Int_t tdc, Int_t tot, uint64_t bc, Int_t lbl=0, uint32_t triggerorbit=0, uint16_t triggerbunch=0, float geanttime=0, double t0=0)
Definition Strip.cxx:37
static int mDigitMerged
Definition Strip.h:87
void init(Int_t index)
Definition Strip.h:65
o2::tof::Digit * findDigit(ULong64_t key)
reset points container
Definition Strip.h:97
std::map< ULong64_t, o2::tof::Digit > mDigits
Map of fired digits, possibly in multiple frames.
Definition Strip.h:92
void clear()
Definition Strip.h:60
ClassDefNV(Strip, 1)
Int_t getStripIndex() const
Definition Strip.h:74
void setStripIndex(Int_t index)
Definition Strip.h:64
~Strip()=default
Destructor.
Strip()=default
Default constructor.
Int_t getNumberOfDigits() const
Definition Strip.h:78
GLuint index
Definition glcorearb.h:781
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t0
Definition glcorearb.h:5034
GLint ref
Definition glcorearb.h:291
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::vector< Digit > digits