/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

MpTrigger.cc
Go to the documentation of this file.
00001 
00015 #include "MuonProphet.h"
00016 
00017 /*
00018  * In this version, I am going to skip all muon geant4 simulation.
00019  * Have a quick check with geant4 for neutron and heavy isotopes only.
00020  *
00021  * Zhe Wang, 3 Dec. 2009
00022  */
00023 
00024 // Triggered by RPC?
00025 MpTriggerStat MuonProphet::triggeredByRpc(HepMC::GenParticle * /*pMuon*/)
00026 {
00027   /* old one
00028   if(m_crossRpc) {
00029     return MpTriggerStat::kTriggered;
00030   } else {
00031     return MpTriggerStat::kNeedSim;
00032   }
00033   */
00034   
00036   if(m_crossRpc) {
00037     return MpTriggerStat::kTriggered;
00038   } else {
00039     return MpTriggerStat::kFarAway;
00040   }
00041   //
00042 }
00043 
00044 // Triggered by water pool?
00045 MpTriggerStat MuonProphet::triggeredByWaterPool(HepMC::GenParticle * /*pMuon*/)
00046 {
00047   /* old one
00048   if(m_crossWater) {
00049     if(m_trkLengthInWater > m_trkLengthInWaterThres) {
00050       return MpTriggerStat::kTriggered;
00051     }
00052   }
00053 
00054   return MpTriggerStat::kNeedSim;
00055   */
00056 
00058   if(m_crossWater) {
00059     if(m_trkLengthInWater > m_trkLengthInWaterThres) {    // 100% triggered
00060       return MpTriggerStat::kTriggered;
00061     } else {
00062       if(m_rnd.Rndm()<0.5) {   // 50% - 50%  triggered or inefficent
00063         return MpTriggerStat::kTriggered;
00064       } else {
00065         return MpTriggerStat::kIneffi;
00066       }
00067     } 
00068   } else {
00069     if(m_rnd.Rndm()<0.05) {   // 5% triggered  95% faraway
00070       return MpTriggerStat::kTriggered;
00071     } else {
00072       return MpTriggerStat::kFarAway;
00073     }
00074   }
00076 }
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:21:29 for MuonProphet by doxygen 1.7.4