Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Eoin Clerkin
cbmroot_geometry
Commits
d8ee7a8d
Commit
d8ee7a8d
authored
Nov 19, 2020
by
Norbert Herrmann
Browse files
introduce tracking station assignment to tof counters
parent
560ad9df
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/detectors/tof/CbmTofDigiBdfPar.cxx
View file @
d8ee7a8d
...
...
@@ -38,11 +38,13 @@ ClassImp(CbmTofDigiBdfPar)
,
fdDeadtime
(
5.0
)
,
fdSignalPropSpeed
(
0.0
)
,
fiNbSmTypes
(
0
)
,
fiNbTrackingStations
(
0
)
,
fiNbSm
()
,
fiNbRpc
()
,
fiNbGaps
()
,
fdGapSize
()
,
fdSigVel
()
,
fiTrkStation
()
,
fiNbCh
()
,
fiChType
()
,
fiChOrientation
()
...
...
@@ -109,6 +111,8 @@ void CbmTofDigiBdfPar::putParams(FairParamList* l) {
l
->
add
(
Form
(
"GapSize%03d"
,
iSmType
),
fdGapSize
[
iSmType
]);
for
(
Int_t
iSmType
=
0
;
iSmType
<
fiNbSmTypes
;
iSmType
++
)
l
->
add
(
Form
(
"SigVel%03d"
,
iSmType
),
fdSigVel
[
iSmType
]);
for
(
Int_t
iSmType
=
0
;
iSmType
<
fiNbSmTypes
;
iSmType
++
)
l
->
add
(
Form
(
"TrkStation%03d"
,
iSmType
),
fiTrkStation
[
iSmType
]);
for
(
Int_t
iSmType
=
0
;
iSmType
<
fiNbSmTypes
;
iSmType
++
)
l
->
add
(
Form
(
"NbCh%03d"
,
iSmType
),
fiNbCh
[
iSmType
]);
for
(
Int_t
iSmType
=
0
;
iSmType
<
fiNbSmTypes
;
iSmType
++
)
...
...
@@ -224,6 +228,23 @@ Bool_t CbmTofDigiBdfPar::getParams(FairParamList* l) {
}
// for( Int_t iSmType = 0; iSmType < fiNbSmTypes; iSmType ++)
fiTrkStation
.
resize
(
fiNbSmTypes
);
for
(
Int_t
iSmType
=
0
;
iSmType
<
fiNbSmTypes
;
iSmType
++
)
{
fiTrkStation
[
iSmType
].
Set
(
fiNbSm
[
iSmType
]
*
fiNbRpc
[
iSmType
]);
if
(
!
l
->
fill
(
Form
(
"TrkStation%03d"
,
iSmType
),
&
(
fiTrkStation
[
iSmType
])))
{
LOG
(
info
)
<<
"CbmTofDigiBdfPar::getParams => parameter "
<<
Form
(
"TrkStation%03d"
,
iSmType
)
<<
" not found in the text file. "
<<
"Initialized to 0 "
;
for
(
Int_t
iRpc
=
0
;
iRpc
<
fiNbSm
[
iSmType
]
*
fiNbRpc
[
iSmType
];
iRpc
++
)
fiTrkStation
[
iSmType
].
SetAt
(
0
,
iRpc
);
//return kFALSE;
}
// if ( ! l->fill( Form("SigVel%03d", iSmType), &(fdSigVel[iSmType]) ) )
for
(
Int_t
iRpc
=
0
;
iRpc
<
fiNbSm
[
iSmType
]
*
fiNbRpc
[
iSmType
];
iRpc
++
)
fiNbTrackingStations
=
TMath
::
Max
(
fiNbTrackingStations
,
fiTrkStation
[
iSmType
][
iRpc
]
+
1
);
}
// for( Int_t iSmType = 0; iSmType < fiNbSmTypes; iSmType ++)
fiNbCh
.
resize
(
fiNbSmTypes
);
for
(
Int_t
iSmType
=
0
;
iSmType
<
fiNbSmTypes
;
iSmType
++
)
{
fiNbCh
[
iSmType
].
Set
(
fiNbRpc
[
iSmType
]);
...
...
@@ -567,6 +588,18 @@ void CbmTofDigiBdfPar::SetSigVel(Int_t iSmType,
LOG
(
error
)
<<
"Invalid SMType "
<<
iSmType
;
}
}
Int_t
CbmTofDigiBdfPar
::
GetTrackingStation
(
Int_t
iSmType
,
Int_t
iSm
,
Int_t
iRpc
)
const
{
if
(
iSmType
<
fiNbSmTypes
)
{
if
(
iSm
<
fiNbSm
[
iSmType
]
&&
iRpc
<
fiNbRpc
[
iSmType
])
return
fiTrkStation
[
iSmType
][
iSm
*
fiNbRpc
[
iSmType
]
+
iRpc
];
else
return
0.0
;
}
// if( iSmType < fiNbSmTypes )
else
return
0.0
;
}
Int_t
CbmTofDigiBdfPar
::
GetNbChan
(
Int_t
iSmType
,
Int_t
iRpc
)
const
{
if
(
iSmType
<
fiNbSmTypes
)
{
if
(
iRpc
<
fiNbRpc
[
iSmType
])
...
...
@@ -705,22 +738,26 @@ void CbmTofDigiBdfPar::printParams() {
sIndex
=
" Rpc index |-- "
;
Int_t
iMaxRpcNb
=
0
;
TString
*
sGapsNb
=
new
TString
[
fiNbSmTypes
];
TString
*
sGapsSz
=
new
TString
[
fiNbSmTypes
];
TString
*
sSigVel
=
new
TString
[
fiNbSmTypes
];
TString
*
sChNb
=
new
TString
[
fiNbSmTypes
];
TString
*
sChType
=
new
TString
[
fiNbSmTypes
];
TString
*
sChOrient
=
new
TString
[
fiNbSmTypes
];
TString
*
sGapsNb
=
new
TString
[
fiNbSmTypes
];
TString
*
sGapsSz
=
new
TString
[
fiNbSmTypes
];
TString
*
sSigVel
=
new
TString
[
fiNbSmTypes
];
TString
*
sChNb
=
new
TString
[
fiNbSmTypes
];
TString
*
sChType
=
new
TString
[
fiNbSmTypes
];
TString
*
sChOrient
=
new
TString
[
fiNbSmTypes
];
TString
*
sTrkStation
=
new
TString
[
fiNbSmTypes
];
for
(
Int_t
iSmType
=
0
;
iSmType
<
fiNbSmTypes
;
iSmType
++
)
{
sSmNb
+=
Form
(
"%3d "
,
GetNbSm
(
iSmType
));
sRpcNb
+=
Form
(
"%3d "
,
GetNbRpc
(
iSmType
));
sGapsNb
[
iSmType
]
=
Form
(
" Nb of Gaps in SM type %3d:|-> "
,
iSmType
);
sGapsSz
[
iSmType
]
=
Form
(
" Gap Size(mm) in SM type %3d:|-> "
,
iSmType
);
sSigVel
[
iSmType
]
=
Form
(
" SigVel(cm/ps) in SM type %3d:|-> "
,
iSmType
);
sChNb
[
iSmType
]
=
Form
(
" Nb of Chan in SM type %3d:|-> "
,
iSmType
);
sChType
[
iSmType
]
=
Form
(
" Chan Type in SM type %3d:|-> "
,
iSmType
);
sChOrient
[
iSmType
]
=
Form
(
" Chan orient. in SM type %3d:|-> "
,
iSmType
);
sGapsNb
[
iSmType
]
=
Form
(
" Nb of Gaps in SM type %3d:|-> "
,
iSmType
);
sGapsSz
[
iSmType
]
=
Form
(
" Gap Size(mm) in SM type %3d:|-> "
,
iSmType
);
sSigVel
[
iSmType
]
=
Form
(
" SigVel(cm/ps) in SM type %3d:|-> "
,
iSmType
);
sChNb
[
iSmType
]
=
Form
(
" Nb of Chan in SM type %3d:|-> "
,
iSmType
);
sChType
[
iSmType
]
=
Form
(
" Chan Type in SM type %3d:|-> "
,
iSmType
);
sChOrient
[
iSmType
]
=
Form
(
" Chan Orientation in SM type %3d:|-> "
,
iSmType
);
sTrkStation
[
iSmType
]
=
Form
(
" TrackStations in SM type %3d:|-> "
,
iSmType
);
if
(
iMaxRpcNb
<
fiNbRpc
[
iSmType
])
iMaxRpcNb
=
fiNbRpc
[
iSmType
];
...
...
@@ -734,10 +771,11 @@ void CbmTofDigiBdfPar::printParams() {
sChType
[
iSmType
]
+=
"pad "
;
else
sChType
[
iSmType
]
+=
"str "
;
if
(
1
==
GetChanOrient
(
iSmType
,
iRpc
))
sChOrient
[
iSmType
]
+=
"hor "
;
else
sChOrient
[
iSmType
]
+=
"ver "
;
sChOrient
[
iSmType
]
+=
Form
(
" %d "
,
GetChanOrient
(
iSmType
,
iRpc
));
for
(
Int_t
iSm
=
0
;
iSm
<
fiNbSm
[
iSmType
];
iSm
++
)
sTrkStation
[
iSmType
]
+=
Form
(
" %d "
,
GetTrackingStation
(
iSmType
,
iSm
,
iRpc
));
}
}
// for( Int_t iSmType = 0; iSmType < fiNbSmTypes; iSmType ++)
for
(
Int_t
iRpc
=
0
;
iRpc
<
iMaxRpcNb
;
iRpc
++
)
...
...
@@ -753,6 +791,7 @@ void CbmTofDigiBdfPar::printParams() {
LOG
(
info
)
<<
sChNb
[
iSmType
];
LOG
(
info
)
<<
sChType
[
iSmType
];
LOG
(
info
)
<<
sChOrient
[
iSmType
];
LOG
(
info
)
<<
sTrkStation
[
iSmType
];
}
// for( Int_t iSmType = 0; iSmType < fiNbSmTypes; iSmType ++)
// Beamtime variables
...
...
core/detectors/tof/CbmTofDigiBdfPar.h
View file @
d8ee7a8d
...
...
@@ -13,6 +13,9 @@
#ifndef CBMTOFDIGIBDFPAR_H
#define CBMTOFDIGIBDFPAR_H 1
#include
<CbmTofAddress.h>
// for accessors
#include
<CbmTofHit.h>
// for accessors
#include
<Rtypes.h>
// for THashConsistencyHolder, ClassDef
#include
<RtypesCore.h>
// for Int_t, Double_t, Bool_t
#include
<TArrayD.h>
// for TArrayD
...
...
@@ -66,6 +69,13 @@ public:
Int_t
GetNbDet
()
const
;
Int_t
GetDetUId
(
Int_t
iDet
);
Int_t
GetDetInd
(
Int_t
iAddr
);
Int_t
GetTrackingStation
(
Int_t
iSmType
,
Int_t
iSm
,
Int_t
iRpc
)
const
;
Int_t
GetTrackingStation
(
CbmTofHit
*
pHit
)
const
{
return
GetTrackingStation
(
CbmTofAddress
::
GetSmType
(
pHit
->
GetAddress
()),
CbmTofAddress
::
GetSmId
(
pHit
->
GetAddress
()),
CbmTofAddress
::
GetRpcId
(
pHit
->
GetAddress
()));
};
Int_t
GetNbTrackingStations
()
const
{
return
fiNbTrackingStations
;
};
// Beamtime variables
TString
GetInputFileName
()
const
{
return
fsBeamInputFile
;
};
...
...
@@ -127,12 +137,15 @@ private:
// Geometry variables, text to be generated in the CreateGeometry macros
Double_t
fdSignalPropSpeed
;
// -> in parameter?
Int_t
fiNbSmTypes
;
//
Int_t
fiNbTrackingStations
;
//
TArrayI
fiNbSm
;
// [fiNbSmTypes]
TArrayI
fiNbRpc
;
// [fiNbSmTypes]
std
::
vector
<
TArrayI
>
fiNbGaps
;
// [fiNbSmTypes][fiNbRpc]
std
::
vector
<
TArrayD
>
fdGapSize
;
// [fiNbSmTypes][fiNbRpc]
std
::
vector
<
TArrayD
>
fdSigVel
;
// [fiNbSmTypes][fiNbSm*fiNbRpc] // Signal velocity
std
::
vector
<
TArrayI
>
fiTrkStation
;
// [fiNbSmTypes][fiNbSm*fiNbRpc] // Signal velocity
std
::
vector
<
TArrayI
>
fiNbCh
;
// [fiNbSmTypes][fiNbRpc]
std
::
vector
<
TArrayI
>
fiChType
;
// [fiNbSmTypes][fiNbRpc]
std
::
vector
<
TArrayI
>
...
...
reco/detectors/tof/CbmTofFindTracks.cxx
View file @
d8ee7a8d
...
...
@@ -1042,7 +1042,7 @@ Bool_t CbmTofFindTracks::WriteHistos() {
// ----- Public method Exec --------------------------------------------
void
CbmTofFindTracks
::
Exec
(
Option_t
*
opt
)
{
if
(
gLogger
->
IsLogNeeded
(
fair
::
Severity
::
debug
))
{
fDigiBdfPar
->
printParams
();
fDigiBdfPar
->
printParams
();
}
if
(
!
fEventsColl
)
{
// fTofHitArray = (TClonesArray*)fTofHitArrayIn->Clone();
...
...
@@ -1171,29 +1171,30 @@ void CbmTofFindTracks::ExecFind(Option_t* /*opt*/) {
Int_t
iSt
=
GetStationOfAddr
(
iDetId
);
MarkStationFired
(
iSt
);
LOG
(
debug
)
<<
Form
(
"Exec found Hit %02d, addr 0x%08x, sta %02d, %02d, HM
%02d, X %6.2f(%3.2f) Y "
"%6.2f(%3.2f) Z %6.2f(%3.2f) T %6.2f(%3.2f) (%6.2f)"
,
iHit
,
pHit
->
GetAddress
(),
GetStationOfAddr
(
iDetId
),
fDigiBdfPar
->
GetTrackingStation
(
pHit
),
fStationHMul
[
GetStationOfAddr
(
iDetId
)],
pHit
->
GetX
(),
pHit
->
GetDx
(),
pHit
->
GetY
(),
pHit
->
GetDy
(),
pHit
->
GetZ
(),
pHit
->
GetDz
(),
pHit
->
GetTime
(),
pHit
->
GetTimeError
(),
dTcor
);
LOG
(
debug
)
<<
Form
(
"Exec found Hit %02d, addr 0x%08x, sta %02d, %02d, HM "
"
%02d, X %6.2f(%3.2f) Y "
"%6.2f(%3.2f) Z %6.2f(%3.2f) T %6.2f(%3.2f) (%6.2f)"
,
iHit
,
pHit
->
GetAddress
(),
GetStationOfAddr
(
iDetId
),
fDigiBdfPar
->
GetTrackingStation
(
pHit
),
fStationHMul
[
GetStationOfAddr
(
iDetId
)],
pHit
->
GetX
(),
pHit
->
GetDx
(),
pHit
->
GetY
(),
pHit
->
GetDy
(),
pHit
->
GetZ
(),
pHit
->
GetDz
(),
pHit
->
GetTime
(),
pHit
->
GetTimeError
(),
dTcor
);
}
LOG
(
debug
)
<<
Form
(
"CbmTofFindTracks::Exec NStationsFired %d > %d Min ?, NbStations %d"
,
GetNStationsFired
(),
GetMinNofHits
(),
fDigiBdfPar
->
GetNbTrackingStations
());
LOG
(
debug
)
<<
Form
(
"CbmTofFindTracks::Exec NStationsFired %d > %d Min ?, NbStations %d"
,
GetNStationsFired
(),
GetMinNofHits
(),
fDigiBdfPar
->
GetNbTrackingStations
());
if
(
GetNStationsFired
()
<
GetMinNofHits
())
{
fInspectEvent
=
kFALSE
;
// mark event as non trackable
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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