#include <DsPhysConsOptical.h>
Inheritance diagram for DsPhysConsOptical:
Public Types | |
SUCCESS | |
NO_INTERFACE | |
VERSMISMATCH | |
LAST_ERROR | |
enum | Status |
enum | Status |
enum | Status |
Public Member Functions | |
DsPhysConsOptical (const std::string &type, const std::string &name, const IInterface *parent) | |
virtual | ~DsPhysConsOptical () |
void | ConstructParticle () |
void | ConstructProcess () |
StatusCode | initialize () |
virtual StatusCode | finalize () |
virtual G4VPhysicsConstructor * | physicsConstructor () const |
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 Attributes | |
bool | m_useCerenkov |
Property: UseCerenkov, UseScintillation, UseRayleigh, UseAbsorption Turn on/off optical processes. | |
bool | m_useScintillation |
bool | m_useRayleigh |
bool | m_useAbsorption |
bool | m_applyPreQE |
preQE is maximal possible PMT QE. | |
double | m_preQE |
int | m_cerenMaxPhotonPerStep |
Property: CerenMaxPhotonsPerStep Maximum number of photons per step to limit step size. | |
double | m_ScintillationYieldFactor |
ScintillationYieldFactor: scale the number of produced scintillation photons per MeV by this much. | |
bool | m_useFastMu300nsTrick |
double | m_birksConstant1 |
Birks constants C1 and C2. | |
double | m_birksConstant2 |
bool | m_doReemission |
ScintDoReemission: Do reemission in scintilator. | |
bool | m_doScintAndCeren |
ScintDoScintAndCeren: Do both scintillation and Cerenkov in scintilator. |
bv@bnl.gov Tue Jan 29 15:25:22 2008
Definition at line 22 of file DsPhysConsOptical.h.
DsPhysConsOptical::DsPhysConsOptical | ( | const std::string & | type, | |
const std::string & | name, | |||
const IInterface * | parent | |||
) |
Definition at line 31 of file DsPhysConsOptical.cc.
00034 : GiGaPhysConstructorBase(type,name,parent) 00035 { 00036 declareProperty("CerenMaxPhotonsPerStep",m_cerenMaxPhotonPerStep = 300, 00037 "Limit step to at most this many (unscaled) Cerenkov photons."); 00038 00039 declareProperty("ScintDoReemission",m_doReemission = true, 00040 "Do reemission in scintilator."); 00041 declareProperty("ScintDoScintAndCeren",m_doScintAndCeren = true, 00042 "Do both scintillation and Cerenkov in scintilator."); 00043 00044 declareProperty("UseCerenkov", m_useCerenkov=true, 00045 "Use the Cerenkov process?"); 00046 00047 declareProperty("UseScintillation",m_useScintillation=true, 00048 "Use the Scintillation process?"); 00049 declareProperty("UseRayleigh", m_useRayleigh=true, 00050 "Use the Rayleigh scattering process?"); 00051 declareProperty("UseAbsorption", m_useAbsorption=true, 00052 "Use light absorption process?"); 00053 declareProperty("UseFastMu300nsTrick", m_useFastMu300nsTrick=false, 00054 "Use Fast muon simulation?"); 00055 declareProperty("ScintillationYieldFactor",m_ScintillationYieldFactor = 1.0, 00056 "Scale the number of scintillation photons per MeV by this much."); 00057 00058 declareProperty("BirksConstant1", m_birksConstant1 = 6.5e-3*g/cm2/MeV, 00059 "Birks constant C1"); 00060 declareProperty("BirksConstant2", m_birksConstant2 = 2.1e-6*(g/cm2/MeV)*(g/cm2/MeV), 00061 "Birks constant C2"); 00062 00063 declareProperty("PreQE", m_preQE=0.32, 00064 "Miximal possible PMT QE value to be applied on the stage of " 00065 "generating photons in scintillation/Cerenkov processes"); 00066 00067 declareProperty("ApplyPreQE",m_applyPreQE=true, 00068 "Apply preQE on stage of generating photons of not."); 00069 }
DsPhysConsOptical::~DsPhysConsOptical | ( | ) | [virtual] |
void DsPhysConsOptical::ConstructParticle | ( | ) |
void DsPhysConsOptical::ConstructProcess | ( | ) |
Definition at line 87 of file DsPhysConsOptical.cc.
00088 { 00089 #ifdef USE_CUSTOM_CERENKOV 00090 00091 info () << "Using customized DsG4Cerenkov." << endreq; 00092 DsG4Cerenkov* cerenkov = 0; 00093 if (m_useCerenkov) { 00094 cerenkov = new DsG4Cerenkov(); 00095 cerenkov->SetMaxNumPhotonsPerStep(m_cerenMaxPhotonPerStep); 00096 cerenkov->SetApplyPreQE(m_applyPreQE); 00097 cerenkov->SetPreQE(m_preQE); 00098 // cerenkov->SetPhotonWeight(m_cerenPhotonScaleWeight); 00099 cerenkov->SetTrackSecondariesFirst(true); 00100 } 00101 #else 00102 info () << "Using standard G4Cerenkov." << endreq; 00103 G4Cerenkov* cerenkov = 0; 00104 if (m_useCerenkov) { 00105 cerenkov = new G4Cerenkov(); 00106 cerenkov->SetMaxNumPhotonsPerStep(m_cerenMaxPhotonPerStep); 00107 cerenkov->SetTrackSecondariesFirst(true); 00108 } 00109 #endif 00110 00111 #ifdef USE_CUSTOM_SCINTILLATION 00112 DsG4Scintillation* scint = 0; 00113 info() << "Using customized DsG4Scintillation." << endreq; 00114 scint = new DsG4Scintillation(); 00115 scint->SetBirksConstant1(m_birksConstant1); 00116 scint->SetBirksConstant2(m_birksConstant2); 00117 scint->SetDoReemission(m_doReemission); 00118 scint->SetDoBothProcess(m_doScintAndCeren); 00119 // scint->SetPhotonWeight(m_scintPhotonScaleWeight); 00120 scint->SetApplyPreQE(m_applyPreQE); 00121 scint->SetPreQE(m_preQE); 00122 scint->SetScintillationYieldFactor(m_ScintillationYieldFactor); //1.); 00123 scint->SetUseFastMu300nsTrick(m_useFastMu300nsTrick); 00124 scint->SetTrackSecondariesFirst(true); 00125 if (!m_useScintillation) { 00126 scint->SetNoOp(); 00127 } 00128 #else // standard G4 scint 00129 G4Scintillation* scint = 0; 00130 if (m_useScintillation) { 00131 info() << "Using standard G4Scintillation." << endreq; 00132 scint = new G4Scintillation(); 00133 scint->SetScintillationYieldFactor(m_ScintillationYieldFactor); // 1.); 00134 scint->SetTrackSecondariesFirst(true); 00135 } 00136 #endif 00137 00138 G4OpAbsorption* absorb = 0; 00139 if (m_useAbsorption) { 00140 absorb = new G4OpAbsorption(); 00141 } 00142 00143 DsG4OpRayleigh* rayleigh = 0; 00144 if (m_useRayleigh) { 00145 rayleigh = new DsG4OpRayleigh(); 00146 // rayleigh->SetVerboseLevel(2); 00147 } 00148 00149 G4OpBoundaryProcess* boundproc = new G4OpBoundaryProcess(); 00150 boundproc->SetModel(unified); 00151 00152 G4FastSimulationManagerProcess* fast_sim_man 00153 = new G4FastSimulationManagerProcess("fast_sim_man"); 00154 00155 theParticleIterator->reset(); 00156 while( (*theParticleIterator)() ) { 00157 00158 G4ParticleDefinition* particle = theParticleIterator->value(); 00159 G4ProcessManager* pmanager = particle->GetProcessManager(); 00160 00161 // Caution: as of G4.9, Cerenkov becomes a Discrete Process. 00162 // This code assumes a version of G4Cerenkov from before this version. 00163 00164 if(cerenkov && cerenkov->IsApplicable(*particle)) { 00165 pmanager->AddProcess(cerenkov); 00166 pmanager->SetProcessOrdering(cerenkov, idxPostStep); 00167 debug() << "Process: adding Cherenkov to " 00168 << particle->GetParticleName() << endreq; 00169 } 00170 00171 if(scint && scint->IsApplicable(*particle)) { 00172 pmanager->AddProcess(scint); 00173 pmanager->SetProcessOrderingToLast(scint, idxAtRest); 00174 pmanager->SetProcessOrderingToLast(scint, idxPostStep); 00175 debug() << "Process: adding Scintillation to " 00176 << particle->GetParticleName() << endreq; 00177 } 00178 00179 if (particle == G4OpticalPhoton::Definition()) { 00180 if (absorb) 00181 pmanager->AddDiscreteProcess(absorb); 00182 if (rayleigh) 00183 pmanager->AddDiscreteProcess(rayleigh); 00184 pmanager->AddDiscreteProcess(boundproc); 00185 //pmanager->AddDiscreteProcess(pee); 00186 pmanager->AddDiscreteProcess(fast_sim_man); 00187 } 00188 } 00189 }
StatusCode DsPhysConsOptical::initialize | ( | ) | [virtual] |
Reimplemented from GiGaPhysConstructorBase.
Definition at line 71 of file DsPhysConsOptical.cc.
00072 { 00073 info()<<"Photons prescaling is "<<( m_applyPreQE?"on":"off" ) 00074 <<". Preliminary applied efficiency is "<<m_preQE<<endreq; 00075 info()<<"Make sure the same values are set for the DsPmtSensDet"<<endreq; 00076 return this->GiGaPhysConstructorBase::initialize(); 00077 }
bool DsPhysConsOptical::m_useCerenkov [private] |
Property: UseCerenkov, UseScintillation, UseRayleigh, UseAbsorption Turn on/off optical processes.
Default, all are on.
Definition at line 39 of file DsPhysConsOptical.h.
bool DsPhysConsOptical::m_useScintillation [private] |
Definition at line 39 of file DsPhysConsOptical.h.
bool DsPhysConsOptical::m_useRayleigh [private] |
Definition at line 39 of file DsPhysConsOptical.h.
bool DsPhysConsOptical::m_useAbsorption [private] |
Definition at line 39 of file DsPhysConsOptical.h.
bool DsPhysConsOptical::m_applyPreQE [private] |
preQE is maximal possible PMT QE.
It's used in order to avoid generating in scintillation and Cerenkov processes unnecessary photons, which anyway will be cut out by the QE.
Definition at line 44 of file DsPhysConsOptical.h.
double DsPhysConsOptical::m_preQE [private] |
Definition at line 45 of file DsPhysConsOptical.h.
int DsPhysConsOptical::m_cerenMaxPhotonPerStep [private] |
Property: CerenMaxPhotonsPerStep Maximum number of photons per step to limit step size.
This value is independent from PhotonScaleWeight. Default is 300.
Definition at line 57 of file DsPhysConsOptical.h.
double DsPhysConsOptical::m_ScintillationYieldFactor [private] |
ScintillationYieldFactor: scale the number of produced scintillation photons per MeV by this much.
This controls the primary yield of scintillation photons per MeV of deposited energy.
Definition at line 68 of file DsPhysConsOptical.h.
bool DsPhysConsOptical::m_useFastMu300nsTrick [private] |
Definition at line 69 of file DsPhysConsOptical.h.
double DsPhysConsOptical::m_birksConstant1 [private] |
double DsPhysConsOptical::m_birksConstant2 [private] |
Definition at line 73 of file DsPhysConsOptical.h.
bool DsPhysConsOptical::m_doReemission [private] |
bool DsPhysConsOptical::m_doScintAndCeren [private] |
ScintDoScintAndCeren: Do both scintillation and Cerenkov in scintilator.
Definition at line 79 of file DsPhysConsOptical.h.