diff --git a/StDb/idl/StvHitErrs.idl b/StDb/idl/StvHitErrs.idl deleted file mode 100644 index 4c9791101c8..00000000000 --- a/StDb/idl/StvHitErrs.idl +++ /dev/null @@ -1,16 +0,0 @@ -/* HitError.idl -* -* Table: StvHitErrs -* Description: Simplest parameters used to calculate hit errors -* Typical case some pixel detector. X axis supposed to be orthogonal -* to hit plane. Errors provided only for Y,Z coordinates in a local frame -* - yErr => Y resolution **2 in local frame - zErr => Z resolution **2 in local frame -*/ - -struct StvHitErrs -{ -double yErr ; /* Y resolution **2 in local frame */ -double zErr ; /* Z resolution **2 in local frame */ -}; diff --git a/StDb/idl/StvKonst.idl b/StDb/idl/StvKonst.idl deleted file mode 100644 index f4696393856..00000000000 --- a/StDb/idl/StvKonst.idl +++ /dev/null @@ -1,52 +0,0 @@ -/* Stv constants */ - -struct StvKonst { - float mXi2Hit; /*Xi2 to accept new hit*/ - float mXi2Vtx; /*Xi2 to accept vertex */ - float mXi2Joi; /*Xi2 in Refit join left & right subtrack*/ - float mXi2Trk; /*Xi2 for track */ - float mXi2Hlx; /*Xi2 in Helix */ - float mDca2dZeroXY; /*max 2d dca to X=Y=0 for primary track*/ - float mDca3dVertex; /*max 3d dca to vertex for primary track*/ - float mMaxCurv; /*Maximal allowed curvature*/ - float mMinP2; /*Minimal allowed momentum**2 for Geant3*/ - float mMaxPti; /*Maximal allowed 1/pt */ - float mMaxRes; /*Maximal allowed residual */ - float mCoeWindow; /*Error coeficient for searching window*/ - float mMaxWindow; /*Maximal window to search hits*/ - - long mMinSeedHits; /*Min number of seed hits allowed MidEta*/ - long mMaxSeedHits; /*Max number of seed hits allowed MidEta*/ - - long mMinHits; /*Min number of hits allowed MidEta*/ - long mNorHits; /*Normal number of hits allowed MidEta*/ - long mGoodHits; /*Min umber of Good hits in track MidEta*/ - - long mMinTotHits; /*Min number hits per track*/ - long mMinGoodHits; /*Min number good hits for track*/ - long mMinContHits; /*Min length of good hit sequence*/ - long mMaxContNits; /*Max length of acceptable non hit sequence*/ - long mMaxTotNits; /*Max number of acceptable non hits*/ - float mRxyMax; /*Max radius for tracking*/ - float mZMax; /*Max Z for tracking*/ - - - long mMinSeedHitsFw; /*Min number of seed hits allowed MidEta*/ - long mMaxSeedHitsFw; /*Max number of seed hits allowed MidEta*/ - - long mMinHitsFw; /*Min number of hits allowed forwEta*/ - long mNorHitsFw; /*Normal number of hits allowed forwEta*/ - long mGoodHitsFw; /*Min umber of Good hits in track forwEta*/ - - long mMinTotHitsFw; /*Min number hits per track forwEta*/ - long mMinGoodHitsFw; /*Min number good hits for track forwEta*/ - long mMinContHitsFw; /*Min length of good hit sequence forwEta*/ - long mMaxContNitsFw; /*Max length of acceptable non hit sequence forwEta*/ - long mMaxTotNitsFw; /*Max number of acceptable non hits*/ - float mRxyMaxFw; /*Max radius for tracking*/ - float mZMaxFw; /*Max Z for tracking*/ - - -}; - - diff --git a/StDb/idl/StvTpcHitErrs.idl b/StDb/idl/StvTpcHitErrs.idl deleted file mode 100644 index 0d6e1d43a85..00000000000 --- a/StDb/idl/StvTpcHitErrs.idl +++ /dev/null @@ -1,39 +0,0 @@ -/* StvTpcHitErrs.idl -* -* Table: StvTpcHitErrs -* Description: Collection of parameters used to calculate hit errors. -* There should be one such parameter set for each detector. Some detectors, such -* as the TPC may have more. -* - yErr => Intrinsic resolution, padrow or Y direction - zErr => Intrinsic resolution, Z direction - thkDet=> Effective detector thickness , not fitted - yyDiff=> Diffusion in XY direction - zzDiff=> Diffusion in Z direction - yFact=> Error factor in Y-direction (supposed to be <1 but life is hard) - zFact=> Error factor in Z-direction (supposed to be <1 but life is hard) - zAB2 => Constant member in Z direction (a*b)**2 - - = thkDet/12 - = (tP2*thkDet/12 +yyDiff/cP2)*yFact**2 +yErr - = (tL2/cP2*(thkDet/12 + yyDiff) +zAB2/180/cP2 + zzDiff)*zFact**2+zErr - - = tP * thkDet/12 *yFact - = tL/cP*(thkDet/12)*zFact - = (tP*tL)/cP*((thkDet/12 + yyDiff/yFact))*yFact*zFact - - - -*/ - -struct StvTpcHitErrs -{ -double yErr ; /* Intrinsic resolution, padrow or Y direction */ -double zErr ; /* Intrinsic resolution, z direction */ -double thkDet; /* detector thickness , not fitted */ -double yyDiff; /* Diffusion in XY direction */ -double zzDiff; /* Diffusion in Z direction */ -double yFact ; /* Error factor in Y-direction */ -double zFact ; /* Error factor in Z-direction */ -double zAB2 ; /* Constant member in Z direction (a*b)**2 */ -}; diff --git a/StRoot/StBFChain/BigFullChain.h b/StRoot/StBFChain/BigFullChain.h index c1c933650aa..0ce20af62e6 100644 --- a/StRoot/StBFChain/BigFullChain.h +++ b/StRoot/StBFChain/BigFullChain.h @@ -448,10 +448,6 @@ Bfc_st BFC[] = { // standard chains , "/star/rcf/simu/rcf9066_20_1000evts.fzd",kFALSE}, {"eval_Sti_pp200.MC.y2008","","","MC.y2008,Sti,fzin,MiniMcMk","","" , "/star/rcf/simu/rcf9992_01_1000evts.fzd",kFALSE}, - {"eval_StvCA_dau200.MC.Stv.y2008","","","MC.in.y2008,StvPulls,StvCA,in,MiniMcMk","","" - , "/star/rcf/simu/rcf11025_2040_100evts.event.root",kFALSE}, - {"eval_Stv_dau200.MC.y2008","","","MC.in.y2008,Stv,StvPulls,in,MiniMcMk","","" - , "/star/rcf/simu/rcf11025_2040_100evts.event.root",kFALSE}, {"eval_Sti.AgML_pp500.MC.y2009","","","MC.y2009a,Sti,AgML,fzin,MiniMcMk","","" , "/star/rcf/simu/rcf9994_01_1000evts.fzd",kFALSE}, {"eval_StiCA_pp200.MC.y2009","","","MC.y2009a,StiCA,fzin,MiniMcMk","","" @@ -462,10 +458,6 @@ Bfc_st BFC[] = { // standard chains , "/star/rcf/simu/rcf9993_01_1000evts.fzd",kFALSE}, {"eval_Sti_pp500.MC.y2009","","","MC.y2009a,Sti,fzin,MiniMcMk","","" , "/star/rcf/simu/rcf9994_01_1000evts.fzd",kFALSE}, - {"eval_StvCA_pp500.MC.y2009","","","MC.in.y2009,StvPulls,StvCA,in,MiniMcMk","","" - , "/star/rcf/simu/rcf11026_1020_50evts_pileup.event.root",kFALSE}, - {"eval_Stv_pp500.MC.y2009","","","MC.in.y2009,Stv,StvPulls,in,MiniMcMk","","" - , "/star/rcf/simu/rcf11026_1020_50evts_pileup.event.root",kFALSE}, {"eval_Sti.AgML_auau11.MC.y2010","","","MC.y2010a,Sti,AgML,fzin,MiniMcMk","","" , "/star/rcf/simu/rcf10031_1_100evts.fzd",kFALSE}, {"eval_Sti.AgML_auau200.MC.y2010","","","MC.y2010,Sti,AgML,fzin,MiniMcMk","","" @@ -490,16 +482,6 @@ Bfc_st BFC[] = { // standard chains , "/star/rcf/simu/rcf10033_1_100evts.fzd",kFALSE}, {"eval_StiCA_auau7.MC.y2010","","","MC.y2010a,StiCA,fzin,MiniMcMk","","" , "/star/rcf/simu/rcf10030_1_100evts.fzd",kFALSE}, - {"eval_Stv_auau200.MC.y2010","","","MC.in.y2010,Stv,StvPulls,in,MiniMcMk","","" - , "/star/rcf/simu/rcf11022_2241_50evts.event.root",kFALSE}, - {"eval_StvCA_auau200.MC.y2010","","","MC.in.y2010,StvPulls,StvCA,in,MiniMcMk","","" - , "/star/rcf/simu/rcf11022_2241_50evts.event.root",kFALSE}, - {"eval_StvCA_auau39.MC.y2010","","","MC.y2010a,StvCA","","" - , "/star/rcf/simu/rcf10032_1_100evts.fzd",kFALSE}, - {"eval_StvCA_auau62.MC.y2010","","","MC.y2010a,StvCA","","" - , "/star/rcf/simu/rcf10033_1_100evts.fzd",kFALSE}, - {"eval_StvCA_auau7.MC.y2010","","","MC.y2010a,StvCA","","" - , "/star/rcf/simu/rcf10030_1_100evts.fzd",kFALSE}, {"eval_Sti.AgML_auau200.MC.y2011","","","MC.y2011,Sti,AgML,fzin,MiniMcMk","","" , "/star/rcf/simu/rcf11023_2060_25evts.fzd",kFALSE}, {"eval_Sti.AgML_pp500.MC.y2011","","","MC.fast.y2011,AgML,Sti,fzin,MiniMcMk","","" @@ -518,10 +500,6 @@ Bfc_st BFC[] = { // standard chains ,"/star/rcf/simu/pp500/pythia/pileup/rcf10100_90_200evts_Wplus_enu.fzd\n" " gfile b /star/rcf/simu/pp500/pythia/pileup/rcf10100_90_4000evts_minb.fzd\n" " mode TPCE back 4001400\n gback 400 400 0.1 106.6" ,kFALSE}, - {"eval_Stv_auau200.MC.y2011","","","MC.in.y2011,Stv,StvPulls,in,MiniMcMk","","" - , "/star/rcf/simu/rcf11023_2060_25evts.event.root",kFALSE}, - {"eval_StvCA_auau200.MC.y2011","","","MC.in.y2011,StvPulls,StvCA,in,MiniMcMk","","" - , "/star/rcf/simu/rcf11023_2060_25evts.event.root",kFALSE}, {"eval_Sti.AgML_CuAu200.MC.y2012","","","MC.y2012,Sti,AgML,fzin,MiniMcMk","","" , "/star/rcf/simu/rcf12003_1_100evts.fzd",kFALSE}, {"eval_Sti.AgML_pp200.MC.y2012","","","MC.y2012,Sti,AgML,fzin,MiniMcMk","","" @@ -546,12 +524,6 @@ Bfc_st BFC[] = { // standard chains , "/star/rcf/test/daq/2007/112/8112052/st_physics_8112052_raw_1020010.daq",kFALSE}, {"eval_Sti.RC.auau200.MB.y2007","","","RC.y2007,pmdReco,ITTF,Sti","","" , "/star/rcf/test/daq/2007/113/8113044/st_physics_8113044_raw_1040042.daq",kFALSE}, - {"eval_Stv.AgML.RC.auau200.MB.y2007","","","RC.y2007,Stv,AgML","","" - , "/star/rcf/test/daq/2007/113/8113044/st_physics_8113044_raw_1040042.daq",kFALSE}, - {"eval_StvCA.RC.auau200.MB.y2007","","","RC.y2007.NoSvt,StvCA","","" - , "/star/rcf/test/daq/2007/113/8113044/st_physics_8113044_raw_1040042.daq",kFALSE}, - {"eval_Stv.RC.auau200.MB.y2007","","","RC.y2007.NoSvt,Stv","","" - , "/star/rcf/test/daq/2007/113/8113044/st_physics_8113044_raw_1040042.daq",kFALSE}, {"eval_Sti.AgML.RC.dau200.y2008","","","RC.y2008,ITTF,AgML,Sti","","" , "/star/rcf/test/daq/2007/352/st_physics_8352025_raw_1030011.daq",kFALSE}, {"eval_StiCA.RC.dau200.y2008","","","RC.y2008,StiCA","","" @@ -562,16 +534,6 @@ Bfc_st BFC[] = { // standard chains , "/star/rcf/test/daq/2007/352/st_physics_8352025_raw_1030011.daq",kFALSE}, {"eval_Sti.RC.pp200.y2008","","","RC.pp.y2008,ITTF,Sti","","" , "/star/rcf/test/daq/2008/043/st_physics_9043046_raw_2030002.daq",kFALSE}, - {"eval_Stv.AgML.RC.dau200.y2008","","","RC.y2008.notof,Stv,AgML","","" - , "/star/rcf/test/daq/2007/352/st_physics_8352025_raw_1030011.daq",kFALSE}, - {"eval_StvCA.RC.dau200.y2008","","","RC.y2008.notof,StvCA","","" - , "/star/rcf/test/daq/2007/352/st_physics_8352025_raw_1030011.daq",kFALSE}, - {"eval_StvCA.RC.pp200.y2008","","","RC.pp.y2008.Minuit,StvCA","","" - , "/star/rcf/test/daq/2008/043/st_physics_9043046_raw_2030002.daq",kFALSE}, - {"eval_Stv.RC.dau200.y2008","","","RC.y2008.notof,Stv","","" - , "/star/rcf/test/daq/2007/352/st_physics_8352025_raw_1030011.daq",kFALSE}, - {"eval_Stv.RC.pp200.y2008","","","RC.pp.y2008.Minuit,Stv","","" - , "/star/rcf/test/daq/2008/043/st_physics_9043046_raw_2030002.daq",kFALSE}, {"eval_Sti.AgML.RC.pp500.y2009","","","RC.pp.y2009.VFPP,ITTF,Sti","","" , "/star/rcf/test/daq/2009/085/st_physics_10085024_raw_2020001.daq",kFALSE}, {"eval_StiCA.RC.pp200.y2009","","","RC.pp.y2009.VFPP,StiCA","","" @@ -582,16 +544,6 @@ Bfc_st BFC[] = { // standard chains , "/star/rcf/test/daq/2009/115/st_physics_10115020_raw_5020001.daq",kFALSE}, {"eval_Sti.RC.pp500.y2009","","","RC.pp.y2009.VFPP,ITTF,Sti","","" , "/star/rcf/test/daq/2009/085/st_physics_10085024_raw_2020001.daq",kFALSE}, - {"eval_Stv.AgML.RC.pp500.y2009","","","RC.pp.y2009,Stv,AgML","","" - , "/star/rcf/test/daq/2009/085/st_physics_10085024_raw_2020001.daq",kFALSE}, - {"eval_StvCA.RC.pp200.y2009","","","RC.pp.y2009,StvCA","","" - , "/star/rcf/test/daq/2009/115/st_physics_10115020_raw_5020001.daq",kFALSE}, - {"eval_StvCA.RC.pp500.y2009","","","RC.pp.y2009,StvCA","","" - , "/star/rcf/test/daq/2009/085/st_physics_10085024_raw_2020001.daq",kFALSE}, - {"eval_Stv.RC.pp200.y2009","","","RC.pp.y2009,Stv","","" - , "/star/rcf/test/daq/2009/115/st_physics_10115020_raw_5020001.daq",kFALSE}, - {"eval_Stv.RC.pp500.y2009","","","RC.pp.y2009,Stv","","" - , "/star/rcf/test/daq/2009/085/st_physics_10085024_raw_2020001.daq",kFALSE}, {"eval_Sti.AgML.RC.auau200.y2010","","","RC.y2010.notof,AgML,Sti","","" , "/star/rcf/test/daq/2010/029/st_physics_11029020_raw_1030002.daq",kFALSE}, {"eval_Sti.AgML.RC.auau39.y2010","","","RC.y2010.notof,AgML,Sti","","" @@ -619,34 +571,6 @@ Bfc_st BFC[] = { // standard chains #if 0 {"eval_Sti.RC.auau7.y2010","","","RC.y2010,Sti","","" , "/star/rcf/test/daq/2010/138/st_physics_11138001_raw_2020001.daq",kFALSE}, -#endif - {"eval_Stv.AgML.RC.auau200.y2010","","","RC.y2010.notof,Stv,AgML","","" - , "/star/rcf/test/daq/2010/029/st_physics_11029020_raw_1030002.daq",kFALSE}, - {"eval_Stv.AgML.RC.auau39.y2010","","","RC.y2010.notof,Stv,AgML","","" - , "/star/rcf/test/daq/2010/100/st_physics_11100070_raw_1030001.daq",kFALSE}, - {"eval_StvCA.RC.auau11.y2010","","","RC.y2010.notof,StvCA","","" - , "/star/rcf/test/daq/2010/157/st_physics_11157020_raw_2030001.daq",kFALSE}, - {"eval_StvCA.RC.auau200.y2010","","","RC.y2010.notof,StvCA","","" - , "/star/rcf/test/daq/2010/029/st_physics_11029020_raw_1030002.daq",kFALSE}, - {"eval_StvCA.RC.auau39.y2010","","","RC.y2010.notof,StvCA","","" - , "/star/rcf/test/daq/2010/100/st_physics_11100070_raw_1030001.daq",kFALSE}, - {"eval_StvCA.RC.auau62.y2010","","","RC.y2010.notof,StvCA","","" - , "/star/rcf/test/daq/2010/098/st_physics_11098050_raw_3020001.daq",kFALSE}, -#if 0 - {"eval_StvCA.RC.auau7.y2010","","","RC.y2010.notof,StvCA","","" - , "/star/rcf/test/daq/2010/138/st_physics_11138001_raw_2020001.daq",kFALSE}, -#endif - {"eval_Stv.RC.auau11.y2010","","","RC.y2010.notof,Stv","","" - , "/star/rcf/test/daq/2010/157/st_physics_11157020_raw_2030001.daq",kFALSE}, - {"eval_Stv.RC.auau200.y2010","","","RC.y2010.notof,Stv","","" - , "/star/rcf/test/daq/2010/029/st_physics_11029020_raw_1030002.daq",kFALSE}, - {"eval_Stv.RC.auau39.y2010","","","RC.y2010.notof,Stv","","" - , "/star/rcf/test/daq/2010/100/st_physics_11100070_raw_1030001.daq",kFALSE}, - {"eval_Stv.RC.auau62.y2010","","","RC.y2010.notof,Stv","","" - , "/star/rcf/test/daq/2010/098/st_physics_11098050_raw_3020001.daq",kFALSE}, -#if 0 - {"eval_Stv.RC.auau7.y2010","","","RC.y2010.notof,Stv","","" - , "/star/rcf/test/daq/2010/138/st_physics_11138001_raw_2020001.daq",kFALSE}, #endif {"eval_Sti.AgML.RC.auau200.y2011","","","RC.y2011,AgML,Sti","","" , "/star/rcf/test/daq/2011/130/st_physics_12130084_raw_5020002.daq",kFALSE}, @@ -670,26 +594,6 @@ Bfc_st BFC[] = { // standard chains , "/star/rcf/test/daq/2011/174/st_physics_12174106_raw_2040001.daq",kFALSE}, {"eval_Sti.RC.pp500.y2011","","","RC.pp.y2011.VFPPV,pmdReco,mtdDat,Sti","","" , "/star/rcf/test/daq/2011/059/st_physics_12059038_raw_2030002.daq",kFALSE}, - {"eval_Stv.AgML.RC.auau200.y2011","","","RC.y2011,Stv,AgML","","" - , "/star/rcf/test/daq/2011/130/st_physics_12130084_raw_5020002.daq",kFALSE}, - {"eval_Stv.AgML.RC.auau20.y2011","","","RC.y2011,Stv,AgML","","" - , "/star/rcf/test/daq/2011/122/st_physics_12122018_raw_2010002.daq",kFALSE}, - {"eval_StvCA.RC.auau200.y2011","","","RC.y2011,StvCA","","" - , "/star/rcf/test/daq/2011/130/st_physics_12130084_raw_5020002.daq",kFALSE}, - {"eval_StvCA.RC.auau20.y2011","","","RC.y2011,StvCA","","" - , "/star/rcf/test/daq/2011/122/st_physics_12122018_raw_2010002.daq",kFALSE}, - {"eval_StvCA.RC.auau27.y2011","","","RC.y2011,StvCA","","" - , "/star/rcf/test/daq/2011/174/st_physics_12174106_raw_2040001.daq",kFALSE}, - {"eval_StvCA.RC.pp500.y2011","","","RC.pp.y2011,pmdReco,mtdDat,StvCA","","" - , "/star/rcf/test/daq/2011/059/st_physics_12059038_raw_2030002.daq",kFALSE}, - {"eval_Stv.RC.auau200.y2011","","","RC.y2011,Stv","","" - , "/star/rcf/test/daq/2011/130/st_physics_12130084_raw_5020002.daq",kFALSE}, - {"eval_Stv.RC.auau20.y2011","","","RC.y2011,Stv","","" - , "/star/rcf/test/daq/2011/122/st_physics_12122018_raw_2010002.daq",kFALSE}, - {"eval_Stv.RC.auau27.y2011","","","RC.y2011,Stv","","" - , "/star/rcf/test/daq/2011/174/st_physics_12174106_raw_2040001.daq",kFALSE}, - {"eval_Stv.RC.pp500.y2011","","","RC.pp.y2011,pmdReco,mtdDat,Stv","","" - , "/star/rcf/test/daq/2011/059/st_physics_12059038_raw_2030002.daq",kFALSE}, {"eval_Sti.AgML.RC.pp200.y2012","","","RC.pp.y2012,AgML,Sti","","" , "/star/rcf/test/daq/2012/044/st_physics_13044030_raw_2010001.daq",kFALSE}, {"eval_Sti.AgML.RC.pp500.y2012","","","RC.pp.y2012,AgML,Sti","","" @@ -704,30 +608,6 @@ Bfc_st BFC[] = { // standard chains , "/star/rcf/test/daq/2012/082/st_physics_13082004_raw_1020004.daq",kFALSE}, {"eval_Sti.RC.UU193.y2012","","","RC.y2012,Sti","","" , "/star/rcf/test/daq/2012/115/st_physics_13115004_raw_2010002.daq",kFALSE}, - {"eval_Stv.AgML.RC.cuAu200.y2012","","","RC.y2012b.notof,Stv,AgML","","" - , "/star/rcf/test/daq/2012/143/st_physics_13143018_raw_3020009.daq",kFALSE}, - {"eval_Stv.AgML.RC.pp200.y2012","","","RC.pp.y2012.notofMin,Stv,AgML","","" - , "/star/rcf/test/daq/2012/044/st_physics_13044030_raw_2010001.daq",kFALSE}, - {"eval_Stv.AgML.RC.pp500.y2012","","","RC.pp.y2012.notofMin,Stv,AgML","","" - , "/star/rcf/test/daq/2012/082/st_physics_13082004_raw_1020004.daq",kFALSE}, - {"eval_Stv.AgML.RC.UU193.y2012","","","RC.y2012b.notof,Stv,AgML","","" - , "/star/rcf/test/daq/2012/115/st_physics_13115004_raw_2010002.daq",kFALSE}, - {"eval_StvCA.RC.cuAu200.y2012","","","RC.y2012b.notof,StvCA","","" - , "/star/rcf/test/daq/2012/143/st_physics_13143018_raw_3020009.daq",kFALSE}, - {"eval_StvCA.RC.pp200.y2012","","","RC.pp.y2012.notofMin,StvCA","","" - , "/star/rcf/test/daq/2012/044/st_physics_13044030_raw_2010001.daq",kFALSE}, - {"eval_StvCA.RC.pp500.y2012","","","RC.pp.y2012.notofMin,StvCA","","" - , "/star/rcf/test/daq/2012/082/st_physics_13082004_raw_1020004.daq",kFALSE}, - {"eval_StvCA.RC.UU193.y2012","","","RC.y2012b.notof,StvCA","","" - , "/star/rcf/test/daq/2012/115/st_physics_13115004_raw_2010002.daq",kFALSE}, - {"eval_Stv.RC.cuAu200.y2012","","","RC.y2012b.notof,Stv","","" - , "/star/rcf/test/daq/2012/143/st_physics_13143018_raw_3020009.daq",kFALSE}, - {"eval_Stv.RC.pp200.y2012","","","RC.pp.y2012.notofMin,Stv","","" - , "/star/rcf/test/daq/2012/044/st_physics_13044030_raw_2010001.daq",kFALSE}, - {"eval_Stv.RC.pp500.y2012","","","RC.pp.y2012.notofMin,Stv","","" - , "/star/rcf/test/daq/2012/082/st_physics_13082004_raw_1020004.daq",kFALSE}, - {"eval_Stv.RC.UU193.y2012","","","RC.y2012b.notof,Stv","","" - , "/star/rcf/test/daq/2012/115/st_physics_13115004_raw_2010002.daq",kFALSE}, {"doEvents" ,"" ,"","in,StEvent,analysis,NoDb" ,"","","",kFALSE}, {"MakeMuDst","","","in,StEvent,CMuDST,Tree,nodefault,NoHistos,ReadAll","","" ,"StEvent => MuDst",kFALSE}, {"drawDst" ,"" ,"","in,ry1h,globT,SCL,geant,display,NoDb,TbUtil" ,"","","",kFALSE}, @@ -1804,7 +1684,6 @@ Bfc_st BFC[] = { // standard chains // Sti options {"StiPulls" ,"","","" ,"","", "Request to make Sti Pulls",kFALSE}, - {"StvPulls" ,"","","" ,"","", "Request to make Stv Pulls",kFALSE}, {"StiLib" ,"","","" ,"","Sti,StiUtilities","Load Sti",kFALSE}, {"StiCALib" ,"","","" ,"","TPCCATracker,StiCA","Load Sti+CA",kFALSE}, {"StiTpc" ,"","","TpcDb,ITTF,tpc_T,dbutil,detDb,StarMagField,magF" ,"","StiTpc","Load StiTpc",kFALSE}, @@ -1842,9 +1721,6 @@ Bfc_st BFC[] = { // standard chains {"HLTCA" ,"" ,"Sti","", "StHLTCAMaker","StHLTCAMaker", "HLT reconstruction",kFALSE}, {"KFVertex" ,"" ,"Sti","-genvtx,-VFMinuit,-VFFV,-VFMCE,-VFppLMV,-VFPPVnoCTB,-VFPPV,-Kink2,-V02,-Xi2" ,"StKFVertexMaker", "MathMore,Spectrum", "...KFParticle based multi vertex reconstruction",kFALSE}, - {"Stv" ,"Stv","","-xgeometry,-Sti,-StiTpc,-StiSsd,-StiSvt,-StiPxl,-StiSsd,-StiSst,-StiIst,","StvMaker" - ,"libHist,libHistPainter,libVMC,StarMiniCern,geant3,GeoTestMaker,StvUtil,Stv,StvSeed,StvMaker,StEventUtilities,-StiLibs,-StiLibsHft","Stv",kFALSE}, - {"StvCA" ,"StvCA","","Stv","","" ,"StvCA",kFALSE}, {"StiVMC" ,"StiVMC","","-Sti,SCL,StEvent,StDbT,TpcDb,compend","StiVMCMaker" , "StEventUtilities,StiVMC,StiVMCMaker" ,"ITTF VMC tracker",kFALSE}, {"StiVMCLibs","","","detDb,StarMagField","", "","ITTF:load StiVMC libraries",kFALSE}, diff --git a/StRoot/StBFChain/StBFChain.cxx b/StRoot/StBFChain/StBFChain.cxx index 2ad61649dd6..5de367510c4 100644 --- a/StRoot/StBFChain/StBFChain.cxx +++ b/StRoot/StBFChain/StBFChain.cxx @@ -465,11 +465,7 @@ Int_t StBFChain::Instantiate() // --- // Sti(ITTF) start // --- - if (maker == "StiMaker" || maker == "StiVMCMaker" || maker == "StvMaker") { - if ( maker == "StvMaker" && GetOption("StvCA")) { - // mk->SetAttr("seedFinders","CA","Stv"); // for CA seed finder - mk->SetAttr("seedFinders","CA,Default","Stv"); // for CA + Default seed finders - } + if (maker == "StiMaker" || maker == "StiVMCMaker" ) { // When StiCA library is requested CA will be used as seed finder in StiMaker if ( GetOption("StiCA") ) { @@ -545,8 +541,7 @@ Int_t StBFChain::Instantiate() mk->SetAttr("activeBTof" ,kTRUE); } - if (GetOption("StiPulls") || - GetOption("StvPulls")) mk->SetAttr("makePulls" ,kTRUE); + if (GetOption("StiPulls")) mk->SetAttr("makePulls" ,kTRUE); if (GetOption("skip1row")) mk->SetAttr("skip1row" ,kTRUE); if (GetOption("EastOff")) mk->SetAttr("EastOff" ,kTRUE); if (GetOption("WestOff")) mk->SetAttr("WestOff" ,kTRUE); @@ -559,16 +554,15 @@ Int_t StBFChain::Instantiate() // Sti(ITTF) end if (maker=="StGenericVertexMaker") { // VertexFinder methods - if (GetOption("Sti") || GetOption("StiCA") || - GetOption("Stv") || - GetOption("StiVMC" ) ) mk->SetAttr("ITTF" , kTRUE); + if (GetOption("Sti") || GetOption("StiCA") || GetOption("StiVMC" ) ) mk->SetAttr("ITTF" , kTRUE); if (GetOption("VFMinuit" ) ) mk->SetAttr("VFMinuit" , kTRUE); if (GetOption("VFppLMV" ) ) mk->SetAttr("VFppLMV" , kTRUE); if (GetOption("VFppLMV5" ) ) mk->SetAttr("VFppLMV5" , kTRUE); - if ((GetOption("VFPPV") && GetOption("Stv")) || GetOption("VFPPVEv") ) { + if ( GetOption("VFPPVEv") ) { gSystem->Load("StBTofUtil.so"); mk->SetAttr("VFPPVEv" , kTRUE); - } else if (GetOption("VFPPV") && GetOption("Sti")) mk->SetAttr( "VFPPV", kTRUE); + } + else if (GetOption("VFPPV") && GetOption("Sti")) mk->SetAttr( "VFPPV", kTRUE); if (GetOption("VFPPVEvNoBtof")){ gSystem->Load("StBTofUtil.so"); //Not used but loaded to avoid fail mk->SetAttr("VFPPVEvNoBtof", kTRUE); @@ -954,7 +948,6 @@ Int_t StBFChain::Instantiate() if (GetOption("svt1hit")) SetAttr("minPrecHits",1,"Sti"); if (GetOption("svt1hit")) SetAttr("minPrecHits",1,"StiCA"); - if (GetOption("svt1hit")) SetAttr("minPrecHits",1,"Stv"); if (GetOption("svt1hit")) SetAttr("minPrecHits",1,"StiVMC"); for ( unsigned int n=0 ; n < Gproperty.size() ; n++ ){ @@ -1015,7 +1008,6 @@ Int_t StBFChain::Init() { // force load of geometry for VMC and Sti if (GetOption("Sti") || GetOption("StiCA") || - GetOption("Stv") || GetOption("StiVMC") ||GetOption("VMC") || GetOption("VMCPassive")) { const DbAlias_t *DbAlias = GetDbAliases(); @@ -1560,41 +1552,31 @@ void StBFChain::SetFlags(const Char_t *chainOpts) gMessMgr->Error() << "Option ntin cannot be used in root.exe. Use root4star" << endm; abort(); } - if (! (GetOption("Stv"))) { - if (GetOption("gstar") || GetOption("pythia")) { - SetOption("VMC","Default,-TGiant3,gstar"); - SetOption("-gstar","Default,-TGiant3"); - SetOption("-pythia","Default,-TGiant3"); - } + + if (GetOption("gstar") || GetOption("pythia")) { + SetOption("VMC","Default,-TGiant3,gstar"); + SetOption("-gstar","Default,-TGiant3"); + SetOption("-pythia","Default,-TGiant3"); } + SetOption("-geant","Default,-TGiant3"); SetOption("-geantL","Default,-TGiant3"); SetOption("-geometry","Default,-TGiant3"); SetOption("-geomNoField","Default,-TGiant3"); - if (! (GetOption("Stv"))) { - if (! (GetOption("VMC") || GetOption("VMCPassive"))) { - SetOption("VMCPassive","Default,-TGiant3"); - } - SetOption("pgf77","Default,-TGiant3"); - SetOption("mysql","Default,-TGiant3"); - SetOption("StarMiniCern","Default,-TGiant3"); + + if (! (GetOption("VMC") || GetOption("VMCPassive"))) { + SetOption("VMCPassive","Default,-TGiant3"); } + SetOption("pgf77","Default,-TGiant3"); + SetOption("mysql","Default,-TGiant3"); + SetOption("StarMiniCern","Default,-TGiant3"); + } - if (GetOption("ITTF") && ! (GetOption("Sti") || GetOption("StiCA") || GetOption("Stv") || GetOption("StiVMC"))) { + if (GetOption("ITTF") && ! (GetOption("Sti") || GetOption("StiCA") || GetOption("StiVMC"))) { TString STAR_LEVEL(gSystem->Getenv("STAR_LEVEL")); if (STAR_LEVEL == ".DEV2") SetOption("StiCA","Default,ITTF"); else SetOption("Sti" ,"Default,ITTF"); } - if (GetOption("Stv")) { - SetOption("-TpcIT","Default,Stv"); - SetOption("-SvtIT","Default,Stv"); - SetOption("-SsdIT","Default,Stv"); - SetOption("-HpdIT","Default,Stv"); - SetOption("-BTofIT","Default,Stv"); - SetOption("-PxlIT","Default,Stv"); - SetOption("-IstIT","Default,Stv"); - } - } if (!GetOption("Eval") && GetOption("AllEvent")) SetOption("Eval","-Eval,AllEvent"); // Print set values diff --git a/StRoot/StEvent/StTriggerData2022.h b/StRoot/StEvent/StTriggerData2022.h index 39939704b93..a38c7995cc0 100644 --- a/StRoot/StEvent/StTriggerData2022.h +++ b/StRoot/StEvent/StTriggerData2022.h @@ -284,7 +284,7 @@ class StTriggerData2022 : public StTriggerData { void swapRawDetOfflen(TrgOfflen2022* offlen); void swapRawDet(DataBlock2022* data, int name, int hlength, int bs); - ClassDef(StTriggerData2022,1) + ClassDef(StTriggerData2022,2) }; inline void StTriggerData2022::swapOfflen(TrgOfflen2022* offlen) diff --git a/StRoot/StGenericVertexMaker/StGenericVertexMaker.cxx b/StRoot/StGenericVertexMaker/StGenericVertexMaker.cxx index adbf5d6fb15..17c81fdc73d 100644 --- a/StRoot/StGenericVertexMaker/StGenericVertexMaker.cxx +++ b/StRoot/StGenericVertexMaker/StGenericVertexMaker.cxx @@ -19,11 +19,17 @@ #include "StGenericVertexMaker/StGenericVertexMaker.h" #include "StGenericVertexMaker/StiPPVertex/StPPVertexFinder.h" #include "StGenericVertexMaker/StppLMVVertexFinder.h" -#include "StGenericVertexMaker/StvPPVertex/StPPVertexFinder.h" +#include "StGenericVertexMaker/StvPPVertex/StPPVertexFinder.h" #include "St_base/StMessMgr.h" #include "St_db_Maker/St_db_Maker.h" #include "tables/St_g2t_vertex_Table.h" +// Historical Note 10/17/23. Jason Webb +// ------------------------------------- +// The StvPPVertex appears to be an equivalent set of vertex +// finding algorithms using tracks from the StEvent data model +// rather than the internal data structures of the Sti tracker. + class StMuDst; class TClonesArray; @@ -140,8 +146,7 @@ Int_t StGenericVertexMaker::Init() useBTOF = 1; } - } else if ( IAttr("VFPPVEv") || IAttr("VFPPVEvNoBTof") - ||(IAttr("VFPPV") && IAttr("Stv")) ) { // 2 version of PPV w/ & w/o Btof + } else if ( IAttr("VFPPVEv") || IAttr("VFPPVEvNoBTof") ) { // 2 version of PPV w/ & w/o Btof LOG_INFO << "StGenericVertexMaker::Init: uses StvPPVertex finder(StEvent based)"<< endm; LOG_INFO << "StPPVertexFinder::StPPVertexFinder is in use" << endm; diff --git a/StRoot/StXTrakMaker/StXTrak.cxx b/StRoot/StXTrakMaker/StXTrak.cxx deleted file mode 100644 index ffebef0f71b..00000000000 --- a/StRoot/StXTrakMaker/StXTrak.cxx +++ /dev/null @@ -1,238 +0,0 @@ -// $Id: StXTrak.cxx,v 1.5 2016/08/05 18:10:37 perev Exp $ -/// \File StXTrak.cxx -/// \author V.Perev 2016 -// -/*! - -\class StXTrak - -A class StXTrak is a auxiliary for Sti/StiCA/Stv packages. -
-Main tasks: -
    -
  • Xtend/prolong StTrack to far detector; -
  • Save produced data into StEvent. -
-*/ -#include -#include -#include -#include "TMath.h" -#include "TCernLib.h" -#include "TVector3.h" -#include "StXTrak.h" -#include "TGeoManager.h" -#include "TGeoSwim.h" -#include "TGeoManager.h" -#include "TGeoNode.h" -#include "TGeoVolume.h" -#include "TGeoShape.h" -#include "TGeoMaterial.h" -#include "StThreeVectorD.hh" -#include "THelixTrack.h" -#include "StiUtilities/StiDebug.h" - -#include "StiUtilities/StiDebug.h" - -//_____________________________________________________________________________ -StXTrak::StXTrak(MyMag *myMag,MyLoss* eLoss,TGeoSwimEnd* myEnd) -{ - mMyLoss= eLoss; //ELoss calculator - if (!mMyLoss) mMyLoss = new MyLoss(); - - mMyMag = myMag; //Mag field calculator - if (!mMyMag) mMyMag = new MyMag(); - - - mMyEnd = myEnd; //End condition - - static const char* farDets[]={ - "BTOF","BBCA","CALB","ECAL","ETTV", - "FGTM","FBOX","FSCE","HCMO","MUTD", - "PHMD","VPDD","ZCAL", - 0}; - - if (!mMyEnd ) mMyEnd = new TGeoSwimDefaultEnd(TGeoSwimEnd::kNameVolu,farDets); - - mSwim = new TGeoSwim(); - mSwim->Set(mMyMag,mMyLoss,mMyEnd); - mSwim->Set(500.,-400.,400.,5.); - - mMass = 0.1349766; - if (mMyLoss) mMass = mMyLoss->GetMass(); -} - -//_____________________________________________________________________________ -void StXTrak::Clear() -{ - memset(mBeg,0,mEnd-mBeg+1); -} - -//_____________________________________________________________________________ -void StXTrak::Set1stPoint(int charge1st,double pos1st[3],double mom1st[3]) -{ -static const double kHftRad = 3; -enum {kUndef, kPrimary, kDca,k1stPoint}; - - memcpy(m1stTk.mPos,pos1st,sizeof(m1stTk.mPos)); - memcpy(m1stTk.mMom,mom1st,sizeof(m1stTk.mMom)); - m1stTk.mCosLam = sin(TVector3(m1stTk.mMom).Theta()); - m1stTk.mCharge=charge1st; - TVector3 vMom(m1stTk.mMom),vPos(m1stTk.mPos); - double B[3]; - (*mMyMag)(m1stTk.mPos,B); - m1stTk.mCurv= -B[2]*m1stTk.mCharge/vMom.Perp(); - m1stTk.mP = vMom.Mag();; - m1stTk.mPti = -m1stTk.mCharge/vMom.Perp(); - m1stTk.mPt = 1./(fabs(m1stTk.mPti)+1e-10); - m1stTk.mLen= 0; - double dis = vPos.Perp(); - mFlag1st=k1stPoint; //0=undefined, 1=primary, 2=dca,3=1st point - if (dis1e-3)? fabs(asin(sinAlf)*2./m1stTk.mCurv):dis; - m1stTk.mLen/= m1stTk.mCosLam; - } -} - - - -//_____________________________________________________________________________ -void StXTrak::Set2ndPoint(int charge2nd,double pos2nd[3],double mom2nd[3]) -{ - memcpy(m2ndTk.mPos,pos2nd,sizeof(m2ndTk.mPos)); - memcpy(m2ndTk.mMom,mom2nd,sizeof(m2ndTk.mMom)); - m2ndTk.mCosLam = sin(TVector3(m2ndTk.mMom).Theta()); - m2ndTk.mCharge=charge2nd; - TVector3 vPos(m2ndTk.mPos); - TVector3 vMom(m2ndTk.mMom); - TVector3 dPos = (vPos - TVector3(m1stTk.mPos)); - TVector3 aMom = (vMom + TVector3(m1stTk.mMom))*0.5; - - - double B[3]; - (*mMyMag)(m2ndTk.mPos,B); - m2ndTk.mCurv= -B[2]*m2ndTk.mCharge/vMom.Perp(); - m2ndTk.mP = vMom.Mag();; - m2ndTk.mPti = -m2ndTk.mCharge/vMom.Perp(); - m2ndTk.mPt = 1./(fabs(m2ndTk.mPti)+1e-10); - m2ndTk.mLen= 0; - double curv = (fabs(m1stTk.mCurv)>0)?(m1stTk.mCurv+m2ndTk.mCurv)*0.5 - :( m2ndTk.mCurv); - double dis = dPos.Perp(); - double sinAlf = dis*curv/2; - m2ndTk.mLen = (fabs(sinAlf)>1e-3)? fabs(asin(sinAlf)*2./curv):dis; - double cosLam = (fabs(m1stTk.mCosLam)>0) ? (m1stTk.mCosLam+m2ndTk.mCosLam)*0.5 - : ( m2ndTk.mCosLam); - m2ndTk.mLen/= cosLam; - m2ndTk.mLen+=m1stTk.mLen; - - mCurTk = m2ndTk; - double P1 = m1stTk.mP; - double P2 = m2ndTk.mP; - double betInv1 = sqrt(1.+mMass*mMass/(P1*P1)); - double betInv2 = sqrt(1.+mMass*mMass/(P2*P2)); - double betInv = 0.5*(betInv1+betInv2); - mAveBeta = 1./betInv; - assert(mAveBeta<1); - mAveMom = mMass*mAveBeta/sqrt(1-mAveBeta*mAveBeta); - -} -//_____________________________________________________________________________ -double StXTrak::Get2ndTimeF() const -{ - double betInv = 1./mAveBeta; - return m2ndTk.mLen*betInv/TMath::C(); -} -//_____________________________________________________________________________ -double StXTrak::GetTimeF() const -{ - return Get2ndTimeF()+mSwim->GetTime(); -} -//_____________________________________________________________________________ -void StXTrak::SetLen2nd(double length) -{ - m2ndTk.mLen = length + m1stTk.mLen; - mCurTk.mLen = m2ndTk.mLen; -} - -//_____________________________________________________________________________ -int StXTrak::Next() -{ - - mSwim->Set(mCurTk.mPos,mCurTk.mMom,mCurTk.mCurv); - auto ans = mSwim->Swim(500); - - memcpy(mCurTk.mPos,mSwim->GetPos(),sizeof(mCurTk.mPos)); - memcpy(mCurTk.mMom,mSwim->GetDir(),sizeof(mCurTk.mMom)); - mCurTk.mCurv = mSwim->GetCurv(); - mCurTk.mP = mSwim->GetP(); - mCurTk.mPt = mSwim->GetPt(); - mCurTk.mPti = mSwim->GetPti(); - mCurTk.mLen+= mSwim->GetLen(); - mCurTk.mPLoss = mSwim->GetPLoss(); - double d = mSwim->GetLen(1)-mSwim->GetLen(0); - StiDebug::Count("Thick",d); - return ans; -} -#include "StarMagField/StarMagField.h" -//______________________________________________________________________________ -/*! Calculates mag field - Field is calcualated via StarMagField class -*/ -void MyMag::operator()(const double x[3],double b[3]) -{ - -static const double EC = 2.99792458e-4; -static StarMagField *magf = StarMagField::Instance(); - magf->BField(x,b); - b[0]*=EC; - b[1]*=EC; - b[2]*=EC; -} - -#if 0 -#include "StvUtil/StvELossTrak.h" -MyLoss::MyLoss() -{ - mELoss = new StvELossTrak; - mELoss->Reset(1); -} - - -double MyLoss::operator()(const TGeoMaterial* mate,double P,double len - ,double *theta2) -{ - mELoss->Reset(1); - mELoss->Set(mate,P); - mELoss->Add(len); - double dP = mELoss->PLoss(P); - if (theta2){}; - return dP; -} -#endif -#if 1 -#include "Sti/StiElossCalculator.h" -MyLoss::MyLoss() -{ - mELoss = new StiElossCalculator; -} - - -double MyLoss::operator()(const TGeoMaterial* gmate,double P,double len - ,double *theta2) -{ - double A = gmate->GetA(),Z=gmate->GetZ(),D=gmate->GetDensity(); -//double X0=gmate->GetRadLen(); - mELoss->set(Z/A,0,A,Z,D); - double beta2 = P*P/(P*P+mMass*mMass); - double dedx = mELoss->calculate(1., mMass,beta2); - double dP = dedx*len*sqrt(1+pow(mMass/P,2)); - if (theta2){}; - return dP; -} - -#endif diff --git a/StRoot/StXTrakMaker/StXTrak.h b/StRoot/StXTrakMaker/StXTrak.h deleted file mode 100644 index c6140265b6a..00000000000 --- a/StRoot/StXTrakMaker/StXTrak.h +++ /dev/null @@ -1,107 +0,0 @@ -//StXTrak.h - -#ifndef StXTrak_HH -#define StXTrak_HH -#include "TGeoSwim.h" -class TGeoSwim; -class MyMag; -class MyLoss; - - -class StXTrakAux -{ -public: -double mPos[3]; -double mMom[3]; -double mCosLam; -double mCurv; -double mP; -double mPt; -double mPti; -double mLen; -double mPLoss; -double mTimeF; -int mCharge; -}; -class StXTrak -{ - public: - - StXTrak(MyMag* myMag=0,MyLoss* eLoss=0,TGeoSwimEnd* myEnd=0); - virtual ~StXTrak(){;} - - void Clear(); - void Set1stPoint(int charge1st,double pos1st[3],double mom1st[3]); - void Set2ndPoint(int charge2nd,double pos2nd[3],double mom2nd[3]); - void SetLen2nd (double length); - - StXTrakAux &GetAux(int idx=3) {return (&m1stTk)[idx-1];} -const StXTrakAux &GetAux(int idx=3) const {return (&m1stTk)[idx-1];} - double Get2ndTimeF() const; - double GetTimeF() const; - double GetMass() const {return mMass;} - double GetLen (int idx=3) const {return GetAux(idx).mLen;} -const char *GetName() const {return (mMyEnd)?mMyEnd->GetName():"" ;} -TGeoSwimMag *GetMag() {return mMyMag;} - - int Next(); -//========================= - - protected: - TGeoSwim* mSwim; //Swimmer - TGeoSwimMag* mMyMag; - TGeoSwimLoss* mMyLoss; - TGeoSwimEnd* mMyEnd; - private: -double mMass; - -char mBeg[1]; -int mFlag1st; //0=undefined, 1=primary, 2=dca,3=1st point -double mAveBeta; //ave beta used for timing -double mAveMom; //ave momentum used for timing -StXTrakAux m1stTk; -StXTrakAux m2ndTk; -StXTrakAux mCurTk; - - -char mEnd[1]; - -}; - -class MyMag: public TGeoSwimMag -{ -public: - MyMag(){} - virtual void operator()(const double* x, double* b); -}; - -#if 0 -class StvELossTrak; -class MyLoss: public TGeoSwimLoss { -public: -MyLoss(); -// returns momentum loss -virtual double operator()(const TGeoMaterial* mate,double P,double len - ,double *theta2=0); -protected: -StvELossTrak *mELoss; -}; -#endif -#if 1 -class StiElossCalculator; -class MyLoss: public TGeoSwimLoss { -public: -MyLoss(); -// returns momentum loss -virtual double operator()(const TGeoMaterial* mate,double P,double len - ,double *theta2=0); -protected: -StiElossCalculator *mELoss; -}; -#endif - - - - - -#endif diff --git a/StRoot/StXTrakMaker/StXTrakMaker.cxx b/StRoot/StXTrakMaker/StXTrakMaker.cxx deleted file mode 100644 index 1d34eca78aa..00000000000 --- a/StRoot/StXTrakMaker/StXTrakMaker.cxx +++ /dev/null @@ -1,221 +0,0 @@ -// $Id: StXTrakMaker.cxx,v 1.10 2018/10/06 23:42:55 perev Exp $ -/// \File StXTrakMaker.cxx -/// \author V.Perev 2016 -// -/*! - -\class StXTrakMaker - -A maker StXTrakMaker is a auxiliary maker for Sti/StiCA/Stv packages. -
-Main tasks: -
    -
  • Xtend/prolong StTrack to far detector; -
  • Save produced data into StEvent. -
-*/ -#include -#include -#include -#include "TSystem.h" -#include "TCernLib.h" -#include "TVector3.h" -#include "StDetectorId.h" -#include "StEventTypes.h" -#include "StEvent/StTrack.h" -#include "StEvent/StPrimaryTrack.h" -#include "StEvent/StTrackNode.h" -#include "StEvent/StTrackGeometry.h" -#include "StEvent/StExtGeometry.h" -#include "StEvent/StContainers.h" -#include "StEvent/StVertex.h" -#include "StThreeVectorD.hh" - -#include "StXTrakMaker.h" -#include "StXTrak.h" -#include "TGeoManager.h" -#include "TGeoSwim.h" -#include "TGeoManager.h" -#include "TGeoNode.h" -#include "TGeoVolume.h" -#include "TGeoShape.h" -#include "TGeoMaterial.h" -#include "TFile.h" - -#include "Sti/StiElossCalculator.h" -//#include "StvUtil/StvELossTrak.h" -#include "StiUtilities/StiDebug.h" -#include "StEvent/StEventSummary.h" - -ClassImp(StXTrakMaker) - - -//_____________________________________________________________________________ -StXTrakMaker::StXTrakMaker(const Char_t *name) : - StMaker(name) - -{ -} - -//_____________________________________________________________________________ -StXTrakMaker::~StXTrakMaker() -{ - cout <<"StXTrakMaker::~StXTrakMaker() -I- Started/Done"<GetMag(); - double B[3]; - static double B00=0; - if (B00<=0) { - double pos[3]={0}; - (*myMag)(pos,B); - B00=B[2]; - } - - StEvent * event = dynamic_cast( GetInputDS("StEvent") ); - if (!event) return kStWarn; - double rxy,dca,*pos; - const StEventSummary *summ = event->summary();if(summ){}; - double lenStTr=0,lenOutHlx=0,lenInnHlx=0,lenExt=0; - const StSPtrVecTrackNode& nodes= event->trackNodes(); - int nNodes = nodes.size(); - for (int iNode = 0;iNode Clear(); -// =================================================== - StTrackNode *node = nodes[iNode]; - StTrack *track = node->track(primary); - int iprim = track!=0; - if (!iprim) continue; - if (!track) { track = node->track(global);} - assert(track); - lenStTr = track->length(); - - const StTrackGeometry* geo1st = track->geometry(); - assert(geo1st); - StThreeVectorD priPOS = geo1st->origin(); - StThreeVectorD priMOM = geo1st->momentum(); - int priCHARGE = geo1st->charge(); - auto h = geo1st->helicity(); - double priCURV = geo1st->curvature(); if (h<0) priCURV = -priCURV; - if (fabs(priCURV )>1./90) continue; - THelixTrack priHLX(priPOS.xyz(),priMOM.xyz(),priCURV); - - mSwim->Set1stPoint(priCHARGE,priPOS.xyz(),priMOM.xyz()); -// =================================================== - const StTrackGeometry* geo2nd = track->outerGeometry(); - assert(geo2nd); - int CHARGE = geo2nd->charge(); - h = geo2nd->helicity(); - double CURV = geo2nd->curvature(); if (h<0) CURV = -CURV; - if (fabs(CURV )>1./90) continue; - StThreeVectorD STPOS = geo2nd->origin(); - StThreeVectorD STMOM = geo2nd->momentum(); - mSwim->Set2ndPoint(CHARGE,STPOS.xyz(),STMOM.xyz()); - double lenSimp = mSwim->GetLen(2); - mSwim->SetLen2nd(lenStTr); -// =================================================== - THelixTrack HLX(STPOS.xyz(),STMOM.xyz(),CURV); - TString found; - - while(1) {// Loop along the track - - int iEnd = mSwim->Next(); - // =================================================== - - if (iEnd) break; - if (found == mSwim->GetName()) continue; - found = mSwim->GetName(); - auto &aux = mSwim->GetAux(); - pos = aux.mPos; - lenExt = aux.mLen-lenStTr; - rxy = TVector3(pos).Perp(); - dca = HLX.Dca(pos); - lenOutHlx = HLX.Path(pos); - lenInnHlx = fabs(HLX.Path(0.,0.)); - - StExtGeometry *xg = new StExtGeometry; - xg->setName(found.Data()); - double pars[6]; - pars[StExtGeometry::kPhi ] = atan2(pos[1],pos[0]); - pars[StExtGeometry::kZ ] = pos[2]; - pars[StExtGeometry::kPsi ] = atan2(aux.mMom[1],aux.mMom[0]); - pars[StExtGeometry::kPti ] = aux.mPti; - pars[StExtGeometry::kTan ] = atan2(aux.mMom[2],aux.mPt); - pars[StExtGeometry::kCurv] = aux.mCurv; - xg->setLength(aux.mLen); - xg->set(rxy,pars,0); - track->addExtGeometry(xg); - - - - TString ts; - if (iprim) { - ts ="PriDca:Z."; ts+=found; - StiDebug::Count(ts ,pos[2] , dca); - ts ="PriDca:Rxy."; ts+=found; - StiDebug::Count(ts,rxy , dca); - ts ="PriDca:Ptinv."; ts+=found; - StiDebug::Count(ts,aux.mPti, dca); - ts ="PriDca:PLoss."; ts+=found; - StiDebug::Count(ts,aux.mPLoss, dca); - ts ="PriY:X."; - StiDebug::Count(ts,pos[0], pos[1]); - ts ="PriRxy:Z."; - StiDebug::Count(ts,pos[2], rxy); - ts ="PriPLoss:Z."; ts+=found; - StiDebug::Count(ts,pos[2],aux.mPLoss); - ts ="PriPLoss:Pti."; ts+=found; - StiDebug::Count(ts,aux.mPti, aux.mPLoss); - ts ="LenOutRes:Z."; ts+=found; - StiDebug::Count(ts,pos[2],lenExt-lenOutHlx); - ts ="LenInnRes1:Z."; - StiDebug::Count(ts,pos[2],(lenSimp-lenStTr)); - ts ="LenInnRes2:Z."; - StiDebug::Count(ts,pos[2],(lenInnHlx-lenStTr)); - StiDebug::Count("Detectors",found.Data()); - - if (found.Contains("TOF")) { - double myTime = mSwim->GetTimeF(); - StiDebug::Count("myTOFTime",myTime*1e6); - double beta = (lenSimp+lenOutHlx)/myTime/TMath::C(); - if(beta<1) { - double p = mSwim->GetAux(1).mP; - double mass = p*sqrt((1.-beta)*(1+beta))/beta-mSwim->GetMass(); - StiDebug::Count("DeltaMass_1",p,mass); - p = mSwim->GetAux(2).mP; - mass = p*sqrt((1.-beta)*(1+beta))/beta-mSwim->GetMass(); - StiDebug::Count("DeltaMass_2",p,mass); - } - - } - - - } else {//global track - } - }// end along the track - }//End stnodes - return kStOK; -} - diff --git a/StRoot/StXTrakMaker/StXTrakMaker.h b/StRoot/StXTrakMaker/StXTrakMaker.h deleted file mode 100644 index 30b13ca7b44..00000000000 --- a/StRoot/StXTrakMaker/StXTrakMaker.h +++ /dev/null @@ -1,36 +0,0 @@ -//StXTrakMaker.h - -#ifndef StXTrakMaker_HH -#define StXTrakMaker_HH - -#include "StMaker.h" -#include "StEvent/StEnumerations.h" -class StvELossTrak; -class MyMag; -class StXTrak; -class TGeoSwim; - -class StXTrakMaker : public StMaker -{ - public: - - StXTrakMaker(const char* name = "StXTrak"); - virtual ~StXTrakMaker(); - virtual void Clear(const char* opt=""); - virtual Int_t Init(); - virtual Int_t Make(); - virtual Int_t Finish(); - - virtual const char* GetCVS() const - {static const char cvs[]="Tag $Name: $ $Id: StXTrakMaker.h,v 1.3 2016/07/22 19:00:20 perev Exp $ built " __DATE__ " " __TIME__; return cvs;} - - protected: - StXTrak *mSwim; //Swimmer - - private: - ClassDef(StXTrakMaker,0) -}; - -//inlines - -#endif diff --git a/StRoot/StXTrakMaker/StXTrakTestMaker.cxx b/StRoot/StXTrakMaker/StXTrakTestMaker.cxx deleted file mode 100644 index 653c8eaeda7..00000000000 --- a/StRoot/StXTrakMaker/StXTrakTestMaker.cxx +++ /dev/null @@ -1,129 +0,0 @@ -// $Id: StXTrakTestMaker.cxx,v 1.1 2017/05/04 01:22:15 perev Exp $ -/// \File StXTrakTestMaker.cxx -/// \author V.Perev 2016 -// -/*! - -\class StXTrakTestMaker - -A maker StXTrakTestMaker is a auxiliary maker for Sti/StiCA/Stv packages. -
-Main tasks: -
    -
  • Xtend/prolong StTrack to far detector; -
  • Save produced data into StEvent. -
-*/ -#include -#include -#include -#include "TSystem.h" -#include "TVector3.h" -#include "TH2F.h" -#include "TCanvas.h" -#include "StDetectorId.h" -#include "StEventTypes.h" -#include "StEvent/StTrack.h" -#include "StEvent/StPrimaryTrack.h" -#include "StEvent/StTrackNode.h" -#include "StEvent/StTrackGeometry.h" -#include "StEvent/StExtGeometry.h" -#include "StEvent/StContainers.h" -#include "StEvent/StVertex.h" -#include "StThreeVectorD.hh" - -#include "StXTrakTestMaker.h" -#include "StEvent/StEventSummary.h" - -ClassImp(StXTrakTestMaker) - -//_____________________________________________________________________________ -StXTrakTestMaker::StXTrakTestMaker(const Char_t *name) : - StMaker(name) - -{ -} - -//_____________________________________________________________________________ -StXTrakTestMaker::~StXTrakTestMaker() -{ - cout <<"StXTrakTestMaker::~StXTrakTestMaker() -I- Started/Done"<GetName()); - auto *C = new TCanvas(h->GetName(),h->GetName(),600,800); - C->cd(); h->Draw(); - } - return 0; -} - -//_____________________________________________________________________________ -Int_t StXTrakTestMaker::Init() -{ - return 0; -} -//_____________________________________________________________________________ -TH2 *StXTrakTestMaker::GetTH2(const char *name) -{ - TH2* &th = (TH2*&)mMap[name]; - if (!th) th = new TH2F(name, name, 100, 0,0,100,0,0); - return th; -} - -//_____________________________________________________________________________ -Int_t StXTrakTestMaker::Make() -{ - - StEvent * event = dynamic_cast( GetInputDS("StEvent") ); - if (!event) return kStWarn; - const StSPtrVecTrackNode& nodes= event->trackNodes(); - int nNodes = nodes.size(); - for (int iNode = 0;iNode track(primary):node->track(global); - if (!track) continue; - const StExtGeometry *xg = track->extGeometry(); - if (!xg) continue; //No extention - do {// Loop along the track extentions - TString name(xg->name()); - name+= (iprim)? "_Prim":"_Glob"; - double Rxy = xg->rxy(); - double Z = xg->z(); - double L = xg->length(); - double Phi = xg->phi(); - - TString ts; - ts = name; ts+="_Rxy_vs_Z"; - GetTH2(ts)->Fill(Z,Rxy); - ts = name; ts+="_Len_vs_Z"; - GetTH2(ts)->Fill(Z,L); - - ts = name; ts+="_Rxy_vs_Phi"; - GetTH2(ts)->Fill(Phi*67,Rxy); - ts = name; ts+="_Len_vs_Phi"; - GetTH2(ts)->Fill(Phi*57,L); - ts = name; ts+="_Y_vs_X"; - GetTH2(ts)->Fill(Rxy*cos(Phi),Rxy*sin(Phi)); - } while((xg = xg->next())); //end Xtentions - } //End Glob/Prim - }//End stnodes - return kStOK; -} - diff --git a/StRoot/StXTrakMaker/StXTrakTestMaker.h b/StRoot/StXTrakMaker/StXTrakTestMaker.h deleted file mode 100644 index 60efe4b312d..00000000000 --- a/StRoot/StXTrakMaker/StXTrakTestMaker.h +++ /dev/null @@ -1,35 +0,0 @@ -//StXTrakTestMaker.h - -#ifndef StXTrakTestMaker_HH -#define StXTrakTestMaker_HH - -#include "StMaker.h" -#include "StEvent/StEnumerations.h" -#include - -class TH1; -class TH2; -class StXTrakTestMaker : public StMaker -{ - public: - - StXTrakTestMaker(const char* name = "StXTrakTest"); - virtual ~StXTrakTestMaker(); - virtual void Clear(const char* opt=""); - virtual Int_t Init(); - virtual Int_t Make(); - virtual Int_t Finish(); - TH2 *GetTH2(const char *name); - virtual const char* GetCVS() const - {static const char cvs[]="Tag $Name: $ $Id: StXTrakTestMaker.h,v 1.1 2017/05/04 01:22:15 perev Exp $ built " __DATE__ " " __TIME__; return cvs;} - - protected: - std::map mMap; - - private: - ClassDef(StXTrakTestMaker,0) -}; - -//inlines - -#endif diff --git a/StRoot/StXTrakMaker/TGeoSwim.cxx b/StRoot/StXTrakMaker/TGeoSwim.cxx deleted file mode 100644 index b586b0068b6..00000000000 --- a/StRoot/StXTrakMaker/TGeoSwim.cxx +++ /dev/null @@ -1,313 +0,0 @@ - -// $Id: TGeoSwim.cxx,v 1.8 2017/11/06 20:49:19 perev Exp $ -// -// -// Class StTGeoHelper -// ------------------ - - - -#include -#include -#include -#include -#include -#include -#include "TString.h" -#include "TMath.h" -#include "TGeoManager.h" -#include "TGeoNavigator.h" -#include "TGeoNode.h" -#include "TGeoVolume.h" -#include "TGeoShape.h" -#include "TGeoBBox.h" -#include "TGeoNode.h" -#include "TGeoMedium.h" -#include "TGeoMaterial.h" -#include "TGeoSwim.h" -#include "THelixTrack.h" -ClassImp(TGeoSwim) -//! TGeoSwim Constructor. -/*! - \param Name of instance -*/ -//_____________________________________________________________________________ -TGeoSwim::TGeoSwim(const char *name):TNamed(name,"TGeoSwim") -{ - fSmax = 5; - fRmax = 1000; - fZmin =-1000; - fZmax = 1000; - fHelx[0] = new THelixTrack(); - fHelx[1] = new THelixTrack(); - fNode[0] = 0; - fNode[1] = 0; - fMag = 0; - fLoss= 0; - fEnd = 0; - fInOutLen[0] = 0; - fInOutLen[1] = 0; - fC = 0; - fP = 0; //momentum loss(GeV) - fPt = 0; //momentum loss(GeV) - fPLoss = 0; //momentum loss(GeV) - fTimeFly = 0; //time in seconds - memset(fB,0,sizeof(fB)); -} - -/// Setting of tracking region. -/*! - \param Rmax - maxiimal xy Radius - \param Zmin - min Z - \param Zmax - max Z - \param sMax - max step -*/ -//_____________________________________________________________________________ -void TGeoSwim::Set(double Rmax,double Zmin,double zMax,double sMax) -{ - fRmax = Rmax; - fZmin = Zmin; - fZmax = zMax; - fSmax = sMax; -} - -/// Setting of tracking starting point. -/*! - \param pos - 3d track start point position - \param dir - 3d track direction - \param curv - curvatore(signed) -*/ -//_____________________________________________________________________________ -int TGeoSwim::Set(const double* pos,const double* dir, double curv) -{ -THelixTrack **helx = fHelx; -double *B = fB; -double *inOut = fInOutLen; - if (fEnd) fEnd->Reset(); - fPt=0;fP=0;fPLoss=0;fTimeFly=0; memset(fB,0,sizeof(fB)); - fC = curv; - fHelx[0]->Set(pos,dir,curv); - if (fMag) { - (*fMag)(pos,fB); - fPti = (fabs(fB[2])>1e-6) ? fC/fB[2]:1e-3; - fPt = fabs(1./fPti); - fP = fabs(fPt/fHelx[0]->GetCos()); - } - fStartSign = dir[0]*pos[0]+dir[1]*pos[1]; - - gGeoManager->SetCurrentPoint (fHelx[0]->Pos()); - gGeoManager->SetCurrentDirection(fHelx[0]->Dir()); - fNode[0] = gGeoManager->FindNode(); - if (!fNode[0]) return 13; - return 0; -} -//_____________________________________________________________________________ -const double *TGeoSwim::GetPos (int idx) const {return fHelx[idx]->Pos();} -//_____________________________________________________________________________ -const double *TGeoSwim::GetDir (int idx) const {return fHelx[idx]->Dir();} -//_____________________________________________________________________________ -const char *TGeoSwim::GetPath () const {return gGeoManager->GetPath();} -//_____________________________________________________________________________ -double TGeoSwim::GetTime () const -{ - return fTimeFly/TMath::C(); -} -//_____________________________________________________________________________ -int TGeoSwim::OutScene(const double *x) const -{ - if (x[2] fZmax) return 1; - if (x[0]*x[0]+x[1]*x[1] > fRmax*fRmax)return 2; - return 0; -} -//_____________________________________________________________________________ -const TGeoMaterial *TGeoSwim::GetMate () const -{ - if (!fNode[0]) return 0; - return fNode[0]->GetMedium()->GetMaterial(); -} -//_____________________________________________________________________________ -/// Start tracking.. -/*! - \param maxLenP - Max allowed tracking length - returns flag, see enum SwimExit -*/ -//_____________________________________________________________________________ -int TGeoSwim::Swim(double maxLenP) -{ -static const double kMaxLoss = 0.1;// Max momentum loss - -enum {kMaxIter=100}; -enum {kInside = 1, kOutside = 0}; -THelixTrack **helx = fHelx; -double *B = fB; -double *inOut = fInOutLen; - - *fHelx[1] = *fHelx[0]; - double maxLen = maxLenP; - double cutLen = 1e11; - fInOutLen[2]=0; fTimeFly=0; - while(1) { - const double *poz = fHelx[0]->Pos(); - double range = fabs(poz[0])+fabs(poz[1])+fabs(poz[2]); - double myMicron = 1e-4+range*1e-4; - - double dP,dC,dPt,pos[3],dir[3],cosTh2,cosTh,lenxy2,lenxy; - - fNode[0] = gGeoManager->GetCurrentNode(); - double myRad =1./(fabs(fHelx[0]->GetRho())+1e-10)/fHelx[0]->GetCos(); - double maxStep = fSmax; - if (maxStep>cutLen) maxStep=cutLen; cutLen = 1e11; - if (maxStep>maxLen) maxStep=maxLen; - if (maxStep>myRad) maxStep = myRad; - fInOutLen[0]=0; fInOutLen[1]=maxStep; - double step=0,myLen=0; - const TGeoMaterial *gmate = GetMate(); - int kase = kInside; - for (int iter=0;iter0) { - fHelx[1]->Move(step); fInOutLen[0]+=step; - gGeoManager->SetCurrentPoint (fHelx[1]->Pos()); - gGeoManager->SetCurrentDirection(fHelx[1]->Dir()); - fNode[1] = gGeoManager->FindNode(); - } - if ( fInOutLen[0]+maxStep > maxLen) maxStep = maxLen-fInOutLen[0]; - if (maxStep<=0) break; - gGeoManager->FindNextBoundary(maxStep); - step = gGeoManager->GetStep()*0.99; - break;} - - case kOutside : { // outside & quality bad - if (fInOutLen[1]>fInOutLen[0]+step){ fInOutLen[1]=fInOutLen[0]+step;} - if (fInOutLen[1]>maxLen) fInOutLen[1]=maxLen; - if (fInOutLen[0]< fInOutLen[1]/2) { step = (fInOutLen[1]-fInOutLen[0])*0.9;} - else { step = (fInOutLen[1]-fInOutLen[0])*0.5;} - break;} - - default: assert(0 && "Wrong case"); - - } - range = fInOutLen[1]-fInOutLen[0]; - if (range range/2) step = range/2; - } - fHelx[1]->Eval(step,pos,dir); - kase = (gGeoManager->IsSameLocation(pos[0],pos[1],pos[2]))? kInside:kOutside; - } - - range = fInOutLen[1]-fInOutLen[0]; - if (range>myMicron) return kNoConv; //no convergency at all - fHelx[1]->Move(range); - - if (OutScene(fHelx[1]->Pos())) return kOutScene; - - - myLen = fInOutLen[1]; - fInOutLen[2]+=fInOutLen[1]; - if (fLoss) { // Account of energy loss - - dP = -(*fLoss)(gmate,fP,myLen,0); -// ================================ - - if (fabs(dP) > kMaxLoss*fP) { // Cut step, too big eloss - cutLen = fInOutLen[1]/2; - *fHelx[1]=*fHelx[0]; - gGeoManager->SetCurrentPoint (fHelx[1]->Pos()); - gGeoManager->SetCurrentDirection(fHelx[1]->Dir()); - fNode[1] = gGeoManager->FindNode(); - continue; - } - memcpy(pos,fHelx[1]->Pos(),sizeof(pos)); - memcpy(dir,fHelx[1]->Dir(),sizeof(dir)); - fCurrSign = dir[0]*pos[0]+dir[1]*pos[1]; - if (fCurrSign*fStartSign<=0) return kApogee; - - cosTh2 = (1.-dir[2])*(1.+dir[2]); - cosTh = sqrt(cosTh2); - for (int j=0;j<3;j++){ dir[j]/=cosTh;} - dPt = fPt/fP*dP; - double dPti = -fPti*(dPt/fPt); - fP += dP; fPt+= dPt; fPti+= dPti; - if (fabs(fPt)Set(pos,dir,fC); -// Time of flight calculation - double m = fLoss->GetMass(); - double p = fP-dP; - double betIn0 = sqrt((p*p+m*m)/(p*p)); - p = fP; - double betIn1 = sqrt((p*p+m*m)/(p*p)); - fTimeFly += 0.5*(betIn0+betIn1)*fInOutLen[1]; -// - } - gGeoManager->SetCurrentPoint ((double*)fHelx[1]->Pos()); - gGeoManager->SetCurrentDirection((double*)fHelx[1]->Dir()); - fNode[1] = gGeoManager->FindNode(); - if (!fNode[1]) return kOutScene; - if (!fEnd || (*fEnd)()) return kNormal; - fNode[0] = fNode[1]; - *fHelx[0] = *fHelx[1]; - maxLen -= fInOutLen[1]; - if (maxLen<=0) return kEndRange; - } - return kFailed; -} -//_____________________________________________________________________________ -//_____________________________________________________________________________ -int TGeoSwimDefaultEnd::operator()() -{ - mTit = 0; - mEnd = mKase; - switch(mKase) { - - case kDefault: return kDefault; - - case kNewVolu: { - TString myPath(gGeoManager->GetPath()); - if (myPath == mPrevPath) {mEnd = kUndef;return kUndef;} - mPrevPath = myPath; return kNewVolu; - } - - case kNameVolu:{ - mEnd = kUndef; - TString myPath(gGeoManager->GetPath()); - if (myPath == mPrevPath) {return kUndef;}; - mPrevPath = myPath; - - for (int j=0;mTits[j];j++) { - if (myPath.Index(mTits[j])<0) continue; - if (j == mJit) break; - mJit = j; - mTit = mTits[j]; - mEnd = kNameVolu; break; - } - return mEnd; - } - - default: assert(0 && "Wrong TGeoSwimEnd kase"); - - } - return kUndef; -} diff --git a/StRoot/StXTrakMaker/TGeoSwim.h b/StRoot/StXTrakMaker/TGeoSwim.h deleted file mode 100644 index 96a80f8ffe1..00000000000 --- a/StRoot/StXTrakMaker/TGeoSwim.h +++ /dev/null @@ -1,148 +0,0 @@ -/// $Id: TGeoSwim.h,v 1.9 2017/11/06 20:49:19 perev Exp $ -/// -/// -/// Class StTGeoSwim -/// ------------------ -/// This class provides tracking thru TGeo structure of volumes and materisls -/// There are only ROOT dependencies and STAR class THelixTrack. -/// Communication with non ROOT entities, -/// like Mag field, Energy loss provide4d via functors inherited from -/// auxiliary TGeoSwimMag and TGeoSwimLoss classes. -/// Tracking accounts energy loss and magnetic field. It stops at the beginning -/// of the volume if functor inherited from cauxiliary class TGeoSwimEnd returns non zero -/// The current version is working only with mag field along Z. -/// -// _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ - - -#ifndef ST_TGESWIM_H -#define ST_TGESWIM_H -#include "TString.h" -#include "TNamed.h" -class THelixTrack; -class TGeoNode; -class TGeoMaterial; - -class TGeoSwimMag { -public: -TGeoSwimMag(){}; -virtual void operator()(const double X[3],double B[3])=0; -}; - -class TGeoSwimLoss { -public: -TGeoSwimLoss(double charge=1,double mass=0.13956995){mCharge = charge;mMass = mass;}; -// returns momentum loss -virtual double operator()(const TGeoMaterial* mate,double P,double len - ,double *theta2=0)=0; -double GetMass() const {return mMass;} -protected: -double mCharge; -double mMass; -}; - - -class TGeoSwimEnd { -public: -// Main output cases ( - enum EndKase { - kUndef = 0,//Undefined - kDefault = 1,//Immediate return after any step - kNewVolu = 2,//Return when new vollume started - kNameVolu = 4,//Return, if mother volume name from the given list - }; -TGeoSwimEnd(){;} -virtual void Reset()=0; -virtual int operator()()=0; -virtual const char* GetName() const {return 0;}; -virtual int GetExit() const {return mEnd;} -protected: -EndKase mEnd; - -}; - -class TGeoSwim: public TNamed -{ -public: -enum SwimExit {kEndRange=-1,kNormal=0 ,kManySteps=13,kNoConv=14 - ,kBadMom=15 ,kFailed=16,kApogee=17 ,kOutScene=99}; -#define kMinMom 0.05 // minimal allowed Pt - -TGeoSwim(const char *name=""); - -void Set(TGeoSwimMag *mag=0, TGeoSwimLoss *loss=0,TGeoSwimEnd* endd=0) - {fMag=mag;fLoss=loss;fEnd=endd;} - -TGeoSwimMag *GetMag() {return fMag; } -TGeoSwimLoss *GetLoss(){return fLoss;} -TGeoSwimEnd *GetEnd() {return fEnd; } - - -void Set(double Rmax,double Zmin,double Zmax,double sMax=10); - int Set(const double* pos,const double* dir, double curv); - int OutScene(const double *x) const ; - - int Swim(double maxLen); -double GetLen (int idx=2) const {return fInOutLen[idx];} -const TGeoNode *GetNode (int idx=1) const {return fNode[idx];} - THelixTrack *GetHelix(int idx=1) const {return fHelx[idx];} -const double *GetPos (int idx=1) const; -const double *GetDir (int idx=1) const; -const char *GetPath() const; -const TGeoMaterial*GetMate() const; - double GetTime() const; - double GetPti() const {return fPti ;} - double GetPt() const {return fPt ;} - double GetP() const {return fP ;} - double GetPLoss()const {return fPLoss ;} - double GetCurv() const {return fC ;} - -void Swap() { THelixTrack *h=fHelx[0];fHelx[0]=fHelx[1];fHelx[1]=h;} -protected: - -TGeoSwimMag *fMag; ///< Mag functor -TGeoSwimLoss *fLoss; ///< Energy loss functor -TGeoSwimEnd *fEnd; ///< Stop condition functor -double fSmax; ///< Max step size -double fRmax; ///< Max radius(xy) -double fZmin; ///< Min Z -double fZmax; ///< Max Z -double fInOutLen[3]; ///< Length 0=VoluEnd 1=voluStart 2=total length -double fC; ///< curvature 1/cm -double fP; ///< momentum loss(GeV) -double fPti; ///< signed invers pt -double fPt; ///< Pt(GeV) -double fPLoss; ///< momentum loss(GeV) -double fTimeFly; ///< time of flight in seconds -double fB[3]; ///< Current mag field -double fStartSign; ///< Start signature Dirxy*Posxy -double fCurrSign; ///< Current signature Dirxy*Posxy -THelixTrack *fHelx[2]; -const TGeoNode *fNode[2]; -ClassDef(TGeoSwim,0) - -}; - -class TGeoSwimDefaultEnd: public TGeoSwimEnd -{ -public: -TGeoSwimDefaultEnd(TGeoSwimEnd::EndKase kase - ,const char ** tits=0){mKase=kase;mTits=tits;mJit=-1;} -virtual void Reset(){mPrevPath="";mJit=-1; mTit=0;} -virtual int operator()(); -virtual const char* GetName() const {return mTit;}; -protected: -TGeoSwimEnd::EndKase mKase; -TString mPrevPath; -const char ** mTits; -const char * mTit; -int mJit; -}; - - - - - - - -#endif diff --git a/StRoot/StXTrakMaker/xtrak.C b/StRoot/StXTrakMaker/xtrak.C deleted file mode 100644 index a1869a8ceed..00000000000 --- a/StRoot/StXTrakMaker/xtrak.C +++ /dev/null @@ -1,75 +0,0 @@ -class StMaker; -void rmMaker(const StMaker *top, const char *key); -void xtrak(int flag=0) -{ -gROOT->LoadMacro("./bfc.C"); -TString opt,fil; -int fr=1,to=1; -int ierr = 0; -int KNN = 0; - - - - -#if 1 //Same but Sti -opt = "in,y2016,AgML,usexgeom,FieldOn,MakeEvent,Sti,NoSsdIt,NoSvtIt,"; -opt+= "Idst,BAna,l0,Tree,logger,genvtx,tpcDB,bbcSim,btofsim,mtdSim,tags,emcY2,EEfs,evout,"; -opt+= "-dstout,IdTruth,big,MiniMcMk"; -fil = "/star/simu/simu/perev/StvKutta/OutDirSti/hijing_18_fieldon_ideal_sdt20160517_10evts.event.root"; -#endif -////////////////////////////////////////////////////////////////////////////// -bfc(-1,opt,fil); -//chain->SetAttr("seedFinders","KN","Stv"); -// chain->SetAttr(".call","SetDebug(1)","St_db_Maker::"); -//chain->SetAttr("makePulls",1,"StiMaker::"); -// bfc(fr,to,opt,fil); - - -//int ixt = gSystem->Load("StvUtil"); -gSystem->Load("StXTrakMaker"); -chain->AddAfter("Sti", new StXTrakMaker ); -chain->AddAfter("StXTrak", new StXTrakTestMaker); - -StMaker::lsMakers(chain); - -int stv = opt.Contains("Stv"); -if (stv) { StvDebug::SetDebug(11);} -else { StiDebug::SetDebug(11);} - -#if 1 -int sim =0; -if (fil.Contains(".fz")) sim = 1; -if (!sim) { -rmMaker(chain,"geant"); -} else { -gSystem->Setenv("STARFPE","NO"); -} -#endif - -chain->Init(); -if (KNN) chain->SetAttr("seedFinders","kn","Stv"); - -chain->EventLoop(30); -chain->Finish(); -} - -void rmMaker(const StMaker *top, const char *key) -{ - TRegexp rex(key); - for (int del=1;del;) { - TDataSetIter iter((TDataSet*)top,20); - del=0; - for(const TDataSet *mk=top;mk;mk = iter.Next()) { - if(strncmp(".maker",mk->GetTitle(),6)!=0) continue; - TString ts(mk->ClassName()); ts+="::"; - ts+=mk->GetName(); - if (ts.Index(rex)<0) continue; - printf("*** Remove %s *** \n",ts.Data()); - delete mk; del = 1; break; - } - } - - printf("*** Maker %s Not Found ***\n",ts.Data()); - -} - diff --git a/StRoot/macros/calib/StvFitErr.C b/StRoot/macros/calib/StvFitErr.C deleted file mode 100644 index d4367a425f0..00000000000 --- a/StRoot/macros/calib/StvFitErr.C +++ /dev/null @@ -1,1876 +0,0 @@ -#include -#include -#include -#include "TSystem.h" -#include "TMath.h" -#include "TFile.h" -#include "TTree.h" -#include "TH1.h" -#include "TF1.h" -#include "TMath.h" -#include "TCanvas.h" -#include "TGraph.h" -#include "TCernLib.h" -#include "TMatrixD.h" -#include "TRandom.h" -#include "TVectorD.h" -#include "TVector2.h" -#include "TVector3.h" -#include "TTreeIter.h" -#include "TTable.h" -#include "TInterpreter.h" -#include "TMinuit.h" -#include "StvUtil/StvHitErrCalculator.h" -#include "TPolinom.h" -#include -//#define APPROX -static const double kWeight = 0.99; //pars = oldPars*(1-kWeight) + newPars*kWeight -static int testOnly=0; -enum {kMinNodes = 10,kMinHits=25}; -static const double kMaxDY=0.5,kMaxDZ=0.5,kErrFak=1.,kMaxCur=1./200,kPMin=0.5; -static const int gScale = 0; -static const double kUppPar=22,kLowPar=1e-8; - -//______________________________________________________________________________ -class FEEvent; -class FEFcn; -class StvHitErrCalculator; -class StvTpcHitErrCalculator; -int StvFitErr(const char *file="pulls.root"); -int MyTest(); -#if !defined(__MAKECINT__) -enum {kMaxPars = StvHitErrCalculator::kMaxPars}; -TMatrixD T(TMatrixD a) { TMatrixD mx(a); return mx.T();} - - -//______________________________________________________________________________ -class FERead : public TNamed -{ -public: -FERead(const char *file); -FEEvent *ReadEvent(); -private: -TTreeIter *mTreeIter; -FEEvent *mEvent; -}; - -//______________________________________________________________________________ -class Poli2 { -public: -Poli2(int npw,double reg); -Poli2(int npw,int n,const double *X,const double *Y,const double *W); -void SetReg(double reg) {fReg = reg;} -double Fit(); -void Clear(); -void Add(double x, double y, double w); -double Xi2() const {return fXi2;} -double LiH() const {return fXi2+fLiH+fKor;} -double dKordW() const {return fdKor;} -double Xi2(int ipt) const; -double Res(int ipt) const; -double Kor() const {return fKor;} -double Kor(int ipt) const; -double dKordW(int ipt) const; -double EvalXi2() const; -int Pw() const {return fPw ;} -int NPt() const {return fN ;} -double Fun( double x ) const; -double FunErr2( double x ) const; -double Pull( double x ,double y,double yErr2) const; -double dXi2dW( int ipt ) const; -double d2Xi2dW( int k, int l ) const; -double dLiHdW( int ipt ) const; -double d2LiHdW( int kpt ,int lpt) const; -double Deriv( TVectorD &Di ) const; -double D2riv( TMatrixD &Dik) const; -void TestIt() const; -void MyTest() const; -static void Test(); -static void Test2(); -static void TestErr(); -private: -static double F(double T) { return TMath::Erf(T)/M_2_SQRTPIl;} -private: -int fPw; -char fBeg[1]; -int fN; -double fReg,fKor,fdKor; -double fX[100]; -double fY[100]; -double fW[100]; -double fXi2; -double fLiH; -double fX0,fY0; -char fEnd[1]; -TVectorD fP; -TVectorD fB; -TMatrixD fA; -TMatrixD fAi; -}; - - -//______________________________________________________________________________ -class FEEvent -{ -public: - FEEvent(TTreeIter &th); - int NextTrack(int &jr); - void Reset() {mLTrack=0;mRTrack=-1;} -public: -int mLTrack,mRTrack; -const int &run; -const int &evt; -const int &nGHits; -const float *&mCurv; -const float *&mChi2; -const float *&mPt; -const short *&mTrackNumber; -const unsigned char *&nAllHits; //number of all hits in track -const unsigned char *&nTpcHits; //number of tpc hits in track -const unsigned char *&nFtpcHits; //number of ftpc hits in track -const unsigned char *&nSsdHits; //number of ssd hits in track -const unsigned char *&nRndHits; //number of RND hits in track -const unsigned char *&mDetector; -const float *&lYHit; -const float *&lZHit; -const float *&lLen; -const float *&gPhiHP; // phi of normal vector of hit plane in global Stv frame -const float *&gLamHP; // lambda of normal vector of hit plane in global Stv frame -const float *&gPsi; -const float *&gDip; -const float *&gRFit; -const float *&gPFit; -const float *&gZFit; -}; -//______________________________________________________________________________ -class FECalcHolder -{ -public: - FECalcHolder(); - FECalcHolder(int id,StvHitErrCalculator* calc,const double miMax[2][2]); - StvHitErrCalculator *GetCalc() const {return mCalc;} -virtual StvHitErrCalculator *GetCalc(const float x[3]) {if(x){};return mCalc;} -virtual int FixPars(FEFcn * /*fcn*/) {return 0;} - int GetId() {return mId;} - void SetOffset(int off) {mOffset=off;} - int GetOffset() const {return mOffset;} - int GetNPars() const {return mCalc->GetNPars();} -const double *GetPars() const {return mCalc->GetPars() ;} -const char *GetName() const {return mCalc->GetName() ;} - void Update(const double *a); - void DbLoad(); - void DbSave(); - void Scale(double fak); - - void AvInit(); - void AvAdd(const double hRR[3],double yXi2,double zXi2); - void AvEnd(); - -private: -char mBeg[1]; -TTable *mTab; -int mId; -int mOffset; -public: -double mAve[10]; -double mAveDer[kMaxPars][3]; -double mMiMax[2][2]; -StvHitErrCalculator* mCalc; -char mEnd[1]; -}; - -//______________________________________________________________________________ -class FETpcCalcHolder: public FECalcHolder -{ -public: - FETpcCalcHolder(StvHitErrCalculator* calc,const double miMax[2][2]) - :FECalcHolder(1,calc,miMax){;} -virtual StvHitErrCalculator *GetCalc(const float x[3]); -virtual int FixPars(FEFcn *fcn); -}; -//______________________________________________________________________________ -class FETstCalcHolder: public FECalcHolder -{ -public: - FETstCalcHolder(); -}; - -//______________________________________________________________________________ -class FENode -{ -public: -float tkDir[3]; -float hiPos[3]; -float hiDir[3][3]; -float s; -float yz[2]; -float detId; -}; -typedef std::vector FENodes; - -//______________________________________________________________________________ -class FETrak -{ -public: -void Add(const FENode &node) {mNodes.push_back(node);} -int NNodes() const {return mNodes.size(); } -const FENodes &Nodes() {return mNodes; } -private: -FENodes mNodes; -}; -typedef std::vector FETraks; -//______________________________________________________________________________ -class FEFcn -{ -public: - FEFcn(); - void Clear(); - void Add(FECalcHolder *holder); - void Add(); - void DbLoad(); - void DbSave(); - int Add(FEEvent *event); - - void InitFitter(); - int GetNPars() const {return mNPars;} -double* GetPars() {return mPars ;} - int GetIPar(const char* name) const; - int GetNFixd() const {return mNFixd;} - void Update(const double *upd); - void Synchro(char from,const double *par=0); - void Approx(int nonBias); -FECalcHolder *GetCalc(int id,const float hiPos[3]); - void Eval(int npar, double* grad, double& fval, double* par, int flag); - void FixPar(int iPar,int fix=1); - int FixPars(); - int IsFixed(int iPar) const {return mFix[iPar];} - int Fit(); - void AvErr(const char *tit); - int IsEnded() const; -static void Fcn(int &npar, double* grad, double& fval, double* par, int flag); - - -private: -char mFix[400]; -int mNPars; -int mNFixd; -int mNEvs; -int mNTks; -int mNHits; -int mNCall; -double mPars[100]; -double mFist[100]; -double mVal00; -double mVal99; -double mXi2[3]; -double mRes[4]; - -char mEnd[1]; -TString mNams[100]; -std::vector mCas; -FETraks mTks; -static FEFcn *mgInst; -}; -#ifdef APPROX -//______________________________________________________________________________ -class FEApprox -{ -public: - FEApprox(FEFcn *fefcn); -int Prepare(); -int Quadr(); -int Approx(); -int Test(); -private: -FEFcn *mFcn; -int mNPars; -TMatrixD mG,mGi,mC; -TVectorD mB,mP,mPrev,mClo,mIclo,mCup,mIcup; -TVectorD mXlo,mIxlo,mXup,mIxup; -double mXi2; -}; -#endif //APPROX - - -FEFcn *FEFcn::mgInst=0; - -//______________________________________________________________________________ -//______________________________________________________________________________ -//______________________________________________________________________________ -void CalcInit(); -FEFcn myFcn; -TMinuit myFitter(100); -//______________________________________________________________________________ -int MyTest() -{ - Poli2::Test(); - Poli2::TestErr(); - return 0; -} -//______________________________________________________________________________ -int StvFitErr(const char *file) -{ - testOnly = strcmp(file,"test")==0; - printf("StvFitErr(%s) started",file); - - CalcInit(); - myFcn.DbLoad(); - myFcn.InitFitter(); - - int nEv=0; - FEEvent *ev=0; - int eot=0; - if (!testOnly) { - FERead input(file); - while ((ev=input.ReadEvent())) - { - // printf ("Event %d\n",nEv); - nEv++; eot = myFcn.Add(ev); - if (eot) break; - } - printf ("StvFitErr: %d Events used\n",nEv); - #ifdef APPROX - FEApprox app(&myFcn); - #endif - } else { -// TestOnly - myFcn.Add(); - } - myFcn.AvErr("Before Fit"); - int ans =0; - ans = myFcn.Fit(); - myFcn.AvErr("After Fit"); - myFcn.DbSave(); - return (myFcn.IsEnded())? 99:0; -} -//______________________________________________________________________________ -void CalcInit() -{ - const char* innOutNames[4] ={"StvTpcInnerHitErrsFE" ,"StvTpcOuterHitErrsFE" - ,"StvTpcInnerPromptErrsFE" ,"StvTpcOuterPromptErrsFE" }; -// const double innOutPars[2][6]={{0.047,0.107,5e-5,1./12,0.0011, 0.0012} -// ,{0.035,0.077,5e-5,1./12,0.0011, 0.0012}}; - double TpcMiMax[2][2]={{0.05,0.2},{0.05,0.2}}; - - - myFcn.Clear(); - if (testOnly) { - FECalcHolder *hold= new FETstCalcHolder(); - myFcn.Add(hold); - return; - } - - for (int io=0;io<4;io++) { - StvHitErrCalculator *hec = (io<2) ? new StvTpcHitErrCalculator(innOutNames[io]) - : new StvHitErrCalculator (innOutNames[io]); - FECalcHolder *hold= new FETpcCalcHolder(hec,TpcMiMax); - myFcn.Add(hold); - } -} -//______________________________________________________________________________ -//______________________________________________________________________________ -//______________________________________________________________________________ -//______________________________________________________________________________ - - -//______________________________________________________________________________ -//______________________________________________________________________________ -//______________________________________________________________________________ -//______________________________________________________________________________ -Poli2::Poli2(int npw,double reg):fP(npw+1),fB(npw+1),fA(npw+1,npw+1),fAi(npw+1,npw+1) -{ - fPw = npw; - Clear(); - fReg = reg; -} -//______________________________________________________________________________ -void Poli2::Clear() -{ - memset(fBeg,0,fEnd-fBeg+1); -} -//______________________________________________________________________________ -Poli2::Poli2(int npw,int N,const double *X,const double *Y,const double *W) -:fP(npw+1),fB(npw+1),fA(npw+1,npw+1),fAi(npw+1,npw+1) -{ - fPw = npw; - Clear(); - fN = N; - int nb = N*sizeof(double); - memcpy(fX,X,nb); - memcpy(fY,Y,nb); - memcpy(fW,W,nb); -} -//______________________________________________________________________________ -void Poli2::Add(double x, double y, double w) -{ - fX[fN]=x; fY[fN]=y, fW[fN]=w; fN++; - assert(fN<=100); -} -//______________________________________________________________________________ -double Poli2::Fit() -{ - double Wt=0,Wx=0,Wy=0; - for (int i=0;iGaus(0,sqrt(1./W[i])); - } - Poli2 pp(npw,20,X,Y,W); - pp.Fit(); -// pp.MyTest(); - double Xi2 = pp.Xi2(); - double Xi2Eva = pp.EvalXi2(); if ( Xi2Eva) {}; - printf ("Xi2 = %g Fun(10)= %g\n",Xi2,pp.Fun(10.)); - - TPoliFitter pf(2); - for (int i=0;i<20;i++) { pf.Add(X[i],Y[i],1./W[i]);} - Xi2 =pf.Fit()*(20-3); - printf ("Xi2 = %g Fun(10)= %g\n",Xi2,pf.Eval(10.)); - - -// for (int i=0; i<20; i++) { -// printf(" %g %g : %g\n",X[i],YY[i],pp.Fun(X[i])); -// } -// check d/dW - printf("\n check d/dWi\n"); - double myDelta = 1e-3,delta,maxDif=0; - for (int k=0;k<20;k++) { - Poli2 ppp(npw,0); - for (int i=0;i<20;i++) { - double w = W[i]; - if (i==k) { delta = w*myDelta; w+=delta;} - ppp.Add(X[i],Y[i],w); - } - ppp.Fit(); - double ana = pp.dXi2dW(k); - double num = (ppp.Xi2()-pp.Xi2())/delta; - double dif = 2*(num-ana)/(fabs(num+ana)+3e-33); - if (maxDifGaus(0,sqrt(1./W[i])); - } - Poli2 pp(npw,20,X,Y,W); - pp.Fit(); -// pp.MyTest(); - TVectorD myDer(20),nyDer(20); - pp.Deriv(myDer); - printf("\n check d/dWi\n"); - double myDelta = 1e-3,delta,maxDif=0; - for (int k=0;k<20;k++) { - Poli2 ppp(npw,0); - for (int i=0;i<20;i++) { - double w = W[i]; - if (i==k) { delta = w*myDelta; w+=delta;} - ppp.Add(X[i],Y[i],w); - } - ppp.Fit(); - ppp.Deriv(nyDer); - for (int l=0;l<=k; l++) { - - double ana = 0.5*(pp.d2Xi2dW(k,l)+ppp.d2Xi2dW(k,l)); - double num = (nyDer(l)-myDer(l))/delta; - double dif = 2*(num-ana)/(fabs(num+ana)+3e-33); - if (fabs(dif)> maxDif) maxDif =fabs(dif); - if (fabs(dif)<1e-3) continue; - printf ("d2Xi2dW(%2d,%2d) \tana=%g \tnum = %g \tdif=%g\n",k,l,ana,num,dif); - } - } - printf ("Test2 d2Xi2dW(...) maxDif=%g\n",maxDif); - - -} -//______________________________________________________________________________ -void Poli2::TestIt() const -{ - TVectorD g,gT; - Poli2 pp(*this); - pp.Fit(); - double Xi2 = pp.Deriv(g); - - double delta = 1e-3; - for (int k=0;k0.01) - printf ("\ndXi2dW(%2d) \tana=%g \tnum = %g \tdif=%g\n\n",k,ana,num,dif); - } - - -} -//______________________________________________________________________________ -void Poli2::TestErr() -{ - double A[3]={3,0.02,0.05}; - - int npw=2; - double X[20],Y[20],W[20],YY[20]; - for (int i=0;i<20;i++) { - X[i]=i; - YY[i]= A[0]+X[i]*(A[1]+A[2]*X[i]); - W[i]= 1+10./YY[i]; - } - int nEv=10000,nTot=0; - double av=0,rms=0; - for (int iev=0;ievGaus(YY[i],sqrt(1./W[i])); - } - Poli2 pp(npw,20,X,Y,W); - pp.Fit(); - for (int ix=0;ix<20;ix++) { - double delta = (pp.Fun(X[ix])-YY[ix])/sqrt(pp.FunErr2(X[ix])); - av+=delta;rms+=delta*delta;nTot++; - } - } - av/=nTot; rms/=nTot; rms=sqrt(rms); - - - printf ("TestErr Av=%g Rms=%g\n",av,rms); -} -//______________________________________________________________________________ -void poli2() -{ -Poli2::Test(); -Poli2::Test2(); -Poli2::TestErr(); -} - -//______________________________________________________________________________ -FEEvent::FEEvent(TTreeIter &th): - run ( th("mRun")), - evt ( th("mEvt")), - nGHits ( th("mHitsG")), - mCurv ( th("mHitsG.mCurv")), - mChi2 ( th("mHitsG.mChi2")), - mPt ( th("mHitsG.mPt")), - mTrackNumber ( th("mHitsG.mTrackNumber")), - nAllHits ( th("mHitsG.nAllHits")), - nTpcHits ( th("mHitsG.nTpcHits")), - nFtpcHits ( th("mHitsG.nFtpcHits")), - nSsdHits ( th("mHitsG.nSsdHits")), - nRndHits ( th("mHitsG.nRndHits")), - mDetector ( th("mHitsG.mDetector")), - lYHit ( th("mHitsG.lYHit")), - lZHit ( th("mHitsG.lZHit")), - lLen ( th("mHitsG.lLen")), - gPhiHP ( th("mHitsG.gPhiHP")), - gLamHP ( th("mHitsG.gLamHP")), - gPsi ( th("mHitsG.gPsi")), - gDip ( th("mHitsG.gDip")), - gRFit ( th("mHitsG.gRFit")), - gPFit ( th("mHitsG.gPFit")), - gZFit ( th("mHitsG.gZFit")) -{ - mLTrack=0;mRTrack=-1; - -} -//______________________________________________________________________________ -int FEEvent::NextTrack(int &jr) -{ - mLTrack = mRTrack+1; - if (mLTrack>=nGHits) { jr=-1; return -1;} - mRTrack=mLTrack; - int tkNum= mTrackNumber[mLTrack]; - for (int j=mLTrack+1; jAddFile(file); - mEvent = new FEEvent(*mTreeIter); -} -//______________________________________________________________________________ -FEEvent* FERead::ReadEvent() -{ - mEvent->Reset(); - int nbytes = mTreeIter->Next(); - if (!nbytes) return 0; - return mEvent; -} - -//______________________________________________________________________________ -FECalcHolder::FECalcHolder(int id,StvHitErrCalculator* calc - ,const double miMax[2][2]) -{ - memset(mBeg,0,mEnd-mBeg+1); - mId=id; mCalc=calc; - memcpy(mMiMax[0],miMax[0],sizeof(mMiMax)); - double *par = calc->GetPars(); - for (int j=0;j<2;j++) {par[j] = 0.5*(miMax[j][0]+miMax[j][1]);} -} -//______________________________________________________________________________ -FECalcHolder::FECalcHolder() -{ - memset(mBeg,0,mEnd-mBeg+1); -} -//______________________________________________________________________________ - void FECalcHolder::Update(const double *a) - { - double b[100]; - int n = mCalc->GetNPars(); - for (int i=0;iSetPars(b); -} -//______________________________________________________________________________ -void FECalcHolder::DbLoad() -{ - gSystem->Load("libStDb_Tables.so"); - TString dbName(GetName()); - - - TString dbFile("StarDb/Calibrations/tracker/"); - dbFile += dbName; dbFile += ".C"; - int myN = mCalc->GetNPars();if(myN){}; - if (!gSystem->AccessPathName(dbFile)) {//file exists - printf("FECalcHolder::DbLoad: %s\n",dbFile.Data()); - TString command (".L "); command += dbFile; - gInterpreter->ProcessLine(command); - mTab = (TTable *) gInterpreter->Calc("CreateTable()"); - command.ReplaceAll(".L ",".U "); - gInterpreter->ProcessLine(command); - mCalc->SetPars((double*)mTab->GetArray()); -//?? Scale(1./kErrFak); - } else { //file does not exist - printf("FECalcHolder::DbLoad: %s NOT FOUND. Default is used)\n",dbFile.Data()); -// mTab = (TTable *)gInterpreter->Calc("new St_StvHitErrs(\"someHitError\",1)"); -// mTab->SetName(dbName); -// mTab->SetUsedRows(1); -// memcpy(mTab->GetArray(),mCalc->GetPars(),myN*sizeof(double)); - } - -} -//______________________________________________________________________________ -void FECalcHolder::DbSave() -{ - if (testOnly) return; - int myN = mCalc->GetNPars(); - memcpy(mTab->GetArray(),mCalc->GetPars(),myN*sizeof(double)); - TString dbFile("StarDb/Calibrations/tracker/"); - dbFile += GetName(); - dbFile += ".C"; - if (!gSystem->AccessPathName(dbFile)) {//file exists - TString ts(dbFile); - ts +=".BAK"; gSystem->Rename(dbFile,ts); - } - { //save FE file - std::ofstream ofs(dbFile); - -// Save increased errors -//?? Scale(kErrFak); - mTab->SavePrimitive(ofs); -//?? Scale(1./kErrFak); - } -// Save production errors - { - dbFile.ReplaceAll("FE.C",".C"); - std::ofstream ofs(dbFile); - TString ts(mTab->GetName()); - assert(ts.EndsWith("FE")); - ts.Chop();ts.Chop(); - mTab->SetName(ts); - mTab->SavePrimitive(ofs); - ts+="FE"; - mTab->SetName(ts); - } -} -//______________________________________________________________________________ -void FECalcHolder::Scale(double fak) -{ - int n = mTab->GetRowSize()/sizeof(double); - double *d = (double*)mTab->GetArray(); - TCL::vscale(d,fak,d,n); -} -//______________________________________________________________________________ -void FECalcHolder::AvInit() -{ - memset(mAve ,0,sizeof(mAve )); - memset(mAveDer[0],0,sizeof(mAveDer)); -} -//______________________________________________________________________________ -void FECalcHolder::AvAdd(const double hRR[3],double yXi2,double zXi2) -{ -// double der[kMaxPars][3]; - mAve[0]++; - mAve[1]+=hRR[0]; - mAve[2]+=hRR[0]*hRR[0]; - mAve[3]+=hRR[2]; - mAve[4]+=hRR[2]*hRR[2]; - mAve[5]+=yXi2; - mAve[6]+=zXi2; - -// mCalc->CalcDcaDers(der); -// TCL::vadd(mAveDer[0],der[0],mAveDer[0],kMaxPars*3); -} -//______________________________________________________________________________ -void FECalcHolder::AvEnd() -{ - for (int i=1;i<7;i++) {mAve[i]/=mAve[0];} - for (int i=2;i<5;i+=2){mAve[i] -= pow(mAve[i-1],2);} - - printf(" %s\t yRes=%g zRes=%g \n\n",GetName(),sqrt(myFcn.mRes[1]),sqrt(myFcn.mRes[3])); - printf(" %s\t yErr= %5.2g(+-%5.2g) \tzErr = %5.2g(+-%5.2g) Hits=%g\n" - ,GetName() - ,sqrt(mAve[1]), mAve[2]/(2*sqrt(mAve[1])) - ,sqrt(mAve[3]), mAve[4]/(2*sqrt(mAve[3])), mAve[0]); - printf(" %s\t yXi2=%g zXi2=%g \n\n",GetName(),mAve[5],mAve[6]); - - -} -//______________________________________________________________________________ -StvHitErrCalculator *FETpcCalcHolder::GetCalc(const float x[3]) -{ -static const double Rinner =120.8; -static const double Dinner =120.8/cos(15./180*M_PI); -static const double kZPrompt = 205; - int inOut = -1; - if (strstr(mCalc->GetName(),"TpcInnerHit" )) inOut=0;; - if (strstr(mCalc->GetName(),"TpcOuterHit" )) inOut=1;; - if (strstr(mCalc->GetName(),"TpcInnerPrompt")) inOut=2;; - if (strstr(mCalc->GetName(),"TpcOuterPrompt")) inOut=3;; - assert(inOut>=0); - float rxy = x[0]*x[0]+x[1]*x[1]; - int jk=-1; - if (rxyDinner*Dinner) jk=1; - if (jk==-1) { - float gphi = atan2(x[1],x[0])/M_PI*180; - gphi = fmod(gphi+15,30.)-15; - gphi = fmod(gphi+15,30.)-15; - jk = (sqrt(rxy)*cos(gphi/180*M_PI) kZPrompt) jk+=2; - return (inOut==jk)? mCalc:0; -} -//______________________________________________________________________________ -int FETpcCalcHolder::FixPars(FEFcn *fcn) -{ -enum { -kYErr =0, /* Intrinsic resolution, padrow or Y direction */ -kZErr =1, /* Intrinsic resolution, z direction */ -kThkDet =2, /* detector thickness**2 , not fitted */ -kYYDiff =3, /* Diffusion in XY direction *yFactor */ -kZZDiff =4, /* Diffusion in Z direction *ZFactor */ -kYFact =5, /* Error factor in Y-direction */ -kZFact =6, /* Error factor in Z-direction */ -kZAB2 =7}; /* Constant member in Z direction (a*b)**2 */ - - if (strstr(GetName(),"Prompt")) return 0; - fcn->FixPar(kZAB2+mOffset); - fcn->FixPar(kThkDet+mOffset); - return 2; -} -//______________________________________________________________________________ -FETstCalcHolder::FETstCalcHolder() -{ - - mId = 1946; - mCalc = new StvHitErrCalculator("TestHitErrCalc",2); - double pars[2]={0.04,0.01}; - mCalc->SetPars(pars); -} - -//______________________________________________________________________________ -//______________________________________________________________________________ -FEFcn::FEFcn() -{ - Clear(); - mgInst = this; -} -//______________________________________________________________________________ -void FEFcn::Clear() -{ - memset(mFix,0,mEnd-mFix); - mTks.clear(); - mCas.clear(); -} -//______________________________________________________________________________ -void FEFcn::FixPar(int ipar,int fix) -{ - assert(mFix[ipar]!=2); - mFix[ipar]=fix; - if (fix) {myFitter.FixParameter(ipar);mNFixd++;} - else {myFitter.Release(ipar) ;mNFixd--;} -} -//______________________________________________________________________________ -int FEFcn::GetIPar(const char* name) const -{ - for (int ip=0;ipSetOffset(mNPars); - mNPars+=holder->GetNPars(); - mCas.push_back(holder); -} -//______________________________________________________________________________ -int FEFcn::FixPars() -{ - int n = mCas.size(); - int nn = 0; - for (int i=0;iFixPars(this); - } - return nn; - -} -//______________________________________________________________________________ -void FEFcn::InitFitter() -{ - myFitter.SetMaxIterations(2000); - myFitter.SetPrintLevel(1); - Synchro('C'); - TCL::ucopy(mPars,mFist,mNPars); - - myFitter.SetFCN(&Fcn); - int n = FixPars(); - printf("FEFcn::InitFitter() %d fixed params\n",n); - -} -//______________________________________________________________________________ -void FEFcn::DbLoad() -{ - for (int i=0;i<(int)mCas.size();i++) { mCas[i]->DbLoad(); } -} -//______________________________________________________________________________ -void FEFcn::DbSave() -{ - for (int i=0;i<(int)mCas.size();i++) { mCas[i]->DbSave(); } -} - -//______________________________________________________________________________ -void FEFcn::Update(const double *upd) -{ - for (int i=0;i<(int)mCas.size();i++) { - mCas[i]->Update(upd); - } -} -//______________________________________________________________________________ -int FEFcn::Fit() -{ - int stat=0; - stat=myFitter.Command("SET GRAD "); - stat=myFitter.Command("SET GRAD 1"); - assert(!stat); - stat=myFitter.Command("SET STRATEGY 0 "); - assert(!stat); -//stat=myFitter.Command("SET ERRORDEF 0.0001"); - stat=myFitter.Command("SHOW EPS"); - stat=myFitter.Command("SHOW ERR"); - mVal99 = 0; - for (int it=0;it<10;it++) { - mVal00 = mVal99; - Approx(0); - stat = myFitter.Migrad(); - printf("%d Command Migrad == %d\n",it,stat); - if (!stat) {break;} - stat = myFitter.Command("SCAN"); - printf("%d Command Scan== %d\n",it,stat); - if (stat) break; - } -// myFitter.Command("IMPROVE"); - Approx(1); - printf("FEFcn::Fit() Average Xi2/Ndf = %g(y) %g(z) %g\n",mXi2[0],mXi2[1],mXi2[2]); - return 0; - -} -//______________________________________________________________________________ -FECalcHolder *FEFcn::GetCalc(int id,const float hiPos[3]) -{ - for (int i=0;i<(int)mCas.size();i++) { - if (id!=mCas[i]->GetId()) continue; - StvHitErrCalculator *calc = mCas[i]->GetCalc(hiPos); - if (calc) return mCas[i]; - } - assert(0 && "HitErrCalculator not found"); - return 0; -} - -//______________________________________________________________________________ -int FEFcn::Add(FEEvent* ev) -{ - mNEvs++; - int jl,jr; - FENode node; - while ((jl=ev->NextTrack(jr))>-1) - { - if (fabs(ev->mCurv[jl])>kMaxCur) continue; - if (ev->nAllHits[jl] mPt[jl]/cos(ev->gDip[jl]))mChi2+jl,idx); -// float minXi2 = ev->mChi2[jl+idx[4]]; - for (int j=jl;j<=jr;j++) { - if (fabs(ev->lYHit[j])>kMaxDY) continue; - if (fabs(ev->lZHit[j])>kMaxDZ) continue; - double psi = ev->gPsi[j]; - double dip = ev->gDip[j]; - node.tkDir[0] = cos(dip)*cos(psi); - node.tkDir[1] = cos(dip)*sin(psi); - node.tkDir[2] = sin(dip); - - double phi = ev->gPFit[j]; - assert(fabs(phi)<7); - double rxy = ev->gRFit[j]; - assert(rxy<300); - node.hiPos[0] = rxy*cos(phi); - node.hiPos[1] = rxy*sin(phi); - node.hiPos[2] = ev->gZFit[j]; - assert(fabs(node.hiPos[2])<300); - - phi = ev->gPhiHP[j]; - dip = ev->gLamHP[j]; - node.hiDir[0][0] = cos(dip)*cos(phi); - node.hiDir[0][1] = cos(dip)*sin(phi); - node.hiDir[0][2] = sin(dip); - - node.hiDir[1][0] =-sin(phi); - node.hiDir[1][1] = cos(phi); - node.hiDir[1][2] = 0; - - node.hiDir[2][0] =-sin(dip)*cos(phi); - node.hiDir[2][1] =-sin(dip)*sin(phi); - node.hiDir[2][2] = cos(dip); - - node.s = ev->lLen[j]; - if (node.s>=300) continue; - assert(node.s<300); - if (!y00) { y00=ev->lYHit[j]; z00=ev->lZHit[j];} - node.yz[0] = ev->lYHit[j]-y00; - node.yz[1] = ev->lZHit[j]-z00; - node.detId = ev->mDetector[j]; - nNodes++; - myTrak.Add(node); - } - assert(myTrak.NNodes()==nNodes); - if (nNodesGaus(0.,rmsDY); - double lZHit = gRandom->Gaus(0.,rmsDZ); - if (fabs(lYHit)>kMaxDY) continue; - if (fabs(lZHit)>kMaxDZ) continue; - node.tkDir[0] = cos(dip)*cos(psi); - node.tkDir[1] = cos(dip)*sin(psi); - node.tkDir[2] = sin(dip); - - double phi = 0; - double rxy = 100; - node.hiPos[0] = rxy*cos(phi); - node.hiPos[1] = rxy*sin(phi); - node.hiPos[2] = 100; - - phi = 0; dip=0; - - node.hiDir[0][0] = cos(dip)*cos(phi); - node.hiDir[0][1] = cos(dip)*sin(phi); - node.hiDir[0][2] = sin(dip); - - node.hiDir[1][0] =-sin(phi); - node.hiDir[1][1] = cos(phi); - node.hiDir[1][2] = 0; - - node.hiDir[2][0] =-sin(dip)*cos(phi); - node.hiDir[2][1] =-sin(dip)*sin(phi); - node.hiDir[2][2] = cos(dip); - - node.s = s;s+=deltaS; - node.yz[0] = lYHit; - node.yz[1] = lZHit; - node.detId = 1946; - nNodes++; - myTrak.Add(node); - } - mNHits += nNodes; - mNTks++; - mTks.push_back(myTrak); - assert(nNodes==mTks.back().NNodes()); - } - assert(mTks.size()); - return; -} - -//______________________________________________________________________________ -void FEFcn::Eval(int npar, double* gradp, double& fvalp, double* par, int flag) -{ - assert(npar<=mNPars); - mNCall++; - long double grad[100]={0},fval=0,myXi2[3]={0}; - long double gra2[100]={0},fval2=0; - int myN=0,myNy=0,myNz=0; - - memset(mRes,0,sizeof(mRes)); - int myNHits = 0; -// Update calc's params by current ones - Synchro('A',par); -//?? Poli2 poliSY(2),poliSZ(1); - Poli2 poliSY(2,kMaxDY),poliSZ(1,kMaxDZ); - for (int itk=0;itk<(int)mTks.size();itk++) {//Loop over tracks - const FENodes &nodes = mTks[itk].Nodes(); - int nNodes = nodes.size();; - poliSY.Clear(); poliSZ.Clear(); - FECalcHolder *hold[100]; - double hRR[3],dRR[10][3]; - for (int iNode=0;iNodeGetCalc(); - calc->SetTrack(n.tkDir); - calc->CalcDcaErrs(n.hiPos,n.hiDir,hRR); - assert(hRR[0]>0); - assert(hRR[2]>0); - assert(hRR[0]*hRR[2]>hRR[1]*hRR[1]); - poliSY.Add(n.s,n.yz[0],1./hRR[0]); - poliSZ.Add(n.s,n.yz[1],1./hRR[2]); - } // end 1st Loop over nodes - - poliSY.Fit(); - poliSZ.Fit(); - fval += ((poliSY.LiH()+poliSZ.LiH()))-mVal00/mTks.size(); - myXi2[0] += poliSY.Xi2()-(nNodes); - myXi2[1] += poliSZ.Xi2()-(nNodes); - - myXi2[2] = 0.5*(myXi2[0]+myXi2[1]); - fval2 += poliSY.Xi2()+poliSZ.Xi2()- 2*nNodes; - myNy+=(nNodes); - myNz+=(nNodes); - myN+=myNy+myNz; - - myNHits+=nNodes; - for (int iNode=0;iNodeGetCalc(); - calc->SetTrack(n.tkDir); - calc->CalcDcaErrs(n.hiPos,n.hiDir,hRR); - calc->CalcDcaDers(dRR); - // dLih/dW*dW/dErr2 - double dLihdErrY = -poliSY.dLiHdW(iNode)/(hRR[0]*hRR[0]); - double dLihdErrZ = -poliSZ.dLiHdW(iNode)/(hRR[2]*hRR[2]); - double dXi2dErrY = -poliSY.dXi2dW(iNode)/(hRR[0]*hRR[0]); - double dXi2dErrZ = -poliSZ.dXi2dW(iNode)/(hRR[2]*hRR[2]); - int nPar=calc->GetNPars(); - int offs=hold[iNode]->GetOffset(); - for (int jPar=0;jPar fval+mVal00) mVal99 = fval+mVal00; - if (!mVal00) { mVal00 = mVal99; fvalp = 0;} - TCL::vscale(mRes,(1./myNHits),mRes,4); - - - if (flag==2) { - for (int i=0;iGetCalc(); - calc->SetTrack(n.tkDir); - calc->CalcDcaErrs(n.hiPos,n.hiDir,hRR); - assert(hRR[0]>0); - assert(hRR[2]>0); - poliSY.Add(n.s,n.yz[0],1./hRR[0]); - poliSZ.Add(n.s,n.yz[1],1./hRR[2]); - } // end 1st Loop over nodes - - poliSY.Fit(); - poliSZ.Fit(); - myXi2[0] += poliSY.Xi2()-nNodes; - myXi2[1] += poliSZ.Xi2()-nNodes; - - myXi2[2] = 0.5*(myXi2[0]+myXi2[1]); - mydKor += poliSY.dKordW()+poliSZ.dKordW(); - myN+=nNodes; - - for (int iNode=0;iNodeGetCalc(); - calc->SetTrack(n.tkDir); - calc->CalcDcaErrs(n.hiPos,n.hiDir,hRR); - assert(hRR[0]>0); - assert(hRR[2]>0); - myPull += pow(poliSY.Pull(n.s,n.yz[0],hRR[0]),2); - myPull += pow(poliSZ.Pull(n.s,n.yz[1],hRR[2]),2); - - } // end 1st Loop over nodes - - }//End tracks - - mXi2[0] = 1+myXi2[0]/myN; - mXi2[1] = 1+myXi2[1]/myN; - mXi2[2] = 0.5*(mXi2[0]+mXi2[1]); - myPull /=(2*myN); - mydKor /=(2*myN); - printf("Approx::Aver: Xi2=%g(y) %g(z) %g Pull=%g\n" - ,mXi2[0],mXi2[1],mXi2[2],double(myPull)); - - if (gScale) { - double korFak = (1.+mydKor/mXi2[2]); - if (!nonBias) {TCL::vscale(mPars, mXi2[2]*korFak ,mPars,mNPars);} - else {TCL::vscale(mPars,double(myPull*korFak),mPars,mNPars);} - } - - Synchro('P'); -} -//______________________________________________________________________________ -void FEFcn::Synchro(char from,const double* Arr ) -{ -// from: 0=from StvHitErrCalc's; 1=from Minuit; 2 = FEFcn::mPar; 3=from array - - switch (from) { - case 'C': {// input from StvHitErrCals's - int nump = 0; - for (int i=0;i<(int)mCas.size();i++) { - StvHitErrCalculator *calc = mCas[i]->GetCalc(); - int nP = calc->GetNPars(); - const double *p = calc->GetPars(); - for (int ip=0;ipGetName());ts+="_";ts+=ip; - double qwe = p[ip]; if (qwe<1e-8) qwe=1e-8; - double stp = qwe*0.1; if (stp<1e-8) stp = 0.8e-6; - myFitter.DefineParameter(nump,ts.Data(), qwe, stp, kLowPar, kUppPar); - mNams[nump] = ts; - mPars[nump] = qwe; - nump++; - } - } - if (!mNPars) mNPars = nump; - assert(mNPars==nump); - break;} - - case 'M': {// input from Minuit - double err; - for (int ipar=0;iparEval(npar,grad,fval,par,flag); -} - -//______________________________________________________________________________ -void FEFcn::AvErr(const char *tit) -{ - for (int ih=0;ih<(int)mCas.size();ih++) - { - FECalcHolder *hold = mCas[ih]; hold->AvInit(); - } - Poli2 poliSY(2,kMaxDY),poliSZ(2,kMaxDZ); - for (int itk=0;itk<(int)mTks.size();itk++) {//Loop over tracks - const FENodes &nodes = mTks[itk].Nodes(); - int nNodes = nodes.size(); - poliSY.Clear(); poliSZ.Clear(); - FECalcHolder *hold[100]; - double errs[100][3]; - double hRR[3]; - for (int iNode=0;iNodeGetCalc(); - calc->SetTrack(n.tkDir); - calc->CalcDcaErrs(n.hiPos,n.hiDir,hRR); - memcpy(errs[iNode],hRR,sizeof(hRR)); - poliSY.Add(n.s,n.yz[0],1./hRR[0]); - poliSZ.Add(n.s,n.yz[1],1./hRR[2]); - } // end 1st Loop over nodes - - poliSY.Fit(); - poliSZ.Fit(); - - for (int iNode=0;iNodeAvAdd(errs[iNode],yXi2,zXi2); - } // end 2nd Loop over nodes - }//End tracks - - printf("\n ====== AvErr(%s) Events=%d Tracks=%d Hits=%d\n" - ,tit,mNEvs,mNTks,mNHits); - - for (int ih=0;ih<(int)mCas.size();ih++) - { - FECalcHolder *hold = mCas[ih]; - hold->AvEnd(); - } - return; -} -//______________________________________________________________________________ -int FEFcn::IsEnded() const -{ - double sum = 0,dlt=0; - for (int i=0;i 1e-2) return 0; - printf(" *** Fit CONVERGED Hurragh***\n"); - return 1; -} - - -//______________________________________________________________________________ -//______________________________________________________________________________ -#ifdef APPROX -//______________________________________________________________________________ -FEApprox::FEApprox(FEFcn *fefcn) -{ - mFcn=fefcn; - mNPars = mFcn->GetNPars(); - mG.ResizeTo(mNPars,mNPars); - mGi.ResizeTo(mNPars,mNPars); - mB.ResizeTo(mNPars); - mP.ResizeTo(mNPars); - mPrev.ResizeTo(mNPars); - mPrev = TVectorD(mNPars,mFcn->GetPars()); - mXlo.ResizeTo(mNPars); - mIxlo.ResizeTo(mNPars);mIxlo =1.; - mXup.ResizeTo(mNPars); - mIxup.ResizeTo(mNPars);mIxup =1.; -} -//______________________________________________________________________________ -int FEApprox::Prepare() -{ - assert(mNPars<100); - long double myXi2=0,myB[100]={0},myG[100][100]={{0}}; - int myN=0; - TMatrixD d2LdWWy,d2LdWWz,dSdPy,dSdPz; - TMatrixD dWdSy,dWdSz,d2WdSSy,d2WdSSz; - TVectorD dLdWy,dLdWz; - -//?? Poli2 poliSY(2),poliSZ(1); - Poli2 poliSY(2),poliSZ(2); - const FETrak* trak = mFcn->GetTrak(); - for (;trak;trak=trak->Next()) { - int nNodes = trak->GetNNodes(); - poliSY.Clear(); poliSZ.Clear(); - FECalcHolder *hold[100]; - double hRR[3],dRR[10][3]; - for (int iNode=0;iNodeGetNode(iNode); - hold[iNode] = mFcn->GetCalc((int)n->detId,n->hiPos); - StvHitErrCalculator *calc = hold[iNode]->GetCalc(); - calc->SetTrack(n->tkDir); - calc->CalcDcaErrs(n->hiPos,n->hiDir,hRR); - assert(hRR[0]>0); - assert(hRR[2]>0); - poliSY.Add(n->s,n->yz[0],1./hRR[0]); - poliSZ.Add(n->s,n->yz[1],1./hRR[2]); - } // end 1st Loop over nodes - - poliSY.Fit(); - poliSZ.Fit(); - myXi2 +=poliSY.LiH()+poliSZ.LiH(); - poliSY.Deriv(dLdWy); poliSY.D2riv(d2LdWWy); - poliSZ.Deriv(dLdWz); poliSZ.D2riv(d2LdWWz); - dWdSy.ResizeTo(nNodes,nNodes); dWdSy=0.; - dWdSz.ResizeTo(nNodes,nNodes); dWdSz=0.; - d2WdSSy.ResizeTo(nNodes,nNodes); d2WdSSy=0.; - d2WdSSz.ResizeTo(nNodes,nNodes); d2WdSSz=0.; - dSdPy.ResizeTo(mNPars,nNodes); dSdPy=0.; - dSdPz.ResizeTo(mNPars,nNodes); dSdPz=0.; - dSdPy.ResizeTo(mNPars,nNodes); dSdPy=0.; - myN++; - - StvHitErrCalculator *calc=0;const FENode *n=0; - for (int iNode=0;iNodeGetNode(iNode); - calc = hold[iNode]->GetCalc(); - calc->SetTrack(n->tkDir); - calc->CalcDcaErrs(n->hiPos,n->hiDir,hRR); - calc->CalcDcaDers(dRR); - int offs=hold[iNode]->GetOffset(); - int nP = calc->GetNPars(); - for (int jp=0;jp0) { - myDel = 1./sqrt(mG[ipar][ipar]); - if (delta > myDel) delta = myDel; - myDel = fabs(mB[ipar]/mG[ipar][ipar]); - if (delta > myDel) delta = myDel; - } else { - myDel = fabs(mB[ipar]/mG[ipar][ipar])*2/0.1; - if (delta > myDel) delta = myDel; - } - mXlo[ipar] = mPrev[ipar]-delta; - if (mXlo[ipar]<1e-8) mXlo[ipar]=1e-8; - mXup[ipar] = mPrev[ipar]+delta; - } - -// Prepare inequalities - - int nCas = mFcn->mCas.size(); - mC.ResizeTo(nCas*2,mNPars); mC = 0.; - mClo.ResizeTo(nCas*2); - mIclo.ResizeTo(nCas*2); mIclo = 1; - mCup.ResizeTo(nCas*2); - mIcup.ResizeTo(nCas*2); mIcup = 1; - int iRow = 0; - for (int ic=0;icmCas[ic]; - StvHitErrCalculator *calc = hold->GetCalc(); - int iCol = hold->GetOffset(); - int nP = calc->GetNPars(); - for (int ip=0;ipmAveDer[ip][0]; - mC[iRow+1][iCol+ip] = hold->mAveDer[ip][2]; - } - mClo[iRow+0] = hold->mMiMax[0][0]; - mClo[iRow+1] = hold->mMiMax[1][0]; - mCup[iRow+0] = hold->mMiMax[0][1]; - mCup[iRow+1] = hold->mMiMax[1][1]; - iRow+=2; - } - return 0; -} -#include "Riostream.h" -#include "TMath.h" -#include "TSystem.h" - -#include "TMatrixD.h" -#include "TMatrixDSym.h" -#include "TVectorD.h" -#include "TQpProbDens.h" -#include "TGondzioSolver.h" -#include "TMehrotraSolver.h" - -//______________________________________________________________________________ -int FEApprox::Test() -{ - mP = TVectorD(mNPars,mFcn->GetPars()); - Prepare(); -// mB.Print(); - TVectorD baseDer(mB); - TMatrixD baseD2r(mG); - double baseFcn = mXi2; - double part = 3e-2,minStp=3e-4; - for (int ip=0;ipIsFixed(ip)) continue; - double eps = mP[ip]*part; if (eps Update(mP.GetMatrixArray()); - Prepare(); - double nowFcn = mXi2; - double num = (nowFcn-baseFcn)/eps; - double ana = mB[ip]; - double dif = 2*(num-ana)/(fabs(num+ana)+3e-33); - printf ("dXi2dP(%2d) \tana=%g \tnum = %g \tdif=%g\n",ip,ana,num,dif); - for (int jp=0;jp<=ip;jp++) { - if (mFcn->IsFixed(jp)) continue; - num = (mB[jp]-baseDer[jp])/eps; - ana = (mG[ip][jp]+baseD2r[ip][jp])/2; - dif = 2*(num-ana)/(fabs(num+ana)+3e-33); - printf ("\td2Xi2dPP(%2d,%2d) \tana=%g \tnum = %g \tdif=%g\n",ip,jp,ana,num,dif); - } - mP[ip]=sav; - mFcn->Update(mP.GetMatrixArray()); - } - - return 0; -} -//______________________________________________________________________________ -int FEApprox::Quadr() -{ -const int nrVar=mNPars; -const int nrEqual = mFcn->GetNFixd()+3; -const int nrInEqual = mC.GetNrows(); -TVectorD c = mB; -TMatrixDSym Q(nrVar,mG.GetMatrixArray()); - - // equality equation - TMatrixD A(nrEqual,nrVar); - TVectorD b(nrEqual); - int iiEqual=0; - for (int ipar=0;iparIsFixed(ipar)) continue; - A[iiEqual][ipar] = 1; - b[iiEqual] = 0; - iiEqual++; - } - A[iiEqual][4]=1; A[iiEqual][4+6]=-1.;iiEqual++; - A[iiEqual][5]=1; A[iiEqual][5+6]=-1.;iiEqual++; - A[iiEqual][2]=1; A[iiEqual][2+6]=-1.;iiEqual++; - - - // inequality equation - // - // - although not applicable in the current situatio since nrInEqual = 0, one - // has to specify not only clo and cup but also an index vector iclo and icup, - // whose values are either 0 or 1 . If iclo[j] = 1, the lower boundary condition - // is active on x[j], etc. ... - -// TMatrixD C (nrInEqual,nrVar); -// TVectorD clo (nrInEqual); -// TVectorD cup (nrInEqual); -// TVectorD iclo(nrInEqual); -// TVectorD icup(nrInEqual); - - // simple square boundary condition : 0 <= x_i, so only xlo is relevant . - // Like for clo and cup above, we have to define an index vector ixlo and ixup . - // Since each variable has the lower boundary, we can set the whole vector - // ixlo = 1 - -// TVectorD xlo (nrVar); xlo = 1e-8; -// TVectorD xup (nrVar); xup = 10; -// TVectorD ixlo(nrVar); ixlo = 1; -// TVectorD ixup(nrVar); ixup = 1; - - // setup the quadratic programming problem . Since a small number of variables are - // involved and "Q" has everywhere entries, we chose the dense version "TQpProbDens" . - // In case of a sparse formulation, simply replace all "Dens" by "Sparse" below and - // use TMatrixDSparse instead of TMatrixDSym and TMatrixD - - TQpProbDens *qp = new TQpProbDens(nrVar,nrEqual,nrInEqual); - - // stuff all the matrices/vectors defined above in the proper places - - TQpDataDens *prob = (TQpDataDens *)qp->MakeData(c,Q,mXlo,mIxlo,mXup,mIxup,A,b,mC,mClo,mIclo,mCup,mIcup); - - - // setup the nrVar variables, vars->fX will contain the final solution - - TQpVar *vars = qp->MakeVariables(prob); - TQpResidual *resid = qp->MakeResiduals(prob); - - // Now we have to choose the method of solving, either TGondzioSolver or TMehrotraSolver - // The Gondzio method is more sophisticated and therefore numerically more involved - // If one want the Mehrotra method, simply replace "Gondzio" by "Mehrotra" . - - TGondzioSolver *s = new TGondzioSolver(qp,prob); -//TMehrotraSolver *s = new TMehrotraSolver(qp,prob); - const Int_t status = s->Solve(prob,vars,resid); - assert(!status); - mP = vars->fX; - - - - return 0; -} - -//______________________________________________________________________________ -int FEApprox::Approx() -{ - int iter = 0,nCutStp=0; - double myXi2 = 1000.; - for (;iter<26;iter++) - { - Prepare(); - if (mXi2 > myXi2 && nCutStp>5) { - nCutStp++; - mP = 0.5*(mP+mPrev); - mFcn->Update(mP.GetMatrixArray()); - continue; - } - nCutStp=0; - int ans = Quadr(); if(ans){}; - double eps = 0,maxpar=0;int ips=-1; - for (int ip=0;ipUpdate(mP.GetMatrixArray()); - if (eps<0.03) break; - } -// Now release all the parameters - for (int iPar=0;iParIsFixed(iPar)!=1) continue; -// printf(" Approx:: release parameter %d\n",iPar); - mFcn->FixPar(iPar,0); - } - - return iter; -} -#endif // APPROX -#endif - diff --git a/StRoot/macros/calib/StvFitErr.csh b/StRoot/macros/calib/StvFitErr.csh deleted file mode 100755 index 9dff7624d63..00000000000 --- a/StRoot/macros/calib/StvFitErr.csh +++ /dev/null @@ -1,155 +0,0 @@ -# -# Evaluation of hit errors. -# invoking: -# StvFitErr.csh daqfile.daq pp2009 -# -# daqfile must be the fullname of daq file, including full path -# -# At the beginning empty working directory must be created -# At the end in subdirectory StarDb/Calibrations/tracker/ -# will be created files: -# StarDb/Calibrations/tracker/ssdHitError.20050101.235959.C -# StarDb/Calibrations/tracker/svtHitError.20050101.235959.C -# StarDb/Calibrations/tracker/tpcInnerHitError.20050101.235959.C -# StarDb/Calibrations/tracker/tpcOuterHitError.20050101.235959.C -# -# these files could be used by Stv. -# file stv.log contains log of Stv -# file fit.log contains log of HitError fitting -# -# All questions to Victor Perev -# Victor Perev Feb 17, 2007 -############################################################################ -source ${GROUP_DIR}/.starver .DEV -echo STAR = $STAR $ROOTSYS - -# Check input file -if ( ! ${%1} ) then - echo "fiterr: ***No input daq file ***" - exit 13 -endif - -set daqFile = ${1} - -set myFile = {$daqFile:s/@//} -setenv STV_FILE_LIST $myFile - -if (!( -e ${myFile} )) then - echo "fiterr: ***Daq file Not FOUND // ${daqFile} ***" - exit 13 -endif -echo "fiterr: Input daq file=${daqFile}" -set nam = ${daqFile:t} -set nam = ${nam:r} -set nam = ${nam:s/@//} - - -set Opt = ${2} -setenv STV_OPTS $Opt -set myOpt = ${3} -set nFETracks = ${4}; -if ( ! $nFETracks ) set nFETracks = 1000000; -echo "fiterr: *** $nFETracks tracks requested" -# FloatPointException OFF -setenv STARFPE NO - -# Fit Stv errors - - -# Create DB directories -mkdir -p StarDb/Calibrations/tracker/ -mkdir -p StarDb/Calibrations/rich/ - -# Create link to fiterr.C for aclic -#if ( ! ( -e fiterr.C ) ) ln -sf $STAR/StRoot/macros/calib/fiterr.C . - -@ iter = 0 - -AGAIN: -@ iter = $iter + 1 - -set myroot_time = 0 -set fitlog_time = 0 -if ( -e fit.log) set fitlog_time = `stat -c %X fit.log` -if ( -e stv.log) set myroot_time = `stat -c %X stv.log` -touch fit.log -touch stv.log -if ($myroot_time > $fitlog_time) goto FIT - -echo '*** STV Started *** Iter=' $iter -echo '*** STV Started *** Iter=' $iter >> stv.log - -## STV: -## gdb root.exe <>& stv.log -## run -b -## .L runStv.C -## #include -## const char *star = gSystem->Getenv("STAR"); -## const char *path = gSystem->Getenv("LD_LIBRARY_PATH"); -## printf("*** STAR = %s ***\n",star); -## printf("*** PATH = %s ***\n",path); -## int ans =13; -## ans =runStv("$daqFile","${Opt}",0,11); -## printf("*** runStv=%d\n ***",ans); -## ans =13; -## chain->SetAttr("fiterr",$nFETracks,"Stv"); -## chain->SetAttr("HitLoadOpt" ,0,"Stv"); -## chain->SetAttr("useTracker" ,1,"Stv"); -## chain->SetAttr("useVertexFinder",0,"Stv"); -## chain->SetAttr("useEventFiller" ,1,"Stv"); -## chain->SetAttr("makePulls" ,1,"Stv"); -## ans = chain->EventLoop(4000); -## bt -## printf("*** EventLoop=%d ***\n",ans); -## if (ans > 2) exit(13); -## ans =chain->Finish(); -## if (ans) exit(14); -## exit(0); -## EOF -########################## -runCondor.csh -########################## -set myerr = $status -if ($myerr) goto STVERR -echo '*** STV Ended *** Status=' $myerr -echo '*** STV Ended *** Iter=' $iter >> stv.log -touch stv.log -if ($myerr) goto STVERR - -FIT: -echo '*** FitErr Started *** Iter=' $iter -##set timstamp = ( `grep 1stEventTimeStamp stv.log` ) -##echo $timstamp - -touch fit.log - -root.exe -b <>& fit.log -#include - -gSystem->Load("libQuadp.so"); -gSystem->Load("StvUtil"); - -.L StvFitErr.C+ -int ans = 13; -ans = StvFitErr("condor/*.tags.root"); -exit(ans); -.q -EOF -set myerr = $status -echo '*** FitErr Ended *** Status=' $myerr -if ($myerr) goto FITERR -if ( $iter > 9 ) goto MANY -goto AGAIN - -# -STVERR: -echo "STVERR =" $myerr "Iter=" $iter -exit - -FITERR: if (myerr==99) goto DONE - echo "FITERR =" $myerr "Iter=" $iter -exit -DONE: echo "DONE Iter=" $iter -exit -MANY: echo "TOO MANY Iters=" $iter -exit diff --git a/StRoot/macros/calib/runStv.C b/StRoot/macros/calib/runStv.C deleted file mode 100644 index 02860582a80..00000000000 --- a/StRoot/macros/calib/runStv.C +++ /dev/null @@ -1,65 +0,0 @@ -class StMaker; -void rmMaker(const StMaker *top,const char *key); -int runStv(const char *daqFile,const char *flg,int nEvents,int myFlag) -{ -int stv = (myFlag )%10; -int trs = (myFlag/10 )%10; -int mcm = (myFlag/100 )%10; -int knn = (myFlag/1000)%10; - -printf("\n*** runStv(\"%s\",\"%s\",%d,%d)\n\n",daqFile,flg,nEvents,myFlag); -gROOT->LoadMacro("bfc.C"); -TString opt(flg),fil(daqFile); -int fr=1,to=nEvents; -int ierr = 0; - -opt += ",StvPulls"; - - -bfc(-1,opt,fil); -chain->SetAttr("blackList","Svt","St_db_Maker::"); - -// StIOInterFace *iomk = (StIOInterFace *)chain->GetMaker("inputStream"); -// if (iomk && !fil.Contains(".geant.")) { -// TString dir("/star/simu/simu/perev/StiVMC/offline/users/perev/fitErrSim/"); -// iomk->SetBranch("geantBranch",dir,"r"); -// } - - -StMaker *mk=0; - -//StMaker::lsMakers(chain); - -if (nEvents>=0) chain->Init(); - -//========================================== -rmMaker(chain,"StKinkMaker"); -//========================================== -if (knn){ - chain->SetAttr("seedFinders","KN","Stv"); - chain->SetAttr("seedFinders","KN","Sti"); -} -if (nEvents>=0) chain->EventLoop(nEvents); -return 99; -} - -void rmMaker(const StMaker *top, const char *key) -{ - TRegexp rex(key); - for (int del=1;del;) { - TDataSetIter iter((TDataSet*)top,20); - del=0; - for(const TDataSet *mk=top;mk;mk = iter.Next()) { - if(strncmp(".maker",mk->GetTitle(),6)!=0) continue; - TString ts(mk->ClassName()); ts+="::"; - ts+=mk->GetName(); - if (ts.Index(rex)<0) continue; - printf("*** Remove %s *** \n",ts.Data()); - delete mk; del = 1; break; - } - } - - printf("*** Maker %s Not Found ***\n",ts.Data()); - -} - diff --git a/StarDb/Calibrations/tracker/StvIstHitErrs.C b/StarDb/Calibrations/tracker/StvIstHitErrs.C deleted file mode 100644 index 9f798cb5f1e..00000000000 --- a/StarDb/Calibrations/tracker/StvIstHitErrs.C +++ /dev/null @@ -1,22 +0,0 @@ -#include "tables/St_HitError_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// db/.data/StarDb/Calibrations/tracker/.ist3HitError/ist3HitError Allocated rows: 1 Used rows: 1 Row size: 48 bytes -// Table: HitError_st[0]--> HitError_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!gROOT->GetClass("St_HitError")) return 0; -HitError_st row; -St_HitError *tableSet = new St_HitError("StvIstHitErrs",1); -// - Double_t sigma_z = 1.11; - Double_t sigma_y = 0.0017; -memset(&row,0,tableSet->GetRowSize()); -// hit errors are squared ! - row.coeff[0] = sigma_y*sigma_y; // y intrinsic; - row.coeff[1] = sigma_z*sigma_z; // z intrinsic; -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvKonst.C b/StarDb/Calibrations/tracker/StvKonst.C deleted file mode 100644 index 362bf0c3536..00000000000 --- a/StarDb/Calibrations/tracker/StvKonst.C +++ /dev/null @@ -1,68 +0,0 @@ -#include "tables/St_StvKonst_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// StvTpcOuterHitErrs Allocated rows: 1 Used rows: 1 Row size: 48 bytes -// Table: StvKonst_st[0]--> StvKonst_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!TClass::GetClass("St_StvKonst")) return 0; -StvKonst_st row; -St_StvKonst *tableSet = new St_StvKonst("StvKonst",1); -// -memset(&row,0,tableSet->GetRowSize()); -// double myProb = TMath::Prob(30**3,2); - double myProb = TMath::Prob(30,2); -//double myFaktor = 3; - double myFaktor = 1; - row.mXi2Hit = ROOT::Math::chisquared_quantile_c(myProb,2) *myFaktor; //Xi2 to accept new hit - row.mXi2Trk = ROOT::Math::chisquared_quantile_c(myProb,30)/30*myFaktor;//Xi2 to accept new track - row.mXi2Vtx = ROOT::Math::chisquared_quantile_c(myProb,2); //Xi2 to accept vertex - row.mXi2Joi = ROOT::Math::chisquared_quantile_c(myProb,5)*myFaktor; //Xi2 in Refit join left & right subtrack - row.mXi2Hlx = row.mXi2Hit*9; //Xi2 in Helix, . - row.mDca2dZeroXY = 6.; //max 2d dca to X=Y=0 for primary track - row.mDca3dVertex = 3.; //max 3d dca to vertex for primary track - row.mMaxCurv = 1./33; //Maximal allowed curvature(33cm radius) - row.mMinP2 = 0.003*0.003; //Geant3 cut for too small momentum**2 - row.mMaxPti = 20; /*Maximal allowed 1/pt or Pt = 50MeV*/ - row.mMaxRes = 0.5; /*Maximal allowed residual */ - row.mCoeWindow= 9.; /*Maximal window to search hits in errors*/ - row.mMaxWindow= 10.; /*Maximal window to search hits in centimeters*/ - -// MidEta - row.mMinSeedHits = 5; /*Min number of seed hits allowed*/ - row.mMaxSeedHits =10; /*Max number of seed hits allowed*/ - row.mMinHits = 5; /*Min number of hits allowed*/ - row.mNorHits =10; /*Normal number of hits allowed*/ - row.mGoodHits =15; /*Good number of hits */ -// MidEta hitCount hitCount hitCount hitCount hitCount - row.mMinTotHits =3; /*Min number hits for track*/ - row.mMinGoodHits=3; /*Min number good hits for track*/ - row.mMinContHits=3; /*Min length of good hit sequence*/ -//row.mMaxContNits=15; /*Max length of acceptable non hit sequence*/ - row.mMaxContNits=10; /*Max length of acceptable non hit sequence*/ - row.mMaxTotNits =20; /*Max number of acceptable non hits*/ - - row.mRxyMax = 207; //Max radius for tracking - row.mZMax = 220; //Max Z for tracking -// ForwEta version - row.mMinSeedHitsFw = 4; /*Min number of seed hits allowed*/ - row.mMaxSeedHitsFw = 6; /*Max number of seed hits allowed*/ - row.mMinHitsFw = 4; /*Min number of hits allowed*/ - row.mNorHitsFw = 5; /*Normal number of hits allowed*/ - row.mGoodHitsFw =5; /*Good number of hits */ - -// ForwEta hitCount hitCount hitCount hitCount hitCount - row.mMinTotHitsFw =3; /*Min number hits for track*/ - row.mMinGoodHitsFw=3; /*Min number good hits for track*/ - row.mMinContHitsFw=3; /*Min length of good hit sequence*/ - row.mMaxContNitsFw=1; /*Max length of acceptable non hit sequence*/ - row.mMaxTotNitsFw =2; /*Max number of acceptable non hits*/ - row.mRxyMaxFw = 207; //Max radius for tracking - row.mZMaxFw = 700; //Max Z for tracking - - -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvPxlHitErrs.C b/StarDb/Calibrations/tracker/StvPxlHitErrs.C deleted file mode 100644 index 1b2f6d35400..00000000000 --- a/StarDb/Calibrations/tracker/StvPxlHitErrs.C +++ /dev/null @@ -1,22 +0,0 @@ -#include "tables/St_HitError_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// db/.data/StarDb/Calibrations/tracker/.ssdHitError/ssdHitError Allocated rows: 1 Used rows: 1 Row size: 48 bytes -// Table: HitError_st[0]--> HitError_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!gROOT->GetClass("St_HitError")) return 0; -HitError_st row; -St_HitError *tableSet = new St_HitError("StvPxlHitErrs",1); -// - Double_t sigma_y = 0.0012; // 12 mkm - Double_t sigma_z = 0.0012; // 12 mkm -memset(&row,0,tableSet->GetRowSize()); -// hit errors are squared ! - row.coeff[0] = sigma_y*sigma_y; // - row.coeff[1] = sigma_z*sigma_z; -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.20090315.000000.C b/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.20090315.000000.C deleted file mode 100644 index af7eef356e6..00000000000 --- a/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.20090315.000000.C +++ /dev/null @@ -1,25 +0,0 @@ -#include "tables/St_StvTpcHitErrs_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// StvTpcInnerHitErrs Allocated rows: 1 Used rows: 1 Row size: 64 bytes -// Table: StvTpcHitErrs_st[0]--> StvTpcHitErrs_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!TClass::GetClass("St_StvTpcHitErrs")) return 0; -StvTpcHitErrs_st row; -St_StvTpcHitErrs *tableSet = new St_StvTpcHitErrs("StvTpcInnerHitErrs",1); -// -memset(&row,0,tableSet->GetRowSize()); - row.yErr = 0.003112073; // Intrinsic resolution, padrow or Y direction ; - row.zErr = 0.006408807; // Intrinsic resolution, z direction ; - row.thkDet = 1.3225; // detector thickness , not fitted ; - row.yyDiff = 0.001792184; // Diffusion in XY direction ; - row.zzDiff = 0.009125377; // Diffusion in Z direction ; - row.yFact = 0.651482; // Error factor in Y-direction ; - row.zFact = 0.5302516; // Error factor in Z-direction ; - row.zAB2 = 5.0293e-06; // Constant member in Z direction (a*b)**2 ; -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.20100101.000000.C b/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.20100101.000000.C deleted file mode 100644 index 347d58a4f28..00000000000 --- a/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.20100101.000000.C +++ /dev/null @@ -1,31 +0,0 @@ -#include "tables/St_StvTpcHitErrs_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// StvTpcInnerHitErrs Allocated rows: 1 Used rows: 1 Row size: 64 bytes -// Table: StvTpcHitErrs_st[0]--> StvTpcHitErrs_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!TClass::GetClass("St_StvTpcHitErrs")) return 0; -StvTpcHitErrs_st row; -St_StvTpcHitErrs *tableSet = new St_StvTpcHitErrs("StvTpcInnerHitErrs",1); -// -float yErrFact = 1; -float zErrFact = 1; -//yErrFact=1;zErrFact=1; - -memset(&row,0,tableSet->GetRowSize()); - row.yErr = 0.0003248401; // Intrinsic resolution, padrow or Y direction ; - row.zErr = 0.003155829; // Intrinsic resolution, z direction ; - row.thkDet = 1.3225; // detector thickness , not fitted ; - row.yyDiff = 0.006162413; // Diffusion in XY direction ; - row.zzDiff = 0.008600485; // Diffusion in Z direction ; - row.yFact = 0.4891122; // Error factor in Y-direction ; - row.zFact = 0.5432013; // Error factor in Z-direction ; - row.yFact*=yErrFact; - row.zFact*=zErrFact; - row.zAB2 = 5.0293e-06; // Constant member in Z direction (a*b)**2 ; -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.C b/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.C deleted file mode 100644 index 2b6ccf9656b..00000000000 --- a/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.C +++ /dev/null @@ -1,29 +0,0 @@ -#include "tables/St_StvTpcHitErrs_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// StvTpcInnerHitErrs Allocated rows: 1 Used rows: 1 Row size: 64 bytes -// Table: StvTpcHitErrs_st[0]--> StvTpcHitErrs_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!TClass::GetClass("St_StvTpcHitErrs")) return 0; -StvTpcHitErrs_st row; -St_StvTpcHitErrs *tableSet = new St_StvTpcHitErrs("StvTpcInnerHitErrs",1); -// -double myFactor = 3; -memset(&row,0,tableSet->GetRowSize()); - row.yErr = 0.0003248401; // Intrinsic resolution, padrow or Y direction ; - row.zErr = 0.003155829; // Intrinsic resolution, z direction ; - row.thkDet = 1.3225; // detector thickness , not fitted ; - row.yyDiff = 0.006162413; // Diffusion in XY direction ; - row.zzDiff = 0.008600485; // Diffusion in Z direction ; - row.yFact = 0.4891122; // Error factor in Y-direction ; - row.zFact = 0.5432013; // Error factor in Z-direction ; - row.zAB2 = 5.0293e-06; // Constant member in Z direction (a*b)**2 ; -row.yFact*=myFactor; -row.zFact*=myFactor; - -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.y2009c.C b/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.y2009c.C deleted file mode 100644 index c46b27c2195..00000000000 --- a/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.y2009c.C +++ /dev/null @@ -1,25 +0,0 @@ -#include "tables/St_StvTpcHitErrs_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// StvTpcInnerHitErrs Allocated rows: 1 Used rows: 1 Row size: 64 bytes -// Table: StvTpcHitErrs_st[0]--> StvTpcHitErrs_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!TClass::GetClass("St_StvTpcHitErrs")) return 0; -StvTpcHitErrs_st row; -St_StvTpcHitErrs *tableSet = new St_StvTpcHitErrs("StvTpcInnerHitErrs",1); -// -memset(&row,0,tableSet->GetRowSize()); - row.yErr = 0.0003248401; // Intrinsic resolution, padrow or Y direction ; - row.zErr = 0.003155829; // Intrinsic resolution, z direction ; - row.thkDet = 1.3225; // detector thickness , not fitted ; - row.yyDiff = 0.006162413; // Diffusion in XY direction ; - row.zzDiff = 0.008600485; // Diffusion in Z direction ; - row.yFact = 0.4891122; // Error factor in Y-direction ; - row.zFact = 0.5432013; // Error factor in Z-direction ; - row.zAB2 = 5.0293e-06; // Constant member in Z direction (a*b)**2 ; -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.y2010c.C b/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.y2010c.C deleted file mode 100644 index c46b27c2195..00000000000 --- a/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.y2010c.C +++ /dev/null @@ -1,25 +0,0 @@ -#include "tables/St_StvTpcHitErrs_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// StvTpcInnerHitErrs Allocated rows: 1 Used rows: 1 Row size: 64 bytes -// Table: StvTpcHitErrs_st[0]--> StvTpcHitErrs_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!TClass::GetClass("St_StvTpcHitErrs")) return 0; -StvTpcHitErrs_st row; -St_StvTpcHitErrs *tableSet = new St_StvTpcHitErrs("StvTpcInnerHitErrs",1); -// -memset(&row,0,tableSet->GetRowSize()); - row.yErr = 0.0003248401; // Intrinsic resolution, padrow or Y direction ; - row.zErr = 0.003155829; // Intrinsic resolution, z direction ; - row.thkDet = 1.3225; // detector thickness , not fitted ; - row.yyDiff = 0.006162413; // Diffusion in XY direction ; - row.zzDiff = 0.008600485; // Diffusion in Z direction ; - row.yFact = 0.4891122; // Error factor in Y-direction ; - row.zFact = 0.5432013; // Error factor in Z-direction ; - row.zAB2 = 5.0293e-06; // Constant member in Z direction (a*b)**2 ; -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.y2011c.C b/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.y2011c.C deleted file mode 100644 index c46b27c2195..00000000000 --- a/StarDb/Calibrations/tracker/StvTpcInnerHitErrs.y2011c.C +++ /dev/null @@ -1,25 +0,0 @@ -#include "tables/St_StvTpcHitErrs_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// StvTpcInnerHitErrs Allocated rows: 1 Used rows: 1 Row size: 64 bytes -// Table: StvTpcHitErrs_st[0]--> StvTpcHitErrs_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!TClass::GetClass("St_StvTpcHitErrs")) return 0; -StvTpcHitErrs_st row; -St_StvTpcHitErrs *tableSet = new St_StvTpcHitErrs("StvTpcInnerHitErrs",1); -// -memset(&row,0,tableSet->GetRowSize()); - row.yErr = 0.0003248401; // Intrinsic resolution, padrow or Y direction ; - row.zErr = 0.003155829; // Intrinsic resolution, z direction ; - row.thkDet = 1.3225; // detector thickness , not fitted ; - row.yyDiff = 0.006162413; // Diffusion in XY direction ; - row.zzDiff = 0.008600485; // Diffusion in Z direction ; - row.yFact = 0.4891122; // Error factor in Y-direction ; - row.zFact = 0.5432013; // Error factor in Z-direction ; - row.zAB2 = 5.0293e-06; // Constant member in Z direction (a*b)**2 ; -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvTpcInnerPromptErrs.C b/StarDb/Calibrations/tracker/StvTpcInnerPromptErrs.C deleted file mode 100644 index 4b2cdf04ae2..00000000000 --- a/StarDb/Calibrations/tracker/StvTpcInnerPromptErrs.C +++ /dev/null @@ -1,19 +0,0 @@ -#include "tables/St_StvHitErrs_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// StvTpcInnerPromptErrs Allocated rows: 1 Used rows: 1 Row size: 64 bytes -// Table: StvTpcPromptErrs_st[0]--> StvTpcPromptErrs_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!TClass::GetClass("St_StvHitErrs")) return 0; -StvHitErrs_st row; -St_StvHitErrs *tableSet = new St_StvHitErrs("StvTpcInnerPromptErrs",1); -// -memset(&row,0,tableSet->GetRowSize()); - row.yErr = 4e-2; // Intrinsic resolution, padrow or Y direction ; - row.zErr = 4e-2; // Intrinsic resolution, z direction ; -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.20090315.000000.C b/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.20090315.000000.C deleted file mode 100644 index 293d09eb10d..00000000000 --- a/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.20090315.000000.C +++ /dev/null @@ -1,25 +0,0 @@ -#include "tables/St_StvTpcHitErrs_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// StvTpcOuterHitErrs Allocated rows: 1 Used rows: 1 Row size: 64 bytes -// Table: StvTpcHitErrs_st[0]--> StvTpcHitErrs_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!TClass::GetClass("St_StvTpcHitErrs")) return 0; -StvTpcHitErrs_st row; -St_StvTpcHitErrs *tableSet = new St_StvTpcHitErrs("StvTpcOuterHitErrs",1); -// -memset(&row,0,tableSet->GetRowSize()); - row.yErr = 0.001025376; // Intrinsic resolution, padrow or Y direction ; - row.zErr = 0.009810519; // Intrinsic resolution, z direction ; - row.thkDet = 3.8025; // detector thickness , not fitted ; - row.yyDiff = 0.003210183; // Diffusion in XY direction ; - row.zzDiff = 0.0009121676; // Diffusion in Z direction ; - row.yFact = 0.4309839; // Error factor in Y-direction ; - row.zFact = 0.4151657; // Error factor in Z-direction ; - row.zAB2 = 5.0293e-06; // Constant member in Z direction (a*b)**2 ; -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.20100101.000000.C b/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.20100101.000000.C deleted file mode 100644 index ab6ed206bf0..00000000000 --- a/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.20100101.000000.C +++ /dev/null @@ -1,30 +0,0 @@ -#include "tables/St_StvTpcHitErrs_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// StvTpcOuterHitErrs Allocated rows: 1 Used rows: 1 Row size: 64 bytes -// Table: StvTpcHitErrs_st[0]--> StvTpcHitErrs_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!TClass::GetClass("St_StvTpcHitErrs")) return 0; -StvTpcHitErrs_st row; -St_StvTpcHitErrs *tableSet = new St_StvTpcHitErrs("StvTpcOuterHitErrs",1); -// -float yErrFact = 1; -float zErrFact = 1; - -memset(&row,0,tableSet->GetRowSize()); - row.yErr = 0.0006493898; // Intrinsic resolution, padrow or Y direction ; - row.zErr = 0.003386928; // Intrinsic resolution, z direction ; - row.thkDet = 3.8025; // detector thickness , not fitted ; - row.yyDiff = 0.004501354; // Diffusion in XY direction ; - row.zzDiff = 0.004859645; // Diffusion in Z direction ; - row.yFact = 0.4156496; // Error factor in Y-direction ; - row.zFact = 0.4108317; // Error factor in Z-direction ; - row.yFact*=yErrFact; - row.zFact*=zErrFact; - row.zAB2 = 5.0293e-06; // Constant member in Z direction (a*b)**2 ; -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.C b/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.C deleted file mode 100644 index 3c67a64a9e5..00000000000 --- a/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.C +++ /dev/null @@ -1,29 +0,0 @@ -#include "tables/St_StvTpcHitErrs_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// StvTpcOuterHitErrs Allocated rows: 1 Used rows: 1 Row size: 64 bytes -// Table: StvTpcHitErrs_st[0]--> StvTpcHitErrs_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!TClass::GetClass("St_StvTpcHitErrs")) return 0; -StvTpcHitErrs_st row; -St_StvTpcHitErrs *tableSet = new St_StvTpcHitErrs("StvTpcOuterHitErrs",1); -// -double myFactor = 3; -memset(&row,0,tableSet->GetRowSize()); - row.yErr = 0.0006493898; // Intrinsic resolution, padrow or Y direction ; - row.zErr = 0.003386928; // Intrinsic resolution, z direction ; - row.thkDet = 3.8025; // detector thickness , not fitted ; - row.yyDiff = 0.004501354; // Diffusion in XY direction ; - row.zzDiff = 0.004859645; // Diffusion in Z direction ; - row.yFact = 0.4156496; // Error factor in Y-direction ; - row.zFact = 0.4108317; // Error factor in Z-direction ; - row.zAB2 = 5.0293e-06; // Constant member in Z direction (a*b)**2 ; -row.yFact*=myFactor; -row.zFact*=myFactor; - -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.y2009c.C b/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.y2009c.C deleted file mode 100644 index 4d010298f63..00000000000 --- a/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.y2009c.C +++ /dev/null @@ -1,25 +0,0 @@ -#include "tables/St_StvTpcHitErrs_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// StvTpcOuterHitErrs Allocated rows: 1 Used rows: 1 Row size: 64 bytes -// Table: StvTpcHitErrs_st[0]--> StvTpcHitErrs_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!TClass::GetClass("St_StvTpcHitErrs")) return 0; -StvTpcHitErrs_st row; -St_StvTpcHitErrs *tableSet = new St_StvTpcHitErrs("StvTpcOuterHitErrs",1); -// -memset(&row,0,tableSet->GetRowSize()); - row.yErr = 0.0006493898; // Intrinsic resolution, padrow or Y direction ; - row.zErr = 0.003386928; // Intrinsic resolution, z direction ; - row.thkDet = 3.8025; // detector thickness , not fitted ; - row.yyDiff = 0.004501354; // Diffusion in XY direction ; - row.zzDiff = 0.004859645; // Diffusion in Z direction ; - row.yFact = 0.4156496; // Error factor in Y-direction ; - row.zFact = 0.4108317; // Error factor in Z-direction ; - row.zAB2 = 5.0293e-06; // Constant member in Z direction (a*b)**2 ; -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.y2010c.C b/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.y2010c.C deleted file mode 100644 index 4d010298f63..00000000000 --- a/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.y2010c.C +++ /dev/null @@ -1,25 +0,0 @@ -#include "tables/St_StvTpcHitErrs_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// StvTpcOuterHitErrs Allocated rows: 1 Used rows: 1 Row size: 64 bytes -// Table: StvTpcHitErrs_st[0]--> StvTpcHitErrs_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!TClass::GetClass("St_StvTpcHitErrs")) return 0; -StvTpcHitErrs_st row; -St_StvTpcHitErrs *tableSet = new St_StvTpcHitErrs("StvTpcOuterHitErrs",1); -// -memset(&row,0,tableSet->GetRowSize()); - row.yErr = 0.0006493898; // Intrinsic resolution, padrow or Y direction ; - row.zErr = 0.003386928; // Intrinsic resolution, z direction ; - row.thkDet = 3.8025; // detector thickness , not fitted ; - row.yyDiff = 0.004501354; // Diffusion in XY direction ; - row.zzDiff = 0.004859645; // Diffusion in Z direction ; - row.yFact = 0.4156496; // Error factor in Y-direction ; - row.zFact = 0.4108317; // Error factor in Z-direction ; - row.zAB2 = 5.0293e-06; // Constant member in Z direction (a*b)**2 ; -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.y2011c.C b/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.y2011c.C deleted file mode 100644 index 4d010298f63..00000000000 --- a/StarDb/Calibrations/tracker/StvTpcOuterHitErrs.y2011c.C +++ /dev/null @@ -1,25 +0,0 @@ -#include "tables/St_StvTpcHitErrs_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// StvTpcOuterHitErrs Allocated rows: 1 Used rows: 1 Row size: 64 bytes -// Table: StvTpcHitErrs_st[0]--> StvTpcHitErrs_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!TClass::GetClass("St_StvTpcHitErrs")) return 0; -StvTpcHitErrs_st row; -St_StvTpcHitErrs *tableSet = new St_StvTpcHitErrs("StvTpcOuterHitErrs",1); -// -memset(&row,0,tableSet->GetRowSize()); - row.yErr = 0.0006493898; // Intrinsic resolution, padrow or Y direction ; - row.zErr = 0.003386928; // Intrinsic resolution, z direction ; - row.thkDet = 3.8025; // detector thickness , not fitted ; - row.yyDiff = 0.004501354; // Diffusion in XY direction ; - row.zzDiff = 0.004859645; // Diffusion in Z direction ; - row.yFact = 0.4156496; // Error factor in Y-direction ; - row.zFact = 0.4108317; // Error factor in Z-direction ; - row.zAB2 = 5.0293e-06; // Constant member in Z direction (a*b)**2 ; -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/Calibrations/tracker/StvTpcOuterPromptErrs.C b/StarDb/Calibrations/tracker/StvTpcOuterPromptErrs.C deleted file mode 100644 index ec322ab5b8f..00000000000 --- a/StarDb/Calibrations/tracker/StvTpcOuterPromptErrs.C +++ /dev/null @@ -1,19 +0,0 @@ -#include "tables/St_StvHitErrs_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// StvTpcInnerPromptErrs Allocated rows: 1 Used rows: 1 Row size: 64 bytes -// Table: StvTpcHitErrs_st[0]--> StvTpcHitErrs_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!TClass::GetClass("St_StvHitErrs")) return 0; -StvHitErrs_st row; -St_StvHitErrs *tableSet = new St_StvHitErrs("StvTpcOuterPromptErrs",1); -// -memset(&row,0,tableSet->GetRowSize()); - row.yErr = 4e-2; // Intrinsic resolution, padrow or Y direction ; - row.zErr = 4e-2; // Intrinsic resolution, z direction ; -tableSet->AddAt(&row); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -}