#include <DsRpcSensDet.h>
Inheritance diagram for DsRpcSensDet:
Public Types | |
SUCCESS | |
NO_INTERFACE | |
VERSMISMATCH | |
LAST_ERROR | |
enum | Status |
enum | Status |
enum | Status |
Public Member Functions | |
DsRpcSensDet (const std::string &type, const std::string &name, const IInterface *parent) | |
virtual | ~DsRpcSensDet () |
virtual void | Initialize (G4HCofThisEvent *HCE) |
virtual void | EndOfEvent (G4HCofThisEvent *HCE) |
virtual bool | ProcessHits (G4Step *step, G4TouchableHistory *history) |
virtual StatusCode | initialize () |
virtual StatusCode | finalize () |
virtual bool | processStep (G4Step *step, G4TouchableHistory *history) |
virtual unsigned long | release () |
StatusCode | release (const IInterface *interface) const |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface)=0 |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface)=0 |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface)=0 |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvUnknown) |
virtual unsigned long | addRef ()=0 |
virtual unsigned long | addRef ()=0 |
virtual unsigned long | addRef ()=0 |
virtual unsigned long | addRef () |
virtual const std::string & | type () const =0 |
virtual const std::string & | type () const |
virtual const IInterface * | parent () const =0 |
virtual const IInterface * | parent () const |
virtual StatusCode | configure ()=0 |
virtual StatusCode | configure () |
virtual StatusCode | start ()=0 |
virtual StatusCode | start () |
virtual StatusCode | stop ()=0 |
virtual StatusCode | stop () |
virtual StatusCode | terminate ()=0 |
virtual StatusCode | terminate () |
virtual StatusCode | reinitialize ()=0 |
virtual StatusCode | reinitialize () |
virtual StatusCode | restart ()=0 |
virtual StatusCode | restart () |
virtual Gaudi::StateMachine::State | FSMState () const =0 |
virtual Gaudi::StateMachine::State | FSMState () const |
virtual StatusCode | sysInitialize ()=0 |
virtual StatusCode | sysInitialize () |
virtual StatusCode | sysStart ()=0 |
virtual StatusCode | sysStart () |
virtual StatusCode | sysStop ()=0 |
virtual StatusCode | sysStop () |
virtual StatusCode | sysFinalize ()=0 |
virtual StatusCode | sysFinalize () |
virtual StatusCode | sysReinitialize ()=0 |
virtual StatusCode | sysReinitialize () |
virtual StatusCode | sysRestart ()=0 |
virtual StatusCode | sysRestart () |
virtual unsigned long | refCount () const =0 |
virtual const std::string & | name () const =0 |
virtual const std::string & | name () const |
virtual void | handle (const Incident &i) |
IGiGaSvc * | gigaSvc () const |
IGiGaSetUpSvc * | setupSvc () const |
INTupleSvc * | ntupleSvc () const |
INTupleSvc * | evtColSvc () const |
IDataProviderSvc * | detSvc () const |
IDataProviderSvc * | evtSvc () const |
IIncidentSvc * | incSvc () const |
IChronoStatSvc * | chronoSvc () const |
IHistogramSvc * | histoSvc () const |
IAlgContextSvc * | contextSvc () const |
DataObject * | put (IDataProviderSvc *svc, DataObject *object, const std::string &address, const bool useRootInTES=true) const |
DataObject * | put (DataObject *object, const std::string &address, const bool useRootInTES=true) const |
Gaudi::Utils::GetData< TYPE >::return_type | get (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const |
Gaudi::Utils::GetData< TYPE >::return_type | get (const std::string &location, const bool useRootInTES=true) const |
TYPE * | getDet (IDataProviderSvc *svc, const std::string &location) const |
TYPE * | getDet (const std::string &location) const |
bool | exist (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const |
bool | exist (const std::string &location, const bool useRootInTES=true) const |
bool | existDet (IDataProviderSvc *svc, const std::string &location) const |
bool | existDet (const std::string &location) const |
TYPE * | getOrCreate (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const |
TYPE * | getOrCreate (const std::string &location, const bool useRootInTES=true) const |
TOOL * | tool (const std::string &type, const std::string &name, const IInterface *parent=0, bool create=true) const |
TOOL * | tool (const std::string &type, const IInterface *parent=0, bool create=true) const |
SERVICE * | svc (const std::string &name, const bool create=true) const |
IUpdateManagerSvc * | updMgrSvc () const |
IDataProviderSvc * | fastContainersSvc () const |
StatusCode | Error (const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const |
StatusCode | Warning (const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const |
StatusCode | Print (const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const |
StatusCode | Assert (const bool ok, const std::string &message="", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
StatusCode | Assert (const bool ok, const char *message, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
StatusCode | Exception (const std::string &msg, const GaudiException &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
StatusCode | Exception (const std::string &msg, const std::exception &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
StatusCode | Exception (const std::string &msg="no message", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const |
MsgStream & | msgStream (const MSG::Level level) const |
MsgStream & | always () const |
MsgStream & | fatal () const |
MsgStream & | err () const |
MsgStream & | error () const |
MsgStream & | warning () const |
MsgStream & | info () const |
MsgStream & | debug () const |
MsgStream & | verbose () const |
MsgStream & | msg () const |
const Statistics & | counters () const |
StatEntity & | counter (const std::string &tag) const |
MSG::Level | msgLevel () const |
bool | msgLevel (const MSG::Level level) const |
void | resetMsgStream () const |
bool | typePrint () const |
bool | propsPrint () const |
bool | statPrint () const |
bool | errorsPrint () const |
long | printStat (const MSG::Level level=MSG::ALWAYS) const |
long | printErrors (const MSG::Level level=MSG::ALWAYS) const |
long | printProps (const MSG::Level level=MSG::ALWAYS) const |
void | registerCondition (const std::string &condition, StatusCode(CallerClass::*mf)()=NULL) |
void | registerCondition (const std::string &condition, CondType *&condPtrDest, StatusCode(CallerClass::*mf)()=NULL) |
void | registerCondition (char *condition, StatusCode(CallerClass::*mf)()=NULL) |
void | registerCondition (TargetClass *condition, StatusCode(CallerClass::*mf)()=NULL) |
StatusCode | runUpdate () |
TransientFastContainer< T > * | getFastContainer (const std::string &location, typename TransientFastContainer< T >::size_type initial=0) |
const std::string & | context () const |
const std::string & | rootInTES () const |
double | globalTimeOffset () const |
virtual Gaudi::StateMachine::State | targetFSMState () const |
virtual StatusCode | setProperty (const Property &p) |
virtual StatusCode | setProperty (const std::string &s) |
virtual StatusCode | setProperty (const std::string &n, const std::string &v) |
StatusCode | setProperty (const std::string &name, const TYPE &value) |
virtual StatusCode | getProperty (Property *p) const |
virtual const Property & | getProperty (const std::string &name) const |
virtual StatusCode | getProperty (const std::string &n, std::string &v) const |
virtual const std::vector< Property * > & | getProperties () const |
PropertyMgr * | getPropertyMgr () |
ISvcLocator * | serviceLocator () const |
ISvcLocator * | svcLoc () const |
IMessageSvc * | msgSvc () const |
IToolSvc * | toolSvc () const |
StatusCode | setProperties () |
StatusCode | service (const std::string &name, T *&svc, bool createIf=true) const |
StatusCode | service (const std::string &type, const std::string &name, T *&svc) const |
void | declInterface (const InterfaceID &, void *) |
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const |
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const |
IAuditorSvc * | auditorSvc () const |
IMonitorSvc * | monitorSvc () const |
void | declareInfo (const std::string &name, const T &var, const std::string &desc) const |
void | declareInfo (const std::string &name, const std::string &format, const void *var, int size, const std::string &desc) const |
Static Public Member Functions | |
static const InterfaceID & | interfaceID () |
static const InterfaceID & | interfaceID () |
static const InterfaceID & | interfaceID () |
Public Attributes | |
SUCCESS | |
NO_INTERFACE | |
VERSMISMATCH | |
LAST_ERROR | |
Protected Types | |
typedef std::map< std::string, StatEntity > | Statistics |
typedef std::map< std::string, unsigned int > | Counter |
typedef std::vector< IAlgTool * > | AlgTools |
typedef std::pair< IInterface *, std::string > | ServiceEntry |
typedef std::vector< ServiceEntry > | Services |
Protected Member Functions | |
virtual unsigned long | refCount () const |
StatusCode | releaseTool (const IAlgTool *tool) const |
StatusCode | releaseSvc (const IInterface *svc) const |
int | outputLevel () const |
IntegerProperty & | outputLevelProperty () |
void | initOutputLevel (Property &prop) |
Static Protected Attributes | |
static const bool | IgnoreRootInTES |
static const bool | UseRootInTES |
Private Types | |
typedef std::map< short int, G4DhHitCollection * > | LocalHitCache |
Private Member Functions | |
void | StoreHit (DayaBay::SimRpcHit *hit, int trackid) |
const DetectorElement * | SensDetElem (const G4TouchableHistory &hist) |
int | SensDetId (const DetectorElement &de) |
Private Attributes | |
std::string | m_stripLogVol |
RPCStripLogicalVolume : name of logical volume in which this sensitive detector is operating. | |
std::vector< std::string > | m_sensorStructures |
SensorStructures : names of paths in TDS in which to search for sensor detector elements using this sensitive detector. | |
std::string | m_idParameter |
PackedIdParameterName : name of user paramater of the counted detector element which holds the packed, globally unique Rpc ID. | |
std::string | m_t2deName |
TouchableToDetelem : the ITouchableToDetectorElement to use to resolve sensor ID. | |
ITouchableToDetectorElement * | m_t2de |
LocalHitCache | m_hc |
Rndm::Numbers | m_uni |
Definition at line 23 of file DsRpcSensDet.h.
typedef std::map<short int,G4DhHitCollection*> DsRpcSensDet::LocalHitCache [private] |
Definition at line 70 of file DsRpcSensDet.h.
DsRpcSensDet::DsRpcSensDet | ( | const std::string & | type, | |
const std::string & | name, | |||
const IInterface * | parent | |||
) |
Definition at line 50 of file DsRpcSensDet.cc.
00053 : G4VSensitiveDetector(name) 00054 , GiGaSensDetBase(type,name,parent) 00055 , m_t2de(0) 00056 { 00057 info() << "DsRpcSensDet (" << type << "/" << name << ") created" << endreq; 00058 00059 declareProperty("StripLogicalVolume", 00060 m_stripLogVol="/dd/Geometry/RPC/lvRPCStrip", 00061 "RPC read-out strip logical volume to which this SD is attached."); 00062 00063 declareProperty("TouchableToDetelem", m_t2deName = "TH2DE", 00064 "The ITouchableToDetectorElement to use to resolve sensor."); 00065 00066 declareProperty("SensorStructures",m_sensorStructures, 00067 "TDS Paths in which to look for sensor detector elements" 00068 " using this sensitive detector"); 00069 00070 declareProperty("PackedIdPropertyName",m_idParameter="RpcID", 00071 "The name of the user property holding the RPC ID."); 00072 00073 00074 }
DsRpcSensDet::~DsRpcSensDet | ( | ) | [virtual] |
void DsRpcSensDet::Initialize | ( | G4HCofThisEvent * | HCE | ) | [virtual] |
Definition at line 156 of file DsRpcSensDet.cc.
00157 { 00158 m_hc.clear(); 00159 00160 G4DhHitCollection* hc = new G4DhHitCollection(SensitiveDetectorName,collectionName[0]); 00161 m_hc[0] = hc; 00162 int hcid = G4SDManager::GetSDMpointer()->GetCollectionID(hc); 00163 hce->AddHitsCollection(hcid,hc); 00164 00165 for (int isite=0; site_ids1[isite] >= 0; ++isite) { 00166 for (int idet=0; detector_ids1[idet] >= 0; ++idet) { 00167 DayaBay::Detector det(site_ids1[isite],detector_ids1[idet]); 00168 00169 if (det.bogus()) continue; 00170 00171 string name=det.detName(); 00172 debug()<<"det.detName(): "<<name<<"*********************"<<endreq; // was info() 00173 G4DhHitCollection* hc = new G4DhHitCollection(SensitiveDetectorName,name.c_str()); 00174 short int id = det.siteDetPackedData(); 00175 debug()<<"det.siteDetPackedData(): "<<id<<"**************"<<endreq; // was info() 00176 m_hc[id] = hc; 00177 00178 int hcid = G4SDManager::GetSDMpointer()->GetCollectionID(hc); 00179 hce->AddHitsCollection(hcid,hc); 00180 //info() 00181 debug() << "Add hit collection with hcid=" << hcid << ", cached ID=" 00182 << (void*)id 00183 << " name= \"" << SensitiveDetectorName << "/" << name << "\"" 00184 << endreq; 00185 } 00186 } 00187 00188 debug() << "DsRpcSensDet Initialize, made " 00189 << hce->GetNumberOfCollections() << " collections" 00190 << endreq; 00191 00192 }
void DsRpcSensDet::EndOfEvent | ( | G4HCofThisEvent * | HCE | ) | [virtual] |
Definition at line 387 of file DsRpcSensDet.cc.
00388 { 00389 //info() 00390 debug()<< "Cache has " << m_hc.size() << " collections*******************" << endreq; 00391 00392 int ncols = hce->GetNumberOfCollections(); 00393 debug() << "DsRpcSensDet EndOfEvent " << ncols << " collections\n"; 00394 for (int ind=0; ind<ncols; ++ind) { 00395 G4VHitsCollection* hc = hce->GetHC(ind); 00396 debug() << ind << ": " 00397 << hc->GetSDname() << "//" << hc->GetName() << " has " 00398 << hc->GetSize() << " hits\n"; 00399 } 00400 debug() << endreq; 00401 }
bool DsRpcSensDet::ProcessHits | ( | G4Step * | step, | |
G4TouchableHistory * | history | |||
) | [virtual] |
Definition at line 244 of file DsRpcSensDet.cc.
00246 { 00247 //if (!step) return false; just crash for now if not defined 00248 00249 // Find out what detector we are in (RPC) 00250 G4StepPoint* preStepPoint = step->GetPreStepPoint(); 00251 00252 double energyDep = step->GetTotalEnergyDeposit(); 00253 00254 // Do not process non-positive energy deposits 00255 if (energyDep <= 0.0) { 00256 debug()<< "Hit energy too low: " << energyDep/CLHEP::eV << endreq; 00257 return true; 00258 } 00259 00260 00261 00262 00263 const G4TouchableHistory* hist = 00264 dynamic_cast<const G4TouchableHistory*>(preStepPoint->GetTouchable()); 00265 if (!hist or !hist->GetHistoryDepth()) { 00266 error() << "ProcessHits: step has no or empty touchable history." 00267 << " Particle name for track assoc. with this step is " << step->GetTrack()->GetDefinition()->GetParticleName() << endreq; 00268 return false; 00269 } 00270 00271 const DetectorElement* de = this->SensDetElem(*hist); 00272 if (!de) return false; 00273 00274 int rpcid = this->SensDetId(*de); 00275 DayaBay::Detector detector(rpcid); 00276 00277 G4Track* track = step->GetTrack(); 00278 double weight = track->GetWeight(); 00279 weight = 1.; 00280 00281 00282 #if 1 00283 if (!rpcid) { 00284 warning () << "Dumping TouchableHistory: (Particle name for track assoc. with this step is " 00285 << step->GetTrack()->GetDefinition()->GetParticleName() <<" .)\n"; 00286 for (int ind=0; ind<hist->GetHistoryDepth(); ++ind) { 00287 warning () << "\t (" << ind << ") " << hist->GetVolume(ind)->GetName() 00288 << " #" << hist->GetReplicaNumber(ind) 00289 << " physvol @ " << (void*)hist->GetVolume(ind) 00290 << "\n"; 00291 } 00292 warning() << endreq; 00293 } 00294 00295 verbose() << "Dumping TouchableHistory:\n"; 00296 for (int ind=0; ind<hist->GetHistoryDepth(); ++ind) { 00297 verbose() << "\t (" << ind << ") " << hist->GetVolume(ind)->GetName() 00298 << " #" << hist->GetReplicaNumber(ind) 00299 << " physvol @ " << (void*)hist->GetVolume(ind) 00300 << "\n"; 00301 } 00302 verbose() << endreq; 00303 #endif 00304 00305 00306 DayaBay::SimRpcHit* srhit = new DayaBay::SimRpcHit(); 00307 srhit->setEnergyDep(energyDep); 00308 00309 // base hit 00310 00311 // Time since event created 00312 srhit->setHitTime(preStepPoint->GetGlobalTime()); 00313 00314 //#include "G4NavigationHistory.hh" 00315 00316 const G4AffineTransform& trans = hist->GetHistory()->GetTopTransform(); 00317 const G4ThreeVector& global_pos = preStepPoint->GetPosition(); 00318 G4ThreeVector pos = trans.TransformPoint(global_pos); 00319 srhit->setLocalPos(pos); 00320 srhit->setSensDetId(rpcid); 00321 00322 // rpc hit 00323 // sprit->setDir(...); // for now 00324 //G4ThreeVector pol = trans.TransformAxis(track->GetPolarization()); 00325 // pol = pol.unit(); 00326 // G4ThreeVector dir = trans.TransformAxis(track->GetMomentum()); 00327 //dir = dir.unit(); 00328 //srhit->setPol(pol); 00329 //srhit->setDir(dir); 00330 //srhit->setWavelength(wavelength); 00331 //srhit->setType(0); 00332 //srhit->setWeight(weight); 00333 00334 // Dump info on the hit and touchable history 00335 #if 0 00336 debug() << "hit: id=" << (void*)pmtid << ", " 00337 << wavelength/CLHEP::nm << " nm, " 00338 << "pol=[" << pol[0] << "," << pol[1] << "," << pol[2] << "] " 00339 << "pos=[" << pos[0] << "," << pos[1] << "," << pos[2] << "] " 00340 << endreq; 00341 00342 for (int ind=0; ind<hist->GetHistoryDepth(); ++ind) { 00343 verbose () << "\t (" << ind << ") " << hist->GetVolume(ind)->GetName() 00344 << " #" << hist->GetReplicaNumber(ind) 00345 << " physvol @ " << (void*)hist->GetVolume(ind) 00346 << "\n"; 00347 } 00348 verbose() << endreq; 00349 #endif 00350 00351 00352 int trackid = track->GetTrackID(); 00353 this->StoreHit(srhit,trackid); 00354 00355 return true; 00356 }
StatusCode DsRpcSensDet::initialize | ( | ) | [virtual] |
Reimplemented from GiGaSensDetBase.
Definition at line 80 of file DsRpcSensDet.cc.
00081 { 00082 this->GiGaSensDetBase::initialize(); 00083 info() << "DsRpcSensDet initialize" << endreq; 00084 00085 m_t2de = tool<ITouchableToDetectorElement>(m_t2deName); 00086 00087 // define collections. 00088 00089 // first a catch-all 00090 collectionName.insert("unknown"); 00091 for (int isite=0; site_ids1[isite] >= 0; ++isite) { 00092 Site::Site_t site = site_ids1[isite]; 00093 00094 for (int idet=0; detector_ids1[idet] >= 0; ++idet) { 00095 DetectorId::DetectorId_t detid = detector_ids1[idet]; 00096 00097 DayaBay::Detector det(site,detid); 00098 00099 if (det.bogus()) continue; 00100 00101 string name=det.detName(); 00102 collectionName.insert(name.c_str()); 00103 debug() << "Inserted collectionName " << collectionName.size()-1 00104 << " = \"" << name << "\"" 00105 << "(" << isite << "," << idet << "): " 00106 << "(" << site << "," << detid << ")" 00107 << endreq; 00108 } 00109 } 00110 00111 // Set up a fast sim model for RPC. Note, this is 00112 // kind of circular, but I find no other way to attach a fast sim 00113 // to a sens det. 00114 00115 const G4LogicalVolume* lv = GiGaVolumeUtils::findLVolume(m_stripLogVol); 00116 if (!lv) { 00117 error() << "+++++++++++++++++++++++++++++++Failed to get " << m_stripLogVol << endreq; 00118 return StatusCode::FAILURE; 00119 } 00120 00121 G4Region* rpc_reg = new G4Region("RPC_region"); 00122 rpc_reg->AddRootLogicalVolume(const_cast<G4LogicalVolume*>(lv)); 00123 00124 vector<double> cuts; 00125 cuts.push_back(1.0*mm); 00126 cuts.push_back(1.0*mm); 00127 cuts.push_back(1.0*mm); 00128 rpc_reg->SetProductionCuts(new G4ProductionCuts()); 00129 rpc_reg->GetProductionCuts()->SetProductionCuts(cuts); 00130 00131 DsRpcModel* rpcModel = new DsRpcModel("RpcModel",rpc_reg); 00132 rpcModel = 0; 00133 00134 // set up random numbers 00135 IRndmGenSvc *rgs = 0; 00136 if (service("RndmGenSvc",rgs,true).isFailure()) { 00137 fatal() << "Failed to get random service" << endreq; 00138 return StatusCode::FAILURE; 00139 } 00140 StatusCode sc = m_uni.initialize(rgs, Rndm::Flat(0,1)); 00141 if (sc.isFailure()) { 00142 fatal() << "Failed to initialize uniform random numbers" << endreq; 00143 return StatusCode::FAILURE; 00144 } 00145 00146 return StatusCode::SUCCESS; 00147 }
StatusCode DsRpcSensDet::finalize | ( | ) | [virtual] |
Reimplemented from GiGaSensDetBase.
Definition at line 149 of file DsRpcSensDet.cc.
00150 { 00151 info() << "DsRpcSensDet finalize" << endreq; 00152 return this->GiGaSensDetBase::finalize(); 00153 }
void DsRpcSensDet::StoreHit | ( | DayaBay::SimRpcHit * | hit, | |
int | trackid | |||
) | [private] |
Definition at line 358 of file DsRpcSensDet.cc.
00359 { 00360 int did = hit->sensDetId(); 00361 DayaBay::Detector det(did); 00362 short int sdid = det.siteDetPackedData(); 00363 00364 G4DhHitCollection* hc = m_hc[sdid]; 00365 if (!hc) { 00366 warning() << "Got hit with no hit collection. ID = " << (void*)did 00367 << " which is detector: \"" << DayaBay::Detector(did).detName() 00368 << "\". Storing to the " << collectionName[0] << " collection" 00369 << endreq; 00370 sdid = 0; 00371 hc = m_hc[sdid]; 00372 } 00373 00374 #if 1 00375 verbose() << "Storing hit RPC: " << (void*)did 00376 << " from " << DayaBay::Detector(did).detName() 00377 << " in hc #"<< sdid << " = " 00378 << hit->hitTime()/CLHEP::ns << "[ns] " 00379 << hit->localPos()/CLHEP::cm << "[cm] " 00380 <<"Storing to the "<<collectionName[0]<<"collection****************" 00381 << endreq; 00382 #endif 00383 00384 hc->insert(new G4DhHit(hit,trackid)); 00385 }
const DetectorElement * DsRpcSensDet::SensDetElem | ( | const G4TouchableHistory & | hist | ) | [private] |
Definition at line 195 of file DsRpcSensDet.cc.
00196 { 00197 const IDetectorElement* idetelem = 0; 00198 int steps=0; 00199 00200 if (!hist.GetHistoryDepth()) { 00201 error() << "DsRpcSensDet::SensDetElem given empty touchable history" << endreq; 00202 return 0; 00203 } 00204 00205 StatusCode sc = 00206 m_t2de->GetBestDetectorElement(&hist,m_sensorStructures,idetelem,steps); 00207 if (sc.isFailure()) { // verbose warning 00208 warning() << "Failed to find detector element in:\n"; 00209 for (size_t ind=0; ind<m_sensorStructures.size(); ++ind) { 00210 warning() << "\t\t" << m_sensorStructures[ind] << "\n"; 00211 } 00212 warning() << "\tfor touchable history:\n"; 00213 for (int ind=0; ind < hist.GetHistoryDepth(); ++ind) { 00214 warning() << "\t (" << ind << ") " 00215 << hist.GetVolume(ind)->GetName() << "\n"; 00216 } 00217 warning() << endreq; 00218 return 0; 00219 } 00220 00221 return dynamic_cast<const DetectorElement*>(idetelem); 00222 }
int DsRpcSensDet::SensDetId | ( | const DetectorElement & | de | ) | [private] |
Definition at line 224 of file DsRpcSensDet.cc.
00225 { 00226 const DetectorElement* detelem = &de; 00227 //info()<<"+++++++++++++++++++DetectorElement+++++++++"<<detelem<<endreq; 00228 while (detelem) { 00229 // info()<<"detelem = dynamic_cast<const DetectorElement*>(detelem->parentIDetectorElement())::::::::"<<detelem<<endreq; 00230 if (detelem->params()->exists(m_idParameter)) { 00231 break; 00232 } 00233 detelem = dynamic_cast<const DetectorElement*>(detelem->parentIDetectorElement()); 00234 } 00235 if (!detelem) { 00236 warning() << "Could not get RPC detector element starting from " << de << endreq; 00237 return 0; 00238 } 00239 00240 return detelem->params()->param<int>(m_idParameter); 00241 }
std::string DsRpcSensDet::m_stripLogVol [private] |
RPCStripLogicalVolume : name of logical volume in which this sensitive detector is operating.
Definition at line 45 of file DsRpcSensDet.h.
std::vector<std::string> DsRpcSensDet::m_sensorStructures [private] |
SensorStructures : names of paths in TDS in which to search for sensor detector elements using this sensitive detector.
Definition at line 49 of file DsRpcSensDet.h.
std::string DsRpcSensDet::m_idParameter [private] |
PackedIdParameterName : name of user paramater of the counted detector element which holds the packed, globally unique Rpc ID.
Definition at line 54 of file DsRpcSensDet.h.
std::string DsRpcSensDet::m_t2deName [private] |
TouchableToDetelem : the ITouchableToDetectorElement to use to resolve sensor ID.
Definition at line 58 of file DsRpcSensDet.h.
ITouchableToDetectorElement* DsRpcSensDet::m_t2de [private] |
Definition at line 59 of file DsRpcSensDet.h.
LocalHitCache DsRpcSensDet::m_hc [private] |
Definition at line 71 of file DsRpcSensDet.h.
Rndm::Numbers DsRpcSensDet::m_uni [private] |
Definition at line 73 of file DsRpcSensDet.h.