2 #include "StMuMcTrack.h"
8 StMuMcTrack::StMuMcTrack(
const g2t_track_st &t) : TObject(), mGePid(t.ge_pid), mId(t.id), mIsShower(t.is_shower), mItrmdVertex(t.itrmd_vertex_p),
9 mIdVx(t.start_vertex_p), mIdVxEnd(t.stop_vertex_p), mCharge(t.charge), mE(t.e), mEta(t. eta), mPxyz(t.p), mpT(t.pt), mPtot(t.ptot),
10 mRapidity(t.rapidity) {
11 mHits[kctb] = 0xff & t.n_ctb_hit;
12 mHits[keem] = 0xff & t.n_eem_hit;
13 mHits[kemc] = 0xff & t.n_emc_hit;
14 mHits[kesm] = 0xff & t.n_esm_hit;
15 mHits[kftp] = 0xff & t.n_ftp_hit;
16 mHits[kgem] = 0xff & t.n_gem_hit;
17 mHits[khpd] = 0xff & t.n_hpd_hit;
18 mHits[kist] = 0xff & t.n_ist_hit;
19 mHits[kigt] = 0xff & t.n_igt_hit;
20 mHits[kfst] = 0xff & t.n_fst_hit;
21 mHits[kfgt] = 0xff & t.n_fgt_hit;
22 mHits[kfpd] = 0xff & t.n_fpd_hit;
23 mHits[kmwc] = 0xff & t.n_mwc_hit;
24 mHits[kpgc] = 0xff & t.n_pgc_hit;
25 mHits[kpmd] = 0xff & t.n_pmd_hit;
26 mHits[ksmd] = 0xff & t.n_smd_hit;
27 mHits[kssd] = 0xff & t.n_ssd_hit;
28 mHits[ksvt] = 0xff & t.n_svt_hit;
29 mHits[kpix] = 0xff & t.n_pix_hit;
30 mHits[ktof] = 0xff & t.n_tof_hit;
31 mHits[ktpc] = 0xff & t.n_tpc_hit;
32 mHits[kvpd] = 0xff & t.n_vpd_hit;
33 mHits[ketr] = 0xff & t.n_etr_hit;
34 mHits[khca] = 0xff & t.n_hca_hit;
35 mHits[kfts] = 0xff & t.n_fts_hit;
36 mHits[keto] = 0xff & t.n_eto_hit;
37 mHits[kstg] = 0xff & t.n_stg_hit;
38 mHits[kwca] = 0xff & t.n_wca_hit;
39 mHits[kpre] = 0xff & t.n_pre_hit;
40 mHits[kepd] = 0xff & t.n_epd_hit;
42 assert(t.pt<0 || mPxyz.perp()>1e-6);
49 ostream& operator<<(ostream& os,
const StMuMcTrack& v) {
51 os << Form(
"Tk:%4i Vx:%4i Ge:%4i NoHits:%3i",v.Id(),v.IdVx(),v.GePid(),v.NoHits());
52 os << Form(
" q:%2i pT:%7.3f eta:%6.3f phi:%6.3f p:%8.3f px:%8.3f py:%8.3f pz:%8.3f",v.Charge(),v.pT(), v.Eta(),
53 TMath::ATan2(v.Pxyz().y(),v.Pxyz().x()), v.Ptot(), v.Pxyz().x(),v.Pxyz().y(),v.Pxyz().z());
57 Int_t StMuMcTrack::CorrectGePid(Int_t gePid) {
59 if (gePid == 99) gePid = 11151;
60 if (gePid == 207) gePid = 41;
61 if (gePid == 40001) gePid = 24;
62 if (gePid == 98) gePid = 18;
63 if (gePid == 40002) gePid = 32;
64 if (gePid == 97) gePid = 26;
65 if (gePid == 40003) gePid = 23;
66 if (gePid == 40004) gePid = 31;
67 if (gePid == 40005) gePid = 22;
68 if (gePid == 40006) gePid = 30;
69 if (gePid == 10150) gePid = 150;
70 if (gePid == 10151) gePid = 151;
71 if (gePid == 11151) gePid = 10151;
72 if (gePid == 10018) gePid = 98;
73 if (gePid == 10026) gePid = 97;
74 if (gePid == 10017) gePid = 17;
75 if (gePid == 10039) gePid = 39;
76 if (gePid == 10040) gePid = 40;
77 if (gePid == 98) gePid = 18;
78 if (gePid == 97) gePid = 26;
79 if (gePid < 0 || gePid > 50) {
86 const Char_t *StMuMcTrack::GeName() {
87 static const Char_t *GeNames[52] = {
90 "gamma" ,
"e+" ,
"e-" ,
"nu" ,
"mu+" ,
"mu-" ,
"pi0" ,
"pi+" ,
"pi-" ,
"K0L",
91 "K+" ,
"K-" ,
"N" ,
"P" ,
"Pbar" ,
"K0S" ,
"eta" ,
"Lambda",
"Sigma+" ,
"Sigma0",
92 "S-" ,
"Xi0" ,
"Xi-" ,
"Omega",
"Nbar" ,
"LamBar",
"SBar-",
"SBar0" ,
"SBar+" ,
"XiBar0",
93 "XiBar+" ,
"OmBar",
"tau+",
"tau-" ,
"D+" ,
"D-" ,
"D0" ,
"Dbar0" ,
"Ds+" ,
"Ds-" ,
94 "LambC+" ,
"W+" ,
"W-" ,
"Z0" ,
"H2" ,
"H3" ,
"alpha",
"geanti",
"He3" ,
"Cerenk",
97 Int_t iGe = CorrectGePid(GePid());
virtual void Print(Option_t *option="") const
Print track info.