Skip to content
Snippets Groups Projects
Commit 8169500b authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'TrackRecordWithStatus_main' into 'main'

Add status to transient TrackRecord class and add, but not use a new persistent class

See merge request !65241
parents cd36897d dc16d1df
No related branches found
No related tags found
37 merge requests!78241Draft: FPGATrackSim: GenScan code refactor,!78236Draft: Switching Streams https://its.cern.ch/jira/browse/ATR-27417,!78056AFP monitoring: new synchronization and cleaning,!78041AFP monitoring: new synchronization and cleaning,!77990Updating TRT chip masks for L1TRT trigger simulation - ATR-28372,!77733Draft: add new HLT NN JVT, augmented with additional tracking information,!77731Draft: Updates to ZDC reconstruction,!77728Draft: updates to ZDC reconstruction,!77522Draft: sTGC Pad Trigger Emulator,!76725ZdcNtuple: Fix cppcheck warning.,!76611L1CaloFEXByteStream: Fix out-of-bounds array accesses.,!76475Punchthrough AF3 implementation in FastG4,!76474Punchthrough AF3 implementation in FastG4,!76343Draft: MooTrackBuilder: Recalibrate NSW hits in refine method,!75729New implementation of ZDC nonlinear FADC correction.,!75703Draft: Update to HI han config for HLT jets,!75184Draft: Update file heavyions_run.config,!74430Draft: Fixing upper bound for Delayed Jet Triggers,!73963Changing the path of the histograms to "Expert" area,!73875updating ID ART reference plots,!73874AtlasCLHEP_RandomGenerators: Fix cppcheck warnings.,!73449Add muon detectors to DarkJetPEBTLA partial event building,!73343Draft: [TrigEgamma] Add photon ringer chains on bootstrap mechanism,!72972Update L1Calo Jet Trigger Efficiency Monitoring algorithm,!72336Fixed TRT calibration crash,!72176Draft: Improving L1TopoOnline chain that now gets no-empty plots. Activating it by default,!72012Draft: Separate JiveXMLConfig.py into Config files,!71876Fix MET trigger name in MissingETMonitoring,!71820Draft: Adding new TLA End-Of-Fill (EOF) chains and removing obsolete DIPZ chains,!71279Draft: ATR-29330: Move L1_4J15 and the HLT chains seeded by it in the MC Menu,!70990Updates to pulse analysis to support new 2016 p+Pb analysis and 2023 Pb+Pb analysis,!70948[TrigEGam] Adding egamma chains to be monitored,!70777Draft: sTGC offline raw monitoring: strip efficiency re-implementation,!70654Update JetMonitoringStandard.py,!70442Draft: Harmonize output folders+collections in ID Alignment monitoring and update DQM han config,!70269Draft: Initial Preparations for mc23e mu-distribution,!65241Add status to transient TrackRecord class and add, but not use a new persistent class
Showing
with 354 additions and 22 deletions
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
// $Id$
......@@ -99,11 +99,13 @@ StatusCode HitsFillerAlg::fillTrackRecordCollection()
CLHEP::Hep3Vector p(j+11,j+12,j+13);
CLHEP::Hep3Vector x(j+14,j+15,j+16);
c->Emplace(j, // PDG
j+20, // status
(j+10)*1000, // energy
p, //position
x, //momentum
j+17, // time
j+18, // barcode
j+19, // id
"volname" // volume name
);
}
......
......@@ -35,7 +35,7 @@ MuonTruthHitsFillerTool::MuonTruthHitsFillerTool (const std::string& type,
m_PRD_TruthNames.emplace_back("MM_TruthMap");
m_PRD_TruthNames.emplace_back("STGC_TruthMap");
}
......@@ -44,7 +44,7 @@ MuonTruthHitsFillerTool::MuonTruthHitsFillerTool (const std::string& type,
*/
StatusCode MuonTruthHitsFillerTool::initialize()
{
CHECK(book());
CHECK(book());
CHECK( m_idHelperSvc.retrieve() );
return StatusCode::SUCCESS;
}
......@@ -90,9 +90,9 @@ StatusCode MuonTruthHitsFillerTool::book()
/**
* @brief Fill one block --- type-safe version.
*/
StatusCode MuonTruthHitsFillerTool::fill (const TrackRecord& p)
StatusCode MuonTruthHitsFillerTool::fill (const TrackRecord& trackRecord)
{
CHECK( fillHitCounts (p.barcode()) ); // FIXME barcode-based
CHECK( fillHitCounts (trackRecord.barcode()) ); // FIXME barcode-based
return StatusCode::SUCCESS;
}
......@@ -122,7 +122,11 @@ StatusCode MuonTruthHitsFillerTool::fillHitCounts (int barcode)
for (const PRD_MultiTruthCollection::value_type& mc : *collection) {
// check if gen particle same as input
if( HepMC::barcode(mc.second) != barcode ) continue;
// TODO Here barcode is being used purely as a unique
// identifier, so we can use HepMC::uniqueID once TrackRecord
// and xAOD::TruthParticle and PRD_MultiTruthCollection support
// it.
if ( HepMC::barcode(mc.second) != barcode ) continue; // FIXME barcode-based
found = true;
const Identifier& id = mc.first;
ATH_MSG_VERBOSE("found matching hit " << m_idHelperSvc->toString(id) );
......@@ -149,7 +153,7 @@ StatusCode MuonTruthHitsFillerTool::fillHitCounts (int barcode)
}else{
Muon::MuonStationIndex::ChIndex chIndex = m_idHelperSvc->chamberIndex(id);
++*(m_nprecHitsPerChamberLayer[chIndex]);
}
}
}
}
}
......@@ -192,9 +196,9 @@ StatusCode MuonTruthHitsFillerTool::fillHitCounts (int barcode)
if( *ntrig[MSI::T3] > 0 ) ++*m_ntrigEtaLayers;
if( *ntrig[MSI::T4] > 0 ) ++*m_ntrigEtaLayers;
if( *ntrig[MSI::CSC] > 2 ) ++*m_ntrigEtaLayers;
if( *ntrig[MSI::STGC1] +
if( *ntrig[MSI::STGC1] +
*ntrig[MSI::STGC2] > 3 ) ++*m_ntrigEtaLayers;
ATH_MSG_DEBUG("Muon hits: prec " << *m_nprecLayers <<
" phi " << *m_nphiLayers
<< " trig eta " << *m_ntrigEtaLayers );
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
// Gaudi/Athena include(s):
......
......@@ -34,11 +34,13 @@ int TrackHelper::GetBarcode() const // TODO Drop this once UniqueID and Status
if (m_trackInfo==0 || std::as_const(m_trackInfo)->GetHepMCParticle()==0) return 0;
return m_trackInfo->GetParticleBarcode();
}
int TrackHelper::GetUniqueID() const
{
if (m_trackInfo==0 || std::as_const(m_trackInfo)->GetHepMCParticle()==0) return 0;
return m_trackInfo->GetParticleUniqueID();
}
int TrackHelper::GetStatus() const
{
if (m_trackInfo==0 || std::as_const(m_trackInfo)->GetHepMCParticle()==0) return 0;
......
......@@ -71,6 +71,8 @@ void RecordingEnvelope::AddTrackRecord(const G4Step* aStep)
const int pdgcode = (pname=="geantino") ? 999 : aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
TrackHelper trHelp(aStep->GetTrack());
const int barcode = trHelp.GetBarcode();
const int status = trHelp.GetStatus();
const int id = trHelp.GetUniqueID();
G4StepPoint *postStep=aStep->GetPostStepPoint();
G4ThreeVector pos=postStep->GetPosition();
......@@ -81,7 +83,7 @@ void RecordingEnvelope::AddTrackRecord(const G4Step* aStep)
G4StepPoint *preStep=aStep->GetPreStepPoint();
G4VPhysicalVolume *preVol=preStep->GetPhysicalVolume();
m_trackRecordCollection->Emplace(pdgcode,ener,mom,pos,time,barcode,preVol->GetName());
m_trackRecordCollection->Emplace(pdgcode,status,ener,mom,pos,time,barcode,id,preVol->GetName());
return;
}
......@@ -18,39 +18,47 @@ public:
/** @brief Constructor */
TrackRecord(
int pdg,
int status,
double energy,
const CLHEP::Hep3Vector& momentum,
const CLHEP::Hep3Vector& postition,
double time,
int barcode,
int id,
const std::string& volumeName)
: m_pdgCode(pdg)
, m_status(status)
, m_energy(energy)
, m_momentum(momentum)
, m_position(postition)
, m_time(time)
, m_barcode(barcode)
, m_id(id)
, m_volName(volumeName) {}
/** @brief Constructor */
TrackRecord(const TrackRecord& trc)
: m_pdgCode(trc.m_pdgCode)
, m_status(trc.m_status)
, m_energy(trc.m_energy)
, m_momentum(trc.m_momentum)
, m_position(trc.m_position)
, m_time(trc.m_time)
, m_barcode(trc.m_barcode)
, m_id(trc.m_id)
, m_volName(trc.m_volName){}
/** @brief Assignement Operator */
TrackRecord &operator=(const TrackRecord& trc) {
if (this != &trc) {
m_pdgCode = trc.m_pdgCode;
m_status = trc.m_status;
m_energy = trc.m_energy;
m_momentum = trc.m_momentum;
m_position = trc.m_position;
m_time = trc.m_time;
m_barcode = trc.m_barcode;
m_id = trc.m_id;
m_volName = trc.m_volName;
}
return *this;
......@@ -92,6 +100,18 @@ public:
/** @brief Set Volume name */
void SetVolName(const std::string& theName){m_volName = theName;}
/** @brief status. */
int status() const {return m_status;}
/** @brief Set status */
void SetStatus(int status) {m_status = status;}
/** @brief unique ID */
int id() const {return m_id;}
/** @brief Set uniqueID */
void SetID(int uniqueID){m_id = uniqueID;}
/** @brief bar code. Alias function. */
int barcode() const {return m_barcode;}
......@@ -100,11 +120,13 @@ public:
private:
int m_pdgCode{0};
int m_status{0};
double m_energy{0};
CLHEP::Hep3Vector m_momentum{0,0,0};
CLHEP::Hep3Vector m_position{0,0,0};
double m_time{0.};
int m_barcode{0};
int m_id{0};
std::string m_volName{""};
};
......
......@@ -16,7 +16,7 @@ atlas_add_tpcnv_library( G4SimTPCnv
INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
DEFINITIONS ${CLHEP_DEFINITIONS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaPoolCnvSvcLib AthenaPoolServicesLib AthenaKernel TrackRecordLib )
LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaPoolCnvSvcLib AthenaPoolServicesLib AthenaKernel TrackRecordLib TruthUtils)
atlas_add_dictionary( G4SimTPCnvDict
G4SimTPCnv/G4SimTPCnvDict.h
......@@ -34,3 +34,8 @@ atlas_add_test( TrackRecordCnv_p1_test
SOURCES
test/TrackRecordCnv_p1_test.cxx
LINK_LIBRARIES G4SimTPCnv TestTools CxxUtils )
atlas_add_test( TrackRecordCnv_p2_test
SOURCES
test/TrackRecordCnv_p2_test.cxx
LINK_LIBRARIES G4SimTPCnv TestTools CxxUtils )
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
*/
#ifndef G4SIMCNVDICT_H
......@@ -8,6 +8,7 @@
#include "G4SimTPCnv/TrackRecord_p1.h"
#include "G4SimTPCnv/TrackRecordCollection_p1.h"
#include "G4SimTPCnv/TrackRecordCollection_p2.h"
#include "G4SimTPCnv/TrackRecordCollection_p3.h"
// For Root streamer:
// for ROOT streamer
......
/*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
*/
#ifndef G4SIMTPCNV_TRACKRECORDCNV_P2_H
#define G4SIMTPCNV_TRACKRECORDCNV_P2_H
/*
Transient/Persistent converter for TrackRecord class
Author: Davide Costanzo
*/
class TrackRecord;
class TrackRecord_p2;
#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h"
class MsgStream;
class TrackRecordCnv_p2 : public T_AthenaPoolTPCnvConstBase<TrackRecord, TrackRecord_p2>
{
public:
using base_class::transToPers;
using base_class::persToTrans;
TrackRecordCnv_p2() {}
virtual void persToTrans(const TrackRecord_p2* persObj, TrackRecord* transObj, MsgStream &log) const override;
virtual void transToPers(const TrackRecord* transObj, TrackRecord_p2* persObj, MsgStream &log) const override;
};
#endif // G4SIMTPCNV_TRACKRECORDCNV_P2_H
/*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
*/
#ifndef G4SIMTPCNV_TRACKRECORDCOLLECTIONCNV_P3_H
#define G4SIMTPCNV_TRACKRECORDCOLLECTIONCNV_P3_H
#include "G4SimTPCnv/TrackRecordCollection_p3.h"
#include "TrackRecord/TrackRecordCollection.h"
#include "G4SimTPCnv/TrackRecordCnv_p2.h"
#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h"
typedef T_AtlasHitsVectorCnv< TrackRecordCollection, TrackRecordCollection_p3, TrackRecordCnv_p2 > TrackRecordCollectionCnv_p3;
#endif // not G4SIMTPCNV_TRACKRECORDCOLLECTIONCNV_P3_H
/*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TRACKRECORDCOLLECTION_P3_H
#define TRACKRECORDCOLLECTION_P3_H
/*
Persistent represenation of TrackRecordCollection
Author: Davide Costanzo
*/
#include <vector>
#include <string>
#include "G4SimTPCnv/TrackRecord_p2.h"
class TrackRecordCollection_p3
{
public:
/// typedefs
typedef std::vector<TrackRecord_p2> HitVector;
typedef HitVector::const_iterator const_iterator;
typedef HitVector::iterator iterator;
/// Default constructor
TrackRecordCollection_p3 ();
// Accessors
const std::string& name() const;
const HitVector& getVector() const;
std::vector<TrackRecord_p2> m_cont;
std::string m_name;
};
// inlines
inline
TrackRecordCollection_p3::TrackRecordCollection_p3 () {}
inline
const std::string&
TrackRecordCollection_p3::name() const
{return m_name;}
inline
const std::vector<TrackRecord_p2>&
TrackRecordCollection_p3::getVector() const
{return m_cont;}
#endif
/*
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#ifndef G4SIMTPCNV_TRACKRECORD_P2_H
#define G4SIMTPCNV_TRACKRECORD_P2_H
#include <string>
class TrackRecord_p2 {
public:
TrackRecord_p2() {};
int PDG_code() const {return m_PDG_code;}
int status() const {return m_status;}
float energy() const {return m_energy;}
float momentumX() const {return m_momentumX;}
float momentumY() const {return m_momentumY;}
float momentumZ() const {return m_momentumZ;}
float positionX() const {return m_positionX;}
float positionY() const {return m_positionY;}
float positionZ() const {return m_positionZ;}
float time() const {return m_time;}
int uniqueID() const {return m_uniqueID;}
std::string volName() const {return m_volName;}
friend class TrackRecordCnv_p2;
private:
int m_PDG_code{0};
int m_status{0};
float m_energy{0};
float m_momentumX{0}, m_momentumY{0}, m_momentumZ{0};
float m_positionX{0}, m_positionY{0}, m_positionZ{0};
float m_time{0};
int m_uniqueID{0};
std::string m_volName{""};
};
#endif // G4SIMTPCNV_TRACKRECORD_P2_H
......@@ -2,5 +2,9 @@
<class name="TrackRecordCollection_p2" id="22D044AD-A13A-42BF-B2A4-BDAF5BE2D819" />
<class name="std::vector<TrackRecord_p1>" />
<class name="TrackRecord_p1" />
<class name="TrackRecordCollection_p3" id="C17DB0DC-C53D-4993-A222-B1F4E01C9004" />
<class name="std::vector<TrackRecord_p2>" />
<class name="TrackRecord_p2" />
</lcgdict>
G4SimTPCnv/TrackRecordCnv_p2_test
test1
G4SimTPCnv/TrackRecordCnv_p1_test
test1
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
*/
// generate the T/P converter entries
......@@ -7,9 +7,11 @@
#include "G4SimTPCnv/TrackRecordCollectionCnv_p1.h"
#include "G4SimTPCnv/TrackRecordCollectionCnv_p2.h"
#include "G4SimTPCnv/TrackRecordCollectionCnv_p3.h"
#include "G4SimTPCnv/TrackRecord_p1.h"
#include "G4SimTPCnv/TrackRecordCollection_p1.h"
#include "G4SimTPCnv/TrackRecordCollection_p2.h"
#include "G4SimTPCnv/TrackRecordCollection_p3.h"
// For Root streamer:
// for ROOT streamer
......@@ -28,3 +30,8 @@ DECLARE_NAMED_TPCNV_FACTORY(TrackRecordCollectionCnv_p2,
TrackRecordCollection_p2,
Athena::TPCnvVers::Current)
DECLARE_NAMED_TPCNV_FACTORY(TrackRecordCollectionCnv_p3,
TrackRecordCollectionCnv_p3,
AtlasHitsVector<TrackRecord>,
TrackRecordCollection_p3,
Athena::TPCnvVers::Old)
......@@ -7,6 +7,7 @@
#include "G4SimTPCnv/TrackRecord_p1.h"
#include "G4SimTPCnv/TrackRecordCnv_p1.h"
#include "TruthUtils/MagicNumbers.h"
void
......@@ -18,6 +19,8 @@ TrackRecordCnv_p1::persToTrans(const TrackRecord_p1* persObj, TrackRecord* trans
transObj->SetEnergy((double) persObj->energy());
transObj->SetMomentum(CLHEP::Hep3Vector(persObj->momentumX(), persObj->momentumY(), persObj->momentumZ() ));
transObj->SetPosition(CLHEP::Hep3Vector(persObj->positionX(), persObj->positionY(), persObj->positionZ() ));
const int oldStatus = 1; // Given how TrackRecords are used currently; this will be correct for all but some very exotic samples.
transObj->SetStatus(HepMC::new_particle_status_from_old(oldStatus, persObj->barCode()));
transObj->SetTime((double) persObj->time());
transObj->SetBarcode(persObj->barCode()); // FIXME barcode-based
transObj->SetVolName(persObj->volName());
......
/*
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#include "G4SimTPCnv/TrackRecordCnv_p2.h"
#include "G4SimTPCnv/TrackRecord_p2.h"
#include "TrackRecord/TrackRecord.h"
void
TrackRecordCnv_p2::persToTrans(const TrackRecord_p2* persObj, TrackRecord* transObj, MsgStream &log) const
{
log << MSG::DEBUG << "TrackRecordCnv_p2::persToTrans called " << endmsg;
transObj->SetPDGCode (persObj->PDG_code());
transObj->SetStatus (persObj->status());
transObj->SetEnergy ((double) persObj->energy());
transObj->SetMomentum (CLHEP::Hep3Vector( persObj->momentumX(), persObj->momentumY(), persObj->momentumZ() ));
transObj->SetPosition (CLHEP::Hep3Vector( persObj->positionX(), persObj->positionY(), persObj->positionZ() ));
transObj->SetTime ((double) persObj->time());
transObj->SetID (persObj->uniqueID());
transObj->SetVolName (persObj->volName());
}
void
TrackRecordCnv_p2::transToPers(const TrackRecord* transObj, TrackRecord_p2* persObj, MsgStream &log) const
{
log << MSG::DEBUG << "TrackRecordCnv_p2::transToPers called " << endmsg;
persObj->m_PDG_code = transObj->GetPDGCode();
persObj->m_status = transObj->status();
persObj->m_energy = (float) transObj->GetEnergy();
CLHEP::Hep3Vector mom = transObj->GetMomentum();
persObj->m_momentumX = (float) mom.x();
persObj->m_momentumY = (float) mom.y();
persObj->m_momentumZ = (float) mom.z();
CLHEP::Hep3Vector pos = transObj->GetPosition();
persObj->m_positionX = (float) pos.x();
persObj->m_positionY = (float) pos.y();
persObj->m_positionZ = (float) pos.z();
persObj->m_time = (float) transObj->GetTime();
persObj->m_uniqueID = transObj->id();
persObj->m_volName = transObj->GetVolName();
}
......@@ -33,9 +33,11 @@ void compare (const TrackRecord& p1,
const TrackRecord& p2)
{
assert ( p1.GetPDGCode() == p2.GetPDGCode() );
assert ( p1.status() == p2.status() );
assert ( p1.GetEnergy() == p2.GetEnergy() );
assert ( p1.GetTime() == p2.GetTime() );
assert ( p1.barcode() == p2.barcode() );
assert ( p1.id() == p2.id() );
assert ( p1.GetVolName() == p2.GetVolName() );
compare ( p1.GetPosition(), p2.GetPosition() );
compare ( p1.GetMomentum(), p2.GetMomentum() );
......@@ -60,12 +62,16 @@ void test1 ATLAS_NOT_THREAD_SAFE ()
std::cout << "test1\n";
Athena_test::Leakcheck check;
TrackRecord trans1 (123, 124.5,
CLHEP::Hep3Vector (10.5, 11.5, 12.5),
CLHEP::Hep3Vector (20.5, 21.5, 22.5),
125.5,
126,
"vol");
TrackRecord trans1 (123, // pdg code
1, // status - not persistified in TrackRecord_p1
124.5, // energy
CLHEP::Hep3Vector (10.5, 11.5, 12.5), // position
CLHEP::Hep3Vector (20.5, 21.5, 22.5), // momentum
125.5, // time
126, // barcode
0, // id - not persistified in TrackRecord_p1
"vol" // volume name
);
testit (trans1);
}
......
/*
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file G4SimTPCnv/test/TrackRecordCnv_p2_test.cxx
* @author John Chapman
* @date Aug, 2023
* @brief Tests for TrackRecordCnv_p2.
*/
#undef NDEBUG
#include "G4SimTPCnv/TrackRecordCnv_p2.h"
#include "G4SimTPCnv/TrackRecord_p2.h"
#include "TrackRecord/TrackRecord.h"
#include "TestTools/leakcheck.h"
#include "CxxUtils/checker_macros.h"
#include "GaudiKernel/MsgStream.h"
#include <cassert>
#include <iostream>
void compare (const CLHEP::Hep3Vector& p1,
const CLHEP::Hep3Vector& p2)
{
assert ( p1.x() == p2.x() );
assert ( p1.y() == p2.y() );
assert ( p1.z() == p2.z() );
}
void compare (const TrackRecord& p1,
const TrackRecord& p2)
{
assert ( p1.GetPDGCode() == p2.GetPDGCode() );
assert ( p1.status() == p2.status() );
assert ( p1.GetEnergy() == p2.GetEnergy() );
assert ( p1.GetTime() == p2.GetTime() );
// Currently no way to get back the barcode value when using
// TrackRecord_p2 as the persistent version.
assert ( p1.id() == p2.id() );
assert ( p1.GetVolName() == p2.GetVolName() );
compare ( p1.GetPosition(), p2.GetPosition() );
compare ( p1.GetMomentum(), p2.GetMomentum() );
}
void testit (const TrackRecord& trans1)
{
MsgStream log (0, "test");
TrackRecordCnv_p2 cnv;
TrackRecord_p2 pers;
cnv.transToPers (&trans1, &pers, log);
TrackRecord trans2;
cnv.persToTrans (&pers, &trans2, log);
compare (trans1, trans2);
}
void test1 ATLAS_NOT_THREAD_SAFE ()
{
std::cout << "test1\n";
Athena_test::Leakcheck check;
TrackRecord trans1 (123, // pdg code
1, // status
124.5, // energy
CLHEP::Hep3Vector (10.5, 11.5, 12.5), // position
CLHEP::Hep3Vector (20.5, 21.5, 22.5), // momentum
125.5, // time
126, // barcode - not persistified in TrackRecord_p2
127, // id
"vol" // volume name
);
testit (trans1);
}
int main ATLAS_NOT_THREAD_SAFE ()
{
std::cout << "G4SimTPCnv/TrackRecordCnv_p2_test\n";
test1();
return 0;
}
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