CbmRoot
CbmKFTrdHit.cxx
Go to the documentation of this file.
1 // ----------------------------------------------------------------------
2 // ----- CbmKFTrdHit -----
3 // ----- Created 12/12/2005 by D.Kresan -----
4 // ----------------------------------------------------------------------
5 
6 #include "CbmKFTrdHit.h"
7 
8 #include "CbmKF.h"
9 #include "CbmKFMaterial.h"
10 
11 #include "CbmTrdHit.h"
12 
13 #include "TMath.h"
14 #include "TVector3.h"
15 
16 #include <iostream>
17 
18 using std::cout;
19 using std::endl;
20 
21 
22 // ------------------------ Create from CbmTrdHit -----------------------
24  // Get pointer to the Kalman filter
25  CbmKF* KF = CbmKF::Instance();
26  if (NULL == KF) {
27  cout << "-E- CbmKFTrdHit::Create : "
28  << "Kalman filter is not instantiated." << endl;
29  return;
30  }
31  // Get index of material
33  // Store pointer to the material
34  wall = (MaterialIndex >= 0) ? (CbmKFWall*) KF->vMaterial[MaterialIndex] : 0;
35 
36  // Get position and position error
37  TVector3 pos, err;
38  hit->Position(pos);
39  hit->PositionError(err);
40  // Store values
41  /* FitPoint.x = pos.X();
42  FitPoint.y = pos.Y();
43  FitPoint.z = pos.Z();
44  FitPoint.V[0] = 1e-8 * err.X() * err.X();
45  FitPoint.V[1] = 0;
46  FitPoint.V[2] = 1e-8 * err.Y() * err.Y();*/
47  Double_t u = pos.X();
48  Double_t phi = 0.;
49  Double_t sigma2 = err.X() * err.X();
50  if (err.Y() < err.X()) {
51  u = pos.Y();
52  phi = TMath::Pi() / 2.;
53  sigma2 = err.Y() * err.Y();
54  }
55  FitPoint.Set(pos.Z(), u, phi, sigma2);
56 }
57 // ----------------------------------------------------------------------
58 
59 
60 // ------------------------------ Filter --------------------------------
62  Bool_t /*downstream*/,
63  Double_t& QP0) {
64  Bool_t err = 0;
65  /*
66  Double_t zfst, zlst, zend;
67  if( downstream ) {
68  zfst = wall->ZReference - wall->ZThickness/4.;
69  zlst = wall->ZReference + wall->ZThickness/4.;
70  zend = wall->ZReference + wall->ZThickness/2.;
71  }
72  else {
73  zfst = wall->ZReference + wall->ZThickness/4.;
74  zlst = wall->ZReference - wall->ZThickness/4.;
75  zend = wall->ZReference - wall->ZThickness/2.;
76  }
77  Double_t zthick = wall->ZThickness/2.;
78 */
79  // wall->Pass( zfst, zthick, track, downstream, QP0 );
80  // KF->Propagate( track, FitPoint.z, QP0 );
81 
82  err = err || track.Propagate(FitPoint.z, QP0);
83  err = err || FitPoint.Filter(track);
84 
85  // wall->Pass( zlst, zthick, track, downstream, QP0 );
86  // KF->Propagate( track, zend, QP0 );
87  return err;
88 }
89 // ----------------------------------------------------------------------
90 
91 
ClassImp
ClassImp(CbmKFTrdHit)
CbmKFTrdHit::wall
CbmKFWall * wall
Definition: CbmKFTrdHit.h:37
CbmPixelHit::Position
void Position(TVector3 &pos) const
Copies hit position to pos.
Definition: CbmPixelHit.cxx:64
CbmKF.h
CbmKFTrdHit.h
CbmKF::GetMaterialIndex
Int_t GetMaterialIndex(Int_t uid)
Definition: CbmKF.cxx:328
CbmTrdHit
data class for a reconstructed Energy-4D measurement in the TRD
Definition: CbmTrdHit.h:35
CbmKF
Definition: CbmKF.h:33
CbmKFUMeasurement::Set
void Set(Double_t z, Double_t u, Double_t phi, Double_t sigma2)
CbmKF::Instance
static CbmKF * Instance()
Definition: CbmKF.h:39
CbmKFHit::MaterialIndex
Int_t MaterialIndex
Definition: CbmKFHit.h:22
CbmKFUMeasurement::Filter
Int_t Filter(CbmKFTrackInterface &track)
Definition: CbmKFUMeasurement.cxx:22
CbmKFWall
Definition: CbmKFMaterial.h:69
CbmKF::vMaterial
std::vector< CbmKFMaterial * > vMaterial
Definition: CbmKF.h:71
CbmKFTrdHit::Create
void Create(CbmTrdHit *hit)
Definition: CbmKFTrdHit.cxx:23
CbmKFUMeasurement::z
Double_t z
Definition: CbmKFUMeasurement.h:30
CbmTrdHit.h
Class for hits in TRD detector.
xMath::Pi
double Pi()
Definition: xMath.h:5
CbmKFTrackInterface
Definition: CbmKFTrackInterface.h:26
CbmKFTrdHit::Filter
Int_t Filter(CbmKFTrackInterface &track, Bool_t downstream, Double_t &QP0)
Definition: CbmKFTrdHit.cxx:61
CbmKFMaterial.h
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
CbmKFTrackInterface::Propagate
Int_t Propagate(Double_t z_out, Double_t QP0)
Definition: CbmKFTrackInterface.cxx:449
CbmKFTrdHit
Definition: CbmKFTrdHit.h:23
CbmKFTrdHit::FitPoint
CbmKFUMeasurement FitPoint
Definition: CbmKFTrdHit.h:30
CbmPixelHit::PositionError
void PositionError(TVector3 &dpos) const
Copies hit position error to pos.
Definition: CbmPixelHit.cxx:68
CbmTrdHit::GetPlaneId
Int_t GetPlaneId() const
Inherited from CbmBaseHit.
Definition: CbmTrdHit.h:73