EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
CbmMCMatchLoaderTask.cxx
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file CbmMCMatchLoaderTask.cxx
1
// -------------------------------------------------------------------------
2
// ----- CbmMCMatchLoaderTask source file -----
3
// ----- Created 18/07/08 by T.Stockmanns -----
4
// -------------------------------------------------------------------------
5
#include "
CbmMCMatchLoaderTask.h
"
6
7
#include "
CbmMCMatch.h
"
8
#include "
CbmDetectorList.h
"
9
10
// framework includes
11
#include "
FairRootManager.h
"
12
13
// Root includes
14
#include "TClonesArray.h"
15
16
// libc includes
17
#include <iostream>
18
using
std::cout;
19
using
std::endl;
20
21
// ----- Default constructor -------------------------------------------
22
CbmMCMatchLoaderTask::CbmMCMatchLoaderTask
()
23
:
FairTask
(
"Creates CbmMCMatch"
),
24
fMCLink(NULL),
25
fEventNr(0),
26
fMCMatch(NULL)
27
{
28
}
29
// -------------------------------------------------------------------------
30
31
32
// ----- Destructor ----------------------------------------------------
33
CbmMCMatchLoaderTask::~CbmMCMatchLoaderTask
()
34
{
35
}
36
37
// ----- Public method Init --------------------------------------------
38
InitStatus
CbmMCMatchLoaderTask::Init
()
39
{
40
fMCMatch
=
new
CbmMCMatch
(
"CbmMCMatch"
,
"CbmMCMatch"
);
41
42
// fMCMatch->InitStage(kMCTrack, "", "MCTrack");
43
fMCMatch
->
InitStage
(
kStsPoint
,
""
,
"StsPoint"
);
44
fMCMatch
->
InitStage
(
kStsDigi
,
""
,
"StsDigi"
);
45
fMCMatch
->
InitStage
(
kStsCluster
,
""
,
"StsCluster"
);
46
fMCMatch
->
InitStage
(
kStsHit
,
""
,
"StsHit"
);
47
48
49
FairRootManager
* ioman =
FairRootManager::Instance
();
50
if
(!ioman) {
51
cout <<
"-E- CbmMCMatchLoaderTask::Init: "
52
<<
"RootManager not instantiated!"
<< endl;
53
return
kFATAL
;
54
}
55
56
fMCLink
= (TClonesArray*)ioman->
GetObject
(
"MCLink"
);
57
ioman->
Register
(
"MCMatch"
,
"MCMatch"
,
fMCMatch
, kFALSE);
58
59
return
kSUCCESS
;
60
}
61
62
63
// -------------------------------------------------------------------------
64
void
CbmMCMatchLoaderTask::SetParContainers
()
65
{
66
// Get Base Container
67
// FairRun* ana = FairRun::Instance();
68
// FairRuntimeDb* rtdb=ana->GetRuntimeDb();
69
70
}
71
72
73
// ----- Public method Exec --------------------------------------------
74
void
CbmMCMatchLoaderTask::Exec
(Option_t* opt)
75
{
76
/* for (int trackIndex = 0; trackIndex < fTrack->GetEntriesFast(); trackIndex++){
77
CbmTrack* myTrack = (CbmTrack*)fTrack->At(trackIndex);
78
fMCMatch->AddElement(kTrack, trackIndex, kTrackCand, myTrack->GetRefIndex());
79
}
80
*/
81
82
if
(!
fMCLink
) Fatal(
"Exec"
,
"No fMCLink"
);
83
// fMCLinkDet->Delete();
84
// fMCLinkHit->Delete();
85
fMCMatch
->
ClearMCList
();
86
87
fMCMatch
->
LoadInMCLists
(
fMCLink
);
88
fMCMatch
->
CreateArtificialStage
(
kMCTrack
,
""
,
""
);
89
90
fMCMatch
->
Print
();
91
cout << endl;
92
}
93
94
void
CbmMCMatchLoaderTask::Finish
()
95
{
96
}
97
98
99
ClassImp
(
CbmMCMatchLoaderTask
);
EicRoot
blob
master
cbmbase
CbmMCMatchLoaderTask.cxx
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:32
using
1.8.2 with
EIC GitHub integration