Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
InteractionRecord.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file InteractionRecord.h
1
// @brief Interaction record encoding BC, orbit, time
2
// @sa <O2/DataFormats/common/include/CommonDataFormat/InteractionRecord.h>
3
// <29947a45e>
4
5
#ifndef MVTXDECODER_INTERACTIONRECORD_H
6
#define MVTXDECODER_INTERACTIONRECORD_H
7
8
#include <cstdint>
9
#include <string>
10
11
namespace
mvtx
12
{
13
namespace
lhcConstants
14
{
15
constexpr
int
LHCMaxBunches
= 3564;
// max N bunches
16
/*
17
constexpr double LHCRFFreq = 400.789e6; // LHC RF frequency in MHz
18
constexpr double LHCBunchSpacingNS = 10 * 1.e9 / LHCRFFreq; // bunch spacing in ns (10 RFbuckets)
19
constexpr double LHCOrbitNS = LHCMaxBunches * LHCBunchSpacingNS; // orbit duration in ns
20
constexpr double LHCRevFreq = 1.e9 / LHCOrbitNS; // revolution frequency
21
constexpr double LHCBunchSpacingMUS = LHCBunchSpacingNS * 1e-3; // bunch spacing in \mus (10 RFbuckets)
22
constexpr double LHCOrbitMUS = LHCOrbitNS * 1e-3; // orbit duration in \mus
23
24
constexpr int RHICMaxBunches = 120; // max N bunches
25
constexpr double RHICFFreq = 9.839e6; // RHIC RF frequency in MHz
26
constexpr double RHICOrbitNS = 1.e9 / RHICFFreq; // RHIC BCO in nS
27
*/
28
}
// namespace lhcConstants
29
31
32
struct
InteractionRecord
33
{
34
// information about bunch crossing and orbit
35
static
constexpr uint64_t
DummyOrbit
= 0xffffffffff;
36
static
constexpr uint16_t
DummyBC
= 0xffff;
37
38
uint64_t
orbit
=
DummyOrbit
;
39
uint16_t
bc
=
DummyBC
;
40
41
InteractionRecord
() =
default
;
42
43
InteractionRecord
( uint64_t orb, uint16_t
b
) :
orbit
(orb),
bc
(b){};
44
45
InteractionRecord
(
const
InteractionRecord
& src) =
default
;
46
47
InteractionRecord
&
operator=
(
const
InteractionRecord
& src) =
default
;
48
49
void
clear
()
50
{
51
orbit
=
DummyOrbit
;
52
bc
=
DummyBC
;
53
}
54
55
bool
isDummy
()
const
56
{
57
return
bc
>
mvtx::lhcConstants::LHCMaxBunches
;
58
}
59
60
bool
operator==
(
const
InteractionRecord
& other)
const
61
{
62
return
(
orbit
== other.
orbit
) && (
bc
== other.
bc
);
63
}
64
65
bool
operator!=
(
const
InteractionRecord
& other)
const
66
{
67
return
(
orbit
!= other.
orbit
) || (
bc
!= other.
bc
);
68
}
69
70
void
print
()
const
;
71
std::string
asString
()
const
;
72
friend
std::ostream&
operator<<
(std::ostream& stream,
InteractionRecord
const
& ir);
73
// ClassDefNV(InteractionRecord, 3);
74
};
75
76
}
77
#endif
online_distribution
blob
master
newbasic
mvtx_decoder
InteractionRecord.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:27
using
1.8.2 with
sPHENIX GitHub integration