From f284ca54a3a50d6c7d2a04ad2987ab989d063ef4 Mon Sep 17 00:00:00 2001 From: "guofangyi@ihep.ac.cn" <guofangyi@ihep.ac.cn> Date: Mon, 2 Dec 2024 09:35:41 +0000 Subject: [PATCH] Minor: update scripts --- Analysis/ReadDigi/src/ReadDigiAlg.cpp | 12 +++++++++++- Analysis/ReadDigi/src/ReadDigiAlg.h | 2 +- Detector/DetCRD/scripts/TDR_o1_v01/tracking.py | 4 ++-- Reconstruction/RecPFACyber/script/tracking.py | 8 ++++---- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Analysis/ReadDigi/src/ReadDigiAlg.cpp b/Analysis/ReadDigi/src/ReadDigiAlg.cpp index c2cdb4ed..5d4f56b6 100644 --- a/Analysis/ReadDigi/src/ReadDigiAlg.cpp +++ b/Analysis/ReadDigi/src/ReadDigiAlg.cpp @@ -52,6 +52,9 @@ StatusCode ReadDigiAlg::initialize() m_mctree->Branch("MCP_py", &MCP_py); m_mctree->Branch("MCP_pz", &MCP_pz); m_mctree->Branch("MCP_E", &MCP_E); + m_mctree->Branch("MCP_VTX_x", &MCP_VTX_x); + m_mctree->Branch("MCP_VTX_y", &MCP_VTX_y); + m_mctree->Branch("MCP_VTX_z", &MCP_VTX_z); m_mctree->Branch("MCP_endPoint_x", &MCP_endPoint_x); m_mctree->Branch("MCP_endPoint_y", &MCP_endPoint_y); m_mctree->Branch("MCP_endPoint_z", &MCP_endPoint_z); @@ -176,6 +179,9 @@ StatusCode ReadDigiAlg::execute() MCP_py.push_back(m_MCp.getMomentum().y); MCP_pz.push_back(m_MCp.getMomentum().z); MCP_E.push_back(m_MCp.getEnergy()); + MCP_VTX_x.push_back(m_MCp.getVertex().x); + MCP_VTX_y.push_back(m_MCp.getVertex().y); + MCP_VTX_z.push_back(m_MCp.getVertex().z); MCP_endPoint_x.push_back(m_MCp.getEndpoint().x); MCP_endPoint_y.push_back(m_MCp.getEndpoint().y); MCP_endPoint_z.push_back(m_MCp.getEndpoint().z); @@ -359,8 +365,9 @@ StatusCode ReadDigiAlg::execute() N_fullTrk = const_fullTrkCol->size(); for(int i=0; i<N_fullTrk; i++){ auto m_trk = const_fullTrkCol->at(i); +//cout<<"In track #"<<i<<": track state size "<<m_trk.trackStates_size()<<", track hit size "<<m_trk.trackerHits_size()<<endl; if(m_trk.trackStates_size()==0) continue; - if(m_trk.trackerHits_size()==0) continue; + //if(m_trk.trackerHits_size()==0) continue; int NTrkHit = m_trk.trackerHits_size(); for(int istat=0; istat<m_trk.trackStates_size(); istat++){ @@ -520,6 +527,9 @@ StatusCode ReadDigiAlg::Clear() MCP_py.clear(); MCP_pz.clear(); MCP_E.clear(); + MCP_VTX_x.clear(); + MCP_VTX_y.clear(); + MCP_VTX_z.clear(); MCP_endPoint_x.clear(); MCP_endPoint_y.clear(); MCP_endPoint_z.clear(); diff --git a/Analysis/ReadDigi/src/ReadDigiAlg.h b/Analysis/ReadDigi/src/ReadDigiAlg.h index ea79a581..1eef085c 100644 --- a/Analysis/ReadDigi/src/ReadDigiAlg.h +++ b/Analysis/ReadDigi/src/ReadDigiAlg.h @@ -70,7 +70,7 @@ private : //MCParticle int N_MCP; - FloatVec MCP_px, MCP_py, MCP_pz, MCP_E, MCP_endPoint_x, MCP_endPoint_y, MCP_endPoint_z; + FloatVec MCP_px, MCP_py, MCP_pz, MCP_E, MCP_VTX_x, MCP_VTX_y, MCP_VTX_z, MCP_endPoint_x, MCP_endPoint_y, MCP_endPoint_z; IntVec MCP_pdgid, MCP_gStatus; //Tracker diff --git a/Detector/DetCRD/scripts/TDR_o1_v01/tracking.py b/Detector/DetCRD/scripts/TDR_o1_v01/tracking.py index daacc154..ab968e52 100644 --- a/Detector/DetCRD/scripts/TDR_o1_v01/tracking.py +++ b/Detector/DetCRD/scripts/TDR_o1_v01/tracking.py @@ -257,8 +257,8 @@ full.SITHitToTrackDistance = 3. full.SETHitToTrackDistance = 5. full.MinChi2ProbForSiliconTracks = 0 full.MaxChi2PerHit = 200 -#full.ForceSiTPCMerging = True -#full.ForceTPCSegmentsMerging = True +full.ForceSiTPCMerging = True +full.ForceTPCSegmentsMerging = True #full.OutputLevel = DEBUG from Configurables import TPCDndxAlg diff --git a/Reconstruction/RecPFACyber/script/tracking.py b/Reconstruction/RecPFACyber/script/tracking.py index be11bff4..76c38cb8 100644 --- a/Reconstruction/RecPFACyber/script/tracking.py +++ b/Reconstruction/RecPFACyber/script/tracking.py @@ -67,8 +67,8 @@ ftdhitname = "FTDTrackerHits" ftdspname = "FTDSpacePoints" from Configurables import SmearDigiTool vxdtool = SmearDigiTool("VXD") -vxdtool.ResolutionU = [0.004, 0.004, 0.004, 0.004, 0.004, 0.004] -vxdtool.ResolutionV = [0.004, 0.004, 0.004, 0.004, 0.004, 0.004] +vxdtool.ResolutionU = [0.005] +vxdtool.ResolutionV = [0.005] vxdtool.UsePlanarTag = True vxdtool.ParameterizeResolution = False vxdtool.ParametersU = [5.60959e-03, 5.74913e-03, 7.03433e-03, 1.99516, -663.952, 3.752e-03, 0, -0.0704734, 0.0454867e-03, 1.07359] @@ -102,8 +102,8 @@ digiSET.IsStrip = False digiSET.SimTrackHitCollection = "OTKBarrelCollection" digiSET.TrackerHitCollection = sethitname digiSET.TrackerHitAssociationCollection = "OTKBarrelTrackerHitAssociation" -digiSET.ResolutionU = [0.005] -digiSET.ResolutionV = [0.021] +digiSET.ResolutionU = [0.010] +digiSET.ResolutionV = [1.000] digiSET.UsePlanarTag = True digiSET.ParameterizeResolution = False digiSET.ParametersU = [2.29655e-03, 0.965899e-03, 0.584699e-03, 17.0856, 84.566, 12.4695e-03, -0.0643059, 0.168662, 1.87998e-03, 0.514452] -- GitLab