BmnRoot
26.10.0-19-g6979a6c6
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnMatch.h
Go to the documentation of this file.
1
/**
2
* \file BmnMatch.h
3
* \author Andrey Lebedev <andrey.lebedev@gsi.de> - original author for CBM experiment
4
* \author Sergey Merts <sergey.merts@gmail.com> - modifications for BMN experiment
5
* \date 2013-2014
6
*
7
* Base data class for storing RECO-to-MC matching information.
8
**/
9
10
#ifndef BMNMATCH_H_
11
#define BMNMATCH_H_
12
13
#include "
BmnLink.h
"
14
#include "
TObject.h
"
15
16
#include <algorithm>
17
#include <string>
18
#include <vector>
19
20
using
std::pair;
21
using
std::string;
22
using
std::vector;
23
24
class
BmnMatch
:
public
TObject
25
{
26
public
:
27
/**
28
* \brief Default constructor.
29
*/
30
BmnMatch
();
31
32
/**
33
* \brief Destructor.
34
*/
35
virtual
~BmnMatch
();
36
37
/* Accessors */
38
const
BmnLink
&
GetLink
(
Int_t
i
)
const
{
return
fLinks
[
i
]; }
39
const
vector<BmnLink>&
GetLinks
()
const
{
return
fLinks
; }
40
const
BmnLink
&
GetMatchedLink
()
const
{
return
fLinks
[
fMatchedIndex
]; }
41
Int_t
GetNofLinks
()
const
{
return
fLinks
.size(); }
42
Double_t
GetTotalWeight
()
const
{
return
fTotalWeight
; }
43
Int_t
GetMatchedIndex
()
const
{
return
fMatchedIndex
; }
44
45
/* Modifiers */
46
void
AddLink
(
const
BmnMatch
&
match
);
47
void
AddLinks
(
const
BmnMatch
&
match
) {
AddLink
(
match
); }
48
void
AddLink
(
const
BmnLink
& newLink);
49
void
AddLink
(
Double_t
weight,
Int_t
index,
Int_t
entry = -1,
Int_t
file = -1);
50
void
ClearLinks
();
51
52
/**
53
* \brief Return string representation of the object.
54
* \return String representation of the object.
55
**/
56
virtual
string
ToString
()
const
;
57
58
protected
:
59
vector<BmnLink>
fLinks
;
// List of links to MC
60
Double_t
fTotalWeight
;
// Sum of all reference weights
61
Int_t
fMatchedIndex
;
// Index of the matched reference in fReferences array
62
63
ClassDef
(
BmnMatch
, 1);
64
};
65
66
#endif
/* BMNMATCH_H_ */
BmnLink.h
i
int i
Definition
P4_F32vec4.h:22
Int_t
int Int_t
Double_t
double Double_t
ClassDef
#define ClassDef(name, id)
TObject.h
BmnLink
Definition
BmnLink.h:20
BmnMatch
Definition
BmnMatch.h:25
BmnMatch::AddLinks
void AddLinks(const BmnMatch &match)
Definition
BmnMatch.h:47
BmnMatch::fTotalWeight
Double_t fTotalWeight
Definition
BmnMatch.h:60
BmnMatch::GetLink
const BmnLink & GetLink(Int_t i) const
Definition
BmnMatch.h:38
BmnMatch::GetMatchedIndex
Int_t GetMatchedIndex() const
Definition
BmnMatch.h:43
BmnMatch::fMatchedIndex
Int_t fMatchedIndex
Definition
BmnMatch.h:61
BmnMatch::fLinks
vector< BmnLink > fLinks
Definition
BmnMatch.h:59
BmnMatch::GetTotalWeight
Double_t GetTotalWeight() const
Definition
BmnMatch.h:42
BmnMatch::AddLink
void AddLink(const BmnMatch &match)
Definition
BmnMatch.cxx:40
BmnMatch::ClearLinks
void ClearLinks()
Definition
BmnMatch.cxx:81
BmnMatch::~BmnMatch
virtual ~BmnMatch()
Destructor.
Definition
BmnMatch.cxx:21
BmnMatch::BmnMatch
BmnMatch()
Default constructor.
Definition
BmnMatch.cxx:15
BmnMatch::GetMatchedLink
const BmnLink & GetMatchedLink() const
Definition
BmnMatch.h:40
BmnMatch::ToString
virtual string ToString() const
Return string representation of the object.
Definition
BmnMatch.cxx:26
BmnMatch::GetLinks
const vector< BmnLink > & GetLinks() const
Definition
BmnMatch.h:39
BmnMatch::GetNofLinks
Int_t GetNofLinks() const
Definition
BmnMatch.h:41
TObject::TObject
TObject()
match
Definition
BmnMwpcTrackFinder.cxx:27
base
data
BmnMatch.h
Generated on
for BmnRoot by
1.17.0