|
ATLAS Offline Software
|
#include <SimHitCreatorMS.h>
◆ SimHitCreatorMS()
iFatras::SimHitCreatorMS::SimHitCreatorMS |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~SimHitCreatorMS()
virtual iFatras::SimHitCreatorMS::~SimHitCreatorMS |
( |
| ) |
|
|
virtualdefault |
◆ createHit()
Private HitCreate method - returns bool for a successful hit creation.
< TO DO : to be fixed
< end of TO DO
Definition at line 346 of file SimHitCreatorMS.cxx.
357 ATH_MSG_VERBOSE(
"[ muhit ] Creating MDTSimHit with identifier " << simId );
363 if(
std::find( (myIt->second).begin(), (myIt->second).end(),
id) != (myIt->second).end() ) {
376 double de = 0.02*dlh/15.075;
402 ATH_MSG_VERBOSE(
"[ muhit ] Creating RPCSimHit with identifier " << simId );
424 ATH_MSG_VERBOSE(
"[ muhit ] Creating TGCSimHit with identifier " << simId );
429 double stepLength=3.;
446 float hitlength = 5./cs;
459 if (pdgcode == 22) lundcode=1;
460 else if (pdgcode == 13 ) lundcode=6;
461 else if (pdgcode == -13) lundcode=5;
469 ATH_MSG_VERBOSE(
"[ muhit ] Creating CSCSimHit with identifier " << simId );
475 const double kineticEnergy{-1.};
◆ createHits()
Loop over the hits and call the hit creator - also provide the ISF particle to register the truth link.
Definition at line 234 of file SimHitCreatorMS.cxx.
238 std::vector<Trk::HitInfo>::const_iterator plIter =
hits.begin();
239 std::vector<Trk::HitInfo>::const_iterator plIterEnd =
hits.end();
240 for ( ; plIter != plIterEnd; ++plIter ){
243 double timeInfo = (*plIter).time;
246 if (!currLay)
continue;
265 float segLengthSTGC = 2.85/cosAngle;
281 partLink, eKin, entryPos);
293 bool hitCreated =
createHit(isp, currLay,parm,hid,timeInfo,pitch,
true);
297 if (!mdtROE)
continue;
302 while (tCur+
next>0) {
310 hitCreated =
createHit(isp, currLay,parm,nextId,timeInfo,pitch,
true);
311 if (!hitCreated)
break;
315 while (tCur+
next <= tMax) {
323 hitCreated =
createHit(isp, currLay,parm,nextId,timeInfo,pitch,
true);
324 if (!hitCreated)
break;
337 hid =
m_measTool->nearestDetEl(currLay,parm,
true,pitch);
◆ handle()
void iFatras::SimHitCreatorMS::handle |
( |
const Incident & |
inc | ) |
|
handle for incident service
Definition at line 157 of file SimHitCreatorMS.cxx.
159 if ( inc.type() == IncidentType::BeginEvent ){
◆ initDeadChannels()
Definition at line 521 of file SimHitCreatorMS.cxx.
522 PVConstLink cv = mydetEl->getMaterialGeom();
523 int nGrandchildren = cv->getNChildVols();
524 if(nGrandchildren <= 0)
return;
532 std::vector<Identifier> deadTubes;
536 bool tubefound =
false;
537 for(
unsigned int kk=0;
kk < cv->getNChildVols();
kk++) {
538 int tubegeo = cv->getIdOfChildVol(
kk) % maxNTubesPerLayer;
539 int layergeo = ( cv->getIdOfChildVol(
kk) - tubegeo ) / maxNTubesPerLayer;
540 if( tubegeo ==
tube && layergeo ==
layer ) {
544 if( layergeo >
layer )
break;
548 deadTubes.push_back( deadTubeId );
550 <<
"), phi(" << phi <<
"), eta(" << eta <<
"), name(" <<
name
551 <<
"), multilayerId(" << ml <<
") and identifier " << deadTubeId <<
" .");
555 std::sort(deadTubes.begin(), deadTubes.end());
◆ initialize()
StatusCode iFatras::SimHitCreatorMS::initialize |
( |
| ) |
|
|
virtual |
Definition at line 95 of file SimHitCreatorMS.cxx.
122 return StatusCode::FAILURE;
135 ATH_MSG_INFO(
"Processing configuration for layouts with BMG chambers.");
137 for(
int phi=6;
phi<8;
phi++) {
138 for(
int eta=1;
eta<4;
eta++) {
152 return StatusCode::SUCCESS;
◆ offIdToSimId()
int iFatras::SimHitCreatorMS::offIdToSimId |
( |
Identifier |
id | ) |
const |
|
private |
◆ m_BMGid
int iFatras::SimHitCreatorMS::m_BMGid |
|
private |
◆ m_BMGpresent
bool iFatras::SimHitCreatorMS::m_BMGpresent = false |
|
private |
◆ m_createAllMdtHits
bool iFatras::SimHitCreatorMS::m_createAllMdtHits |
|
private |
◆ m_cscCollectionName
std::string iFatras::SimHitCreatorMS::m_cscCollectionName |
|
private |
◆ m_cscHitIdHelper
◆ m_cscSimHitCollection
◆ m_DeadChannels
◆ m_extrapolator
◆ m_idHelperSvc
◆ m_incidentSvc
ServiceHandle<IIncidentSvc> iFatras::SimHitCreatorMS::m_incidentSvc |
|
private |
◆ m_mdtCollectionName
std::string iFatras::SimHitCreatorMS::m_mdtCollectionName |
|
private |
◆ m_mdtHitIdHelper
◆ m_mdtSigmaDriftRadius
double iFatras::SimHitCreatorMS::m_mdtSigmaDriftRadius |
|
private |
◆ m_mdtSimHitCollection
◆ m_measTool
◆ m_mmCollectionName
std::string iFatras::SimHitCreatorMS::m_mmCollectionName |
|
private |
◆ m_mmOffToSimId
◆ m_mmSimHitCollection
◆ m_muonMgr
◆ m_randomEngine
CLHEP::HepRandomEngine* iFatras::SimHitCreatorMS::m_randomEngine |
|
private |
◆ m_randomEngineName
std::string iFatras::SimHitCreatorMS::m_randomEngineName |
|
private |
◆ m_randomSvc
◆ m_rpcCollectionName
std::string iFatras::SimHitCreatorMS::m_rpcCollectionName |
|
private |
◆ m_rpcHitIdHelper
◆ m_rpcSimHitCollection
◆ m_stgcCollectionName
std::string iFatras::SimHitCreatorMS::m_stgcCollectionName |
|
private |
◆ m_stgcOffToSimId
◆ m_stgcSimHitCollection
◆ m_tgcCollectionName
std::string iFatras::SimHitCreatorMS::m_tgcCollectionName |
|
private |
◆ m_tgcHitIdHelper
◆ m_tgcSimHitCollection
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
const RpcReadoutElement * getRpcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
int offIdToSimId(Identifier id) const
const MuonGM::MuonDetectorManager * m_muonMgr
const CscHitIdHelper * m_cscHitIdHelper
Amg::Transform3D globalToLocalTransf(const Identifier &id) const
sTGCSimHitCollection * m_stgcSimHitCollection
static const RpcHitIdHelper * GetHelper(unsigned int nGasGaps=2)
CSCSimHitCollection * m_cscSimHitCollection
int getNLayers() const
Returns the number of tube layers inside the multilayer.
RPCSimHitCollection * m_rpcSimHitCollection
std::string find(const std::string &s)
return a remapped string
void initDeadChannels(const MuonGM::MdtReadoutElement *mydetEl)
sTgcSimIdToOfflineId * m_stgcOffToSimId
TGCSimHitCollection * m_tgcSimHitCollection
const Amg::Vector3D & position() const
Access method for the position.
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
Amg::Transform3D globalToLocalTransf(const Identifier &id) const
AtlasHitsVector< sTGCSimHit > sTGCSimHitCollection
AtlasHitsVector< MDTSimHit > MDTSimHitCollection
AtlasHitsVector< TGCSimHit > TGCSimHitCollection
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
ToolHandle< Muon::IMuonTGMeasTool > m_measTool
Muon TrackingGeometry Measurement Tool.
int pdgCode() const
PDG value.
AtlasHitsVector< RPCSimHit > RPCSimHitCollection
MMSimHitCollection * m_mmSimHitCollection
std::string m_stgcCollectionName
bool createHit(const ISF::ISFParticle &isp, const Trk::Layer *, const Trk::TrackParameters *, Identifier, double, double, bool) const
Private HitCreate method - returns bool for a successful hit creation.
#define ATH_MSG_VERBOSE(x)
static const MdtHitIdHelper * GetHelper(unsigned int nTubes=78)
MM_SimIdToOfflineId * m_mmOffToSimId
std::map< Identifier, std::vector< Identifier > > m_DeadChannels
AtlasHitsVector< MMSimHit > MMSimHitCollection
value_type get_compact() const
Get the compact id.
int layerType() const
get the Layer coding
Identifier convert(int simId) const
AtlasHitsVector< CSCSimHit > CSCSimHitCollection
int BuildRpcHitId(const std::string &, const int, const int, const int, const int, const int, const int, const int) const
Amg::Transform3D globalToLocalTransf(const int tubeLayer, const int tube) const
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const RpcHitIdHelper * m_rpcHitIdHelper
void Emplace(Args &&... args)
ServiceHandle< IIncidentSvc > m_incidentSvc
Incident Service.
a link optimized in size for a GenParticle in a McEventCollection
ToolHandle< Trk::ITimedExtrapolator > m_extrapolator
Tool using the track creator per event.
static const CscHitIdHelper * GetHelper()
Identifier convert(int simId) const
const MdtHitIdHelper * m_mdtHitIdHelper
int BuildCscHitId(const std::string &, const int, const int, const int, const int) const
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const CscReadoutElement * getCscReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
std::string m_randomEngineName
Name of the random number stream.
std::string m_rpcCollectionName
MDTSimHitCollection * m_mdtSimHitCollection
Eigen::Affine3d Transform3D
virtual const Amg::Vector3D & normal() const
Returns the normal vector of the Surface (i.e.
static const TgcHitIdHelper * GetHelper()
const TgcHitIdHelper * m_tgcHitIdHelper
const Amg::Vector3D & momentum() const
The current momentum vector of the ISFParticle.
Eigen::Matrix< double, 3, 1 > Vector3D
std::string m_cscCollectionName
std::string m_tgcCollectionName
std::string m_mmCollectionName
const MuonStation * getMuonStation(const std::string &stName, int eta, int phi) const
const Amg::Vector3D & momentum() const
Access method for the momentum.
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
ServiceHandle< IAtRndmGenSvc > m_randomSvc
Pointer to the random number generator service.
Eigen::Translation< double, 3 > Translation3D
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
CLHEP::HepRandomEngine * m_randomEngine
Random Engine.
int BuildTgcHitId(const std::string &, const int, const int, const int) const
int getNtubesperlayer() const
Returns the number of tubes in each tube layer.
Amg::Transform3D globalToLocalTransf(const Identifier &id) const
Returns the global -> local transformation.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
int BuildMdtHitId(const std::string &, const int, const int, const int, const int, const int) const
std::string m_mdtCollectionName
double m_mdtSigmaDriftRadius
double mass() const
mass of the particle