00001
00002 #include "StMuMcTrack.h"
00003 #include "Stiostream.h"
00004 #include "TString.h"
00005 ClassImp(StMuMcTrack);
00006
00007 ostream& operator<<(ostream& os, const StMuMcTrack& v) {
00008 os << Form("Tk:%4i Vx:%4i Ge:%4i NoHits:%3i",v.Id(),v.IdVx(),v.GePid(),v.NoHits());
00009 os << Form(" q:%2i pT:%7.3f eta:%6.3f phi:%6.3f, p:%8.3f %8.3f %8.3f",v.Charge(),v.Pxyz().x(),v.Pxyz().y(),v.Pxyz().z());
00010 return os;
00011 }
00012
00013 Int_t StMuMcTrack::CorrectGePid(Int_t gePid) {
00014
00015 if (gePid == 99) gePid = 11151;
00016 if (gePid == 207) gePid = 41;
00017 if (gePid == 40001) gePid = 24;
00018 if (gePid == 98) gePid = 18;
00019 if (gePid == 40002) gePid = 32;
00020 if (gePid == 97) gePid = 26;
00021 if (gePid == 40003) gePid = 23;
00022 if (gePid == 40004) gePid = 31;
00023 if (gePid == 40005) gePid = 22;
00024 if (gePid == 40006) gePid = 30;
00025 if (gePid == 10150) gePid = 150;
00026 if (gePid == 10151) gePid = 151;
00027 if (gePid == 11151) gePid = 10151;
00028 if (gePid == 10018) gePid = 98;
00029 if (gePid == 10026) gePid = 97;
00030 if (gePid == 10017) gePid = 17;
00031 if (gePid == 10039) gePid = 39;
00032 if (gePid == 10040) gePid = 40;
00033 if (gePid == 98) gePid = 18;
00034 if (gePid == 97) gePid = 26;
00035 if (gePid < 0 || gePid > 50) {
00036
00037 gePid = 51;
00038 }
00039 return gePid;
00040 }
00041
00042 const Char_t *StMuMcTrack::GeName() {
00043 static const Char_t *GeNames[52] = {
00044
00045 "",
00046 "gamma" ,"e+" ,"e-" ,"nu" ,"mu+" ,"mu-" ,"pi0" ,"pi+" ,"pi-" ,"K0L",
00047 "K+" ,"K-" ,"N" ,"P" ,"Pbar" ,"K0S" ,"eta" ,"Lambda","Sigma+" ,"Sigma0",
00048 "S-" ,"Xi0" ,"Xi-" ,"Omega","Nbar" ,"LamBar","SBar-","SBar0" ,"SBar+" ,"XiBar0",
00049 "XiBar+" ,"OmBar","tau+","tau-" ,"D+" ,"D-" ,"D0" ,"Dbar0" ,"Ds+" ,"Ds-" ,
00050 "LambC+" ,"W+" ,"W-" ,"Z0" ,"H2" ,"H3" ,"alpha","geanti","He3" ,"Cerenk",
00051 "??????"};
00052 static TString Name;
00053 Int_t iGe = CorrectGePid(GePid());
00054 Name = GeNames[iGe];
00055 return Name.Data();
00056 }
00057
00058 void StMuMcTrack::Print(Option_t *option) const {cout << *this << endl;}
00059
00060
00061
00062
00063
00064
00065
00066