CbmRoot
LitTrackFitterMuon.h
Go to the documentation of this file.
1 
9 #ifndef LITTRACKFITTERMUON_H_
10 #define LITTRACKFITTERMUON_H_
11 
12 #include "../LitAddMaterial.h"
13 #include "../LitExtrapolation.h"
14 #include "../LitFiltration.h"
15 #include "../LitTrackParam.h"
16 #include "../LitTypes.h"
17 #include "LitDetectorGeometryMuon.h"
18 
19 namespace lit {
20  namespace parallel {
21 
22  /* Performs SIMDized/scalar fast track fit.
23  * Number of hits must be equal to the number of stations.
24  *
25  */
26  template<class T>
27  inline void LitTrackFitterMuon(LitTrack<T>& track,
28  const LitDetectorLayoutMuon<T>& layout) {
29  // track.paramLast = track.paramFirst;
30  LitTrackParam<T>& par = track.paramLast;
31  unsigned char ihit = 0;
32 
33  for (unsigned char isg = 0; isg < layout.GetNofStationGroups(); isg++) {
34  const LitStationGroupMuon<T>& stationGroup = layout.stationGroups[isg];
35  //Propagation through the absorber
36  LitFieldRegion<T> field;
37  LitFieldValue<T> v1, v2;
38  const LitAbsorber<T>& absorber = stationGroup.absorber;
39  absorber.fieldSliceFront.GetFieldValue(par.X, par.Y, v1);
40  absorber.fieldSliceBack.GetFieldValue(par.X, par.Y, v2);
41  field.Set(
42  v1, absorber.fieldSliceFront.Z, v2, absorber.fieldSliceBack.Z);
43  LitRK4Extrapolation(par, absorber.Z, field);
44  LitAddMaterial(par, absorber.material);
45 
46  //Approximate the field between the absorbers
47  const LitSubstationMuon<T>& ss1 =
48  stationGroup.stations[0].substations[0];
49  const LitSubstationMuon<T>& ss2 =
50  stationGroup.stations[1].substations[0];
51  ss1.fieldSlice.GetFieldValue(par.X, par.Y, v1);
52  ss2.fieldSlice.GetFieldValue(par.X, par.Y, v2);
53  field.Set(v1, ss1.fieldSlice.Z, v2, ss2.fieldSlice.Z);
54  for (unsigned char ist = 0; ist < stationGroup.GetNofStations();
55  ist++) {
56  const LitStationMuon<T>& station = stationGroup.stations[ist];
57  // const LitSubstationMuon<T>& substation0 = station.substations[0];
58  // LitRK4Extrapolation(par, substation0.Z, field);
59  // LitAddMaterial(par, substation0.material);
60  for (unsigned char iss = 0; iss < station.GetNofSubstations();
61  iss++) {
62  const LitSubstationMuon<T>& substation = station.substations[iss];
63  // Propagation through station
64  LitRK4Extrapolation(par, substation.Z, field);
65  // LitLineExtrapolation(par, substation.Z);
66  LitAddMaterial(par, substation.material);
67  }
68  LitPixelHit<T>* hit = track.hits[ihit];
69  LitFiltration(par, *hit);
70  ihit++;
71  }
72  }
73  }
74 
75  } // namespace parallel
76 } // namespace lit
77 #endif /* LITTRACKFITTERMUON_H_ */
lit::parallel::LitTrackFitterMuon
void LitTrackFitterMuon(LitTrack< T > &track, const LitDetectorLayoutMuon< T > &layout)
Definition: LitTrackFitterMuon.h:27
lit::parallel::LitSubstationMuon
Substation in muon detector layout.
Definition: LitSubstationMuon.h:23
lit::parallel::LitFiltration
void LitFiltration(LitTrackParam< T > &par, const LitPixelHit< T > &hit, T &chiSq)
Function implements Kalman filter update step for pixel hit.
Definition: LitFiltration.h:34
lit::parallel::LitTrackParam::X
T X
Definition: LitTrackParam.h:92
lit::parallel::LitStationMuon::GetNofSubstations
unsigned char GetNofSubstations() const
Return number of substations in station.
Definition: LitStationMuon.h:59
lit::parallel::LitTrackParam::Y
T Y
Definition: LitTrackParam.h:93
lit::parallel::LitStationGroupMuon
Definition: LitStationGroupMuon.h:26
lit::parallel::LitAddMaterial
void LitAddMaterial(LitTrackParam< T > &par, T siliconThickness)
Definition: LitAddMaterial.h:34
lit::parallel::LitDetectorLayoutMuon
Muon detector layout.
Definition: LitDetectorLayoutMuon.h:31
lit::parallel::LitTrackParam
Track parameters data class.
Definition: LitTrackParam.h:34
lit::parallel::LitFieldRegion
Storage for field approximation along Z.
Definition: LitFieldRegion.h:26
lit::parallel::LitFieldValue
Magnetic field value at a certain point in the space.
Definition: LitFieldValue.h:29
lit::parallel::LitTrack::paramLast
LitTrackParam< T > paramLast
Definition: LitTrack.h:76
lit::parallel::LitTrack
Base track data class.
Definition: LitTrack.h:31
lit::parallel::LitRK4Extrapolation
void LitRK4Extrapolation(LitTrackParam< T > &par, T zOut, const LitFieldGrid &field1, const LitFieldGrid &field2, const LitFieldGrid &field3)
Definition: LitExtrapolation.h:73
lit::parallel::LitStationGroupMuon::GetNofStations
unsigned char GetNofStations() const
Return number of stations in this station group.
Definition: LitStationGroupMuon.h:108
lit::parallel::LitFieldRegion::Set
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.
Definition: LitFieldRegion.h:40
lit::parallel::LitTrack::hits
vector< LitPixelHit< T > * > hits
Definition: LitTrack.h:77
lit::parallel::LitAbsorber
Absorber in muon detector layout.
Definition: LitAbsorber.h:23
lit::parallel::LitPixelHit
Base class for pixel hits.
Definition: LitPixelHit.h:29
lit::parallel::LitStationMuon
Station in muon detector layout.
Definition: LitStationMuon.h:26
lit::parallel::LitDetectorLayoutMuon::GetNofStationGroups
unsigned char GetNofStationGroups() const
Return number of station groups.
Definition: LitDetectorLayoutMuon.h:55
lit
Definition: LitTrackFinderNNVecElectron.h:19