CbmRoot
Simple/LxUtils.cxx
Go to the documentation of this file.
1 #include "Lx.h"
2 
3 using namespace std;
4 
5 // Used for building of the background on an invariant mass.
7 #ifdef MAKE_HISTOS
8  for (list<LxTrack*>::iterator i = caSpace.tracks.begin();
9  i != caSpace.tracks.end();
10  ++i) {
11  LxTrack* firstTrack = *i;
12 
13  if (0 == firstTrack->externalTrack) continue;
14 
15  CbmStsTrack t = *firstTrack->externalTrack->track;
16 
17  if (t.GetParamLast()->GetQp() > 0)
18  extFitter.DoFit(&t, -13);
19  else
20  extFitter.DoFit(&t, 13);
21 
22  // scaltype chi2Prim = extFitter.GetChiToVertex(&t, fPrimVtx);
23  extFitter.GetChiToVertex(&t, fPrimVtx);
24  FairTrackParam params;
25  extFitter.Extrapolate(&t, fPrimVtx->GetZ(), &params);
26 
27  scaltype p = 1 / params.GetQp();
28  scaltype p2 = p * p;
29 
30  if (p2 < 9) continue;
31 
32  scaltype tx2 = params.GetTx() * params.GetTx();
33  scaltype ty2 = params.GetTy() * params.GetTy();
34  scaltype pt2 = p2 * (tx2 + ty2) / (1 + tx2 + ty2);
35 
36  if (pt2 < 1) continue;
37 
38  t.SetParamFirst(&params);
39  *superEventData = t;
40  superEventTracks->Fill();
41  }
42 #endif //MAKE_HISTOS
43 }
LxTrack
Definition: LxCA.h:268
CbmTrack::GetParamLast
const FairTrackParam * GetParamLast() const
Definition: CbmTrack.h:62
scaltype
#define scaltype
Definition: CbmGlobalTrackingDefs.h:17
LxSpace::tracks
std::list< LxTrack * > tracks
Definition: LxCA.h:326
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
caSpace
LxSpace caSpace
Definition: riplet/Lx.cxx:72
LxFinder::SaveEventTracks
void SaveEventTracks()
Definition: Simple/LxUtils.cxx:6
Lx.h
LxExtTrack::track
CbmStsTrack * track
Definition: LxCA.h:250
CbmTrack::SetParamFirst
void SetParamFirst(const FairTrackParam *par)
Definition: CbmTrack.h:75
CbmStsTrack
Definition: CbmStsTrack.h:37
LxTrack::externalTrack
LxExtTrack * externalTrack
Definition: LxCA.h:269