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
Mehulkumar Shiroya
cbmroot
Commits
e906a614
Commit
e906a614
authored
Jul 22, 2021
by
Sergey Gorbunov
Committed by
Florian Uhlig
Jul 23, 2021
Browse files
L1: remove "using *" from the headers
parent
bdf67354
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
442 additions
and
564 deletions
+442
-564
analysis/common/analysis_tree_converter/CbmStsTracksConverter.cxx
.../common/analysis_tree_converter/CbmStsTracksConverter.cxx
+10
-10
reco/KF/KFQA/CbmKFPartEfficiencies.h
reco/KF/KFQA/CbmKFPartEfficiencies.h
+1
-1
reco/L1/CbmL1.cxx
reco/L1/CbmL1.cxx
+25
-25
reco/L1/CbmL1Counters.h
reco/L1/CbmL1Counters.h
+30
-39
reco/L1/CbmL1Hit.h
reco/L1/CbmL1Hit.h
+5
-6
reco/L1/CbmL1MCPoint.h
reco/L1/CbmL1MCPoint.h
+33
-45
reco/L1/CbmL1MCTrack.cxx
reco/L1/CbmL1MCTrack.cxx
+12
-35
reco/L1/CbmL1MCTrack.h
reco/L1/CbmL1MCTrack.h
+45
-84
reco/L1/CbmL1Performance.cxx
reco/L1/CbmL1Performance.cxx
+8
-11
reco/L1/CbmL1ReadEvent.cxx
reco/L1/CbmL1ReadEvent.cxx
+13
-48
reco/L1/L1Algo/L1AlgoTBB.h
reco/L1/L1Algo/L1AlgoTBB.h
+227
-223
reco/L1/L1Algo/L1CATrackFinder.cxx
reco/L1/L1Algo/L1CATrackFinder.cxx
+1
-1
reco/L1/L1Algo/L1Def.h
reco/L1/L1Algo/L1Def.h
+0
-2
reco/L1/L1Algo/L1EventEfficiencies.h
reco/L1/L1Algo/L1EventEfficiencies.h
+8
-10
reco/L1/L1Algo/L1Grid.h
reco/L1/L1Algo/L1Grid.h
+5
-7
reco/L1/L1Algo/L1Vector.h
reco/L1/L1Algo/L1Vector.h
+7
-2
reco/L1/L1AlgoInputData.h
reco/L1/L1AlgoInputData.h
+3
-5
reco/eventbuilder/tracks/CbmEbEventEfficiencies.h
reco/eventbuilder/tracks/CbmEbEventEfficiencies.h
+9
-10
No files found.
analysis/common/analysis_tree_converter/CbmStsTracksConverter.cxx
View file @
e906a614
...
...
@@ -94,10 +94,10 @@ void CbmStsTracksConverter::Init()
// TODO misleading name, move field filling somewhere else?
float
CbmStsTracksConverter
::
ExtrapolateToVertex
(
CbmStsTrack
*
sts_track
,
AnalysisTree
::
Track
&
track
,
int
pdg
)
{
vector
<
CbmStsTrack
>
tracks
=
{
*
sts_track
};
std
::
vector
<
CbmStsTrack
>
tracks
=
{
*
sts_track
};
CbmL1PFFitter
fitter
;
vector
<
float
>
chi2_to_vtx
;
vector
<
L1FieldRegion
>
field
;
std
::
vector
<
float
>
chi2_to_vtx
;
std
::
vector
<
L1FieldRegion
>
field
;
CbmKFVertex
kfVertex
=
CbmKFVertex
(
*
cbm_prim_vertex_
);
if
(
is_reproduce_cbmkfpf_
)
{
std
::
vector
<
int
>
pdgVector
=
{
pdg
};
...
...
@@ -210,15 +210,15 @@ bool CbmStsTracksConverter::IsGoodCovMatrix(const CbmStsTrack* sts_track) const
}
// Cuts, coded in MZ's CbmKFParticleFinder.cxx
bool
ok
=
true
;
ok
=
ok
&&
isfinite
(
sts_track
->
GetParamFirst
()
->
GetX
());
ok
=
ok
&&
isfinite
(
sts_track
->
GetParamFirst
()
->
GetY
());
ok
=
ok
&&
isfinite
(
sts_track
->
GetParamFirst
()
->
GetZ
());
ok
=
ok
&&
isfinite
(
sts_track
->
GetParamFirst
()
->
GetTx
());
ok
=
ok
&&
isfinite
(
sts_track
->
GetParamFirst
()
->
GetTy
());
ok
=
ok
&&
isfinite
(
sts_track
->
GetParamFirst
()
->
GetQp
());
ok
=
ok
&&
std
::
isfinite
(
sts_track
->
GetParamFirst
()
->
GetX
());
ok
=
ok
&&
std
::
isfinite
(
sts_track
->
GetParamFirst
()
->
GetY
());
ok
=
ok
&&
std
::
isfinite
(
sts_track
->
GetParamFirst
()
->
GetZ
());
ok
=
ok
&&
std
::
isfinite
(
sts_track
->
GetParamFirst
()
->
GetTx
());
ok
=
ok
&&
std
::
isfinite
(
sts_track
->
GetParamFirst
()
->
GetTy
());
ok
=
ok
&&
std
::
isfinite
(
sts_track
->
GetParamFirst
()
->
GetQp
());
for
(
auto
element
:
cov_matrix
)
{
ok
=
ok
&&
isfinite
(
element
);
ok
=
ok
&&
std
::
isfinite
(
element
);
}
ok
=
ok
&&
(
cov_matrix
[
0
]
<
1.
&&
cov_matrix
[
0
]
>
0.
)
&&
(
cov_matrix
[
2
]
<
1.
&&
cov_matrix
[
2
]
>
0.
)
&&
(
cov_matrix
[
5
]
<
1.
&&
cov_matrix
[
5
]
>
0.
)
&&
(
cov_matrix
[
9
]
<
1.
&&
cov_matrix
[
9
]
>
0.
)
...
...
reco/KF/KFQA/CbmKFPartEfficiencies.h
View file @
e906a614
...
...
@@ -523,7 +523,7 @@ public:
<<
" | "
<<
" N MC "
<<
std
::
endl
;
int
NCounters
=
mc
.
NC
ounters
;
int
NCounters
=
mc
.
GetNc
ounters
()
;
for
(
int
iC
=
0
;
iC
<
NCounters
;
iC
++
)
{
std
::
cout
<<
names
[
iC
]
<<
" : "
<<
std
::
setw
(
6
)
<<
ratio_reco
.
counters
[
iC
]
<<
" / "
<<
std
::
setw
(
6
)
<<
ratio_ghost
.
counters
[
iC
]
// particles w\o MCParticle
...
...
reco/L1/CbmL1.cxx
View file @
e906a614
...
...
@@ -1579,7 +1579,7 @@ void CbmL1::WriteSTAPGeoData(const L1Vector<float>& geo_)
{
// write geo in file
TString
fgeo_name
=
fSTAPDataDir
+
"geo_algo.txt"
;
ofstream
fgeo
(
fgeo_name
);
std
::
ofstream
fgeo
(
fgeo_name
);
fgeo
.
setf
(
ios
::
scientific
,
ios
::
floatfield
);
fgeo
.
precision
(
20
);
int
size
=
geo_
.
size
();
...
...
@@ -1595,15 +1595,15 @@ void CbmL1::WriteSTAPAlgoData() // must be called after ReadEvent
{
// write algo data in file
static
int
vNEvent
=
1
;
fstream
fadata
;
std
::
fstream
fadata
;
TString
fadata_name
=
fSTAPDataDir
+
"data_algo.txt"
;
// if ( vNEvent <= maxNEvent ) {
if
(
1
)
{
if
(
vNEvent
==
1
)
fadata
.
open
(
fadata_name
,
fstream
::
out
);
// begin new file
if
(
vNEvent
==
1
)
fadata
.
open
(
fadata_name
,
std
::
fstream
::
out
);
// begin new file
else
fadata
.
open
(
fadata_name
,
fstream
::
out
|
fstream
::
app
);
fadata
.
open
(
fadata_name
,
std
::
fstream
::
out
|
std
::
fstream
::
app
);
fadata
<<
"Event:"
<<
" "
;
...
...
@@ -1675,8 +1675,8 @@ void CbmL1::WriteSTAPAlgoData() // must be called after ReadEvent
void
CbmL1
::
WriteSTAPPerfData
()
// must be called after ReadEvent
{
fstream
fpdata
;
fpdata
<<
setprecision
(
8
);
std
::
fstream
fpdata
;
fpdata
<<
std
::
setprecision
(
8
);
static
int
vNEvent
=
1
;
...
...
@@ -1685,9 +1685,9 @@ void CbmL1::WriteSTAPPerfData() // must be called after ReadEvent
// if ( vNEvent <= maxNEvent ) {
if
(
1
)
{
if
(
vNEvent
==
1
)
fpdata
.
open
(
fpdata_name
,
fstream
::
out
);
// begin new file
if
(
vNEvent
==
1
)
fpdata
.
open
(
fpdata_name
,
std
::
fstream
::
out
);
// begin new file
else
fpdata
.
open
(
fpdata_name
,
fstream
::
out
|
fstream
::
app
);
fpdata
.
open
(
fpdata_name
,
std
::
fstream
::
out
|
std
::
fstream
::
app
);
fpdata
<<
"Event: "
;
fpdata
<<
vNEvent
<<
endl
;
...
...
@@ -1822,7 +1822,7 @@ void CbmL1::WriteSTAPPerfData() // must be called after ReadEvent
vNEvent
++
;
}
// void CbmL1::WriteSTAPPerfData()
istream
&
CbmL1
::
eatwhite
(
istream
&
is
)
// skip spaces
std
::
istream
&
CbmL1
::
eatwhite
(
std
::
istream
&
is
)
// skip spaces
{
char
c
;
while
(
is
.
get
(
c
))
{
...
...
@@ -1839,7 +1839,7 @@ istream& CbmL1::eatwhite(istream& is) // skip spaces
void
CbmL1
::
ReadSTAPGeoData
(
L1Vector
<
fscal
>&
geo_
,
int
&
size
)
{
TString
fgeo_name
=
fSTAPDataDir
+
"geo_algo.txt"
;
ifstream
fgeo
(
fgeo_name
);
std
::
ifstream
fgeo
(
fgeo_name
);
cout
<<
"-I- CbmL1: Read geometry from file "
<<
fgeo_name
<<
endl
;
int
i
;
...
...
@@ -1856,11 +1856,11 @@ void CbmL1::ReadSTAPGeoData(L1Vector<fscal>& geo_, int& size)
void
CbmL1
::
ReadSTAPAlgoData
()
{
static
int
nEvent
=
1
;
static
fstream
fadata
;
static
std
::
fstream
fadata
;
TString
fadata_name
=
fSTAPDataDir
+
"data_algo.txt"
;
// if (nEvent <= maxNEvent){
if
(
1
)
{
if
(
nEvent
==
1
)
fadata
.
open
(
fadata_name
,
fstream
::
in
);
if
(
nEvent
==
1
)
fadata
.
open
(
fadata_name
,
std
::
fstream
::
in
);
if
(
algo
->
vStsHits
)
algo
->
vStsHits
->
clear
();
algo
->
NStsStrips
=
0
;
...
...
@@ -1931,11 +1931,11 @@ void CbmL1::ReadSTAPAlgoData()
void
CbmL1
::
ReadSTAPPerfData
()
{
static
int
nEvent
=
1
;
static
fstream
fpdata
;
static
std
::
fstream
fpdata
;
TString
fpdata_name
=
fSTAPDataDir
+
"data_perfo.txt"
;
// if (nEvent <= maxNEvent){
if
(
1
)
{
if
(
nEvent
==
1
)
{
fpdata
.
open
(
fpdata_name
,
fstream
::
in
);
};
if
(
nEvent
==
1
)
{
fpdata
.
open
(
fpdata_name
,
std
::
fstream
::
in
);
};
vMCPoints
.
clear
();
vMCTracks
.
clear
();
...
...
@@ -2113,10 +2113,10 @@ void CbmL1::WriteSIMDKFData()
if
(
first
)
{
FairField
*
dMF
=
CbmKF
::
Instance
()
->
GetMagneticField
();
fstream
FileGeo
;
std
::
fstream
FileGeo
;
FileGeo
.
open
(
"geo.dat"
,
ios
::
out
);
fstream
FieldCheck
;
std
::
fstream
FieldCheck
;
FieldCheck
.
open
(
"field.dat"
,
ios
::
out
);
Double_t
bfg
[
3
],
rfg
[
3
];
...
...
@@ -2277,19 +2277,19 @@ void CbmL1::WriteSIMDKFData()
///Write Tracks and MC Tracks
static
int
TrNumber
=
0
;
fstream
Tracks
,
McTracksCentr
,
McTracksIn
,
McTracksOut
;
std
::
fstream
Tracks
,
McTracksCentr
,
McTracksIn
,
McTracksOut
;
if
(
first
)
{
Tracks
.
open
(
"tracks.dat"
,
fstream
::
out
);
McTracksCentr
.
open
(
"mctrackscentr.dat"
,
fstream
::
out
);
McTracksIn
.
open
(
"mctracksin.dat"
,
fstream
::
out
);
McTracksOut
.
open
(
"mctracksout.dat"
,
fstream
::
out
);
Tracks
.
open
(
"tracks.dat"
,
std
::
fstream
::
out
);
McTracksCentr
.
open
(
"mctrackscentr.dat"
,
std
::
fstream
::
out
);
McTracksIn
.
open
(
"mctracksin.dat"
,
std
::
fstream
::
out
);
McTracksOut
.
open
(
"mctracksout.dat"
,
std
::
fstream
::
out
);
first
=
0
;
}
else
{
Tracks
.
open
(
"tracks.dat"
,
fstream
::
out
|
fstream
::
app
);
McTracksCentr
.
open
(
"mctrackscentr.dat"
,
fstream
::
out
|
fstream
::
app
);
McTracksIn
.
open
(
"mctracksin.dat"
,
fstream
::
out
|
fstream
::
app
);
McTracksOut
.
open
(
"mctracksout.dat"
,
fstream
::
out
|
fstream
::
app
);
Tracks
.
open
(
"tracks.dat"
,
std
::
fstream
::
out
|
std
::
fstream
::
app
);
McTracksCentr
.
open
(
"mctrackscentr.dat"
,
std
::
fstream
::
out
|
std
::
fstream
::
app
);
McTracksIn
.
open
(
"mctracksin.dat"
,
std
::
fstream
::
out
|
std
::
fstream
::
app
);
McTracksOut
.
open
(
"mctracksout.dat"
,
std
::
fstream
::
out
|
std
::
fstream
::
app
);
}
for
(
L1Vector
<
CbmL1Track
>::
iterator
RecTrack
=
vRTracks
.
begin
();
RecTrack
!=
vRTracks
.
end
();
++
RecTrack
)
{
...
...
reco/L1/CbmL1Counters.h
View file @
e906a614
...
...
@@ -11,39 +11,32 @@
#include <iomanip>
#include <iostream>
#include <map>
#include <vector>
using
std
::
ios
;
using
std
::
map
;
using
std
::
setw
;
using
std
::
vector
;
#include "L1Vector.h"
/// counters used for efficiency calculation
template
<
typename
T
>
struct
TL1TracksCatCounters
// counters for different tracks categories
{
TL1TracksCatCounters
()
:
NCounters
(
0
),
counters
()
{
counters
.
clear
();
};
TL1TracksCatCounters
(
int
nCounters
)
:
NCounters
(
nCounters
),
counters
()
{
counters
.
resize
(
NCounters
,
T
(
0
));
};
TL1TracksCatCounters
()
{
counters
.
reserve
(
20
);
}
void
AddCounter
()
{
NCounters
++
;
counters
.
push_back
(
T
(
0
));
};
void
AddCounters
(
int
nCounters
)
{
NCounters
+=
nCounters
;
counters
.
resize
(
NCounters
,
T
(
0
));
};
TL1TracksCatCounters
(
int
nCounters
)
{
counters
.
reset
(
nCounters
,
T
(
0
));
};
int
GetNcounters
()
const
{
return
counters
.
size
();
}
void
AddCounter
()
{
counters
.
push_back_no_warning
(
T
(
0
));
};
void
AddCounters
(
int
nCounters
)
{
counters
.
enlarge
(
GetNcounters
()
+
nCounters
,
T
(
0
));
};
TL1TracksCatCounters
&
operator
+=
(
TL1TracksCatCounters
&
a
)
{
if
(
NC
ounters
!=
a
.
NC
ounters
)
{
if
(
GetNc
ounters
()
!=
a
.
GetNc
ounters
()
)
{
std
::
cout
<<
" TL1TracksCatCounters: Error. Addition of counters of "
"different sizes: "
<<
NC
ounters
<<
" "
<<
a
.
NC
ounters
<<
std
::
endl
;
<<
GetNc
ounters
()
<<
" "
<<
a
.
GetNc
ounters
()
<<
std
::
endl
;
}
else
{
for
(
int
iC
=
0
;
iC
<
NC
ounters
;
iC
++
)
{
for
(
int
iC
=
0
;
iC
<
GetNc
ounters
()
;
iC
++
)
{
counters
[
iC
]
+=
a
.
counters
[
iC
];
}
}
...
...
@@ -60,14 +53,14 @@ struct TL1TracksCatCounters // counters for different tracks categories
template
<
typename
T2
>
TL1TracksCatCounters
<
double
>
operator
/
(
TL1TracksCatCounters
<
T2
>&
a
)
{
TL1TracksCatCounters
<
double
>
b
(
NC
ounters
);
if
(
NC
ounters
!=
a
.
NC
ounters
)
{
TL1TracksCatCounters
<
double
>
b
(
GetNc
ounters
()
);
if
(
GetNc
ounters
()
!=
a
.
GetNc
ounters
()
)
{
std
::
cout
<<
" TL1TracksCatCounters: Error. Addition of counters of "
"different sizes: "
<<
NC
ounters
<<
" "
<<
a
.
NC
ounters
<<
std
::
endl
;
<<
GetNc
ounters
()
<<
" "
<<
a
.
GetNc
ounters
()
<<
std
::
endl
;
}
else
{
for
(
int
iC
=
0
;
iC
<
NC
ounters
;
iC
++
)
{
for
(
int
iC
=
0
;
iC
<
GetNc
ounters
()
;
iC
++
)
{
b
.
counters
[
iC
]
=
Div
(
counters
[
iC
],
a
.
counters
[
iC
]);
}
}
...
...
@@ -77,8 +70,8 @@ struct TL1TracksCatCounters // counters for different tracks categories
template
<
typename
T2
>
TL1TracksCatCounters
<
T2
>
operator
/
(
double
a
)
{
TL1TracksCatCounters
<
T2
>
b
(
NC
ounters
);
for
(
int
iC
=
0
;
iC
<
NC
ounters
;
iC
++
)
{
TL1TracksCatCounters
<
T2
>
b
(
GetNc
ounters
()
);
for
(
int
iC
=
0
;
iC
<
GetNc
ounters
()
;
iC
++
)
{
b
.
counters
[
iC
]
=
static_cast
<
T2
>
(
Div
(
counters
[
iC
],
a
));
}
return
b
;
...
...
@@ -86,7 +79,7 @@ struct TL1TracksCatCounters // counters for different tracks categories
friend
std
::
fstream
&
operator
<<
(
std
::
fstream
&
strm
,
const
TL1TracksCatCounters
<
T
>&
a
)
{
strm
<<
a
.
NC
ounters
<<
" "
<<
a
.
counters
.
size
()
<<
" "
;
strm
<<
a
.
GetNc
ounters
()
<<
" "
<<
a
.
counters
.
size
()
<<
" "
;
for
(
unsigned
int
iV
=
0
;
iV
<
a
.
counters
.
size
();
iV
++
)
strm
<<
a
.
counters
[
iV
]
<<
" "
;
strm
<<
std
::
endl
;
...
...
@@ -95,7 +88,7 @@ struct TL1TracksCatCounters // counters for different tracks categories
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
strm
,
const
TL1TracksCatCounters
<
T
>&
a
)
{
strm
<<
a
.
NCounters
<<
" "
<<
a
.
counters
.
size
()
<<
" "
;
strm
<<
a
.
counters
.
size
()
<<
" "
;
for
(
unsigned
int
iV
=
0
;
iV
<
a
.
counters
.
size
();
iV
++
)
strm
<<
a
.
counters
[
iV
]
<<
" "
;
strm
<<
std
::
endl
;
...
...
@@ -106,9 +99,8 @@ struct TL1TracksCatCounters // counters for different tracks categories
{
int
tmp
;
strm
>>
tmp
;
a
.
NCounters
=
tmp
;
strm
>>
tmp
;
a
.
counters
.
resize
(
tmp
,
T
(
0
));
a
.
counters
.
clear
();
a
.
counters
.
reset
(
tmp
,
T
(
0
));
for
(
int
iV
=
0
;
iV
<
tmp
;
iV
++
)
{
T
tmp1
;
strm
>>
tmp1
;
...
...
@@ -121,8 +113,7 @@ private:
double
Div
(
double
a
,
double
b
)
{
return
(
b
>
0
)
?
a
/
b
:
-
1.
;
};
public:
int
NCounters
;
vector
<
T
>
counters
;
L1Vector
<
T
>
counters
{
"TL1TracksCatCounters::counters"
};
};
struct
TL1Efficiencies
{
...
...
@@ -153,8 +144,8 @@ struct TL1Efficiencies {
void
PrintEff
();
vector
<
TString
>
names
;
// names counters indexed by index of counter
map
<
TString
,
int
>
indices
;
// indices of counters indexed by a counter shortname
std
::
vector
<
TString
>
names
;
// names counters indexed by index of counter
std
::
map
<
TString
,
int
>
indices
;
// indices of counters indexed by a counter shortname
TL1TracksCatCounters
<
double
>
ratio_reco
;
double
ratio_ghosts
;
...
...
@@ -212,16 +203,16 @@ inline void TL1Efficiencies::Inc(bool isReco, TString name)
inline
void
TL1Efficiencies
::
PrintEff
()
{
std
::
cout
.
setf
(
ios
::
fixed
);
std
::
cout
.
setf
(
ios
::
showpoint
);
std
::
cout
.
setf
(
std
::
ios
::
fixed
);
std
::
cout
.
setf
(
std
::
ios
::
showpoint
);
std
::
cout
.
precision
(
3
);
std
::
cout
.
setf
(
ios
::
right
);
std
::
cout
.
setf
(
std
::
ios
::
right
);
std
::
cout
<<
"Track category : "
<<
" Eff "
<<
" | "
<<
"All MC"
<<
std
::
endl
;
int
NCounters
=
mc
.
NC
ounters
;
int
NCounters
=
mc
.
GetNc
ounters
()
;
for
(
int
iC
=
0
;
iC
<
NCounters
;
iC
++
)
{
std
::
cout
<<
names
[
iC
]
<<
" : "
<<
ratio_reco
.
counters
[
iC
]
<<
" | "
<<
mc
.
counters
[
iC
]
<<
std
::
endl
;
}
...
...
reco/L1/CbmL1Hit.h
View file @
e906a614
...
...
@@ -5,22 +5,20 @@
#ifndef _CbmL1Hit_h_
#define _CbmL1Hit_h_
#include <vector>
using
std
::
vector
;
#include "L1Vector.h"
///
/// hits with hit-mcpoint match information
///
class
CbmL1Hit
{
public:
CbmL1Hit
()
{}
;
struct
CbmL1Hit
{
CbmL1Hit
()
=
default
;
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
...
...
@@ -29,6 +27,7 @@ public:
int
ID
=
0
;
// TODO: check if this ID is redundant
int
file
=
0
;
// TODO: ??
int
event
=
0
;
// TODO: ??
L1Vector
<
int
>
mcPointIds
{
"CbmL1Hit::mcPointIds"
};
// indices of CbmL1MCPoint in L1->vMCPoints array
};
#endif
reco/L1/CbmL1MCPoint.h
View file @
e906a614
...
...
@@ -21,53 +21,12 @@
#ifndef CbmL1MCPoint_H
#define CbmL1MCPoint_H
#include <vector>
using
std
::
vector
;
#include "L1Vector.h"
struct
CbmL1MCPoint
{
CbmL1MCPoint
()
:
x
(
0
)
,
y
(
0
)
,
z
(
0
)
,
px
(
0
)
,
py
(
0
)
,
pz
(
0
)
,
xIn
(
0
)
,
yIn
(
0
)
,
zIn
(
0
)
,
pxIn
(
0
)
,
pyIn
(
0
)
,
pzIn
(
0
)
,
xOut
(
0
)
,
yOut
(
0
)
,
zOut
(
0
)
,
pxOut
(
0
)
,
pyOut
(
0
)
,
pzOut
(
0
)
,
p
(
0
)
,
q
(
0
)
,
mass
(
0
)
,
time
(
0
)
,
pdg
(
0
)
,
ID
(
0
)
,
mother_ID
(
0
)
,
iStation
(
0
)
,
pointId
(
-
1
)
,
file
(
-
1
)
,
event
(
-
1
)
,
hitIds
()
{
}
double
x
,
y
,
z
,
px
,
py
,
pz
;
double
xIn
,
yIn
,
zIn
,
pxIn
,
pyIn
,
pzIn
;
double
xOut
,
yOut
,
zOut
,
pxOut
,
pyOut
,
pzOut
;
double
p
,
q
,
mass
,
time
;
int
pdg
,
ID
,
mother_ID
;
int
iStation
;
int
pointId
;
int
file
;
int
event
;
CbmL1MCPoint
()
=
default
;
static
bool
compareIDz
(
const
CbmL1MCPoint
&
a
,
const
CbmL1MCPoint
&
b
)
{
return
(
a
.
ID
<
b
.
ID
)
||
((
a
.
ID
==
b
.
ID
)
&&
(
a
.
z
<
b
.
z
));
...
...
@@ -78,7 +37,36 @@ struct CbmL1MCPoint {
return
(
a
->
ID
<
b
->
ID
)
||
((
a
->
ID
==
b
->
ID
)
&&
(
a
->
z
<
b
->
z
));
}
vector
<
int
>
hitIds
;
// indices of CbmL1Hits in L1->vStsHits array
double
x
=
0
.;
double
y
=
0
.;
double
z
=
0
.;
double
px
=
0
.;
double
py
=
0
.;
double
pz
=
0
.;
double
xIn
=
0
.;
double
yIn
=
0
.;
double
zIn
=
0
.;
double
pxIn
=
0
.;
double
pyIn
=
0
.;
double
pzIn
=
0
.;
double
xOut
=
0
.;
double
yOut
=
0
.;
double
zOut
=
0
.;
double
pxOut
=
0
.;
double
pyOut
=
0
.;
double
pzOut
=
0
.;
double
p
=
0
.;
double
q
=
0
.;
double
mass
=
0
.;
double
time
=
0
.;
int
pdg
=
0
;
int
ID
=
0
;
int
mother_ID
=
0
;
int
iStation
=
0
;
int
pointId
=
-
1
;
int
file
=
-
1
;
int
event
=
-
1
;
L1Vector
<
int
>
hitIds
{
"CbmL1MCPoint::hitIds"
};
// indices of CbmL1Hits in L1->vStsHits array
};
#endif
reco/L1/CbmL1MCTrack.cxx
View file @
e906a614
...
...
@@ -29,41 +29,18 @@
CbmL1MCTrack
::
CbmL1MCTrack
(
double
mass_
,
double
q_
,
TVector3
vr
,
TLorentzVector
vp
,
int
_ID
,
int
_mother_ID
,
int
_pdg
)
:
mass
(
mass_
)
,
q
(
q_
)
,
p
(
0
)
,
x
(
0
)
,
y
(
0
)
,
z
(
0
)
,
px
(
0
)
,
py
(
0
)
,
pz
(
0
)
,
time
(
0
)
,
p
(
vp
.
P
())
,
x
(
vr
.
X
())
,
y
(
vr
.
Y
())
,
z
(
vr
.
Z
())
,
px
(
vp
.
Px
())
,
py
(
vp
.
Py
())
,
pz
(
vp
.
Pz
())
,
ID
(
_ID
)
,
iFile
(
0
)
,
iEvent
(
0
)
,
mother_ID
(
_mother_ID
)
,
pdg
(
_pdg
)
,
Points
()
,
StsHits
()
,
nMCContStations
(
0
)
,
nHitContStations
(
0
)
,
maxNStaMC
(
0
)
,
maxNSensorMC
(
0
)
,
maxNStaHits
(
0
)
,
nStations
(
0
)
,
nMCStations
(
0
)
,
isReconstructable
(
0
)
,
isAdditional
()
,
rTracks
()
,
tTracks
()
{
x
=
vr
.
X
();
y
=
vr
.
Y
();
z
=
vr
.
Z
();
px
=
vp
.
Px
();
py
=
vp
.
Py
();
pz
=
vp
.
Pz
();
p
=
sqrt
(
fabs
(
px
*
px
+
py
*
py
+
pz
*
pz
));
};
}
// CbmL1MCTrack::CbmL1MCTrack(TmpMCPoints &mcPoint, TVector3 vr, TLorentzVector vp, int ID, int mother_ID):
// ID(_ID), mother_ID(_mother_ID)
...
...
@@ -90,7 +67,7 @@ void CbmL1MCTrack::Init()
CbmL1MCPoint
*
point
=
&
(
L1
->
vMCPoints
[
Points
[
iP
]]);
for
(
unsigned
int
iH
=
0
;
iH
<
point
->
hitIds
.
size
();
iH
++
)
{
const
int
iih
=
point
->
hitIds
[
iH
];
if
(
std
::
find
(
StsHits
.
begin
(),
StsHits
.
end
(),
iih
)
==
StsHits
.
end
())
StsHits
.
push_back
(
iih
);
if
(
std
::
find
(
StsHits
.
begin
(),
StsHits
.
end
(),
iih
)
==
StsHits
.
end
())
StsHits
.
push_back
_no_warning
(
iih
);
}
}
...
...
@@ -146,9 +123,9 @@ void CbmL1MCTrack::CalculateHitCont()
int
istaold
=
-
1
,
ncont
=
0
;
{
for
(
int
ih
=
0
;
ih
<
nhits
;
ih
++
)
{
int
jh
=
StsHits
[
ih
];
const
L1Hit
&
h
=
(
*
algo
->
vStsHits
)[
jh
];
int
ista
=
(
*
algo
->
fStripFlag
)[
h
.
f
]
/
4
;
int
jh
=
StsHits
[
ih
];
const
L1Hit
&
h
=
(
*
algo
->
vStsHits
)[
jh
];
int
ista
=
(
*
algo
->
fStripFlag
)[
h
.
f
]
/
4
;
if
(
ista
-
istaold
==
1
)
ncont
++
;
else
if
(
ista
-
istaold
>
1
)
{
...
...
reco/L1/CbmL1MCTrack.h
View file @
e906a614
...
...
@@ -27,77 +27,17 @@
#include "TVector3.h"
#include <iostream>
#include <vector>
using
std
::
v
ector
;
#include "L1V
ector
.h"
class
CbmL1Track
;
class
CbmL1MCTrack
{
public:
double
mass
,
q
,
p
,
x
,
y
,
z
,
px
,
py
,
pz
,
time
;
int
ID
,
iFile
,
iEvent
,
mother_ID
,
pdg
;
vector
<
int
>
Points
;
// indices of pints in L1::vMCPoints
vector
<
int
>
StsHits
;
// indices of hits in algo->vStsHits or L1::vStsHits
CbmL1MCTrack
()
:
mass
(
0.
)
,
q
(
0.
)
,
p
(
0.
)
,
x
(
0.
)
,
y
(
0.
)
,
z
(
0.
)
,
px
(
0.
)
,
py
(
0.
)
,
pz
(
0.
)
,
time
(
0.
)
,
ID
(
-
1
)
,
iFile
(
-
1
)
,
iEvent
(
-
1
)
,
mother_ID
(
-
1
)
,
pdg
(
-
1
)
,
Points
()
,
StsHits
()
,
nMCContStations
(
0
)
,
nHitContStations
(
0
)
,
maxNStaMC
(
0
)
,
maxNSensorMC
(
0
)
,
maxNStaHits
(
0
)
,
nStations
(
0
)
,
nMCStations
(
0
)
,
isReconstructable
(
0
)
,
isAdditional
(
0
)
,
rTracks
()
,
tTracks
()
{};
CbmL1MCTrack
(
int
_ID
)
:
mass
(
0.
)
,
q
(
0.
)
,
p
(
0.
)
,
x
(
0.
)
,
y
(
0.
)
,
z
(
0.
)
,
px
(
0.
)
,
py
(
0.
)
,
pz
(
0.
)
,
time
(
0.
)
,
ID
(
_ID
)
,
iFile
(
-
1
)