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
Jan de Cuveland
cbmroot
Commits
c1d35ae2
Commit
c1d35ae2
authored
Jul 09, 2021
by
Sergey Gorbunov
Browse files
rename L1StsHit to L1Hit
parent
489c6f7e
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
220 additions
and
201 deletions
+220
-201
reco/L1/CMakeLists.txt
reco/L1/CMakeLists.txt
+3
-1
reco/L1/CbmL1.cxx
reco/L1/CbmL1.cxx
+14
-14
reco/L1/CbmL1.h
reco/L1/CbmL1.h
+2
-2
reco/L1/CbmL1Hit.h
reco/L1/CbmL1Hit.h
+34
-0
reco/L1/CbmL1MCPoint.h
reco/L1/CbmL1MCPoint.h
+1
-1
reco/L1/CbmL1MCTrack.cxx
reco/L1/CbmL1MCTrack.cxx
+2
-2
reco/L1/CbmL1Performance.cxx
reco/L1/CbmL1Performance.cxx
+4
-4
reco/L1/CbmL1ReadEvent.cxx
reco/L1/CbmL1ReadEvent.cxx
+13
-13
reco/L1/CbmL1StsHit.h
reco/L1/CbmL1StsHit.h
+0
-52
reco/L1/CbmL1TrackFitter.cxx
reco/L1/CbmL1TrackFitter.cxx
+5
-5
reco/L1/L1Algo/L1Algo.cxx
reco/L1/L1Algo/L1Algo.cxx
+9
-13
reco/L1/L1Algo/L1Algo.h
reco/L1/L1Algo/L1Algo.h
+14
-14
reco/L1/L1Algo/L1Branch.h
reco/L1/L1Algo/L1Branch.h
+1
-1
reco/L1/L1Algo/L1CATrackFinder.cxx
reco/L1/L1Algo/L1CATrackFinder.cxx
+41
-40
reco/L1/L1Algo/L1Grid.cxx
reco/L1/L1Algo/L1Grid.cxx
+13
-11
reco/L1/L1Algo/L1Grid.h
reco/L1/L1Algo/L1Grid.h
+6
-6
reco/L1/L1Algo/L1Hit.h
reco/L1/L1Algo/L1Hit.h
+35
-0
reco/L1/L1Algo/L1HitsSortHelper.cxx
reco/L1/L1Algo/L1HitsSortHelper.cxx
+3
-3
reco/L1/L1Algo/L1HitsSortHelper.h
reco/L1/L1Algo/L1HitsSortHelper.h
+4
-4
reco/L1/L1Algo/L1TrackExtender.cxx
reco/L1/L1Algo/L1TrackExtender.cxx
+16
-15
No files found.
reco/L1/CMakeLists.txt
View file @
c1d35ae2
...
...
@@ -129,6 +129,8 @@ L1Algo/L1MCEvent.cxx
L1Algo/L1Fit.cxx
CbmL1MCTrack.cxx
L1Algo/utils/L1AlgoDraw.cxx
ParticleFinder/CbmL1PFFitter.cxx
ParticleFinder/CbmL1PFMCParticle.cxx
)
...
...
@@ -138,7 +140,7 @@ CbmL1CATrdTrackFinderSA.h
CbmL1.h
CbmL1MCTrack.h
CbmL1MCPoint.h
CbmL1
Sts
Hit.h
CbmL1Hit.h
CbmL1TofMerger.h
CbmL1Track.h
CbmL1TrackMerger.h
...
...
reco/L1/CbmL1.cxx
View file @
c1d35ae2
...
...
@@ -65,7 +65,7 @@
#include "L1Algo/L1Algo.h"
#include "L1Algo/L1Branch.h"
#include "L1Algo/L1Field.h"
#include "L1Algo/L1
Sts
Hit.h"
#include "L1Algo/L1Hit.h"
#include "L1AlgoInputData.h"
#include "L1Event.h"
...
...
@@ -1331,7 +1331,7 @@ void CbmL1::Reconstruct(CbmEvent* event)
strips
.
clear
();
zP
.
clear
();
for
(
unsigned
int
iH
=
0
;
iH
<
(
*
algo
->
vStsHits
).
size
();
++
iH
)
{
L1
Sts
Hit
&
h
=
const_cast
<
L1
Sts
Hit
&>
((
*
algo
->
vStsHits
)[
iH
]);
L1Hit
&
h
=
const_cast
<
L1Hit
&>
((
*
algo
->
vStsHits
)[
iH
]);
#ifdef USE_EVENT_NUMBER
h
.
n
=
-
1
;
#endif
...
...
@@ -1406,7 +1406,7 @@ void CbmL1::Reconstruct(CbmEvent* event)
for
(
unsigned
int
iH
=
0
;
iH
<
(
*
algo
->
vStsHits
).
size
();
++
iH
)
{
#ifdef USE_EVENT_NUMBER
L1
Sts
Hit
&
h
=
const_cast
<
L1
Sts
Hit
&>
((
*
algo
->
vStsHits
)[
iH
]);
L1Hit
&
h
=
const_cast
<
L1Hit
&>
((
*
algo
->
vStsHits
)[
iH
]);
h
.
n
=
-
1
;
#endif
if
(
vStsHits
[
iH
].
mcPointIds
.
size
()
==
0
)
continue
;
...
...
@@ -1427,7 +1427,7 @@ void CbmL1::Reconstruct(CbmEvent* event)
for
(
unsigned
int
iH
=
0
;
iH
<
MC
.
StsHits
.
size
();
iH
++
)
{
const
int
hitI
=
MC
.
StsHits
[
iH
];
CbmL1
Sts
Hit
&
hit
=
const_cast
<
CbmL1
Sts
Hit
&>
(
vStsHits
[
hitI
]);
CbmL1Hit
&
hit
=
const_cast
<
CbmL1Hit
&>
(
vStsHits
[
hitI
]);
hit
.
event
=
MC
.
iEvent
;
...
...
@@ -1613,7 +1613,7 @@ void CbmL1::Reconstruct(CbmEvent* event)
for
(
unsigned
int
iH
=
0
;
iH
<
(
*
algo
->
vStsHits
).
size
();
++
iH
)
{
#ifdef USE_EVENT_NUMBER
L1
Sts
Hit
&
h
=
const_cast
<
L1
Sts
Hit
&>
((
*
algo
->
vStsHits
)[
iH
]);
L1Hit
&
h
=
const_cast
<
L1Hit
&>
((
*
algo
->
vStsHits
)[
iH
]);
h
.
n
=
-
1
;
#endif
if
(
vStsHits
[
iH
].
mcPointIds
.
size
()
==
0
)
continue
;
...
...
@@ -1634,7 +1634,7 @@ void CbmL1::Reconstruct(CbmEvent* event)
for
(
unsigned
int
iH
=
0
;
iH
<
MC
.
StsHits
.
size
();
iH
++
)
{
const
int
hitI
=
MC
.
StsHits
[
iH
];
CbmL1
Sts
Hit
&
hit
=
const_cast
<
CbmL1
Sts
Hit
&>
(
vStsHits
[
hitI
]);
CbmL1Hit
&
hit
=
const_cast
<
CbmL1Hit
&>
(
vStsHits
[
hitI
]);
hit
.
event
=
MC
.
iEvent
;
}
...
...
@@ -1727,7 +1727,7 @@ void CbmL1::IdealTrackFinder()
for
(
unsigned
int
iH
=
0
;
iH
<
MC
.
StsHits
.
size
();
iH
++
)
{
const
int
hitI
=
MC
.
StsHits
[
iH
];
const
CbmL1
Sts
Hit
&
hit
=
vStsHits
[
hitI
];
const
CbmL1Hit
&
hit
=
vStsHits
[
hitI
];
const
int
iStation
=
vMCPoints
[
hit
.
mcPointIds
[
0
]].
iStation
;
...
...
@@ -1838,7 +1838,7 @@ void CbmL1::WriteSTAPAlgoData() // must be called after ReadEvent
n
=
(
*
algo
->
vStsHits
).
size
();
fadata
<<
n
<<
endl
;
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
const
L1
Sts
Hit
&
h
=
(
*
algo
->
vStsHits
)[
i
];
const
L1Hit
&
h
=
(
*
algo
->
vStsHits
)[
i
];
fadata
<<
static_cast
<
int
>
(
h
.
f
)
<<
" "
;
fadata
<<
static_cast
<
int
>
(
h
.
b
)
<<
" "
;
#ifdef USE_EVENT_NUMBER
...
...
@@ -1848,7 +1848,7 @@ void CbmL1::WriteSTAPAlgoData() // must be called after ReadEvent
fadata
<<
h
.
u
<<
" "
;
fadata
<<
h
.
v
<<
" "
;
// fadata << (*algo->vStsHits)[i].time << endl;
fadata
<<
h
.
t
_reco
<<
endl
;
fadata
<<
h
.
t
<<
endl
;
};
if
(
fVerbose
>=
4
)
{
cout
<<
"vStsHits["
<<
n
<<
"]"
...
...
@@ -2065,7 +2065,7 @@ void CbmL1::ReadSTAPAlgoData()
if
(
1
)
{
if
(
nEvent
==
1
)
fadata
.
open
(
fadata_name
,
fstream
::
in
);
if
(
algo
->
vStsHits
)
const_cast
<
std
::
vector
<
L1
Sts
Hit
>*>
(
algo
->
vStsHits
)
->
clear
();
if
(
algo
->
vStsHits
)
const_cast
<
std
::
vector
<
L1Hit
>*>
(
algo
->
vStsHits
)
->
clear
();
algo
->
NStsStrips
=
0
;
if
(
algo
->
vStsZPos
)
const_cast
<
std
::
vector
<
float
>*>
(
algo
->
vStsZPos
)
->
clear
();
if
(
algo
->
fStripFlag
)
algo
->
fStripFlag
->
clear
();
...
...
@@ -2115,12 +2115,12 @@ void CbmL1::ReadSTAPAlgoData()
int
element_n
;
int
element_iz
;
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
L1
Sts
Hit
element
;
fadata
>>
element_f
>>
element_b
>>
element_n
>>
element_iz
>>
element
.
u
>>
element
.
v
>>
element
.
t
_reco
;
L1Hit
element
;
fadata
>>
element_f
>>
element_b
>>
element_n
>>
element_iz
>>
element
.
u
>>
element
.
v
>>
element
.
t
;
element
.
f
=
static_cast
<
THitI
>
(
element_f
);
element
.
b
=
static_cast
<
THitI
>
(
element_b
);
element
.
iz
=
static_cast
<
TZPosI
>
(
element_iz
);
const_cast
<
std
::
vector
<
L1
Sts
Hit
>*>
(
algo
->
vStsHits
)
->
push_back
(
element
);
const_cast
<
std
::
vector
<
L1Hit
>*>
(
algo
->
vStsHits
)
->
push_back
(
element
);
}
if
(
fVerbose
>=
4
)
{
cout
<<
"vStsHits["
<<
n
<<
"]"
...
...
@@ -2291,7 +2291,7 @@ void CbmL1::ReadSTAPPerfData()
// vStsHits
fpdata
>>
n
;
for
(
int
i
=
0
;
i
<
n
;
i
++
)
{
CbmL1
Sts
Hit
element
;
CbmL1Hit
element
;
fpdata
>>
element
.
hitId
;
fpdata
>>
element
.
extIndex
;
...
...
reco/L1/CbmL1.h
View file @
c1d35ae2
...
...
@@ -31,9 +31,9 @@
//#include "L1Algo/L1Algo.h"
#include "CbmEvent.h"
#include "CbmL1Hit.h"
#include "CbmL1MCPoint.h"
#include "CbmL1MCTrack.h"
#include "CbmL1StsHit.h"
#include "CbmMCTrack.h"
#include "CbmMvdHit.h"
#include "CbmMvdPoint.h"
...
...
@@ -317,7 +317,7 @@ private:
//CbmMCEventHeader* fEvent;
/// Used data = Repacked input data
vector
<
CbmL1
Sts
Hit
>
vStsHits
;
// hits with hit-mcpoint match information
vector
<
CbmL1Hit
>
vStsHits
;
// hits with hit-mcpoint match information
// vector<CbmL1MCPoint> vMCPoints;
vector
<
int
>
SortedIndex
;
vector
<
int
>
StsIndex
;
...
...
reco/L1/CbmL1Hit.h
0 → 100644
View file @
c1d35ae2
/* Copyright (C) 2010-2021 Frankfurt Institute for Advanced Studies, Goethe-Universität Frankfurt, Frankfurt
SPDX-License-Identifier: GPL-3.0-only
Authors: Igor Kulakov [committer], Valentina Akishina, Maksym Zyzak */
#ifndef _CbmL1Hit_h_
#define _CbmL1Hit_h_
#include <vector>
using
std
::
vector
;
///
/// hits with hit-mcpoint match information
///
class
CbmL1Hit
{
public:
CbmL1Hit
()
{};
CbmL1Hit
(
int
hitId_
,
int
extIndex_
,
int
Det_
)
:
hitId
(
hitId_
),
extIndex
(
extIndex_
),
Det
(
Det_
)
{};
int
hitId
=
0
;
// index of L1Hit in algo->vStsHits array. Should be equal to index of this in L1->vStsHits
int
extIndex
=
0
;
// index of hit in the TClonesArray array
int
Det
=
0
;
// station index
vector
<
int
>
mcPointIds
{};
// indices of CbmL1MCPoint in L1->vMCPoints array
float
x
=
0.
f
;
// measured X coordinate
float
y
=
0.
f
;
// measured Y coordinate
float
t
=
0.
f
;
// measured time
int
f
=
0
;
// front strip index
int
b
=
0
;
// back strip index
int
ID
=
0
;
// TODO: check if this ID is redundant
int
file
=
0
;
// TODO: ??
int
event
=
0
;
// TODO: ??
};
#endif
reco/L1/CbmL1MCPoint.h
View file @
c1d35ae2
...
...
@@ -78,7 +78,7 @@ struct CbmL1MCPoint {
return
(
a
->
ID
<
b
->
ID
)
||
((
a
->
ID
==
b
->
ID
)
&&
(
a
->
z
<
b
->
z
));
}
vector
<
int
>
hitIds
;
// indices of CbmL1
Sts
Hits in L1->vStsHits array
vector
<
int
>
hitIds
;
// indices of CbmL1Hits in L1->vStsHits array
};
#endif
reco/L1/CbmL1MCTrack.cxx
View file @
c1d35ae2
...
...
@@ -24,7 +24,7 @@
#include "CbmL1Constants.h"
#include "L1Algo/L1Algo.h"
#include "L1Algo/L1
Sts
Hit.h"
#include "L1Algo/L1Hit.h"
CbmL1MCTrack
::
CbmL1MCTrack
(
double
mass_
,
double
q_
,
TVector3
vr
,
TLorentzVector
vp
,
int
_ID
,
int
_mother_ID
,
int
_pdg
)
:
mass
(
mass_
)
...
...
@@ -147,7 +147,7 @@ void CbmL1MCTrack::CalculateHitCont()
{
for
(
int
ih
=
0
;
ih
<
nhits
;
ih
++
)
{
int
jh
=
StsHits
[
ih
];
const
L1
Sts
Hit
&
h
=
(
*
algo
->
vStsHits
)[
jh
];
const
L1Hit
&
h
=
(
*
algo
->
vStsHits
)[
jh
];
int
ista
=
(
*
algo
->
fStripFlag
)[
h
.
f
]
/
4
;
if
(
ista
-
istaold
==
1
)
ncont
++
;
...
...
reco/L1/CbmL1Performance.cxx
View file @
c1d35ae2
...
...
@@ -1813,7 +1813,7 @@ void CbmL1::InputPerformance()
if
(
listStsHits
&&
listStsHitMatch
)
{
for
(
unsigned
int
iH
=
0
;
iH
<
vStsHits
.
size
();
iH
++
)
{
const
CbmL1
Sts
Hit
&
h
=
vStsHits
[
iH
];
const
CbmL1Hit
&
h
=
vStsHits
[
iH
];
if
(
h
.
Det
!=
1
)
continue
;
// mvd hit
const
CbmStsHit
*
sh
=
L1_DYNAMIC_CAST
<
CbmStsHit
*>
(
listStsHits
->
At
(
h
.
extIndex
));
...
...
@@ -1957,7 +1957,7 @@ void CbmL1::InputPerformance()
if
(
fMuchPixelHits
&&
listMuchHitMatches
)
{
for
(
unsigned
int
iH
=
0
;
iH
<
vStsHits
.
size
();
iH
++
)
{
const
CbmL1
Sts
Hit
&
h
=
vStsHits
[
iH
];
const
CbmL1Hit
&
h
=
vStsHits
[
iH
];
if
(
h
.
Det
!=
2
)
continue
;
// mvd hit
...
...
@@ -2027,7 +2027,7 @@ void CbmL1::InputPerformance()
if
(
listTrdHits
&&
fTrdHitMatches
)
{
for
(
unsigned
int
iH
=
0
;
iH
<
vStsHits
.
size
();
iH
++
)
{
const
CbmL1
Sts
Hit
&
h
=
vStsHits
[
iH
];
const
CbmL1Hit
&
h
=
vStsHits
[
iH
];
if
(
h
.
Det
!=
3
)
continue
;
// mvd hit
const
CbmTrdHit
*
sh
=
L1_DYNAMIC_CAST
<
CbmTrdHit
*>
(
listTrdHits
->
At
(
h
.
extIndex
));
...
...
@@ -2091,7 +2091,7 @@ void CbmL1::InputPerformance()
if
(
fTofHits
&&
fTofHitDigiMatches
)
{
for
(
unsigned
int
iH
=
0
;
iH
<
vStsHits
.
size
();
iH
++
)
{
const
CbmL1
Sts
Hit
&
h
=
vStsHits
[
iH
];
const
CbmL1Hit
&
h
=
vStsHits
[
iH
];
if
(
h
.
Det
!=
4
)
continue
;
// mvd hit
...
...
reco/L1/CbmL1ReadEvent.cxx
View file @
c1d35ae2
...
...
@@ -71,7 +71,7 @@ struct TmpHit { // used for sort Hits before writing in the normal arrays
double
dx
,
dy
,
dxy
;
double
du
,
dv
;
int
iMC
;
// index of MCPoint in the vMCPoints array
double
time
,
t
_er
,
z
;
double
time
,
d
t
,
z
;
int
Det
;
int
id
;
int
track
;
...
...
@@ -513,7 +513,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
//Get time
th
.
time
=
mh
->
GetTime
();
th
.
t_er
=
mh
->
GetTimeError
();
th
.
dt
=
mh
->
GetTimeError
();
if
(
fTimesliceMode
)
th
.
id
=
hitIndex
;
else
...
...
@@ -625,7 +625,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
th
.
iStation
=
DetId
+
NMvdStations
+
NStsStations
;
//Get time
th
.
time
=
mh
->
GetTime
()
-
14.5
;
th
.
t_er
=
mh
->
GetTimeError
();
th
.
dt
=
mh
->
GetTimeError
();
// th.iSector = 0;
...
...
@@ -689,7 +689,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
// th.x = pt->GetX( th.z );// + gRandom->Gaus(0,th.dx);
//
// th.y = pt->GetY(th.z);// + gRandom->Gaus(0,th.dy);
// th.time = pt->GetTime(); //+ gRandom->Gaus(0,th.t
_er
);
// th.time = pt->GetTime(); //+ gRandom->Gaus(0,th.
d
t);
//
// L1Station& st = algo->vStations[th.iStation];
// th.u_front =
...
...
@@ -724,7 +724,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
th
.
time
=
mh
->
GetTime
();
th
.
t_er
=
mh
->
GetTimeError
();
th
.
dt
=
mh
->
GetTimeError
();
// th.iSector = 0;
th
.
iStripF
=
firstDetStrip
+
j
;
...
...
@@ -830,7 +830,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
th
.
time
=
mh
->
GetTime
();
th
.
t
_er
=
mh
->
GetTimeError
();
th
.
d
t
=
mh
->
GetTimeError
();
th
.
dx
=
mh
->
GetDx
();
th
.
dy
=
mh
->
GetDy
();
...
...
@@ -885,7 +885,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
// th.x = pt->GetX() + gRandom->Gaus(0,th.dx);
//
// th.y = pt->GetY()+ gRandom->Gaus(0,th.dy);
// th.time = pt->GetTime()+ gRandom->Gaus(0,th.t
_er
);
// th.time = pt->GetTime()+ gRandom->Gaus(0,th.
d
t);
//
// L1Station &st = algo->vStations[th.iStation];
// th.u_front = th.x*st.frontInfo.cos_phi[0] + th.y*st.frontInfo.sin_phi[0];
...
...
@@ -952,14 +952,14 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
assert
(
th
.
iStripF
>=
0
||
th
.
iStripF
<
NStrips
);
assert
(
th
.
iStripB
>=
0
||
th
.
iStripB
<
NStrips
);
L1
Sts
Hit
h
;
L1Hit
h
;
h
.
f
=
th
.
iStripF
;
h
.
b
=
th
.
iStripB
;
h
.
ID
=
th
.
id
;
h
.
t
_reco
=
th
.
time
;
h
.
t
_er
=
th
.
t
_er
;
h
.
t
=
th
.
time
;
h
.
d
t
=
th
.
d
t
;
// h.track = th.track;
// h.dx = th.dx;
// h.dy = th.dy;
...
...
@@ -1040,7 +1040,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
}
// save hit
vStsHits
.
push_back
(
CbmL1
Sts
Hit
(
fData
->
vStsHits
.
size
(),
th
.
ExtIndex
,
th
.
Det
));
vStsHits
.
push_back
(
CbmL1Hit
(
fData
->
vStsHits
.
size
(),
th
.
ExtIndex
,
th
.
Det
));
vStsHits
[
vStsHits
.
size
()
-
1
].
x
=
th
.
x
;
vStsHits
[
vStsHits
.
size
()
-
1
].
y
=
th
.
y
;
...
...
@@ -1359,13 +1359,13 @@ bool CbmL1::ReadMCPoint(CbmL1MCPoint* MC, int iPoint, int file, int event, int M
bool
CbmL1
::
ReadMCPoint
(
CbmL1MCPoint
*
/*MC*/
,
int
/*iPoint*/
,
int
/*MVD*/
)
{
return
0
;
}
/// Procedure for match hits and MCPoints.
/// Read information about correspondence between hits and mcpoints and fill CbmL1MCPoint::hitIds and CbmL1
Sts
Hit::mcPointIds arrays
/// Read information about correspondence between hits and mcpoints and fill CbmL1MCPoint::hitIds and CbmL1Hit::mcPointIds arrays
/// should be called after fill of algo
void
CbmL1
::
HitMatch
()
{
const
int
NHits
=
vStsHits
.
size
();
for
(
int
iH
=
0
;
iH
<
NHits
;
iH
++
)
{
CbmL1
Sts
Hit
&
hit
=
vStsHits
[
iH
];
CbmL1Hit
&
hit
=
vStsHits
[
iH
];
if
(
hit
.
Det
==
1
)
{
CbmStsHit
*
sh
=
L1_DYNAMIC_CAST
<
CbmStsHit
*>
(
listStsHits
->
At
(
vStsHits
[
iH
].
extIndex
));
...
...
reco/L1/CbmL1StsHit.h
deleted
100644 → 0
View file @
489c6f7e
/* Copyright (C) 2010-2021 Frankfurt Institute for Advanced Studies, Goethe-Universität Frankfurt, Frankfurt
SPDX-License-Identifier: GPL-3.0-only
Authors: Igor Kulakov [committer], Valentina Akishina, Maksym Zyzak */
#ifndef _CbmL1StsHit_h_
#define _CbmL1StsHit_h_
#include <vector>
using
std
::
vector
;
// hits with hit-mcpoint match information
class
CbmL1StsHit
{
public:
CbmL1StsHit
()
:
hitId
(
0
)
,
extIndex
(
0
)
,
Det
(
0
)
,
mcPointIds
()
,
x
(
0.
)
,
y
(
0.
)
,
t
(
0.
)
,
f
(
0.
)
,
b
(
0.
)
,
ID
(
0.
)
,
file
(
0
)
,
event
(
0
)
{};
CbmL1StsHit
(
int
hitId_
,
int
extIndex_
,
int
Det_
)
:
hitId
(
hitId_
)
,
extIndex
(
extIndex_
)
,
Det
(
Det_
)
,
mcPointIds
()
,
x
(
0.
)
,
y
(
0.
)
,
t
(
0.
)
,
f
(
0.
)
,
b
(
0.
)
,
ID
(
0.
)
,
file
(
0
)
,
event
(
0
)
{};
int
hitId
;
// index of L1StsHit in algo->vStsHits array. Should be equal to index of this in L1->vStsHits
int
extIndex
;
// index of hit in the TClonesArray array
int
Det
;
vector
<
int
>
mcPointIds
;
// indices of CbmL1MCPoint in L1->vMCPoints array
float
x
,
y
,
t
;
int
f
,
b
;
int
ID
;
int
file
;
int
event
;
};
#endif
reco/L1/CbmL1TrackFitter.cxx
View file @
c1d35ae2
...
...
@@ -28,7 +28,7 @@
#include "L1Algo/L1Algo.h"
#include "L1Algo/L1Extrapolation.h"
#include "L1Algo/L1Filtration.h"
#include "L1Algo/L1
Sts
Hit.h"
#include "L1Algo/L1Hit.h"
#include "L1Algo/L1TrackPar.h"
void
CbmL1
::
TrackFitter
(
vector
<
CbmL1Track
>&
Tracks
,
CbmL1Vtx
*
V
)
...
...
@@ -42,7 +42,7 @@ void CbmL1::TrackFitter(vector<CbmL1Track>& Tracks, CbmL1Vtx* V)
CbmL1Track &T = *i;
int stmin = 1000, stmax = -1000;
for ( vector<L1
Sts
Hit*>::iterator j = T.StsHits.begin(); j != T.StsHits.end(); ++j)
for ( vector<L1Hit*>::iterator j = T.StsHits.begin(); j != T.StsHits.end(); ++j)
{
if ((*j)->iStation < stmin ) stmin = (*j)->iStation;
if ((*j)->iStation > stmax ) stmax = (*j)->iStation;
...
...
@@ -56,7 +56,7 @@ void CbmL1::TrackFitter(vector<CbmL1Track>& Tracks, CbmL1Vtx* V)
static L1FieldRegion fld[20];
{
vector<L1
Sts
Hit*>::iterator ih2 = T.StsHits.begin(), ih1, ih0;
vector<L1Hit*>::iterator ih2 = T.StsHits.begin(), ih1, ih0;
ih1 = ih2;
ih1++;
ih0 = ih1;
...
...
@@ -96,7 +96,7 @@ void CbmL1::TrackFitter(vector<CbmL1Track>& Tracks, CbmL1Vtx* V)
fvec qp0 = tp.qp;
tp.NDF = 2;
tp.chi2 = 0;
vector<L1
Sts
Hit*>::iterator ih = T.StsHits.begin();
vector<L1Hit*>::iterator ih = T.StsHits.begin();
int ist = (*ih)->iStation;
L1Station *st = &(algo->vStations[ist]);
tp.x = (*ih)->x;
...
...
@@ -124,7 +124,7 @@ void CbmL1::TrackFitter(vector<CbmL1Track>& Tracks, CbmL1Vtx* V)
fvec qp0 = tp.qp;
tp.NDF = 2;
tp.chi2 = 0;
vector<L1
Sts
Hit*>::reverse_iterator ih = T.StsHits.rbegin();
vector<L1Hit*>::reverse_iterator ih = T.StsHits.rbegin();
int ist = (*ih)->iStation;
L1Station *st = &(algo->vStations[ist]);
tp.x = (*ih)->x;
...
...
reco/L1/L1Algo/L1Algo.cxx
View file @
c1d35ae2
...
...
@@ -50,10 +50,6 @@ L1Algo::L1Algo(int nThreads, int ExpectedHits)
,
TIME_CUT2
(
0.
)
,
MaxDZ
(
0.
)
,
#ifdef DRAW
draw
(
0
)
,
#endif
Pick_gather
(
0
)
,
PickNeighbour
(
0
)
,
// (PickNeighbour < dp/dp_error) => triplets are neighbours
...
...
@@ -316,7 +312,7 @@ void L1Algo::Init(const vector<fscal>& geo, const bool UseHitErrors, const bool
}
void
L1Algo
::
SetData
(
vector
<
L1
Sts
Hit
>&
StsHits_
,
int
nStsStrips_
,
const
vector
<
fscal
>&
StsZPos_
,
void
L1Algo
::
SetData
(
vector
<
L1Hit
>&
StsHits_
,
int
nStsStrips_
,
const
vector
<
fscal
>&
StsZPos_
,
L1Vector
<
unsigned
char
>&
SFlag_
,
const
THitI
*
StsHitsStartIndex_
,
const
THitI
*
StsHitsStopIndex_
)
{
...
...
@@ -393,7 +389,7 @@ void L1Algo::SetData(vector<L1StsHit>& StsHits_, int nStsStrips_, const vector<f
}
void
L1Algo
::
GetHitCoor
(
const
L1
Sts
Hit
&
_h
,
fscal
&
_x
,
fscal
&
_y
,
char
iS
)
void
L1Algo
::
GetHitCoor
(
const
L1Hit
&
_h
,
fscal
&
_x
,
fscal
&
_y
,
char
iS
)
{
L1Station
&
sta
=
vStations
[
int
(
iS
)];
fscal
u
=
_h
.
u
;
...
...
@@ -404,7 +400,7 @@ void L1Algo::GetHitCoor(const L1StsHit& _h, fscal& _x, fscal& _y, char iS)
_y
=
(
sta
.
yInfo
.
cos_phi
[
0
]
*
u
+
sta
.
yInfo
.
sin_phi
[
0
]
*
v
)
/
(
*
vStsZPos
)[
_h
.
iz
];
}
void
L1Algo
::
GetHitCoor
(
const
L1
Sts
Hit
&
_h
,
fscal
&
_x
,
fscal
&
_y
,
fscal
&
_z
,
const
L1Station
&
sta
)
void
L1Algo
::
GetHitCoor
(
const
L1Hit
&
_h
,
fscal
&
_x
,
fscal
&
_y
,
fscal
&
_z
,
const
L1Station
&
sta
)
{
fscal
u
=
_h
.
u
;
fscal
v
=
_h
.
v
;
...
...
@@ -466,25 +462,25 @@ void L1Algo::StripsToCoor(
}
/// full the hit point by hit information: takes hit as input (2 strips) and creates hit_point with all coordinates (x,y,z,u,v, n - event number);
L1HitPoint
L1Algo
::
CreateHitPoint
(
const
L1
Sts
Hit
&
hit
,
char
/*ista*/
)
L1HitPoint
L1Algo
::
CreateHitPoint
(
const
L1Hit
&
hit
,
char
/*ista*/
)
/// hit and station number
{
// L1Station& sta = vStations[int(ista)];
const
float
&
z
=
(
*
vStsZPos
)[
hit
.
iz
];
const
float
&
time
=
hit
.
t
_reco
;
return
L1HitPoint
(
z
,
hit
.
u
,
hit
.
v
,
hit
.
du
,
hit
.
dv
,
time
,
hit
.
t
_er
);
const
float
&
time
=
hit
.
t
;
return
L1HitPoint
(
z
,
hit
.
u
,
hit
.
v
,
hit
.
du
,
hit
.
dv
,
time
,
hit
.
d
t
);
}
void
L1Algo
::
CreateHitPoint
(
const
L1
Sts
Hit
&
hit
,
char
/*ista*/
,
L1HitPoint
&
point
)
void
L1Algo
::
CreateHitPoint
(
const
L1Hit
&
hit
,
char
/*ista*/
,
L1HitPoint
&
point
)
/// hit and station number
{
// L1Station& sta = vStations[int(ista)];
const
float
&
z
=
(
*
vStsZPos
)[
hit
.
iz
];
const
float
&
time
=
hit
.
t
_reco
;
const
float
&
time
=
hit
.
t
;
const
float
&
du_
=
hit
.
du
;
const
float
&
dv_
=
hit
.
dv
;
point
.
Set
(
z
,
hit
.
u
,
hit
.
v
,
du_
,
dv_
,
time
,
hit
.
t
_er
);
point
.
Set
(
z
,
hit
.
u
,
hit
.
v
,
du_
,
dv_
,
time
,
hit
.
d
t
);
// point.Set(x,y,z,v.f,u.f, time, n1, hit.time1, 2.9 ); // TODO put correct time error from the hit
}
...
...
reco/L1/L1Algo/L1Algo.h
View file @
c1d35ae2
...
...
@@ -11,7 +11,7 @@
// #define PULLS // triplets pulls
// #define TRIP_PERFORMANCE // triplets efficiencies
// #define DOUB_PERFORMANCE // doublets efficiencies
//#define DRAW // event display
//
#define DRAW // event display
#ifdef DRAW
class
L1AlgoDraw
;
#include "CbmL1Track.h"
...
...
@@ -45,11 +45,11 @@ class L1AlgoDraw;
#include "L1Branch.h"
#include "L1Field.h"
#include "L1Grid.h"
#include "L1Hit.h"
#include "L1HitPoint.h"
#include "L1HitsSortHelper.h"
#include "L1Portion.h"
#include "L1Station.h"
#include "L1StsHit.h"
#include "L1Track.h"
#include "L1TrackPar.h"
#include "L1TrackParFit.h"
...
...
@@ -131,15 +131,15 @@ public:
#ifdef DRAW
L1AlgoDraw
*
draw
;
L1AlgoDraw
*
draw
{
nullptr
}
;
void
DrawRecoTracksTime
(
const
vector
<
CbmL1Track
>&
tracks
);
#endif
void
Init
(
const
vector
<
fscal
>&
geo
,
const
bool
UseHitErrors
,
const
bool
mCBMmode
);
void
SetData
(
vector
<
L1
Sts
Hit
>&
StsHits_
,
int
nStsStrips_
,
const
vector
<
fscal
>&
StsZPos_
,
L1Vector
<
unsigned
char
>&
SFlag_
,
const
THitI
*
StsHitsStartIndex_
,
const
THitI
*
StsHitsStopIndex_
);
void
SetData
(
vector
<
L1Hit
>&
StsHits_
,
int
nStsStrips_
,
const
vector
<
fscal
>&
StsZPos_
,
L1Vector
<
unsigned
char
>&
SFlag_
,
const
THitI
*
StsHitsStartIndex_
,
const
THitI
*
StsHitsStopIndex_
);
void
PrintHits
();
...
...
@@ -170,7 +170,7 @@ public:
int
NStsStrips
;
// number of strips
const
vector
<
fscal
>*
vStsZPos
;
// all possible z-positions of hits
vector
<
L1
Sts
Hit
>*
vStsHits
;
// hits as a combination of front-, backstrips and z-position
vector
<
L1Hit
>*
vStsHits
;
// hits as a combination of front-, backstrips and z-position
L1Grid
vGrid
[
MaxNStations
];
// hits as a combination of front-, backstrips and z-position
L1Grid
vGridTime
[
MaxNStations
];
...
...
@@ -188,9 +188,9 @@ public:
// L1Branch* pointer;
unsigned
int
NHitsIsecAll
;
vector
<
L1
Sts
Hit
>
vStsDontUsedHits_A
;
vector
<
L1
Sts
Hit
>
vStsDontUsedHits_B
;
vector
<
L1
Sts
Hit
>
vStsDontUsedHits_Buf
;
vector
<
L1Hit
>
vStsDontUsedHits_A
;
vector
<
L1Hit
>
vStsDontUsedHits_B
;
vector
<
L1Hit
>
vStsDontUsedHits_Buf
;
vector
<
L1HitPoint
>
vStsDontUsedHitsxy_A
;
vector
<
L1HitPoint
>
vStsDontUsedHitsxy_buf
;
vector
<
L1HitPoint
>
vStsDontUsedHitsxy_B
;
...
...
@@ -241,7 +241,7 @@ public:
/// --- data used during finding iterations
int
isec
;
// iteration
vector
<
L1
Sts
Hit
>*
vStsHitsUnused
;
vector
<
L1Hit
>*
vStsHitsUnused
;
vector
<
THitI
>*
RealIHitP
;
vector
<
THitI
>*
RealIHitPBuf
;
vector
<
L1HitPoint
>*
vStsHitPointsUnused
;
...
...
@@ -275,7 +275,7 @@ public:
const
L1FieldRegion
&
GetVtxFieldRegion
()
const
{
return
vtxFieldRegion
;
}
/// ----- Hit-point-strips conversion routines ------
void
GetHitCoor
(
const
L1
Sts
Hit
&
_h
,
fscal
&
_x
,
fscal
&
_y
,
fscal
&
_z
,
const
L1Station
&
sta
);
void
GetHitCoor
(
const
L1Hit
&
_h
,
fscal
&
_x
,
fscal
&
_y
,
fscal
&
_z
,
const
L1Station
&
sta
);
void
dUdV_to_dY
(
const
fvec
&
u
,
const
fvec
&
v
,
fvec
&
_y
,
const
L1Station
&
sta
);
...
...
@@ -283,16 +283,16 @@ public:
void
dUdV_to_dXdY
(
const
fvec
&
u
,
const
fvec
&
v
,
fvec
&
_xy
,
const
L1Station
&
sta
);
void
GetHitCoor
(
const
L1
Sts
Hit
&
_h
,
fscal
&
_x
,
fscal
&
_y
,
char
iS
);
void
GetHitCoor
(
const
L1Hit
&
_h
,
fscal
&
_x
,
fscal
&
_y
,
char
iS
);
void
StripsToCoor
(
const
fscal
&
u
,
const
fscal
&
v
,
fscal
&
x
,
fscal
&
y
,
const
L1Station
&
sta
)
const
;
// convert strip positions to coordinates
void
StripsToCoor
(
const
fscal
&
u
,
const
fscal
&
v
,
fvec
&
x
,
fvec
&
y
,
const
L1Station
&
sta
)
const
;
// convert strip positions to coordinates
void
StripsToCoor
(
const
fvec
&
u
,
const
fvec
&
v
,
fvec
&
x
,
fvec
&
y
,
const
L1Station
&
sta
)
const
;
L1HitPoint
CreateHitPoint
(
const
L1
Sts
Hit
&
hit
,
L1HitPoint
CreateHitPoint
(
const
L1Hit
&
hit
,
char
ista
);
// full the hit point by hit information.
void
CreateHitPoint
(
const
L1
Sts
Hit
&
hit
,
char
ista
,
L1HitPoint
&
point
);
void
CreateHitPoint
(
const
L1Hit
&
hit
,
char
ista
,
L1HitPoint
&
point
);