Project
Loading...
Searching...
No Matches
MCLabel.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
// Declaration of a transient MC label class for PHOS
13
14
#ifndef ALICEO2_PHOS_MCLABEL_H_
15
#define ALICEO2_PHOS_MCLABEL_H_
16
17
#include "
SimulationDataFormat/MCCompLabel.h
"
18
19
namespace
o2
20
{
21
namespace
phos
22
{
23
class
MCLabel
:
public
o2::MCCompLabel
24
{
25
private
:
26
float
mEdep = 0;
// deposited energy
27
28
public
:
29
MCLabel
() =
default
;
30
MCLabel
(Int_t trackID, Int_t eventID, Int_t srcID,
bool
fake,
float
edep) :
o2
::
MCCompLabel
(trackID, eventID, srcID, fake), mEdep(edep) {}
31
35
bool
operator==
(
const
MCLabel
&
other
)
const
{
return
compare
(
other
) >= 0; }
36
37
MCLabel
&
operator=
(
const
MCLabel
&
other
) =
default
;
38
39
// /// \brief Add deposited energy of a thack, do not check if track the same
40
// /// \param another PHOS MCLabel
41
void
add
(
const
MCLabel
&
other
,
float
scale
) { mEdep +=
other
.mEdep *
scale
; }
42
43
void
scale
(
float
s) { mEdep *= s; }
44
45
float
getEdep
()
const
{
return
mEdep; }
46
47
double
getAmplitudeFraction
()
const
{
return
mEdep; }
48
49
ClassDefNV
(
MCLabel
, 2);
50
};
51
}
// namespace phos
52
}
// namespace o2
53
54
#endif
MCCompLabel.h
o2::MCCompLabel
Definition
MCCompLabel.h:24
o2::MCCompLabel::compare
int compare(const MCCompLabel &other) const
Definition
MCCompLabel.h:85
o2::phos::MCLabel
Definition
MCLabel.h:24
o2::phos::MCLabel::ClassDefNV
ClassDefNV(MCLabel, 2)
o2::phos::MCLabel::add
void add(const MCLabel &other, float scale)
Definition
MCLabel.h:41
o2::phos::MCLabel::MCLabel
MCLabel(Int_t trackID, Int_t eventID, Int_t srcID, bool fake, float edep)
Definition
MCLabel.h:30
o2::phos::MCLabel::getAmplitudeFraction
double getAmplitudeFraction() const
Definition
MCLabel.h:47
o2::phos::MCLabel::getEdep
float getEdep() const
Definition
MCLabel.h:45
o2::phos::MCLabel::operator==
bool operator==(const MCLabel &other) const
Comparison oparator, based on track, event and src Id.
Definition
MCLabel.h:35
o2::phos::MCLabel::MCLabel
MCLabel()=default
o2::phos::MCLabel::operator=
MCLabel & operator=(const MCLabel &other)=default
o2::phos::MCLabel::scale
void scale(float s)
Definition
MCLabel.h:43
o2
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Definition
BitstreamReader.h:24
other
VectorOfTObjectPtrs other
Definition
test_Algorithm.cxx:501
DataFormats
Detectors
PHOS
include
DataFormatsPHOS
MCLabel.h
Generated on Tue Feb 25 2025 23:16:11 for Project by
1.9.8