Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sergei Zharko
cbmroot
Commits
6bd93cbf
Commit
6bd93cbf
authored
May 15, 2022
by
Sergei Zharko
Browse files
code format fix
parent
7298fc76
Changes
30
Hide whitespace changes
Inline
Side-by-side
reco/L1/CbmL1.cxx
View file @
6bd93cbf
...
@@ -86,7 +86,7 @@ using std::ios;
...
@@ -86,7 +86,7 @@ using std::ios;
ClassImp
(
CbmL1
)
ClassImp
(
CbmL1
)
static
L1Algo
algo_static
_fvecalignment
;
// TODO: gAlgo
static
L1Algo
algo_static
_fvecalignment
;
// TODO: gAlgo
//L1AlgoInputData* fData_static _fvecalignment;
//L1AlgoInputData* fData_static _fvecalignment;
...
@@ -388,7 +388,7 @@ InitStatus CbmL1::Init()
...
@@ -388,7 +388,7 @@ InitStatus CbmL1::Init()
// TODO: Replace algo initialization in the constructor (S.Zharko)
// TODO: Replace algo initialization in the constructor (S.Zharko)
algo
=
&
algo_static
;
algo
=
&
algo_static
;
/**********************
//
**
/**********************
**
**
** Field initialization **
** Field initialization **
**************************/
**************************/
...
@@ -397,44 +397,44 @@ InitStatus CbmL1::Init()
...
@@ -397,44 +397,44 @@ InitStatus CbmL1::Init()
};
};
fpInitManager
->
SetFieldFunction
(
fieldGetterFcn
);
fpInitManager
->
SetFieldFunction
(
fieldGetterFcn
);
/***********************
//
**
/***********************
**
**
** Target initialization **
** Target initialization **
***************************/
***************************/
auto
&
target
=
CbmKF
::
Instance
()
->
vTargets
[
0
];
auto
&
target
=
CbmKF
::
Instance
()
->
vTargets
[
0
];
fpInitManager
->
SetTargetPosition
(
target
.
x
,
target
.
y
,
target
.
z
);
fpInitManager
->
SetTargetPosition
(
target
.
x
,
target
.
y
,
target
.
z
);
/*****************************
//
**
/*****************************
**
**
** Target field initialization **
** Target field initialization **
*********************************/
*********************************/
fpInitManager
->
InitTargetField
(
2.5
);
fpInitManager
->
InitTargetField
(
2.5
);
/**********************************
//
**
/**********************************
**
**
** **
** **
** STATIONS GEOMETRY INITIALIZATION **
** STATIONS GEOMETRY INITIALIZATION **
** **
** **
**************************************/
**************************************/
/***********************************************
//
**
/***********************************************
**
**
** Active tracking detector subsystems selection **
** Active tracking detector subsystems selection **
***************************************************/
***************************************************/
fActiveTrackingDetectorIDs
.
insert
(
L1DetectorID
::
kSts
);
fActiveTrackingDetectorIDs
.
insert
(
L1DetectorID
::
kSts
);
if
(
fUseMVD
)
{
fActiveTrackingDetectorIDs
.
insert
(
L1DetectorID
::
kMvd
);
}
if
(
fUseMVD
)
{
fActiveTrackingDetectorIDs
.
insert
(
L1DetectorID
::
kMvd
);
}
if
(
fUseMUCH
)
{
fActiveTrackingDetectorIDs
.
insert
(
L1DetectorID
::
kMuch
);
}
if
(
fUseMUCH
)
{
fActiveTrackingDetectorIDs
.
insert
(
L1DetectorID
::
kMuch
);
}
if
(
fUseTRD
)
{
fActiveTrackingDetectorIDs
.
insert
(
L1DetectorID
::
kTrd
);
}
if
(
fUseTRD
)
{
fActiveTrackingDetectorIDs
.
insert
(
L1DetectorID
::
kTrd
);
}
if
(
fUseTOF
)
{
fActiveTrackingDetectorIDs
.
insert
(
L1DetectorID
::
kTof
);
}
if
(
fUseTOF
)
{
fActiveTrackingDetectorIDs
.
insert
(
L1DetectorID
::
kTof
);
}
fpInitManager
->
SetActiveDetectorIDs
(
fActiveTrackingDetectorIDs
);
fpInitManager
->
SetActiveDetectorIDs
(
fActiveTrackingDetectorIDs
);
/*****************************************************************
//
**
/*****************************************************************
**
**
** Counting numbers of stations for different detector subsystems **
** Counting numbers of stations for different detector subsystems **
*********************************************************************/
*********************************************************************/
CbmMuchGeoScheme
*
fGeoScheme
=
CbmMuchGeoScheme
::
Instance
();
CbmMuchGeoScheme
*
fGeoScheme
=
CbmMuchGeoScheme
::
Instance
();
/*** MuCh ***/
/*** MuCh ***/
if
(
fUseMUCH
)
{
if
(
fUseMUCH
)
{
/// Save old global file and folder pointer to avoid messing with FairRoot
/// Save old global file and folder pointer to avoid messing with FairRoot
...
@@ -525,7 +525,7 @@ InitStatus CbmL1::Init()
...
@@ -525,7 +525,7 @@ InitStatus CbmL1::Init()
fpInitManager
->
SetStationsNumberCrosscheck
(
L1DetectorID
::
kMuch
,
NMuchStations
);
fpInitManager
->
SetStationsNumberCrosscheck
(
L1DetectorID
::
kMuch
,
NMuchStations
);
fpInitManager
->
SetStationsNumberCrosscheck
(
L1DetectorID
::
kTrd
,
NTrdStations
);
fpInitManager
->
SetStationsNumberCrosscheck
(
L1DetectorID
::
kTrd
,
NTrdStations
);
fpInitManager
->
SetStationsNumberCrosscheck
(
L1DetectorID
::
kTof
,
NTOFStation
);
fpInitManager
->
SetStationsNumberCrosscheck
(
L1DetectorID
::
kTof
,
NTOFStation
);
{
{
if
(
fSTAPDataMode
%
2
==
1
)
{
// 1,3
if
(
fSTAPDataMode
%
2
==
1
)
{
// 1,3
LOG
(
warn
)
<<
"CbmL1::Init: geo vector was removed, currently data cannot be written to a text-file"
;
LOG
(
warn
)
<<
"CbmL1::Init: geo vector was removed, currently data cannot be written to a text-file"
;
...
@@ -548,8 +548,8 @@ InitStatus CbmL1::Init()
...
@@ -548,8 +548,8 @@ InitStatus CbmL1::Init()
//if (ind2 != ind)
//if (ind2 != ind)
// LOG(error) << "-E- CbmL1: Read geometry from file " << fSTAPDataDir + "geo_algo.txt was NOT successful.";
// LOG(error) << "-E- CbmL1: Read geometry from file " << fSTAPDataDir + "geo_algo.txt was NOT successful.";
}
}
/***********************************
//
**
/***********************************
**
**
** Stations geometry initialization **
** Stations geometry initialization **
***************************************/
***************************************/
...
@@ -584,7 +584,7 @@ InitStatus CbmL1::Init()
...
@@ -584,7 +584,7 @@ InitStatus CbmL1::Init()
/*** STS stations info ***/
/*** STS stations info ***/
for
(
int
iSt
=
0
;
iSt
<
NStsStations
;
++
iSt
)
{
// NOTE: example using smart pointers
for
(
int
iSt
=
0
;
iSt
<
NStsStations
;
++
iSt
)
{
// NOTE: example using smart pointers
auto
cbmSts
=
CbmStsSetup
::
Instance
()
->
GetStation
(
iSt
);
auto
cbmSts
=
CbmStsSetup
::
Instance
()
->
GetStation
(
iSt
);
auto
stationInfo
=
L1BaseStationInfo
(
L1DetectorID
::
kSts
,
iSt
);
auto
stationInfo
=
L1BaseStationInfo
(
L1DetectorID
::
kSts
,
iSt
);
stationInfo
.
SetStationType
(
0
);
// STS
stationInfo
.
SetStationType
(
0
);
// STS
stationInfo
.
SetTimeInfo
(
1
);
stationInfo
.
SetTimeInfo
(
1
);
...
@@ -625,7 +625,7 @@ InitStatus CbmL1::Init()
...
@@ -625,7 +625,7 @@ InitStatus CbmL1::Init()
stationInfo
.
SetFieldStatus
(
0
);
stationInfo
.
SetFieldStatus
(
0
);
stationInfo
.
SetZ
(
layer
->
GetZ
());
stationInfo
.
SetZ
(
layer
->
GetZ
());
auto
thickness
=
layer
->
GetDz
();
auto
thickness
=
layer
->
GetDz
();
auto
radLength
=
0.
;
// Why 0??? (S.Zharko)
auto
radLength
=
0.
;
// Why 0??? (S.Zharko)
stationInfo
.
SetMaterial
(
thickness
,
radLength
);
stationInfo
.
SetMaterial
(
thickness
,
radLength
);
stationInfo
.
SetXmax
(
100.
);
stationInfo
.
SetXmax
(
100.
);
stationInfo
.
SetYmax
(
100.
);
stationInfo
.
SetYmax
(
100.
);
...
@@ -695,7 +695,7 @@ InitStatus CbmL1::Init()
...
@@ -695,7 +695,7 @@ InitStatus CbmL1::Init()
LOG
(
info
)
<<
"- TOF station "
<<
iSt
<<
" at z = "
<<
stationInfo
.
GetZdouble
();
LOG
(
info
)
<<
"- TOF station "
<<
iSt
<<
" at z = "
<<
stationInfo
.
GetZdouble
();
}
}
/************************************
//
**
/************************************
**
**
** **
** **
** TRACKING ITERATIONS INITIALIZATION **
** TRACKING ITERATIONS INITIALIZATION **
** **
** **
...
@@ -860,10 +860,10 @@ InitStatus CbmL1::Init()
...
@@ -860,10 +860,10 @@ InitStatus CbmL1::Init()
//fpInitManager->PushBackCAIteration(trackingIterAllSecJump);
//fpInitManager->PushBackCAIteration(trackingIterAllSecJump);
}
}
/******************
//
**
/******************
**
**
** Set special cuts **
** Set special cuts **
**********************/
**********************/
fpInitManager
->
SetGhostSuppression
(
fGhostSuppression
);
fpInitManager
->
SetGhostSuppression
(
fGhostSuppression
);
fpInitManager
->
SetTrackingLevel
(
fTrackingLevel
);
fpInitManager
->
SetTrackingLevel
(
fTrackingLevel
);
fpInitManager
->
SetMomentumCutOff
(
fMomentumCutOff
);
fpInitManager
->
SetMomentumCutOff
(
fMomentumCutOff
);
...
@@ -872,7 +872,7 @@ InitStatus CbmL1::Init()
...
@@ -872,7 +872,7 @@ InitStatus CbmL1::Init()
algo
->
Init
(
fUseHitErrors
,
fTrackingMode
,
fMissingHits
);
algo
->
Init
(
fUseHitErrors
,
fTrackingMode
,
fMissingHits
);
/*****************************
//
**
/*****************************
**
**
** Material map initialization **
** Material map initialization **
*********************************/
*********************************/
...
@@ -943,7 +943,8 @@ InitStatus CbmL1::Init()
...
@@ -943,7 +943,8 @@ InitStatus CbmL1::Init()
TDirectory
*
oldDir
=
gDirectory
;
TDirectory
*
oldDir
=
gDirectory
;
TFile
*
rlFile
=
new
TFile
(
fStsMatBudgetFileName
);
TFile
*
rlFile
=
new
TFile
(
fStsMatBudgetFileName
);
cout
<<
"STS Material budget file is "
<<
fStsMatBudgetFileName
<<
".
\n
"
;
cout
<<
"STS Material budget file is "
<<
fStsMatBudgetFileName
<<
".
\n
"
;
for
(
int
j
=
1
,
iSta
=
algo
->
GetNstationsBeforePipe
();
iSta
<
(
algo
->
GetNstationsBeforePipe
()
+
NStsStations
);
iSta
++
,
j
++
)
{
for
(
int
j
=
1
,
iSta
=
algo
->
GetNstationsBeforePipe
();
iSta
<
(
algo
->
GetNstationsBeforePipe
()
+
NStsStations
);
iSta
++
,
j
++
)
{
TString
stationNameSts
=
stationName
;
TString
stationNameSts
=
stationName
;
stationNameSts
+=
j
;
stationNameSts
+=
j
;
TProfile2D
*
hStaRadLen
=
(
TProfile2D
*
)
rlFile
->
Get
(
stationNameSts
);
TProfile2D
*
hStaRadLen
=
(
TProfile2D
*
)
rlFile
->
Get
(
stationNameSts
);
...
@@ -1696,7 +1697,7 @@ void CbmL1::WriteSTAPAlgoData() // must be called after ReadEvent
...
@@ -1696,7 +1697,7 @@ void CbmL1::WriteSTAPAlgoData() // must be called after ReadEvent
// write algo data in file
// write algo data in file
static
int
vNEvent
=
1
;
static
int
vNEvent
=
1
;
std
::
fstream
fadata
;
std
::
fstream
fadata
;
TString
fadata_name
=
fSTAPDataDir
+
"data_algo.txt"
;
TString
fadata_name
=
fSTAPDataDir
+
"data_algo.txt"
;
// if ( vNEvent <= maxNEvent ) {
// if ( vNEvent <= maxNEvent ) {
if
(
1
)
{
if
(
1
)
{
...
...
reco/L1/CbmL1.h
View file @
6bd93cbf
...
@@ -222,7 +222,7 @@ private:
...
@@ -222,7 +222,7 @@ private:
/// \param MVD Index of the detector subsystem
/// \param MVD Index of the detector subsystem
/// \return flag: false - success, true - some errors occured
/// \return flag: false - success, true - some errors occured
bool
ReadMCPoint
(
CbmL1MCPoint
*
MC
,
int
iPoint
,
int
MVD
);
// help procedure
bool
ReadMCPoint
(
CbmL1MCPoint
*
MC
,
int
iPoint
,
int
MVD
);
// help procedure
/// Converts data from generic FairMCPoint based class to the CbmL1MCPoint
/// Converts data from generic FairMCPoint based class to the CbmL1MCPoint
/// \param MC Pointer to a target CbmL1MCPoint object
/// \param MC Pointer to a target CbmL1MCPoint object
/// \param iPoint Index of the point into the input MC points CbmMCDataArray object for the particular detector
/// \param iPoint Index of the point into the input MC points CbmMCDataArray object for the particular detector
...
@@ -232,10 +232,10 @@ private:
...
@@ -232,10 +232,10 @@ private:
/// \return flag: false - success, true - some errors occured
/// \return flag: false - success, true - some errors occured
// TODO: Probably, we should replace input parameter MVD with the template (S.Zharko)
// TODO: Probably, we should replace input parameter MVD with the template (S.Zharko)
bool
ReadMCPoint
(
CbmL1MCPoint
*
MC
,
int
iPoint
,
int
file
,
int
event
,
int
MVD
);
bool
ReadMCPoint
(
CbmL1MCPoint
*
MC
,
int
iPoint
,
int
file
,
int
event
,
int
MVD
);
// static bool compareZ(const int &a, const int &b );
// static bool compareZ(const int &a, const int &b );
// bool compareZ(const int &a, const int &b );
// bool compareZ(const int &a, const int &b );
/// Fills the vMCTracks vector and the dFEI2vMCTracks set
/// Fills the vMCTracks vector and the dFEI2vMCTracks set
void
Fill_vMCTracks
();
void
Fill_vMCTracks
();
...
...
reco/L1/CbmL1Hit.h
View file @
6bd93cbf
...
@@ -16,15 +16,15 @@ struct CbmL1Hit {
...
@@ -16,15 +16,15 @@ struct CbmL1Hit {
CbmL1Hit
(
int
hitId_
,
int
extIndex_
,
int
Det_
)
:
hitId
(
hitId_
),
extIndex
(
extIndex_
),
Det
(
Det_
)
{};
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
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
extIndex
=
0
;
///> index of hit in the TClonesArray array
int
Det
=
0
;
///> station index
int
Det
=
0
;
///> station index
float
x
=
0
.
f
;
///> measured X coordinate
float
x
=
0
.
f
;
///> measured X coordinate
float
y
=
0
.
f
;
///> measured Y coordinate
float
y
=
0
.
f
;
///> measured Y coordinate
float
t
=
0
.
f
;
///> measured time
float
t
=
0
.
f
;
///> measured time
int
f
=
0
;
///> front strip index
int
f
=
0
;
///> front strip index
int
b
=
0
;
///> back strip index
int
b
=
0
;
///> back strip index
int
ID
=
0
;
///> TODO: check if this ID is redundant
int
ID
=
0
;
///> TODO: check if this ID is redundant
L1Vector
<
int
>
mcPointIds
{
"CbmL1Hit::mcPointIds"
};
// indices of CbmL1MCPoint in L1->vMCPoints array
L1Vector
<
int
>
mcPointIds
{
"CbmL1Hit::mcPointIds"
};
// indices of CbmL1MCPoint in L1->vMCPoints array
};
};
...
...
reco/L1/CbmL1Performance.cxx
View file @
6bd93cbf
...
@@ -1193,7 +1193,7 @@ void CbmL1::TrackFitPerformance()
...
@@ -1193,7 +1193,7 @@ void CbmL1::TrackFitPerformance()
for
(
unsigned
int
iMCPoint
=
0
;
iMCPoint
<
mc
.
Points
.
size
();
iMCPoint
++
)
{
for
(
unsigned
int
iMCPoint
=
0
;
iMCPoint
<
mc
.
Points
.
size
();
iMCPoint
++
)
{
const
int
iMCP
=
mc
.
Points
[
iMCPoint
];
const
int
iMCP
=
mc
.
Points
[
iMCPoint
];
CbmL1MCPoint
&
mcP
=
vMCPoints
[
iMCP
];
CbmL1MCPoint
&
mcP
=
vMCPoints
[
iMCP
];
const
L1Station
&
st
=
algo
->
GetStations
()[
mcP
.
iStation
];
const
L1Station
&
st
=
algo
->
GetStations
()[
mcP
.
iStation
];
z
[
ih
]
=
st
.
z
[
0
];
z
[
ih
]
=
st
.
z
[
0
];
if
(
ih
>
0
&&
(
z
[
ih
]
-
z
[
ih
-
1
])
<
0.1
)
continue
;
if
(
ih
>
0
&&
(
z
[
ih
]
-
z
[
ih
-
1
])
<
0.1
)
continue
;
st
.
fieldSlice
.
GetFieldValue
(
mcP
.
x
,
mcP
.
y
,
B
[
ih
]);
st
.
fieldSlice
.
GetFieldValue
(
mcP
.
x
,
mcP
.
y
,
B
[
ih
]);
...
@@ -1304,7 +1304,7 @@ void CbmL1::TrackFitPerformance()
...
@@ -1304,7 +1304,7 @@ void CbmL1::TrackFitPerformance()
for
(
unsigned
int
iMCPoint
=
0
;
iMCPoint
<
mc
.
Points
.
size
();
iMCPoint
++
)
{
for
(
unsigned
int
iMCPoint
=
0
;
iMCPoint
<
mc
.
Points
.
size
();
iMCPoint
++
)
{
const
int
iMCP
=
mc
.
Points
[
iMCPoint
];
const
int
iMCP
=
mc
.
Points
[
iMCPoint
];
CbmL1MCPoint
&
mcP
=
vMCPoints
[
iMCP
];
CbmL1MCPoint
&
mcP
=
vMCPoints
[
iMCP
];
const
L1Station
&
st
=
algo
->
GetStations
()[
mcP
.
iStation
];
const
L1Station
&
st
=
algo
->
GetStations
()[
mcP
.
iStation
];
z
[
ih
]
=
st
.
z
[
0
];
z
[
ih
]
=
st
.
z
[
0
];
if
(
ih
>
0
&&
(
z
[
ih
]
-
z
[
ih
-
1
])
<
0.1
)
continue
;
if
(
ih
>
0
&&
(
z
[
ih
]
-
z
[
ih
-
1
])
<
0.1
)
continue
;
st
.
fieldSlice
.
GetFieldValue
(
mcP
.
x
,
mcP
.
y
,
B
[
ih
]);
st
.
fieldSlice
.
GetFieldValue
(
mcP
.
x
,
mcP
.
y
,
B
[
ih
]);
...
@@ -1375,7 +1375,7 @@ void CbmL1::TrackFitPerformance()
...
@@ -1375,7 +1375,7 @@ void CbmL1::TrackFitPerformance()
if
(
ih
>=
mc
.
Points
.
size
())
continue
;
//If nofMCPoints in track < 3
if
(
ih
>=
mc
.
Points
.
size
())
continue
;
//If nofMCPoints in track < 3
const
int
iMCP
=
mc
.
Points
[
ih
];
const
int
iMCP
=
mc
.
Points
[
ih
];
CbmL1MCPoint
&
mcP
=
vMCPoints
[
iMCP
];
CbmL1MCPoint
&
mcP
=
vMCPoints
[
iMCP
];
const
L1Station
&
st
=
algo
->
GetStations
()[
mcP
.
iStation
];
const
L1Station
&
st
=
algo
->
GetStations
()[
mcP
.
iStation
];
z
[
ih
]
=
st
.
z
[
0
];
z
[
ih
]
=
st
.
z
[
0
];
st
.
fieldSlice
.
GetFieldValue
(
mcP
.
x
,
mcP
.
y
,
B
[
ih
]);
st
.
fieldSlice
.
GetFieldValue
(
mcP
.
x
,
mcP
.
y
,
B
[
ih
]);
};
};
...
@@ -1438,7 +1438,7 @@ void CbmL1::TrackFitPerformance()
...
@@ -1438,7 +1438,7 @@ void CbmL1::TrackFitPerformance()
int
ih
=
1
;
int
ih
=
1
;
for
(
unsigned
int
iHit
=
0
;
iHit
<
it
->
StsHits
.
size
();
iHit
++
)
{
for
(
unsigned
int
iHit
=
0
;
iHit
<
it
->
StsHits
.
size
();
iHit
++
)
{
const
int
iStation
=
vHitStore
[
it
->
StsHits
[
iHit
]].
iStation
;
const
int
iStation
=
vHitStore
[
it
->
StsHits
[
iHit
]].
iStation
;
const
L1Station
&
st
=
algo
->
GetStations
()[
iStation
];
const
L1Station
&
st
=
algo
->
GetStations
()[
iStation
];
z
[
ih
]
=
st
.
z
[
0
];
z
[
ih
]
=
st
.
z
[
0
];
st
.
fieldSlice
.
GetFieldValue
(
vHitStore
[
it
->
StsHits
[
iHit
]].
x
,
vHitStore
[
it
->
StsHits
[
iHit
]].
y
,
B
[
ih
]);
st
.
fieldSlice
.
GetFieldValue
(
vHitStore
[
it
->
StsHits
[
iHit
]].
x
,
vHitStore
[
it
->
StsHits
[
iHit
]].
y
,
B
[
ih
]);
ih
++
;
ih
++
;
...
...
reco/L1/CbmL1ReadEvent.cxx
View file @
6bd93cbf
...
@@ -82,13 +82,13 @@ struct TmpHit {
...
@@ -82,13 +82,13 @@ struct TmpHit {
double
dx
,
dy
,
dxy
;
///> hit position errors in Cortesian coordinates
double
dx
,
dy
,
dxy
;
///> hit position errors in Cortesian coordinates
double
du
,
dv
;
///> hit position errors in strips coordinates
double
du
,
dv
;
///> hit position errors in strips coordinates
int
iMC
;
///> index of MCPoint in the vMCPoints array
int
iMC
;
///> index of MCPoint in the vMCPoints array
double
time
=
0.
;
///> time of the hit
double
time
=
0.
;
///> time of the hit
double
dt
=
1.e10
;
///> time error of the hit
double
dt
=
1.e10
;
///> time error of the hit
int
Det
;
int
Det
;
int
id
;
int
id
;
int
track
;
int
track
;
/// Provides comparison of two hits.
/// Provides comparison of two hits.
/// If two hits belong to different stations,
/// If two hits belong to different stations,
/// the smallest hit belongs to the station with the smallest index. Otherwise, the smallest hit
/// the smallest hit belongs to the station with the smallest index. Otherwise, the smallest hit
/// has the smallest y coordinate
/// has the smallest y coordinate
...
@@ -106,7 +106,7 @@ struct TmpHit {
...
@@ -106,7 +106,7 @@ struct TmpHit {
/// \param nTmpHits
/// \param nTmpHits
/// \param nStripF
/// \param nStripF
/// \param ip
/// \param ip
/// \param NStrips
/// \param NStrips
/// \param st reference to the station info object
/// \param st reference to the station info object
// TODO: Probably, L1Station& st parameter should be constant. Do we really want to modify a station here? (S.Zharko)
// TODO: Probably, L1Station& st parameter should be constant. Do we really want to modify a station here? (S.Zharko)
void
CreateHitFromPoint
(
const
CbmL1MCPoint
&
point
,
int
det
,
int
nTmpHits
,
int
nStripF
,
int
ip
,
int
&
NStrips
,
void
CreateHitFromPoint
(
const
CbmL1MCPoint
&
point
,
int
det
,
int
nTmpHits
,
int
nStripF
,
int
ip
,
int
&
NStrips
,
...
@@ -150,7 +150,7 @@ struct TmpHit {
...
@@ -150,7 +150,7 @@ struct TmpHit {
iMC
=
ip
;
iMC
=
ip
;
}
}
/// Sets randomized position and time of the hit
/// Sets randomized position and time of the hit
/// The positions are smeared within predefined errors dx, dy, dt; z coordinate
/// The positions are smeared within predefined errors dx, dy, dt; z coordinate
/// of the hit is known precisely
/// of the hit is known precisely
/// \param point constant reference to the input MC-point
/// \param point constant reference to the input MC-point
...
@@ -177,15 +177,15 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
...
@@ -177,15 +177,15 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
fData_
->
Clear
();
fData_
->
Clear
();
// clear arrays for next event
// clear arrays for next event
vMCPoints
.
clear
();
/* <CbmL1MCPoint> */
vMCPoints
.
clear
();
/* <CbmL1MCPoint> */
vMCPoints_in_Time_Slice
.
clear
();
/* <int> */
vMCPoints_in_Time_Slice
.
clear
();
/* <int> */
vMCTracks
.
clear
();
/* <CbmL1MCTrack> */
vMCTracks
.
clear
();
/* <CbmL1MCTrack> */
vStsHits
.
clear
();
/* <CbmL1Hit> */
vStsHits
.
clear
();
/* <CbmL1Hit> */
vRTracks
.
clear
();
/* <CbmL1Track> */
vRTracks
.
clear
();
/* <CbmL1Track> */
vHitMCRef
.
clear
();
/* <int>: indexes of MC-points in vMCPoints (by index of algo->vStsHits) */
vHitMCRef
.
clear
();
/* <int>: indexes of MC-points in vMCPoints (by index of algo->vStsHits) */
vHitStore
.
clear
();
/* <CbmL1HitStore> */
vHitStore
.
clear
();
/* <CbmL1HitStore> */
dFEI2vMCPoints
.
clear
();
/* dFEI vs MC-point index: dFEI = index * 10000 + fileID + eventID * 0.0001 */
dFEI2vMCPoints
.
clear
();
/* dFEI vs MC-point index: dFEI = index * 10000 + fileID + eventID * 0.0001 */
dFEI2vMCTracks
.
clear
();
/* dFEI vs MC-track index: dFEI = index * 10000 + fileID + eventID * 0.0001 */
dFEI2vMCTracks
.
clear
();
/* dFEI vs MC-track index: dFEI = index * 10000 + fileID + eventID * 0.0001 */
if
(
fVerbose
>=
10
)
cout
<<
"ReadEvent: clear is done."
<<
endl
;
if
(
fVerbose
>=
10
)
cout
<<
"ReadEvent: clear is done."
<<
endl
;
...
@@ -266,7 +266,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
...
@@ -266,7 +266,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
CbmL1MCPoint
MC
;
CbmL1MCPoint
MC
;
if
(
!
ReadMCPoint
(
&
MC
,
iMC
,
iFile
,
iEvent
,
1
))
{
if
(
!
ReadMCPoint
(
&
MC
,
iMC
,
iFile
,
iEvent
,
1
))
{
MC
.
iStation
=
-
1
;
MC
.
iStation
=
-
1
;
const
L1Station
*
sta
=
algo
->
GetStations
().
begin
();
const
L1Station
*
sta
=
algo
->
GetStations
().
begin
();
double
bestDist
=
1.e20
;
double
bestDist
=
1.e20
;
for
(
Int_t
iSt
=
0
;
iSt
<
NMvdStations
;
iSt
++
)
{
for
(
Int_t
iSt
=
0
;
iSt
<
NMvdStations
;
iSt
++
)
{
// use z_in since z_out is sometimes very wrong
// use z_in since z_out is sometimes very wrong
...
@@ -303,7 +303,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
...
@@ -303,7 +303,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
CbmL1MCPoint
MC
;
CbmL1MCPoint
MC
;
if
(
!
ReadMCPoint
(
&
MC
,
iMC
,
iFile
,
iEvent
,
0
))
{
if
(
!
ReadMCPoint
(
&
MC
,
iMC
,
iFile
,
iEvent
,
0
))
{
MC
.
iStation
=
-
1
;
MC
.
iStation
=
-
1
;
const
L1Station
*
sta
=
algo
->
GetStations
().
begin
()
+
NMvdStations
;
const
L1Station
*
sta
=
algo
->
GetStations
().
begin
()
+
NMvdStations
;
double
bestDist
=
1.e20
;
double
bestDist
=
1.e20
;
for
(
Int_t
iSt
=
0
;
iSt
<
NStsStations
;
iSt
++
)
{
for
(
Int_t
iSt
=
0
;
iSt
<
NStsStations
;
iSt
++
)
{
// use z_in since z_out is sometimes very wrong
// use z_in since z_out is sometimes very wrong
...
@@ -416,7 +416,8 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
...
@@ -416,7 +416,8 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
Int_t
IND_Track
=
trk_it
->
second
;
Int_t
IND_Track
=
trk_it
->
second
;
MC
.
iStation
=
-
1
;
MC
.
iStation
=
-
1
;
const
L1Station
*
sta
=
algo
->
GetStations
().
begin
()
+
NMvdStations
+
NStsStations
+
NMuchStations
+
NTrdStations
;
const
L1Station
*
sta
=
algo
->
GetStations
().
begin
()
+
NMvdStations
+
NStsStations
+
NMuchStations
+
NTrdStations
;
for
(
Int_t
iSt
=
0
;
iSt
<
NTOFStation
;
iSt
++
)
for
(
Int_t
iSt
=
0
;
iSt
<
NTOFStation
;
iSt
++
)
MC
.
iStation
=
(
MC
.
z
>
sta
[
iSt
].
z
[
0
]
-
15
)
MC
.
iStation
=
(
MC
.
z
>
sta
[
iSt
].
z
[
0
]
-
15
)
?
(
NMvdStations
+
NStsStations
+
NMuchStations
+
NTrdStations
+
iSt
)
?
(
NMvdStations
+
NStsStations
+
NMuchStations
+
NTrdStations
+
iSt
)
...
@@ -443,7 +444,8 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
...
@@ -443,7 +444,8 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
if
(
!
ReadMCPoint
(
&
MC
,
TofPointToTrack
[
iTofSta
][
iMC
],
iFile
,
iEvent
,
4
))
{
if
(
!
ReadMCPoint
(
&
MC
,
TofPointToTrack
[
iTofSta
][
iMC
],
iFile
,
iEvent
,
4
))
{
MC
.
iStation
=
-
1
;
MC
.
iStation
=
-
1
;
const
L1Station
*
sta
=
algo
->
GetStations
().
begin
()
+
NMvdStations
+
NStsStations
+
NMuchStations
+
NTrdStations
;
const
L1Station
*
sta
=
algo
->
GetStations
().
begin
()
+
NMvdStations
+
NStsStations
+
NMuchStations
+
NTrdStations
;
for
(
Int_t
iSt
=
0
;
iSt
<
NTOFStation
;
iSt
++
)
for
(
Int_t
iSt
=
0
;
iSt
<
NTOFStation
;
iSt
++
)
MC
.
iStation
=
(
MC
.
z
>
sta
[
iSt
].
z
[
0
]
-
15
)
MC
.
iStation
=
(
MC
.
z
>
sta
[
iSt
].
z
[
0
]
-
15
)
?
(
NMvdStations
+
NStsStations
+
NMuchStations
+
NTrdStations
+
iSt
)
?
(
NMvdStations
+
NStsStations
+
NMuchStations
+
NTrdStations
+
iSt
)
...
@@ -835,7 +837,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
...
@@ -835,7 +837,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
nTrdHits
++
;
nTrdHits
++
;
}
}
}
}
//
//
// Get TRD hits
// Get TRD hits
//
//
...
@@ -1064,7 +1066,8 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
...
@@ -1064,7 +1066,8 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
Double_t
dtrck
=
dFEI
(
iFile
,
iEvent
,
pt
->
GetTrackID
());
Double_t
dtrck
=
dFEI
(
iFile
,
iEvent
,
pt
->
GetTrackID
());
DFEI2I
::
iterator
trk_it
=
dFEI2vMCPoints
.
find
(
dtrck
);
DFEI2I
::
iterator
trk_it
=
dFEI2vMCPoints
.
find
(
dtrck
);
if
(
trk_it
!=
dFEI2vMCPoints
.
end
())
th
.
iMC
=
TofPointToTrack
[
sttof
][
trk_it
->
second
];
if
(
trk_it
!=
dFEI2vMCPoints
.
end
())
th
.
iMC
=
TofPointToTrack
[
sttof
][
trk_it
->
second
];
if
((
1
==
fTofUseMcHit
)
&&
(
th
.
iMC
>
-
1
))
th
.
SetHitFromPoint
(
vMCPoints
[
th
.
iMC
],
algo
->
GetStations
()[
th
.
iStation
]);
if
((
1
==
fTofUseMcHit
)
&&
(
th
.
iMC
>
-
1
))
th
.
SetHitFromPoint
(
vMCPoints
[
th
.
iMC
],
algo
->
GetStations
()[
th
.
iStation
]);
}
}
}
}
...
@@ -1126,7 +1129,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
...
@@ -1126,7 +1129,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
vHitStore
.
reserve
(
nHits
);
vHitStore
.
reserve
(
nHits
);
vHitMCRef
.
reserve
(
nHits
);
vHitMCRef
.
reserve
(
nHits
);
for
(
int
i
=
0
;
i
<
nHits
;
i
++
)
{
for
(
int
i
=
0
;
i
<
nHits
;
i
++
)
{
TmpHit
&
th
=
tmpHits
[
i
];
TmpHit
&
th
=
tmpHits
[
i
];
...
@@ -1169,7 +1172,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
...
@@ -1169,7 +1172,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
h
.
z
=
th
.
z
;
h
.
z
=
th
.
z
;
// save hit
// save hit
vStsHits
.
push_back
(
CbmL1Hit
(
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
].
x
=
th
.
x
;
...
@@ -1222,7 +1225,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
...
@@ -1222,7 +1225,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength,
void
CbmL1
::
Fill_vMCTracks
()
void
CbmL1
::
Fill_vMCTracks
()
{
{
vMCTracks
.
clear
();
vMCTracks
.
clear
();
// Count the total number of tracks in this event and reserve memory
// Count the total number of tracks in this event and reserve memory
{
{
Int_t
nMCTracks
=
0
;
Int_t
nMCTracks
=
0
;
...
@@ -1244,12 +1247,12 @@ void CbmL1::Fill_vMCTracks()
...
@@ -1244,12 +1247,12 @@ void CbmL1::Fill_vMCTracks()
assert
(
header
);
assert
(
header
);
Int_t
nMCTrack
=
fMCTracks
->
Size
(
iFile
,
iEvent
);
Int_t
nMCTrack
=
fMCTracks
->
Size
(
iFile
,
iEvent
);
if
(
fVerbose
>
2
)
{
if
(
fVerbose
>
2
)
{
LOG
(
info
)
<<
"MC event: vertex at "
<<
header
->
GetX
()
<<
" "
<<
header
->
GetY
()
<<
" "
<<
header
->
GetZ
()
LOG
(
info
)
<<
"MC event: vertex at "
<<
header
->
GetX
()
<<
" "
<<
header
->
GetY
()
<<
" "
<<
header
->
GetZ
()
<<
"; Number of tracks = "
<<
nMCTrack
;
<<
"; Number of tracks = "
<<
nMCTrack
;
}
}
/* Loop over MC tracks */
/* Loop over MC tracks */
for
(
Int_t
iMCTrack
=
0
;
iMCTrack
<
nMCTrack
;
iMCTrack
++
)
{
for
(
Int_t
iMCTrack
=
0
;
iMCTrack
<
nMCTrack
;
iMCTrack
++
)
{
CbmMCTrack
*
MCTrack
=
L1_DYNAMIC_CAST
<
CbmMCTrack
*>
(
fMCTracks
->
Get
(
iFile
,
iEvent
,
iMCTrack
));
CbmMCTrack
*
MCTrack
=
L1_DYNAMIC_CAST
<
CbmMCTrack
*>
(
fMCTracks
->
Get
(
iFile
,
iEvent
,
iMCTrack
));
...
...
reco/L1/L1Algo/L1Algo.cxx
View file @
6bd93cbf
...
@@ -76,13 +76,13 @@ void L1Algo::Init(const bool UseHitErrors, const TrackingMode mode, const bool M
...
@@ -76,13 +76,13 @@ void L1Algo::Init(const bool UseHitErrors, const TrackingMode mode, const bool M
fTrackingMode
=
mode
;
fTrackingMode
=
mode
;
fMissingHits
=
MissingHits
;
fMissingHits
=
MissingHits
;
//int NMvdStations = static_cast<int>(geo[ind++]); // TODO: get rid of NMbdStations (S. Zh.)
//int NMvdStations = static_cast<int>(geo[ind++]); // TODO: get rid of NMbdStations (S. Zh.)
int
nStationsSts
=
fInitManager
.
GetStationsNumber
(
static_cast
<
L1DetectorID
>
(
1
));
int
nStationsSts
=
fInitManager
.
GetStationsNumber
(
static_cast
<
L1DetectorID
>
(
1
));
fNstationsBeforePipe
=
fInitManager
.
GetStationsNumber
(
static_cast
<
L1DetectorID
>
(
0
));
fNstationsBeforePipe
=
fInitManager
.
GetStationsNumber
(
static_cast
<
L1DetectorID
>
(
0
));
//int NStsStations = static_cast<int>(geo[ind++]); // TODO: get rid of NStsStations (S. Zh.)
//int NStsStations = static_cast<int>(geo[ind++]); // TODO: get rid of NStsStations (S. Zh.)
fNfieldStations
=
nStationsSts
+
fNstationsBeforePipe
;
// TODO: Provide special getter for it (S.Zharko, 12.05.2022)
fNfieldStations
=
nStationsSts
+
fNstationsBeforePipe
;
// TODO: Provide special getter for it (S.Zharko, 12.05.2022)
if
(
fTrackingMode
==
kMcbm
)
{
fNfieldStations
=
-
1
;
}
if
(
fTrackingMode
==
kMcbm
)
{
fNfieldStations
=
-
1
;
}
...
@@ -93,7 +93,7 @@ void L1Algo::Init(const bool UseHitErrors, const TrackingMode mode, const bool M
...
@@ -93,7 +93,7 @@ void L1Algo::Init(const bool UseHitErrors, const TrackingMode mode, const bool M