BOSS 7.0.2
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
18#include "KalFitAlg/KalFitMaterial.h"
19#include "KalFitAlg/KalFitTrack.h"
20#include "KalFitAlg/KalFitElement.h"
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
58{
60 double path = intersect(track, x);
61 if(path > 0){
62 // move pivot
63 track.pivot_numf(x);
64
65 // multiple scattering and energy loss
66 if(muls_) track.ms(path, *material_, index);
67 if(loss_) track.eloss(path, *material_, index);
68 }
69}
70
72 int index)
73{
75 double path = intersect(track, x);
76 if(path > 0){
77 // move pivot
78 track.pivot_numf(x);
79
80 // multiple scattering and energy loss
81 if(muls_) track.ms(path, *material_, index);
82 if(loss_) track.eloss(path, *material_, index);
83 }
84}
85
86
88{}
89
91{}
92
94{
95 muls_ = i;
96}
97
99{
100 loss_ = i;
101}
102
104{
105 return muls_;
106}
107
109{
110 return loss_;
111}
Double_t x[10]
HepGeom::Point3D< double > HepPoint3D
static int muls(void)
const KalFitMaterial * material_
Material of this element.
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 updateTrack_rphi(KalFitTrack &track, int index)
virtual void updateTrack_alreadyfound(KalFitTrack &track, int index)
virtual void asso_rphi(Lpav &circ, KalFitTrack &track)
Description of a track class (<- Helix.cc)
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.