StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StKFTrack.cxx
1 // $Id: StKFTrack.cxx,v 2.3 2018/04/10 11:32:09 smirnovd Exp $
2 #include "StKFTrack.h"
3 //________________________________________________________________________________
4 StKFTrack::StKFTrack(Int_t k, KFParticle *particle, Double_t chi2, Int_t iWE) :
5  fK(k), fWeight(-1), fW(-1), fOrigKFParticle(particle), fWestOrEast(iWE) {
6  if (particle) {
7  fParticle = KFParticle(*particle);
8  SetChi2(chi2);
9  }
10 }
11 //________________________________________________________________________________
12 void StKFTrack::SetChi2(Double_t chi2) {
13  fChi2 = chi2;
14  if (fChi2 >= 0) {
15  fWeight = TMath::Exp(-fChi2/(2.*StAnneling::Temperature()));
16  } else {
17  fWeight = -1;
18  }
19 }
20 //________________________________________________________________________________
21 Int_t StKFTrack::CorrectGePid(Int_t gePid) {
22  // By pass embedding particle redefinition
23  if (gePid == 99) gePid = 11151;
24  if (gePid == 207) gePid = 41;
25  if (gePid == 40001) gePid = 24;
26  if (gePid == 98) gePid = 18;
27  if (gePid == 40002) gePid = 32;
28  if (gePid == 97) gePid = 26;
29  if (gePid == 40003) gePid = 23;
30  if (gePid == 40004) gePid = 31;
31  if (gePid == 40005) gePid = 22;
32  if (gePid == 40006) gePid = 30;
33  if (gePid == 10150) gePid = 150;
34  if (gePid == 10151) gePid = 151;
35  if (gePid == 11151) gePid = 10151;
36  if (gePid == 10018) gePid = 98;
37  if (gePid == 10026) gePid = 97;
38  if (gePid == 10017) gePid = 17;
39  if (gePid == 10039) gePid = 39;
40  if (gePid == 10040) gePid = 40;
41  if (gePid == 98) gePid = 18;
42  if (gePid == 97) gePid = 26;
43  if (gePid < 0 || gePid > 50) {
44  std::cout << "Illegal gePid " << gePid << std::endl;
45  }
46  if (gePid < 0 || gePid > 50) gePid = 51;
47  return gePid;
48 }
49 //________________________________________________________________________________
50 std::ostream& operator<<(std::ostream& os, const StKFTrack& p) {
51  os << Form("%5i %9.3f %9.3f %9.3f %9.3f",
52  p.K(),p.Weight(),p.W(),p.OrigParticle()->GetZ(),p.Chi2());
53  return os;
54 }
55 // $Log: StKFTrack.cxx,v $
56 // Revision 2.3 2018/04/10 11:32:09 smirnovd
57 // Minor corrections across multiple files
58 //
59 // - Remove ClassImp macro
60 // - Change white space
61 // - Correct windows newlines to unix
62 // - Remove unused debugging
63 // - Correct StTpcRTSHitMaker header guard
64 // - Remove unused preprocessor directives in StiCA
65 // - Minor changes in status and debug print out
66 // - Remove using std namespace from StiKalmanTrackFinder
67 // - Remove includes for unused headers
68 //
69 // Revision 2.2 2012/06/11 15:33:41 fisyak
70 // std namespace
71 //
72 // Revision 2.1 2012/05/07 14:56:14 fisyak
73 // Add StKFVertexMaker
74 //
75 // Revision 1.2 2012/02/07 19:38:26 fisyak
76 // Repackage
77 //