diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/src/CSCSensitiveDetector.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/src/CSCSensitiveDetector.cxx index 8ed7e996ee24e3c4aed918909c466e5c390fb303..5e15094d353b1248479644c109e0d880224b42e1 100755 --- a/MuonSpectrometer/MuonG4/MuonG4SD/src/CSCSensitiveDetector.cxx +++ b/MuonSpectrometer/MuonG4/MuonG4SD/src/CSCSensitiveDetector.cxx @@ -47,9 +47,9 @@ G4bool CSCSensitiveDetector::ProcessHits(G4Step* aStep,G4TouchableHistory* /*ROH /** attributes of the CSC identifier construction */ std::string stationName=""; - int stationEta=0; - int stationPhi=0; - int multiLayer=0; + int stationEta=1; + int stationPhi=1; + int multiLayer=1; int wireLayer=0; /** hit information to be recorded */ diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/src/MDTSensitiveDetector.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/src/MDTSensitiveDetector.cxx index b96e414730b8708c8c7691fabe5e8c58be754738..7fdd79823312848b1714387bdd26efe288bb1f37 100755 --- a/MuonSpectrometer/MuonG4/MuonG4SD/src/MDTSensitiveDetector.cxx +++ b/MuonSpectrometer/MuonG4/MuonG4SD/src/MDTSensitiveDetector.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "MDTSensitiveDetector.h" @@ -128,11 +128,11 @@ int MDTSensitiveDetector::GetIdentifier(G4TouchableHistory* touchHist) { // attributes of the MDT identifier construction std::string stationName; - int stationEta=0; - int stationPhi=0; - int multilayer=0; - int tubeLayer=0; - int tube=0; + int stationEta=1; + int stationPhi=1; + int multilayer=1; + int tubeLayer=1; + int tube=1; bool isAssembly = false; // scan geometry tree to identify the tube diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/test/CSCSensitiveDetector_gtest.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/test/CSCSensitiveDetector_gtest.cxx index 2d933bb12edef950a491daa53406f81b155fd005..7a76b801b9f9656ed19068d2a5d7640ebe46e588 100644 --- a/MuonSpectrometer/MuonG4/MuonG4SD/test/CSCSensitiveDetector_gtest.cxx +++ b/MuonSpectrometer/MuonG4/MuonG4SD/test/CSCSensitiveDetector_gtest.cxx @@ -94,7 +94,7 @@ TEST_F ( CSCSensitiveDetectortest, ProcessHits ) ASSERT_EQ(a->begin()->getHitStart(), Amg::Vector3D(0,0,1)); ASSERT_EQ(a->begin()->getHitEnd(), Amg::Vector3D(0,0,2)); ASSERT_EQ(a->begin()->particleID(), 1); - ASSERT_EQ(a->begin()->CSCid(), -82944); + ASSERT_EQ(a->begin()->CSCid(), 147456); ASSERT_EQ(a->begin()->kineticEnergy(), 1.5); ASSERT_EQ(a->begin()->particleLink(), plink); diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/test/MDTSensitiveDetector_gtest.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/test/MDTSensitiveDetector_gtest.cxx index e3e9a0357e91b7112b7aee38be0fb364c7a99345..50ea955f9bb61174d4b9d121462ab29277c349ce 100644 --- a/MuonSpectrometer/MuonG4/MuonG4SD/test/MDTSensitiveDetector_gtest.cxx +++ b/MuonSpectrometer/MuonG4/MuonG4SD/test/MDTSensitiveDetector_gtest.cxx @@ -216,7 +216,7 @@ TEST_F ( MDTSensitiveDetectortest, ProcessHits ) HepMcParticleLink plink(barcode); MDTSimHitCollection* a = sd2.m_MDTHitColl.ptr(); - ASSERT_EQ(a->begin()->MDTid(), -189440); //test if the MDTid value of the Hit generated by this member function is right, the same below + ASSERT_EQ(a->begin()->MDTid(), 73728); //test if the MDTid value of the Hit generated by this member function is right, the same below ASSERT_EQ(a->begin()->globalTime(), 0.5); ASSERT_EQ(a->begin()->driftRadius(), 0); ASSERT_EQ(a->begin()->localPosition(), Amg::Vector3D(0,0,1)); @@ -258,7 +258,7 @@ TEST_F ( MDTSensitiveDetectortest, GetIdentifier ) sd3.Initialize( &hce ); int theID = sd3.GetIdentifier(touchableHistory); - ASSERT_EQ(theID,-188416); + ASSERT_EQ(theID, 335872); }