Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Shreya Roy
cbmroot
Commits
599891b5
Commit
599891b5
authored
Sep 17, 2021
by
Sergey Gorbunov
Committed by
Sergey Gorbunov
Sep 21, 2021
Browse files
L1: make time-based data mode default
parent
494f4cd7
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
35 additions
and
37 deletions
+35
-37
macro/analysis/dielectron/run_reco.C
macro/analysis/dielectron/run_reco.C
+0
-1
macro/mcbm/mcbm_reco_event.C
macro/mcbm/mcbm_reco_event.C
+2
-2
macro/rich/run/run_reco.C
macro/rich/run/run_reco.C
+0
-1
macro/run/run_reco.C
macro/run/run_reco.C
+0
-1
reco/L1/CbmL1.cxx
reco/L1/CbmL1.cxx
+10
-10
reco/L1/CbmL1.h
reco/L1/CbmL1.h
+2
-2
reco/L1/CbmL1Performance.cxx
reco/L1/CbmL1Performance.cxx
+6
-6
reco/L1/CbmL1ReadEvent.cxx
reco/L1/CbmL1ReadEvent.cxx
+14
-13
reco/L1/L1Algo/L1Algo.h
reco/L1/L1Algo/L1Algo.h
+1
-1
No files found.
macro/analysis/dielectron/run_reco.C
View file @
599891b5
...
...
@@ -331,7 +331,6 @@ void run_reco(const string& mcFile = "/lustre/nyx/cbm/users/criesen/cbm/data/l
else
{
l1
=
new
CbmL1
(
"L1"
,
0
);
}
l1
->
SetDataMode
(
!
eventBased
);
// --- Material budget file names
TString
mvdGeoTag
;
...
...
macro/mcbm/mcbm_reco_event.C
View file @
599891b5
...
...
@@ -364,8 +364,8 @@ void mcbm_reco_event(Int_t nEvents = 10, TString dataset = "data/test", const ch
CbmKF
*
kalman
=
new
CbmKF
();
run
->
AddTask
(
kalman
);
CbmL1
*
l1
=
new
CbmL1
();
l1
->
Set
mCBMm
ode
(
1
);
l1
->
SetLegacyEventMode
(
1
);
l1
->
Set
McbmM
ode
();
l1
->
SetUseHitErrors
(
1
);
// --- Material budget file names
...
...
macro/rich/run/run_reco.C
View file @
599891b5
...
...
@@ -207,7 +207,6 @@ void run_reco(const string& traFile = "/Users/slebedev/Development/cbm/data/sim
else
{
l1
=
new
CbmL1
(
"L1"
,
0
);
}
l1
->
SetDataMode
(
!
eventBased
);
// --- Material budget file names
TString
mvdGeoTag
;
...
...
macro/run/run_reco.C
View file @
599891b5
...
...
@@ -372,7 +372,6 @@ void run_reco(TString input = "", Int_t nTimeSlices = -1, Int_t firstTimeSlice =
else
{
l1
=
new
CbmL1
(
"L1"
,
0
);
}
l1
->
SetDataMode
(
1
);
// --- Material budget file names
TString
mvdGeoTag
;
...
...
reco/L1/CbmL1.cxx
View file @
599891b5
...
...
@@ -223,11 +223,11 @@ InitStatus CbmL1::Init()
vFileEvent
.
clear
();
if
(
fTimeslice
Mode
)
{
// Time-slice mode selected
if
(
!
fLegacyEvent
Mode
)
{
// Time-slice mode selected
LOG
(
info
)
<<
GetName
()
<<
": running in time-slice mode."
;
fTimeSlice
=
NULL
;
fTimeSlice
=
(
CbmTimeSlice
*
)
fManger
->
GetObject
(
"TimeSlice."
);
if
(
fTimeSlice
==
NULL
)
LOG
(
fatal
)
<<
GetName
()
<<
": No time slice branch in tree!"
;
if
(
fTimeSlice
==
NULL
)
LOG
(
fatal
)
<<
GetName
()
<<
": No time slice branch in
the
tree!"
;
}
//? time-slice mode
...
...
@@ -287,7 +287,7 @@ InitStatus CbmL1::Init()
if
(
NULL
==
fStsPoints
)
LOG
(
fatal
)
<<
GetName
()
<<
": No StsPoint data!"
;
if
(
NULL
==
fMCTracks
)
LOG
(
fatal
)
<<
GetName
()
<<
": No MCTrack data!"
;
if
(
fTimeslice
Mode
)
{
if
(
!
fLegacyEvent
Mode
)
{
fEventList
=
(
CbmMCEventList
*
)
fManger
->
GetObject
(
"MCEventList."
);
if
(
NULL
==
fEventList
)
LOG
(
fatal
)
<<
GetName
()
<<
": No MCEventList data!"
;
}
...
...
@@ -1062,7 +1062,7 @@ void CbmL1::Reconstruct(CbmEvent* event)
StsIndex
.
push_back
(
j
);
};
if
(
fTimeslice
Mode
&&
fPerformance
)
{
if
(
!
fLegacyEvent
Mode
&&
fPerformance
)
{
int
nofEvents
=
fEventList
->
GetNofEvents
();
for
(
int
iE
=
0
;
iE
<
nofEvents
;
iE
++
)
{
...
...
@@ -1238,7 +1238,7 @@ void CbmL1::Reconstruct(CbmEvent* event)
if
(
fVerbose
>
1
)
{
cout
<<
"L1 Track fitter ok"
<<
endl
;
}
// save recontstructed tracks
if
(
!
fTimeslice
Mode
)
vRTracksCur
.
clear
();
if
(
fLegacyEvent
Mode
)
vRTracksCur
.
clear
();
int
start_hit
=
0
;
float
TsStart_new
=
TsStart
+
TsLength
-
TsOverlap
;
...
...
@@ -1270,7 +1270,7 @@ void CbmL1::Reconstruct(CbmEvent* event)
for
(
int
i
=
0
;
i
<
it
->
NHits
;
i
++
)
{
int
start_hit1
=
start_hit
;
if
(
algo
->
fRecoHits
[
start_hit1
]
>
vStsHits
.
size
()
-
1
)
start_hit
++
;
else
if
(
fTimeslice
Mode
)
{
else
if
(
!
fLegacyEvent
Mode
)
{
t
.
StsHits
.
push_back
(((
*
algo
->
vStsHits
)[
algo
->
fRecoHits
[
start_hit
]]).
ID
);
}
else
{
...
...
@@ -1312,7 +1312,7 @@ void CbmL1::Reconstruct(CbmEvent* event)
if
(
indd
==
1
)
continue
;
if
((
fTimeslice
Mode
)
&&
(
isInOverlap
==
1
))
{
if
((
!
fLegacyEvent
Mode
)
&&
(
isInOverlap
==
1
))
{
continue
;
///Discard tracks from overlap region
...
...
@@ -1337,9 +1337,9 @@ void CbmL1::Reconstruct(CbmEvent* event)
}
};
if
(
fTimeslice
Mode
)
TsStart
=
TsStart_new
;
///Set new TS strat to earliest discarted track
if
(
!
fLegacyEvent
Mode
)
TsStart
=
TsStart_new
;
///Set new TS strat to earliest discarted track
if
(
fTimeslice
Mode
)
cout
<<
"CA Track Finder: "
<<
algo
->
fCATime
<<
" s/sub-ts"
<<
endl
<<
endl
;
if
(
!
fLegacyEvent
Mode
)
cout
<<
"CA Track Finder: "
<<
algo
->
fCATime
<<
" s/sub-ts"
<<
endl
<<
endl
;
}
...
...
@@ -1373,7 +1373,7 @@ void CbmL1::Reconstruct(CbmEvent* event)
for
(
unsigned
int
iTrack
=
0
;
iTrack
<
vRTracksCur
.
size
();
iTrack
++
)
{
for
(
unsigned
int
iHit
=
0
;
iHit
<
vRTracksCur
[
iTrack
].
StsHits
.
size
();
iHit
++
)
if
(
fTimeslice
Mode
)
vRTracksCur
[
iTrack
].
StsHits
[
iHit
]
=
SortedIndex
[
vRTracksCur
[
iTrack
].
StsHits
[
iHit
]];
if
(
!
fLegacyEvent
Mode
)
vRTracksCur
[
iTrack
].
StsHits
[
iHit
]
=
SortedIndex
[
vRTracksCur
[
iTrack
].
StsHits
[
iHit
]];
vRTracks
.
push_back
(
vRTracksCur
[
iTrack
]);
}
...
...
reco/L1/CbmL1.h
View file @
599891b5
...
...
@@ -152,7 +152,7 @@ public:
void
SetTrdMaterialBudgetFileName
(
TString
fileName
)
{
fTrdMatBudgetFileName
=
fileName
;
}
void
SetTofMaterialBudgetFileName
(
TString
fileName
)
{
fTofMatBudgetFileName
=
fileName
;
}
void
SetExtrapolateToTheEndOfSTS
(
bool
b
)
{
fExtrapolateToTheEndOfSTS
=
b
;
}
void
Set
DataMode
(
int
TimesliceMode
)
{
fTimesliceMode
=
TimesliceMode
;
}
void
Set
LegacyEventMode
(
bool
b
)
{
fLegacyEventMode
=
b
;
}
void
SetMuchPar
(
TString
fileName
)
{
fMuchDigiFile
=
fileName
;
}
void
SetUseHitErrors
(
bool
value
)
{
fUseHitErrors
=
value
;
}
void
SetStsOnlyMode
()
{
fTrackingMode
=
L1Algo
::
TrackingMode
::
kSts
;
}
...
...
@@ -351,7 +351,7 @@ private:
TString
fTrdMatBudgetFileName
{};
TString
fTofMatBudgetFileName
{};
bool
fExtrapolateToTheEndOfSTS
{
false
};
int
fTimeslice
Mode
{
0
};
bool
fLegacyEvent
Mode
{
false
};
KFTopoPerformance
*
fTopoPerformance
{
nullptr
};
L1EventEfficiencies
fEventEfficiency
{};
// average efficiencies
...
...
reco/L1/CbmL1Performance.cxx
View file @
599891b5
/* Copyright (C) 2006-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
SPDX-License-Identifier: GPL-3.0-only
Authors: Ivan Kisel, Sergey Gorbunov, Igor Kulakov, Valentina Akishina, Grigory Kozlov */
Authors: Ivan Kisel, Sergey Gorbunov
[committer]
, Igor Kulakov, Valentina Akishina, Grigory Kozlov */
/*
*====================================================================
...
...
@@ -441,7 +441,7 @@ void CbmL1::EfficienciesPerformance()
cout
<<
"MC tracks/event found : "
<<
int
(
double
(
L1_NTRA
.
reco
.
counters
[
L1_NTRA
.
indices
[
"total"
]])
/
double
(
L1_NEVENTS
))
<<
endl
;
cout
<<
endl
;
cout
<<
"CA Track Finder: "
<<
L1_CATIME
/
L1_NEVENTS
<<
(
f
TimesliceMode
?
" s/time slice"
:
" s/ev
"
)
<<
endl
cout
<<
"CA Track Finder: "
<<
L1_CATIME
/
L1_NEVENTS
<<
(
f
LegacyEventMode
?
" s/ev"
:
" s/time slice
"
)
<<
endl
<<
endl
;
}
}
// void CbmL1::Performance()
...
...
@@ -1859,7 +1859,7 @@ void CbmL1::InputPerformance()
double
mcTime
=
pt
->
GetTime
();
if
(
fTimeslice
Mode
)
mcTime
+=
fEventList
->
GetEventTime
(
link
.
GetEntry
(),
link
.
GetFile
());
if
(
!
fLegacyEvent
Mode
)
mcTime
+=
fEventList
->
GetEventTime
(
link
.
GetEntry
(),
link
.
GetFile
());
// hit pulls and residuals
...
...
@@ -1967,7 +1967,7 @@ void CbmL1::InputPerformance()
CbmMuchPoint
*
pt
=
(
CbmMuchPoint
*
)
fMuchPoints
->
Get
(
link
.
GetFile
(),
link
.
GetEntry
(),
link
.
GetIndex
());
double
mcTime
=
pt
->
GetTime
();
if
(
fTimeslice
Mode
)
mcTime
+=
fEventList
->
GetEventTime
(
link
.
GetEntry
(),
link
.
GetFile
());
if
(
!
fLegacyEvent
Mode
)
mcTime
+=
fEventList
->
GetEventTime
(
link
.
GetEntry
(),
link
.
GetFile
());
// mcTime+=20;
// hit pulls and residuals
...
...
@@ -2036,7 +2036,7 @@ void CbmL1::InputPerformance()
CbmTrdPoint
*
pt
=
(
CbmTrdPoint
*
)
fTrdPoints
->
Get
(
link
.
GetFile
(),
link
.
GetEntry
(),
link
.
GetIndex
());
double
mcTime
=
pt
->
GetTime
();
if
(
fTimeslice
Mode
)
mcTime
+=
fEventList
->
GetEventTime
(
link
.
GetEntry
(),
link
.
GetFile
());
if
(
!
fLegacyEvent
Mode
)
mcTime
+=
fEventList
->
GetEventTime
(
link
.
GetEntry
(),
link
.
GetFile
());
// hit pulls and residuals
// if ((sh->GetPlaneId()) == 0) continue;
...
...
@@ -2104,7 +2104,7 @@ void CbmL1::InputPerformance()
CbmTofPoint
*
pt
=
(
CbmTofPoint
*
)
fTofPoints
->
Get
(
link
.
GetFile
(),
link
.
GetEntry
(),
link
.
GetIndex
());
double
mcTime
=
pt
->
GetTime
();
if
(
fTimeslice
Mode
)
mcTime
+=
fEventList
->
GetEventTime
(
link
.
GetEntry
(),
link
.
GetFile
());
if
(
!
fLegacyEvent
Mode
)
mcTime
+=
fEventList
->
GetEventTime
(
link
.
GetEntry
(),
link
.
GetFile
());
// hit pulls and residuals
...
...
reco/L1/CbmL1ReadEvent.cxx
View file @
599891b5
...
...
@@ -440,7 +440,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
hitIndex
=
(
event
?
event
->
GetIndex
(
ECbmDataType
::
kStsHit
,
j
)
:
j
);
int
hitIndexSort
=
0
;
if
(
fTimeslice
Mode
)
hitIndexSort
=
StsIndex
[
hitIndex
];
if
(
!
fLegacyEvent
Mode
)
hitIndexSort
=
StsIndex
[
hitIndex
];
else
hitIndexSort
=
j
;
...
...
@@ -463,9 +463,10 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
th
.
time
=
mh
->
GetTime
();
th
.
dt
=
mh
->
GetTimeError
();
if
(
fTimeslice
Mode
)
th
.
id
=
nMvdHits
+
hitIndex
;
else
if
(
!
fLegacyEvent
Mode
)
{
th
.
id
=
nMvdHits
+
hitIndex
;
}
else
{
th
.
id
=
tmpHits
.
size
();
}
/// stop if reco TS ends and many hits left
if
(
!
event
)
...
...
@@ -524,7 +525,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
bestWeight
=
stsHitMatch
.
GetLink
(
iLink
).
GetWeight
();
Int_t
iFile
=
stsHitMatch
.
GetLink
(
iLink
).
GetFile
();
Int_t
iEvent
=
stsHitMatch
.
GetLink
(
iLink
).
GetEntry
();
// if(
!fTimeslice
Mode) //TODO Fix the event number in links
// if(
fLegacyEvent
Mode) //TODO Fix the event number in links
// iEvent+=1;
Int_t
iIndex
=
stsHitMatch
.
GetLink
(
iLink
).
GetIndex
()
+
nMvdPoints
;
Double_t
dtrck
=
dFEI
(
iFile
,
iEvent
,
iIndex
);
...
...
@@ -1085,7 +1086,7 @@ bool CbmL1::ReadMCPoint(CbmL1MCPoint* MC, int iPoint, int file, int event, int M
if
(
MVD
==
0
)
{
CbmStsPoint
*
pt
=
L1_DYNAMIC_CAST
<
CbmStsPoint
*>
(
fStsPoints
->
Get
(
file
,
event
,
iPoint
));
// file, event, object
if
(
!
pt
)
return
1
;
// if (
fTimeslice
Mode )
// if (
!fLegacyEvent
Mode )
// {
// Double_t StartTime = fTimeSlice->GetStartTime();
// Double_t EndTime = fTimeSlice->GetEndTime();
...
...
@@ -1095,7 +1096,7 @@ bool CbmL1::ReadMCPoint(CbmL1MCPoint* MC, int iPoint, int file, int event, int M
//
// if (Time_MC_point > EndTime )
// return 1;
// }
//if ( fTimesliceMode )
// }
pt
->
Position
(
xyzI
);
pt
->
Momentum
(
PI
);
...
...
@@ -1109,14 +1110,14 @@ bool CbmL1::ReadMCPoint(CbmL1MCPoint* MC, int iPoint, int file, int event, int M
if
(
MVD
==
2
)
{
CbmMuchPoint
*
pt
=
L1_DYNAMIC_CAST
<
CbmMuchPoint
*>
(
fMuchPoints
->
Get
(
file
,
event
,
iPoint
));
// file, event, object
if
(
!
pt
)
return
1
;
if
(
fTimeslice
Mode
)
{
if
(
!
fLegacyEvent
Mode
)
{
Double_t
StartTime
=
fTimeSlice
->
GetStartTime
();
Double_t
EndTime
=
fTimeSlice
->
GetEndTime
();
Double_t
Time_MC_point
=
pt
->
GetTime
()
+
fEventList
->
GetEventTime
(
event
,
file
);
if
(
Time_MC_point
<
StartTime
)
return
1
;
if
(
Time_MC_point
>
EndTime
)
return
1
;
}
//if ( fTimesliceMode )
}
pt
->
Position
(
xyzI
);
pt
->
Momentum
(
PI
);
...
...
@@ -1131,7 +1132,7 @@ bool CbmL1::ReadMCPoint(CbmL1MCPoint* MC, int iPoint, int file, int event, int M
CbmTrdPoint
*
pt
=
L1_DYNAMIC_CAST
<
CbmTrdPoint
*>
(
fTrdPoints
->
Get
(
file
,
event
,
iPoint
));
// file, event, object
if
(
!
pt
)
return
1
;
if
(
fTimeslice
Mode
)
{
if
(
!
fLegacyEvent
Mode
)
{
//Double_t StartTime = fTimeSlice->GetStartTime(); // not used
//Double_t EndTime = fTimeSlice->GetEndTime(); // not used
//Double_t Time_MC_point = pt->GetTime() + fEventList->GetEventTime(event, file); // not used
...
...
@@ -1140,7 +1141,7 @@ bool CbmL1::ReadMCPoint(CbmL1MCPoint* MC, int iPoint, int file, int event, int M
//
// if (Time_MC_point > EndTime )
// return 1;
}
//if ( fTimesliceMode )
}
pt
->
Position
(
xyzI
);
pt
->
Momentum
(
PI
);
...
...
@@ -1154,14 +1155,14 @@ bool CbmL1::ReadMCPoint(CbmL1MCPoint* MC, int iPoint, int file, int event, int M
if
(
MVD
==
4
)
{
CbmTofPoint
*
pt
=
L1_DYNAMIC_CAST
<
CbmTofPoint
*>
(
fTofPoints
->
Get
(
file
,
event
,
iPoint
));
// file, event, object
if
(
!
pt
)
return
1
;
if
(
fTimeslice
Mode
)
{
if
(
!
fLegacyEvent
Mode
)
{
Double_t
StartTime
=
fTimeSlice
->
GetStartTime
();
Double_t
EndTime
=
fTimeSlice
->
GetEndTime
();
Double_t
Time_MC_point
=
pt
->
GetTime
()
+
fEventList
->
GetEventTime
(
event
,
file
);
if
(
Time_MC_point
<
StartTime
)
return
1
;
if
(
Time_MC_point
>
EndTime
)
return
1
;
}
//if ( fTimesliceMode )
}
pt
->
Position
(
xyzI
);
pt
->
Momentum
(
PI
);
...
...
@@ -1277,7 +1278,7 @@ void CbmL1::HitMatch()
Int_t
iEvent
=
link
.
GetEntry
();
Int_t
iIndex
=
link
.
GetIndex
();
if
(
!
fTimeslice
Mode
)
{
if
(
fLegacyEvent
Mode
)
{
iFile
=
vFileEvent
.
begin
()
->
first
;
iEvent
=
vFileEvent
.
begin
()
->
second
;
}
...
...
reco/L1/L1Algo/L1Algo.h
View file @
599891b5
/* Copyright (C) 2007-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
SPDX-License-Identifier: GPL-3.0-only
Authors: Maksym Zyzak, Valentina Akishina, Igor Kulakov */
Authors: Maksym Zyzak, Valentina Akishina, Igor Kulakov
[committer]
*/
#ifndef L1Algo_h
#define L1Algo_h
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment