Project
Loading...
Searching...
No Matches
RecPoints.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
14
15#ifndef ALICEO2_FV0_RECPOINTS_H
16#define ALICEO2_FV0_RECPOINTS_H
17
21#include <array>
22#include <gsl/span>
23
24namespace o2
25{
26namespace fv0
27{
29
30 int channel = -1; // channel Id
31 double time = -20000; // time in ns, 0 at the LHC clk center
32 double charge = -20000; // charge [channels]
33 int adcId = -1; // QTC chain
34
35 ChannelDataFloat() = default;
36 ChannelDataFloat(int Channel, double Time, double Charge, int AdcId)
37 {
38 channel = Channel;
39 time = Time;
40 charge = Charge;
41 adcId = AdcId;
42 }
43
44 void print() const;
45
47};
48
50{
51
52 public:
56 RecPoints() = default;
57 RecPoints(const std::array<short, 3>& collisiontime, int first, int ne,
59 : mCollisionTimePs(collisiontime)
60 {
61 mRef.setFirstEntry(first);
62 mRef.setEntries(ne);
63 mIntRecord = iRec;
64 mTriggers = triggers;
65 }
66 ~RecPoints() = default;
67
68 float getCollisionTime(TimeTypeIndex type) const { return mCollisionTimePs[type]; }
73 void setCollisionTime(Float_t time, TimeTypeIndex type) { mCollisionTimePs[type] = time; }
74
75 o2::fit::Triggers getTrigger() const { return mTriggers; }
76 o2::InteractionRecord getInteractionRecord() const { return mIntRecord; };
77 gsl::span<const ChannelDataFloat> getBunchChannelData(const gsl::span<const ChannelDataFloat> tfdata) const;
78 short static constexpr sDummyCollissionTime = 32767;
79
80 private:
82 o2::InteractionRecord mIntRecord;
83 o2::fit::Triggers mTriggers; // pattern of triggers in this BC
84 std::array<short, 3> mCollisionTimePs = {sDummyCollissionTime, sDummyCollissionTime, sDummyCollissionTime}; // in picoseconds
85
86 ClassDefNV(RecPoints, 1);
87};
88} // namespace fv0
89} // namespace o2
90#endif
Class to describe fired triggered and/or stored channels for the BC and to refer to channel data.
int16_t time
Definition RawEventData.h:4
Class to refer to the 1st entry and N elements of some group in the continuous container.
void setCollisionTime(Float_t time, TimeTypeIndex type)
Definition RecPoints.h:73
o2::InteractionRecord getInteractionRecord() const
Definition RecPoints.h:76
float getCollisionGlobalMeanTime() const
Definition RecPoints.h:70
~RecPoints()=default
float getCollisionSelectedMeanTime() const
Definition RecPoints.h:71
RecPoints(const std::array< short, 3 > &collisiontime, int first, int ne, o2::InteractionRecord iRec, o2::fit::Triggers triggers)
Definition RecPoints.h:57
static short constexpr sDummyCollissionTime
Definition RecPoints.h:78
bool isValidTime(TimeTypeIndex type) const
Definition RecPoints.h:72
float getCollisionTime(TimeTypeIndex type) const
Definition RecPoints.h:68
o2::fit::Triggers getTrigger() const
Definition RecPoints.h:75
float getCollisionFirstTime() const
Definition RecPoints.h:69
gsl::span< const ChannelDataFloat > getBunchChannelData(const gsl::span< const ChannelDataFloat > tfdata) const
Definition RecPoints.cxx:17
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
ChannelDataFloat(int Channel, double Time, double Charge, int AdcId)
Definition RecPoints.h:36
ClassDefNV(ChannelDataFloat, 1)