CbmRoot
Loading...
Searching...
No Matches
LitTrackFitterMuon.h
Go to the documentation of this file.
1/* Copyright (C) 2009-2011 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
13#ifndef LITTRACKFITTERMUON_H_
14#define LITTRACKFITTERMUON_H_
15
16#include "LitAddMaterial.h"
17#include "LitDetectorGeometryMuon.h"
18#include "LitExtrapolation.h"
19#include "LitFiltration.h"
20#include "LitTrackParam.h"
21#include "LitTypes.h"
22
23namespace lit
24{
25 namespace parallel
26 {
27
28 /* Performs SIMDized/scalar fast track fit.
29 * Number of hits must be equal to the number of stations.
30 *
31 */
32 template<class T>
33 inline void LitTrackFitterMuon(LitTrack<T>& track, const LitDetectorLayoutMuon<T>& layout)
34 {
35 // track.paramLast = track.paramFirst;
36 LitTrackParam<T>& par = track.paramLast;
37 unsigned char ihit = 0;
38
39 for (unsigned char isg = 0; isg < layout.GetNofStationGroups(); isg++) {
40 const LitStationGroupMuon<T>& stationGroup = layout.stationGroups[isg];
41 //Propagation through the absorber
43 LitFieldValue<T> v1, v2;
44 const LitAbsorber<T>& absorber = stationGroup.absorber;
45 absorber.fieldSliceFront.GetFieldValue(par.X, par.Y, v1);
46 absorber.fieldSliceBack.GetFieldValue(par.X, par.Y, v2);
47 field.Set(v1, absorber.fieldSliceFront.Z, v2, absorber.fieldSliceBack.Z);
48 LitRK4Extrapolation(par, absorber.Z, field);
49 LitAddMaterial(par, absorber.material);
50
51 //Approximate the field between the absorbers
52 const LitSubstationMuon<T>& ss1 = stationGroup.stations[0].substations[0];
53 const LitSubstationMuon<T>& ss2 = stationGroup.stations[1].substations[0];
54 ss1.fieldSlice.GetFieldValue(par.X, par.Y, v1);
55 ss2.fieldSlice.GetFieldValue(par.X, par.Y, v2);
56 field.Set(v1, ss1.fieldSlice.Z, v2, ss2.fieldSlice.Z);
57 for (unsigned char ist = 0; ist < stationGroup.GetNofStations(); ist++) {
58 const LitStationMuon<T>& station = stationGroup.stations[ist];
59 // const LitSubstationMuon<T>& substation0 = station.substations[0];
60 // LitRK4Extrapolation(par, substation0.Z, field);
61 // LitAddMaterial(par, substation0.material);
62 for (unsigned char iss = 0; iss < station.GetNofSubstations(); iss++) {
63 const LitSubstationMuon<T>& substation = station.substations[iss];
64 // Propagation through station
65 LitRK4Extrapolation(par, substation.Z, field);
66 // LitLineExtrapolation(par, substation.Z);
67 LitAddMaterial(par, substation.material);
68 }
69 LitPixelHit<T>* hit = track.hits[ihit];
70 LitFiltration(par, *hit);
71 ihit++;
72 }
73 }
74 }
75
76 } // namespace parallel
77} // namespace lit
78#endif /* LITTRACKFITTERMUON_H_ */
Functions for calculation of the material effects.
Functions for track parameters extrapolation.
Track parameters data class.
Header files for SSE operations.
Absorber in muon detector layout.
Definition LitAbsorber.h:29
unsigned char GetNofStationGroups() const
Return number of station groups.
Storage for field approximation along Z.
void Set(const LitFieldValue< T > &B0, const T B0z, const LitFieldValue< T > &B1, const T B1z, const LitFieldValue< T > &B2, const T B2z)
Sets field region using three field values.
Magnetic field value at a certain point in the space.
Base class for pixel hits.
Definition LitPixelHit.h:35
unsigned char GetNofStations() const
Return number of stations in this station group.
Station in muon detector layout.
unsigned char GetNofSubstations() const
Return number of substations in station.
Substation in muon detector layout.
Track parameters data class.
Base track data class.
Definition LitTrack.h:37
vector< LitPixelHit< T > * > hits
Definition LitTrack.h:85
LitTrackParam< T > paramLast
Definition LitTrack.h:84
void LitRK4Extrapolation(LitTrackParam< T > &par, T zOut, const LitFieldGrid &field1, const LitFieldGrid &field2, const LitFieldGrid &field3)
void LitFiltration(LitTrackParam< T > &par, const LitPixelHit< T > &hit, T &chiSq)
Function implements Kalman filter update step for pixel hit.
void LitAddMaterial(LitTrackParam< T > &par, T siliconThickness)
void LitTrackFitterMuon(LitTrack< T > &track, const LitDetectorLayoutMuon< T > &layout)