ssd simulator : bug fix for geometry
Explanation of the commit to StSsdDbMaker
in SL07d (as well as for SL08c), wrong geometry is loaded for plain simulation.
Following are the residuals of hits dX = X_mc -X_reco and dY = Y_mc - Y_reco
Fig 1. dX vs . Ladder
Fig2. dY vs. Ladder
Whereas using the Fast Simulator gives residuals at 0 :
Fig3 . dX v. Ladder (fast)
Fig4. dY vs. Ladder (fast)
The reason are the following.
m_dimensions = (St_ssdDimensions *)
GetInputDB("Geometry/ssd/ssdDimensions");
00076 m_positions = CalculateWafersPosition();
00077 if ((!m_dimensions)||(!m_positions)) {
00078 gMessMgr->Error() << "No access to geometry parameters" << endm;
00079 return kStFatal;
00080 }
where we calculate the positions of wafers.
I was a bit confused by the log, when running the fast and slow simulators
because both have :
LoadTable: .L
/afs/rhic.bnl.gov/star/packages/SL07d/StarDb/Geometry/ssd/SsdOnGlobal.20050310.000000.C
LoadTable: .L
/afs/rhic.bnl.gov/star/packages/SL07d/StarDb/Geometry/ssd/SsdSectorsOnGlobal.20050310.000012.C
LoadTable: .L
/afs/rhic.bnl.gov/star/packages/SL07d/StarDb/Geometry/ssd/SsdLaddersOnSectors.20050310.000018.C
LoadTable: .L
/afs/rhic.bnl.gov/star/packages/SL07d/StarDb/Geometry/ssd/SsdWafersOnLadders.20050101.000000.C
but for the fast simulator, the VMC geometry is after loaded in
StSsdFastSimMaker :
Load TFile:
/afs/rhic.bnl.gov/star/packages/SL07d/StarDb/VmcGeometry/Detectors.y2007.root
LoadTable: .L
/afs/rhic.bnl.gov/star/packages/SL07d/StarDb/VmcGeometry/Geometry.y2007.C
StSsdFastSimMaker:INFO - CreateGeometry : File y2007.h has been found as
/afs/rhic.bnl.gov/star/packages/SL07d/StarDb/VmcGeometry/y2007.h
StSsdFastSimMaker:INFO - TGeoManager::TGeoManager : Geometry y2007,
y2007.h created
StSsdFastSimMaker:INFO - TGeoMaterial::ctor : Material AIR defined with
fractional Z=7.300000
[...]
StSsdFastSimMaker:INFO - TGeoManager::CloseGeometry : 439952 nodes/ 2223
volume UID's in y2007.h
StSsdFastSimMaker:INFO - TGeoManager::CloseGeometry :
----------------modeler ready----------------
Load TFile:
/afs/rhic.bnl.gov/star/packages/SL07d/StarDb/VmcGeometry/geom.y2007.root
StSsdFastSimMaker:DEBUG - Geometry Loaded
As a result,the ideal geometry is loaded and the residuals vs. ladder are
at 0.
In the slowSimulator, when the StSsdbMaker is called to built the barrel,
I guess that it keep these ssdWafersOnLadders.C table and use it for
making the ssdWaferPositions.C table.
What i plan to do is :
if(m_Mode ==1 ){
m_positions = (St_ssdWafersPosition *)
GetInputDB("Geometry/ssd/ssdWafersPosition");}
else
{
m_positions = CalculateWafersPosition();
}
And with this, I get proper residuals, ie at 0, for both SL07d and SL08c.
check 1 :
these plots show the residuals in X and Y before and after the fix for the same events in simulation
check 2 :
I run the real data (as StSsdDbMaker.cxx is also used for them), with and without the fix.
Positions of hits are the same --> correct
Logs are here :
In this log file are the positions (drift,normal,transverse and center) of each wafer :
- bouchet's blog
- Login or register to post comments