Skip to content
Snippets Groups Projects
Commit ecee44c1 authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'uninit.MuonG4SD-20200904' into 'master'

MuonG4SD: Fix uninitialized reads in tests.

See merge request atlas/athena!36165
parents 53aac602 4d33ab3b
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
/*
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
......
......@@ -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);
......
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment