CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
KalFitElement.cxx
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// File from KalFit module
3//
4// Filename : KalFitElement.cc
5//------------------------------------------------------------------------
6// Description :
7// Element is a base class which represents an element of detector
8//------------------------------------------------------------------------
9// Modif :
10//------------------------------------------------------------------------
11#include "CLHEP/Geometry/Point3D.h"
12#ifndef ENABLE_BACKWARDS_COMPATIBILITY
14 #endif
15//#include "TrackUtil/Helix.h"
16//#include "KalFitAlg/helix/Helix.h"
17
21
24
26{
27
29 double path = intersect(track, x);
30
31 //cout<<"KalFitElement: path= "<<path<<" intersect x "<<x<<endl;
32
33 if(path > 0){
34 // move pivot
35
36 //std::cout<<"KalFitElement: track helix1= "<<track.a()<<std::endl;
37 //std::cout<<" KalFitTrack::numf_: "<<KalFitTrack::numf_<<std::endl;
38 //std::cout<<" KalFitTrack::muls_: "<<muls_<<std::endl;
39 //std::cout<<" KalFitTrack::loss_: "<<loss_<<std::endl;
40
41 track.pivot_numf(x);
42
43 //std::cout<<"KalFitElement: track helix2= "<<track.a()<<std::endl;
44
45
46 // multiple scattering and energy loss
47 int index_element(index);
48 if (index_element==0) index_element=1;
49 if(muls_) track.ms(path, *material_, index_element);
50 if(loss_) track.eloss(path, *material_, index_element);
51
52 //cout<<"KalFitElement: track helix3= "<<track.a()<<endl;
53 }
54 //cout<<"KalfitElement: track helix2= "<<track.a()<<endl;
55}
56
57void KalFitElement::updateTrack(KalFitTrack& track, int index, double ri, double ro)
58{
59
61 double path = intersect(track, x,ri,ro);
62 if(path > 0){
63 // move pivot
64 track.pivot_numf(x);
65
66 // multiple scattering and energy loss
67 int index_element(index);
68 if (index_element==0) index_element=1;
69 if(muls_) track.ms(path, *material_, index_element);
70 if(loss_) track.eloss(path, *material_, index_element);
71 }
72}
74{
76 double path = intersect(track, x);
77 if(path > 0){
78 // move pivot
79 track.pivot_numf(x);
80
81 // multiple scattering and energy loss
82 if(muls_) track.ms(path, *material_, index);
83 if(loss_) track.eloss(path, *material_, index);
84 }
85}
86
88 int index)
89{
91 double path = intersect(track, x);
92 if(path > 0){
93 // move pivot
94 track.pivot_numf(x);
95
96 // multiple scattering and energy loss
97 if(muls_) track.ms(path, *material_, index);
98 if(loss_) track.eloss(path, *material_, index);
99 }
100}
101
102
105
108
110{
111 muls_ = i;
112}
113
115{
116 loss_ = i;
117}
118
120{
121 return muls_;
122}
123
125{
126 return loss_;
127}
Double_t x[10]
HepGeom::Point3D< double > HepPoint3D
const KalFitMaterial * material_
Material of this element.
static int muls(void)
static int muls_
Flags.
static int loss_
virtual void updateTrack(KalFitTrack &track, int index)
Update track according the material properties of the current element.
virtual double intersect(const KalFitTrack &track, HepPoint3D &x) const =0
Find intersection with Helix.
static int loss(void)
virtual void asso_rphi(KalmanFit::Lpav &circ, KalFitTrack &track)
virtual void updateTrack_rphi(KalFitTrack &track, int index)
virtual void updateTrack_alreadyfound(KalFitTrack &track, int index)
Description of a track class (<- Helix.cc)
Definition KalFitTrack.h:36
const HepPoint3D & pivot_numf(const HepPoint3D &newPivot)
Sets pivot position in a given mag field.
void ms(double path, const KalFitMaterial &m, int index)
void eloss(double path, const KalFitMaterial &m, int index)
Calculate total energy lost in material.