CbmRoot
riplet/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  for (list<LxTrack*>::iterator i = caSpace.tracks.begin();
8  i != caSpace.tracks.end();
9  ++i) {
10  LxTrack* firstTrack = *i;
11 
12  if (0 == firstTrack->externalTrack) continue;
13 
14  CbmStsTrack t = *firstTrack->externalTrack->track;
15 
16  if (t.GetParamLast()->GetQp() > 0)
17  extFitter.DoFit(&t, -13);
18  else
19  extFitter.DoFit(&t, 13);
20 
21  // Double_t chi2Prim = extFitter.GetChiToVertex(&t, fPrimVtx);
22  extFitter.GetChiToVertex(&t, fPrimVtx);
23  FairTrackParam params;
24  extFitter.Extrapolate(&t, fPrimVtx->GetZ(), &params);
25 
26  Double_t p = 1 / params.GetQp();
27  Double_t p2 = p * p;
28 
29  if (p2 < 9) continue;
30 
31  Double_t tx2 = params.GetTx() * params.GetTx();
32  Double_t ty2 = params.GetTy() * params.GetTy();
33  Double_t pt2 = p2 * (tx2 + ty2) / (1 + tx2 + ty2);
34 
35  if (pt2 < 1) continue;
36 
37  t.SetParamFirst(&params);
38  *superEventData = t;
39  superEventTracks->Fill();
40  }
41 }
LxTrack
Definition: LxCA.h:268
CbmTrack::GetParamLast
const FairTrackParam * GetParamLast() const
Definition: CbmTrack.h:62
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
LxFinderTriplet::SaveEventTracks
void SaveEventTracks()
Definition: riplet/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