diff --git a/Control/CalypsoExample/SimHitExample/src/SimHitAlg.cxx b/Control/CalypsoExample/SimHitExample/src/SimHitAlg.cxx index 6e937ba7221863c0257b402b5cc73912b2d623ac..91d65509e8bf92599ead745c65ac882aa4e8154d 100644 --- a/Control/CalypsoExample/SimHitExample/src/SimHitAlg.cxx +++ b/Control/CalypsoExample/SimHitExample/src/SimHitAlg.cxx @@ -10,7 +10,9 @@ StatusCode SimHitAlg::initialize() // initialize a histogram // letter at end of TH1 indicated variable type (D double, F float etc) m_hist = new TH1D("eLoss", "SCT Hit Energy Loss", 100, 0, 1); //first string is root object name, second is histogram title - ATH_CHECK(histSvc()->regHist("/HIST/myhist", m_hist)); + m_module = new TH2D("module", "SCT Hit Module", 3, -1.5, 1.5, 4, -0.5, 3.5 ); + ATH_CHECK(histSvc()->regHist("/HIST/eloss", m_hist)); + ATH_CHECK(histSvc()->regHist("/HIST/modules", m_module)); // initialize data handle keys ATH_CHECK( m_mcEventKey.initialize() ); @@ -47,6 +49,7 @@ StatusCode SimHitAlg::execute() { hit.print(); m_hist->Fill( hit.energyLoss() ); + m_module->Fill( hit.getModule(), hit.getRow()); } return StatusCode::SUCCESS; diff --git a/Control/CalypsoExample/SimHitExample/src/SimHitAlg.h b/Control/CalypsoExample/SimHitExample/src/SimHitAlg.h index cfc1d0d38162f8e864323d5c7259f765b22b2dbf..fa27551240d2da54b05ae25be1b1ff5158d2f191 100644 --- a/Control/CalypsoExample/SimHitExample/src/SimHitAlg.h +++ b/Control/CalypsoExample/SimHitExample/src/SimHitAlg.h @@ -18,6 +18,7 @@ class SimHitAlg : public AthHistogramAlgorithm private: TH1* m_hist; // Example histogram + TH2* m_module; // Read handle keys for data containers // Any other event data can be accessed identically diff --git a/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql b/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql index 718791997d9e5903f977bc4647090a82bec46f9e..035bb19b37f0f2d84cf6b95cfc84b1762fce9613 100644 --- a/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql +++ b/DetectorDescription/GeoModel/FaserGeoModel/data/geomDB.sql @@ -1404,7 +1404,7 @@ INSERT INTO "SCTTOPLEVEL_DATA2TAG" VALUES(106788,3); -- DROP TABLE IF EXISTS "SCTFASERGENERAL_DATA"; CREATE TABLE "SCTFASERGENERAL_DATA" ("SCTFASERGENERAL_DATA_ID" SLONGLONG, "NUMLAYERS" INT, "LAYERPITCH" DOUBLE, "ETAHALFPITCH" DOUBLE, "PHIHALFPITCH" DOUBLE, "DEPTHHALFPITCH" DOUBLE, "SIDEHALFPITCH" DOUBLE, UNIQUE ( "SCTFASERGENERAL_DATA_ID") ); -INSERT INTO "SCTFASERGENERAL_DATA" VALUES (0, 3, 65.0, 60.0, 30.0, 2.5, 2.5); +INSERT INTO "SCTFASERGENERAL_DATA" VALUES (0, 3, 65.0, 60.0, 30.0, 2.5, 5.0); DROP TABLE IF EXISTS "SCTFASERGENERAL_DATA2TAG"; CREATE TABLE "SCTFASERGENERAL_DATA2TAG" ( "SCTFASERGENERAL_TAG_ID" SLONGLONG ,"SCTFASERGENERAL_DATA_ID" SLONGLONG ); INSERT INTO "SCTFASERGENERAL_DATA2TAG" VALUES(106789, 0); diff --git a/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py b/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py index a9264e44f5e1d923fd5a7639099f2e185427c5c5..8b9637bf15a8f637639e9e22785a1a811627fc8f 100644 --- a/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py +++ b/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/python/FaserISF_HepMC_ToolsConfigNew.py @@ -165,8 +165,8 @@ def FaserTruthStrategyCfg(ConfigFlags, name="ISF_FaserTruthStrategy", **kwargs): FaserRegion.fFaserDipole, FaserRegion.fFaserCalorimeter, FaserRegion.fFaserCavern]) - kwargs.setdefault('ParentMinEkin', 1*MeV) - kwargs.setdefault('ChildMinEkin', 1*MeV) + # kwargs.setdefault('ParentMinEkin', 1*MeV) + # kwargs.setdefault('ChildMinEkin', 1*MeV) result.setPrivateTools(ISF__FaserTruthStrategy(name, **kwargs)) return result diff --git a/Tracker/TrackerRecAlgs/TrackerSpacePointFormation/src/TrackerSpacePointFinder.cxx b/Tracker/TrackerRecAlgs/TrackerSpacePointFormation/src/TrackerSpacePointFinder.cxx index a2355c4b2b26802a90a5eebdc66645c34a3b0e24..8a73c7fc2ffb1a6cfcbe22d4c5f30ae4c3cf2528 100755 --- a/Tracker/TrackerRecAlgs/TrackerSpacePointFormation/src/TrackerSpacePointFinder.cxx +++ b/Tracker/TrackerRecAlgs/TrackerSpacePointFormation/src/TrackerSpacePointFinder.cxx @@ -48,7 +48,7 @@ TrackerSpacePointFinder::TrackerSpacePointFinder(const std::string& name, // declareProperty("OverrideBeamSpot", m_overrideBS=false); declareProperty("VertexX", m_xVertex=0.); declareProperty("VertexY", m_yVertex=0.); - declareProperty("VertexZ", m_zVertex=-100.); + declareProperty("VertexZ", m_zVertex=0.); declareProperty("SpacePointCacheSCT", m_SpacePointCache_SCTKey=""); diff --git a/Tracker/TrackerRecTools/FaserSiSpacePointTool/FaserSiSpacePointTool/TrackerSpacePointMakerTool.h b/Tracker/TrackerRecTools/FaserSiSpacePointTool/FaserSiSpacePointTool/TrackerSpacePointMakerTool.h index 7d26b1b5a37d07a51ecc16625e4f3965524f7e5e..d6245810e9e61a9614a5044855b6c425b5c5b05a 100644 --- a/Tracker/TrackerRecTools/FaserSiSpacePointTool/FaserSiSpacePointTool/TrackerSpacePointMakerTool.h +++ b/Tracker/TrackerRecTools/FaserSiSpacePointTool/FaserSiSpacePointTool/TrackerSpacePointMakerTool.h @@ -93,7 +93,7 @@ namespace Tracker /// @name option to use closest approach of SCT strips as position for SpacePoint //@{ - BooleanProperty m_usePerpProj{this, "UsePerpendicularProjection", false}; + BooleanProperty m_usePerpProj{this, "UsePerpendicularProjection", true}; //@} /// @name ID helper diff --git a/Tracker/TrackerRecTools/FaserSiSpacePointTool/src/TrackerSpacePointMakerTool.cxx b/Tracker/TrackerRecTools/FaserSiSpacePointTool/src/TrackerSpacePointMakerTool.cxx index 738797a6d3faa6b293b234e12a2cc674910b7d52..6dac89b8160545f6bc7318249efa10e094516bb9 100644 --- a/Tracker/TrackerRecTools/FaserSiSpacePointTool/src/TrackerSpacePointMakerTool.cxx +++ b/Tracker/TrackerRecTools/FaserSiSpacePointTool/src/TrackerSpacePointMakerTool.cxx @@ -106,19 +106,36 @@ Trk::SpacePoint* TrackerSpacePointMakerTool::makeSCT_SpacePoint(const Tracker::T to determine the position of the SpacePoint on element 1. This option is especially aimed at the use with cosmics data. */ - Amg::Vector3D mab(c - a); - double eaTeb = q.dot(r); - double denom = 1. - eaTeb*eaTeb; - if (fabs(denom)>10e-7){ - double lambda0 = (mab.dot(q) - mab.dot(r)*eaTeb)/denom; - point = a+lambda0*q; - ATH_MSG_VERBOSE( "Endpoints 1 : ( " << a.x() << " , " << a.y() << " , " << a.z() << " ) to (" << b.x() << " , " << b.y() << " , " << b.z() << " ) " ); - ATH_MSG_VERBOSE( "Endpoints 2 : ( " << c.x() << " , " << c.y() << " , " << c.z() << " ) to (" << d.x() << " , " << d.y() << " , " << d.z() << " ) " ); - ATH_MSG_VERBOSE( "Intersection: ( " << point.x() << " , " << point.y() << " , " << point.z() << " ) " ); - } else { - ATH_MSG_WARNING("Intersection failed"); + double det = Amg::Vector3D(q.cross(r)).z(); + if (fabs(det)>10e-7) + { + Amg::Vector3D s(a+b); + Amg::Vector3D t(c+d); + double lambda0 = r.cross(Amg::Vector3D(s-t)).z()/det; + point = (s + lambda0 * q)/2; + ATH_MSG_VERBOSE( "Endpoints 1 : ( " << a.x() << " , " << a.y() << " , " << a.z() << " ) to (" << b.x() << " , " << b.y() << " , " << b.z() << " ) " ); + ATH_MSG_VERBOSE( "Endpoints 2 : ( " << c.x() << " , " << c.y() << " , " << c.z() << " ) to (" << d.x() << " , " << d.y() << " , " << d.z() << " ) " ); + ATH_MSG_VERBOSE( "Intersection: ( " << point.x() << " , " << point.y() << " , " << point.z() << " ) " ); + } + else + { + ATH_MSG_WARNING("Alt Intersection failed"); ok = false; } + + // Amg::Vector3D mab(c - a); + // double eaTeb = q.dot(r); + // double denom = 1. - eaTeb*eaTeb; + // if (fabs(denom)>10e-7){ + // double lambda0 = (mab.dot(q) - mab.dot(r)*eaTeb)/denom; + // point = a+lambda0*q; + // ATH_MSG_VERBOSE( "Endpoints 1 : ( " << a.x() << " , " << a.y() << " , " << a.z() << " ) to (" << b.x() << " , " << b.y() << " , " << b.z() << " ) " ); + // ATH_MSG_VERBOSE( "Endpoints 2 : ( " << c.x() << " , " << c.y() << " , " << c.z() << " ) to (" << d.x() << " , " << d.y() << " , " << d.z() << " ) " ); + // ATH_MSG_VERBOSE( "Intersection: ( " << point.x() << " , " << point.y() << " , " << point.z() << " ) " ); + // } else { + // ATH_MSG_WARNING("Intersection failed"); + // ok = false; + // } } else { Amg::Vector3D s(a+b-2.*vertexVec); // twice the vector from vertex to midpoint Amg::Vector3D t(c+d-2.*vertexVec); // twice the vector from vertex to midpoint