CDSimpleMC Class Reference

#include <CDSimpleMC.h>

List of all members.

Public Member Functions

 CDSimpleMC ()
 ~CDSimpleMC ()
void RunMC ()
void CalcRatioScToFe ()
void SetThkFe (Double_t thkFe)
void SetParticleMomentum (Double_t pMom)
Double_t GetParticleEnergy () const
Double_t GetThkFe ()
Double_t GetTotalNumScPlanesHit ()
Double_t GetTotalScEnLoss ()
void PrintDensities () const
void PrintThicknesses () const

Public Attributes

std::vector< Double_t > fEn
std::vector< Double_t > fMom
std::vector< Double_t > fMomGeV
std::vector< Double_t > fdE_dxFe
std::vector< Double_t > fdE_dxAl
std::vector< Double_t > fdE_dxSc
std::vector< Double_t > fEnDeposited
std::vector< Double_t > fX
std::vector< Double_t > fXPlanes
std::vector< Double_t > fEnFeDeposited
std::vector< Double_t > fXFe
std::vector< Double_t > fXFePlanes
std::vector< Double_t > fEnAlDeposited
std::vector< Double_t > fXAl
std::vector< Double_t > fXAlPlanes
std::vector< Double_t > fEnScTiO2Deposited
std::vector< Double_t > fXScTiO2
std::vector< Double_t > fXScTiO2Planes
std::vector< Double_t > fEnNotScDeposited
std::vector< Double_t > fXNotSc
std::vector< Double_t > fXNotScPlanes
std::vector< Double_t > fEnScDeposited
std::vector< Double_t > fEnSc
std::vector< Double_t > fMomSc
std::vector< Double_t > fMomScGeV
std::vector< Double_t > fXSc
std::vector< Double_t > fXScPlanes
std::vector< Double_t > fEnDepositedPl
std::vector< Double_t > fEnRatio
std::vector< Double_t > fXRatio
std::vector< Double_t > fXPlanesRatio
std::vector< Double_t > fEnTiO2x2Deposited
std::vector< Double_t > fXTiO2x2
std::vector< Double_t > fEnAlx2Deposited
std::vector< Double_t > fXAlx2

Private Member Functions

void CalcPlaneThk ()
Double_t dE_dxIterative (MuEnergyLoss &mat, Double_t energyRemaining, Double_t totalThk, Double_t rho, Double_t energyCutOff, Int_t slices, Double_t &fractionThrough) const

Private Attributes

Double_t fParticleMomentum
Double_t fTotalScEnLoss
Double_t fTotalNumScPlanesHit
std::string fS
MinosMaterial::StdMaterial_t fStdMatFe
MinosMaterial::StdMaterial_t fStdMatAl
MinosMaterial::StdMaterial_t fStdMatSc
MinosMaterial::StdMaterial_t fStdMatScTiO2
Process::Process_t fELossProcess
Float_t fRoFe
Float_t fRoAl
Float_t fRoScTiO2
Float_t fRoSc
Float_t fMuMass
Float_t fThkFe
Float_t fThkAl
Float_t fThkSc
Float_t fThkScTiO2
Float_t fThkAir
Float_t fThkPlane
MaterialfFe
MaterialfAl
MaterialfSc
MuEnergyLossfIonFe
MuEnergyLossfIonAl
MuEnergyLossfIonSc
MuEnergyLossfIonScTiO2
Int_t fSlices
ModelSelector fModelSelector

Detailed Description

Definition at line 27 of file CDSimpleMC.h.


Constructor & Destructor Documentation

CDSimpleMC::CDSimpleMC (  ) 

Definition at line 28 of file CDSimpleMC.cxx.

References MinosMaterial::Density(), MinosMaterial::eAluminium, Process::eIonization, MinosMaterial::eIronCD, MinosMaterial::ePolystyreneMinos, Msg::kDebug, and MSG.

00029 {
00030   MSG("CDSimpleMC",Msg::kDebug)
00031     <<"Running CDSimpleMC Constructor..."<<endl;
00032 
00033   fS="";//general purpose string
00034   fParticleMomentum=1800;//set a default momentum
00035   fMuMass=105.658369;
00036   fSlices=1000;
00037 
00038   //set the default thicknesses
00039   fThkFe=2.50;//metric iron at CalDet
00040   fThkAl=0.0508;//module skin thickness=0.508 mm (0.020 inches)
00041   fThkSc=0.95;//(1.0-2*fThkScTiO2) in TDR and GMINOS
00042   fThkScTiO2=0.025;//0.025 in TDR and GMINOS
00043   fThkAir=2.4;//Not completely sure of this one, but it doesn't matter
00044   this->CalcPlaneThk();
00045 
00046   //set the default results
00047   fTotalScEnLoss=0;
00048   fTotalNumScPlanesHit=0;
00049 
00050   //set the default process to use for dE_dx
00051   fELossProcess=Process::eIonization;
00052   //case eIonization   
00053   //case ePairProduction 
00054   //case eBremsstrahlung 
00055   //case eNuclearInteraction
00056   //case eAll     
00057 
00058   //set the standard materials
00059   fStdMatFe=MinosMaterial::eIronCD;//CalDet iron
00060   fStdMatAl=MinosMaterial::eAluminium;
00061   fStdMatSc=MinosMaterial::ePolystyreneMinos;
00062   fStdMatScTiO2=MinosMaterial::ePolystyreneMinos;
00063 
00064   //set the densities
00065   fRoFe=MinosMaterial::Density(fStdMatFe);//Was 7.874;
00066   fRoAl=MinosMaterial::Density(fStdMatAl);//Was 2.70;
00067   fRoScTiO2=MinosMaterial::Density(fStdMatScTiO2);//Was 1.06;
00068   fRoSc=MinosMaterial::Density(fStdMatSc);//Was 1.06;
00069 
00070   //get new materials
00071   fFe=new Material(fStdMatFe);
00072   fAl=new Material(fStdMatAl);
00073   fSc=new Material(fStdMatSc);
00074   
00075   //get new energyLoss objects
00076   fIonFe=new MuEnergyLoss(*fFe,fModelSelector);
00077   fIonAl=new MuEnergyLoss(*fAl,fModelSelector);
00078   fIonSc=new MuEnergyLoss(*fSc,fModelSelector);
00079   fIonScTiO2=new MuEnergyLoss(*fSc,fModelSelector);//assume Scint
00080 
00081   MSG("CDSimpleMC",Msg::kDebug)
00082     <<"Finished CDSimpleMC Constructor"<<endl;
00083 }

CDSimpleMC::~CDSimpleMC (  ) 

Definition at line 87 of file CDSimpleMC.cxx.

References fAl, fFe, fIonAl, fIonFe, fIonSc, fIonScTiO2, fSc, Msg::kDebug, and MSG.

00088 {
00089   MSG("CDSimpleMC",Msg::kDebug)
00090       <<"Running CDSimpleMC Destructor..."<<endl;
00091 
00092   //clean up...
00093 
00094   //standard materials
00095   if (fFe) delete fFe;
00096   if (fAl) delete fAl;
00097   if (fSc) delete fSc;
00098   
00099   //energyLoss objects
00100   if (fIonFe) delete fIonFe;
00101   if (fIonAl) delete fIonAl;
00102   if (fIonSc) delete fIonSc;
00103   if (fIonScTiO2) delete fIonScTiO2;
00104 }


Member Function Documentation

void CDSimpleMC::CalcPlaneThk (  )  [private]

Definition at line 116 of file CDSimpleMC.cxx.

References fThkAir, fThkAl, fThkFe, fThkPlane, fThkSc, and fThkScTiO2.

Referenced by SetThkFe().

void CDSimpleMC::CalcRatioScToFe (  ) 

Definition at line 200 of file CDSimpleMC.cxx.

References dE_dxIterative(), fEnRatio, fIonFe, fIonSc, fMuMass, fRoFe, fRoSc, fSlices, fThkPlane, fXPlanesRatio, fXRatio, GetParticleEnergy(), Msg::kDebug, and MSG.

Referenced by CDAnalysis::Bb().

00201 {
00202   fEnRatio.clear();
00203   fXRatio.clear();
00204   fXPlanesRatio.clear();
00205 
00206   //get beam energy
00207   Float_t energyRemaining=this->GetParticleEnergy();
00208   Float_t distTravelled=0;
00209   Double_t fractionThrough=0;
00210 
00211   while (energyRemaining>fMuMass){
00212     
00213     MSG("CDAnalysis",Msg::kDebug) 
00214       <<"CalcRatioScToFe: energyRemaining="<<energyRemaining<<endl;
00215     
00217     //calculate the ratio of energy deposited in Fe to Sc
00219     Float_t eFe=dE_dxIterative(*fIonFe,energyRemaining,
00220                                1,fRoFe,fMuMass,fSlices,fractionThrough);
00221     Float_t eSc=dE_dxIterative(*fIonSc,energyRemaining,
00222                                1,fRoSc,fMuMass,fSlices,fractionThrough);
00223 
00224     //jump out of loop if particle has run out of energy
00225     if (energyRemaining-eFe-eSc<fMuMass || 
00226         eFe==-1 || eSc==-1) break;
00227 
00228     fEnRatio.push_back(eFe/eSc);
00229     fXRatio.push_back(distTravelled);
00230     fXPlanesRatio.push_back(distTravelled/fThkPlane);
00231 
00232     energyRemaining-=eFe;
00233     energyRemaining-=eSc;
00234     distTravelled+=fThkPlane;
00235   }
00236 }

Double_t CDSimpleMC::dE_dxIterative ( MuEnergyLoss mat,
Double_t  energyRemaining,
Double_t  totalThk,
Double_t  rho,
Double_t  energyCutOff,
Int_t  slices,
Double_t &  fractionThrough 
) const [private]

calculate energy deposited in material by iterating over small slices and calculating energy remaining at each stage

Definition at line 156 of file CDSimpleMC.cxx.

References MuEnergyLoss::dE_dx(), fELossProcess, Msg::kDebug, and MSG.

Referenced by CalcRatioScToFe(), and RunMC().

00163 {
00166 
00167   Double_t totalEnergyDeposited=0;
00168   Double_t sliceThk=totalThk/slices;
00169 
00170   //set the fractionThrough to 0 as default
00171   //then you can always add the fraction through to the plane
00172   fractionThrough=0;
00173 
00174   for (Int_t s=0;s<slices;s++){
00175 
00176     if (energyRemaining<energyCutOff){
00177       //calc fractionThrough material
00178       fractionThrough=s*sliceThk/totalThk;
00179 
00180       MSG("CDSimpleMC",Msg::kDebug) 
00181         <<"All energy lost at slice "<<s+1<<"/"<<slices
00182         <<" ("<<100.*fractionThrough<<"% through material)"<<endl;
00183       return -1;
00184     }
00185 
00186     //calculate energy deposited in the slice
00187     Double_t energyDeposited=mat.dE_dx
00188       (energyRemaining,fELossProcess)*rho*sliceThk;
00189     totalEnergyDeposited+=energyDeposited;
00190 
00191     //increment the energy remaining
00192     energyRemaining-=energyDeposited;
00193   }
00194   
00195   return totalEnergyDeposited;
00196 }

Double_t CDSimpleMC::GetParticleEnergy (  )  const

Definition at line 123 of file CDSimpleMC.cxx.

References fMuMass, and fParticleMomentum.

Referenced by CDAnalysis::BbEnVsRange(), CalcRatioScToFe(), and RunMC().

00124 {
00125   //convert momentum to energy
00126   return sqrt(fParticleMomentum*fParticleMomentum+fMuMass*fMuMass);
00127 }

Double_t CDSimpleMC::GetThkFe (  )  [inline]

Definition at line 43 of file CDSimpleMC.h.

References fThkFe.

Referenced by CDAnalysis::BbThkFeVsRange().

00043 {return fThkFe;}

Double_t CDSimpleMC::GetTotalNumScPlanesHit (  )  [inline]
Double_t CDSimpleMC::GetTotalScEnLoss (  )  [inline]

Definition at line 45 of file CDSimpleMC.h.

References fTotalScEnLoss.

Referenced by CDAnalysis::BbEnVsRange().

00045 {return fTotalScEnLoss;}

void CDSimpleMC::PrintDensities (  )  const

Definition at line 131 of file CDSimpleMC.cxx.

References fRoAl, fRoFe, fRoSc, fRoScTiO2, Msg::kInfo, and MSG.

Referenced by RunMC().

00132 {
00133   MSG("CDSimpleMC",Msg::kInfo)
00134     <<"Densities: Fe="<<fRoFe
00135     <<", Al="<<fRoAl
00136     <<", Sc="<<fRoSc
00137     <<", ScTiO2="<<fRoScTiO2<<endl;
00138 }

void CDSimpleMC::PrintThicknesses (  )  const

Definition at line 142 of file CDSimpleMC.cxx.

References fThkAir, fThkAl, fThkFe, fThkPlane, fThkSc, fThkScTiO2, Msg::kInfo, and MSG.

Referenced by RunMC().

00143 {
00144   MSG("CDSimpleMC",Msg::kInfo)
00145     <<"Thicknesses: Fe="<<fThkFe
00146     <<", Al="<<fThkAl
00147     <<", Sc="<<fThkSc
00148     <<", ScTiO2="<<fThkScTiO2
00149     <<", Air="<<fThkAir
00150     <<", Plane="<<fThkPlane
00151     <<endl;
00152 }

void CDSimpleMC::RunMC (  ) 

Definition at line 240 of file CDSimpleMC.cxx.

References MuEnergyLoss::dE_dx(), dE_dxIterative(), fdE_dxAl, fdE_dxFe, fdE_dxSc, fELossProcess, fEn, fEnAlDeposited, fEnAlx2Deposited, fEnDeposited, fEnDepositedPl, fEnFeDeposited, fEnNotScDeposited, fEnSc, fEnScDeposited, fEnScTiO2Deposited, fEnTiO2x2Deposited, fIonAl, fIonFe, fIonSc, fIonScTiO2, fMom, fMomGeV, fMomSc, fMomScGeV, fMuMass, fParticleMomentum, fRoAl, fRoFe, fRoSc, fRoScTiO2, fSlices, fThkAir, fThkAl, fThkFe, fThkPlane, fThkSc, fThkScTiO2, fTotalNumScPlanesHit, fTotalScEnLoss, fX, fXAl, fXAlPlanes, fXAlx2, fXFe, fXFePlanes, fXNotSc, fXNotScPlanes, fXPlanes, fXSc, fXScPlanes, fXScTiO2, fXScTiO2Planes, fXTiO2x2, GetParticleEnergy(), Msg::kDebug, Msg::kInfo, MAXMSG, MSG, PrintDensities(), and PrintThicknesses().

Referenced by CDAnalysis::Bb(), CDAnalysis::BbEnVsRange(), CDAnalysis::BbThkFeVsRange(), and CDAnalysis::BbVsGminos().

00241 {
00242   //clear all the vectors so this can be used in a loop
00243   fEn.clear();
00244   fMom.clear();
00245   fdE_dxFe.clear();
00246   fdE_dxAl.clear();
00247   fdE_dxSc.clear();
00248 
00249   fEnDeposited.clear();
00250   fX.clear();
00251   fXPlanes.clear();
00252 
00253   fEnFeDeposited.clear();
00254   fXFe.clear();
00255   fXFePlanes.clear();
00256 
00257   fEnAlDeposited.clear();
00258   fXAl.clear();
00259   fXAlPlanes.clear();
00260 
00261   fEnScTiO2Deposited.clear();
00262   fXScTiO2.clear();
00263   fXScTiO2Planes.clear();
00264 
00265   fEnNotScDeposited.clear();
00266   fXNotSc.clear();
00267   fXNotScPlanes.clear();
00268 
00269   fEnScDeposited.clear();
00270   fEnSc.clear();
00271   fMomSc.clear();
00272   fXSc.clear();
00273   fXScPlanes.clear();
00274 
00275   fEnDepositedPl.clear();
00276 
00277   //print out useful info
00278   MSG("CDSimpleMC",Msg::kInfo)
00279     <<"This run of the simple MC is configured with the following:"
00280     <<endl
00281     <<"Initial particle momentum="<<fParticleMomentum<<endl;
00282   this->PrintDensities();
00283   this->PrintThicknesses();
00284 
00285   //get beam energy
00286   Float_t energyRemaining=this->GetParticleEnergy();
00287   Float_t distTravelled=0.001;//cm
00288   Float_t sumScEnLoss=0;
00289   Int_t plCounter=0;
00290   Double_t fractionThrough=0;
00291   Double_t fractionThroughFe=0;
00292 
00293   //calcuate the dE/dx
00294   for (Float_t energy=107;energy<energyRemaining;energy+=30){
00295     fEn.push_back(energy);
00296     Double_t mom=sqrt(pow(energy,2)-pow(fMuMass,2));
00297     MAXMSG("CDSimpleMC",Msg::kDebug,100) 
00298       <<"energy="<<energy<<", mom="<<mom<<endl;
00299     fMom.push_back(mom);
00300     fMomGeV.push_back(mom/1000);
00301     fdE_dxFe.push_back(fIonFe->dE_dx(energy,fELossProcess));
00302     fdE_dxAl.push_back(fIonAl->dE_dx(energy,fELossProcess));
00303     fdE_dxSc.push_back(fIonSc->dE_dx(energy,fELossProcess));
00304   }
00305 
00306   //loop over the particle energy until it has no kinetic energy left
00307   while (energyRemaining>fMuMass){
00308 
00309     MSG("CDSimpleMC",Msg::kDebug) 
00310       <<"energyRemaining="<<energyRemaining<<endl;
00311 
00313     //calculate the energy deposited
00314     //iterate energy remaining at each stage
00316 
00317     //variables to store the sum of the energy dep in aluminium
00318     Double_t alx2En=0;
00319     Double_t alx2X=0;
00320     Double_t tiO2x2En=0;
00321     Double_t tiO2x2X=0;
00322 
00323     //***************************
00324     //calc energy deposited in 1st Al module skin
00325     //***************************
00326     Double_t energyDeposited=dE_dxIterative(*fIonAl,energyRemaining,
00327                                             fThkAl,fRoAl,fMuMass,fSlices,
00328                                             fractionThrough);
00329     MSG("CDSimpleMC",Msg::kDebug) 
00330       <<"1st Al ELoss: "<<energyDeposited
00331       <<" ("<<energyRemaining<<")"<<endl;
00332 
00333     if (energyRemaining-energyDeposited<fMuMass || 
00334         energyDeposited==-1) break;
00335 
00336     //get the first al energy deposit
00337     alx2En+=energyDeposited;
00338     alx2X+=distTravelled;
00339 
00340     fEnDeposited.push_back(energyDeposited);
00341     fX.push_back(distTravelled);
00342     fXPlanes.push_back(distTravelled/fThkPlane);
00343     fEnAlDeposited.push_back(energyDeposited);
00344     fXAl.push_back(distTravelled);
00345     fXAlPlanes.push_back(distTravelled/fThkPlane);
00346     fEnDepositedPl.push_back(energyDeposited);
00347     vector<Double_t>::iterator enDepositedPlIter=fEnDepositedPl.end()-1;
00348 
00349     //increment the distance travelled
00350     distTravelled+=fThkAl;
00351     Double_t plEnergyDeposited=energyDeposited;
00352     energyRemaining-=energyDeposited;
00353 
00354     //***************************
00355     //calc energy deposited in 1st TiO2 reflective layer
00356     //***************************
00357     energyDeposited=dE_dxIterative(*fIonScTiO2,energyRemaining,
00358                                    fThkScTiO2,fRoScTiO2,fMuMass,fSlices,
00359                                    fractionThrough);
00360     MSG("CDSimpleMC",Msg::kDebug) 
00361       <<"1st ScTiO2 ELoss: "<<energyDeposited
00362       <<" ("<<energyRemaining<<")"<<endl;
00363 
00364     if (energyRemaining-energyDeposited<fMuMass || 
00365         energyDeposited==-1) break;
00366 
00367     //get the first TiO2 energy deposit
00368     tiO2x2En+=energyDeposited;
00369     tiO2x2X+=distTravelled;
00370 
00371     fEnDeposited.push_back(energyDeposited);
00372     fX.push_back(distTravelled);
00373     fXPlanes.push_back(distTravelled/fThkPlane);
00374     fEnScTiO2Deposited.push_back(energyDeposited);
00375     fXScTiO2.push_back(distTravelled);
00376     fXScTiO2Planes.push_back(distTravelled/fThkPlane);
00377     *enDepositedPlIter+=energyDeposited;
00378 
00379     //increment the distance travelled
00380     distTravelled+=fThkScTiO2;
00381     plEnergyDeposited+=energyDeposited;
00382     energyRemaining-=energyDeposited;
00383 
00384     //***************************
00385     //calc energy deposited in Sc
00386     //***************************
00387     energyDeposited=dE_dxIterative(*fIonSc,energyRemaining,
00388                                    fThkSc,fRoSc,fMuMass,fSlices,
00389                                    fractionThrough);
00390     MSG("CDSimpleMC",Msg::kDebug) 
00391       <<"Sc ELoss: "<<energyDeposited<<" ("<<energyRemaining<<")"<<endl;
00392 
00393     //count the planes here since it is active planes that matter
00394     //the particle could have only just penetrated the Scint but
00395     //that will probably be rare
00396     plCounter++;
00397 
00398     if (energyRemaining-energyDeposited<fMuMass || 
00399         energyDeposited==-1) break;
00400 
00401     fEnDeposited.push_back(energyDeposited);
00402     fX.push_back(distTravelled);
00403     fXPlanes.push_back(distTravelled/fThkPlane);
00404     fEnScDeposited.push_back(energyDeposited);
00405     fEnSc.push_back(energyRemaining);
00406     Double_t momemtum=sqrt(pow(energyRemaining,2)-pow(fMuMass,2));
00407     fMomSc.push_back(momemtum);
00408     fMomScGeV.push_back(momemtum/1000);
00409     fXSc.push_back(distTravelled);
00410     fXScPlanes.push_back(distTravelled/fThkPlane);
00411     *enDepositedPlIter+=energyDeposited;
00412 
00413     //increment the distance travelled
00414     distTravelled+=fThkSc;
00415     //plEnergyDeposited+=energyDeposited;//not Sc
00416     energyRemaining-=energyDeposited;
00417     //keep running total of energy lost in Scint
00418     sumScEnLoss+=energyDeposited;
00419 
00420     //***************************
00421     //calc energy deposited in 2nd TiO2 reflective layer
00422     //***************************
00423     energyDeposited=dE_dxIterative(*fIonScTiO2,energyRemaining,
00424                                    fThkScTiO2,fRoScTiO2,fMuMass,fSlices,
00425                                    fractionThrough);
00426     MSG("CDSimpleMC",Msg::kDebug) 
00427       <<"2nd ScTiO2 ELoss: "<<energyDeposited
00428       <<" ("<<energyRemaining<<")"<<endl;
00429 
00430     if (energyRemaining-energyDeposited<fMuMass || 
00431         energyDeposited==-1) break;
00432 
00433     //get the second TiO2 energy deposit
00434     tiO2x2En+=energyDeposited;
00435     tiO2x2X+=distTravelled;
00436     tiO2x2X/=2;//divide the distance by 2 to get the average
00437     fEnTiO2x2Deposited.push_back(tiO2x2En);
00438     fXTiO2x2.push_back(tiO2x2X);
00439 
00440     fEnDeposited.push_back(energyDeposited);
00441     fX.push_back(distTravelled);
00442     fXPlanes.push_back(distTravelled/fThkPlane);
00443     fEnScTiO2Deposited.push_back(energyDeposited);
00444     fXScTiO2.push_back(distTravelled);
00445     fXScTiO2Planes.push_back(distTravelled/fThkPlane);
00446     *enDepositedPlIter+=energyDeposited;
00447 
00448     //increment the distance travelled
00449     distTravelled+=fThkScTiO2;
00450     plEnergyDeposited+=energyDeposited;
00451     energyRemaining-=energyDeposited;
00452 
00453     //***************************
00454     //calc energy deposited in 2nd Al module skin
00455     //***************************
00456     energyDeposited=dE_dxIterative(*fIonAl,energyRemaining,
00457                                    fThkAl,fRoAl,fMuMass,fSlices,
00458                                    fractionThrough);
00459     MSG("CDSimpleMC",Msg::kDebug) 
00460       <<"2nd Al ELoss: "<<energyDeposited
00461       <<" ("<<energyRemaining<<")"<<endl;
00462 
00463     if (energyRemaining-energyDeposited<fMuMass || 
00464         energyDeposited==-1) break;
00465 
00466     //get the second al energy deposit
00467     alx2En+=energyDeposited;
00468     alx2X+=distTravelled;
00469     alx2X/=2;//divide the distance by 2 to get the average
00470     fEnAlx2Deposited.push_back(alx2En);
00471     fXAlx2.push_back(alx2X);
00472 
00473     fEnDeposited.push_back(energyDeposited);
00474     fX.push_back(distTravelled);
00475     fXPlanes.push_back(distTravelled/fThkPlane);
00476     fEnAlDeposited.push_back(energyDeposited);
00477     fXAl.push_back(distTravelled);
00478     fXAlPlanes.push_back(distTravelled/fThkPlane);
00479     *enDepositedPlIter+=energyDeposited;
00480 
00481     //increment the distance travelled
00482     distTravelled+=fThkAl;
00483     plEnergyDeposited+=energyDeposited;
00484     energyRemaining-=energyDeposited;
00485 
00486     //***************************
00487     //calc energy deposited in Fe
00488     //***************************
00489     energyDeposited=dE_dxIterative(*fIonFe,energyRemaining,
00490                                    fThkFe,fRoFe,fMuMass,fSlices,
00491                                    fractionThrough);
00492     MSG("CDSimpleMC",Msg::kDebug) 
00493       <<"Fe ELoss: "<<energyDeposited<<" ("<<energyRemaining<<")"<<endl;
00494 
00495     //set the fractionThrough Fe variable
00496     fractionThroughFe=fractionThrough;
00497 
00498     if (energyRemaining-energyDeposited<fMuMass || 
00499         energyDeposited==-1) break;
00500 
00501     fEnDeposited.push_back(energyDeposited);
00502     fX.push_back(distTravelled);
00503     fXPlanes.push_back(distTravelled/fThkPlane);
00504     fEnFeDeposited.push_back(energyDeposited);
00505     fXFe.push_back(distTravelled);
00506     fXFePlanes.push_back(distTravelled/fThkPlane);
00507     *enDepositedPlIter+=energyDeposited;//sum energy in plane
00508 
00509     //increment the distance travelled and energy remaining
00510     distTravelled+=fThkFe;
00511     plEnergyDeposited+=energyDeposited;
00512     energyRemaining-=energyDeposited;
00513 
00514     //calc energy deposited in Air
00515     energyDeposited=0;
00516     //eDeposited.push_back(energyDeposited);
00517     //x.push_back(distTravelled);
00518     //xPlanes.push_back(distTravelled/fThkPlane);
00519     //*eDepositedPlIter+=energyDeposited;//sum energy in plane
00520 
00521     //increment the distance travelled
00522     distTravelled+=fThkAir;
00523     energyRemaining-=energyDeposited;
00524 
00525     //add the not scint energy to its vector
00526     fEnNotScDeposited.push_back(plEnergyDeposited);
00527     fXNotSc.push_back(distTravelled);
00528     fXNotScPlanes.push_back(distTravelled/fThkPlane-1);//1st time=pl 0
00529   }
00530 
00531   //set the data members
00532   fTotalScEnLoss=sumScEnLoss;
00533   //add on the fractionThrough Fe to the last plane
00534   //this is not 100% right but close enough since Sc/Fe=2/30
00535   fTotalNumScPlanesHit=plCounter+fractionThroughFe;
00536 
00537 }

void CDSimpleMC::SetParticleMomentum ( Double_t  pMom  )  [inline]

Definition at line 39 of file CDSimpleMC.h.

References fParticleMomentum.

Referenced by CDAnalysis::Bb(), and CDAnalysis::BbEnVsRange().

00039 {fParticleMomentum=pMom;}

void CDSimpleMC::SetThkFe ( Double_t  thkFe  ) 

Definition at line 108 of file CDSimpleMC.cxx.

References CalcPlaneThk(), and fThkFe.

Referenced by CDAnalysis::Bb(), and CDAnalysis::BbThkFeVsRange().

00109 {
00110   fThkFe=thkFe;
00111   this->CalcPlaneThk();
00112 }


Member Data Documentation

Definition at line 143 of file CDSimpleMC.h.

Referenced by ~CDSimpleMC().

std::vector<Double_t> CDSimpleMC::fdE_dxAl

Definition at line 55 of file CDSimpleMC.h.

Referenced by RunMC().

std::vector<Double_t> CDSimpleMC::fdE_dxFe

Definition at line 54 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), CDAnalysis::BbVsGminos(), and RunMC().

std::vector<Double_t> CDSimpleMC::fdE_dxSc

Definition at line 56 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), and RunMC().

Definition at line 123 of file CDSimpleMC.h.

Referenced by dE_dxIterative(), and RunMC().

std::vector<Double_t> CDSimpleMC::fEn

Definition at line 51 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), CDAnalysis::BbVsGminos(), and RunMC().

std::vector<Double_t> CDSimpleMC::fEnAlDeposited

Definition at line 66 of file CDSimpleMC.h.

Referenced by RunMC().

std::vector<Double_t> CDSimpleMC::fEnAlx2Deposited

Definition at line 94 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), and RunMC().

std::vector<Double_t> CDSimpleMC::fEnDeposited

Definition at line 58 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), CDAnalysis::BbVsGminos(), and RunMC().

std::vector<Double_t> CDSimpleMC::fEnDepositedPl

Definition at line 85 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), CDAnalysis::BbVsGminos(), and RunMC().

std::vector<Double_t> CDSimpleMC::fEnFeDeposited

Definition at line 62 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), CDAnalysis::BbVsGminos(), and RunMC().

std::vector<Double_t> CDSimpleMC::fEnNotScDeposited

Definition at line 74 of file CDSimpleMC.h.

Referenced by CDAnalysis::BbVsGminos(), and RunMC().

std::vector<Double_t> CDSimpleMC::fEnRatio

Definition at line 87 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), and CalcRatioScToFe().

std::vector<Double_t> CDSimpleMC::fEnSc

Definition at line 79 of file CDSimpleMC.h.

Referenced by RunMC().

std::vector<Double_t> CDSimpleMC::fEnScDeposited

Definition at line 78 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), CDAnalysis::BbVsGminos(), and RunMC().

std::vector<Double_t> CDSimpleMC::fEnScTiO2Deposited

Definition at line 70 of file CDSimpleMC.h.

Referenced by RunMC().

std::vector<Double_t> CDSimpleMC::fEnTiO2x2Deposited

Definition at line 92 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), and RunMC().

Definition at line 142 of file CDSimpleMC.h.

Referenced by ~CDSimpleMC().

Definition at line 148 of file CDSimpleMC.h.

Referenced by RunMC(), and ~CDSimpleMC().

Definition at line 147 of file CDSimpleMC.h.

Referenced by CalcRatioScToFe(), RunMC(), and ~CDSimpleMC().

Definition at line 149 of file CDSimpleMC.h.

Referenced by CalcRatioScToFe(), RunMC(), and ~CDSimpleMC().

Definition at line 150 of file CDSimpleMC.h.

Referenced by RunMC(), and ~CDSimpleMC().

Definition at line 153 of file CDSimpleMC.h.

std::vector<Double_t> CDSimpleMC::fMom

Definition at line 52 of file CDSimpleMC.h.

Referenced by RunMC().

std::vector<Double_t> CDSimpleMC::fMomGeV

Definition at line 53 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), and RunMC().

std::vector<Double_t> CDSimpleMC::fMomSc

Definition at line 80 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), and RunMC().

std::vector<Double_t> CDSimpleMC::fMomScGeV

Definition at line 81 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), and RunMC().

Float_t CDSimpleMC::fMuMass [private]

Definition at line 131 of file CDSimpleMC.h.

Referenced by CalcRatioScToFe(), GetParticleEnergy(), and RunMC().

Double_t CDSimpleMC::fParticleMomentum [private]

Definition at line 111 of file CDSimpleMC.h.

Referenced by GetParticleEnergy(), RunMC(), and SetParticleMomentum().

Float_t CDSimpleMC::fRoAl [private]

Definition at line 127 of file CDSimpleMC.h.

Referenced by PrintDensities(), and RunMC().

Float_t CDSimpleMC::fRoFe [private]

Definition at line 126 of file CDSimpleMC.h.

Referenced by CalcRatioScToFe(), PrintDensities(), and RunMC().

Float_t CDSimpleMC::fRoSc [private]

Definition at line 129 of file CDSimpleMC.h.

Referenced by CalcRatioScToFe(), PrintDensities(), and RunMC().

Float_t CDSimpleMC::fRoScTiO2 [private]

Definition at line 128 of file CDSimpleMC.h.

Referenced by PrintDensities(), and RunMC().

std::string CDSimpleMC::fS [private]

Definition at line 114 of file CDSimpleMC.h.

Definition at line 144 of file CDSimpleMC.h.

Referenced by ~CDSimpleMC().

Int_t CDSimpleMC::fSlices [private]

Definition at line 152 of file CDSimpleMC.h.

Referenced by CalcRatioScToFe(), and RunMC().

Definition at line 118 of file CDSimpleMC.h.

Definition at line 117 of file CDSimpleMC.h.

Definition at line 119 of file CDSimpleMC.h.

Definition at line 120 of file CDSimpleMC.h.

Float_t CDSimpleMC::fThkAir [private]

Definition at line 138 of file CDSimpleMC.h.

Referenced by CalcPlaneThk(), PrintThicknesses(), and RunMC().

Float_t CDSimpleMC::fThkAl [private]

Definition at line 135 of file CDSimpleMC.h.

Referenced by CalcPlaneThk(), PrintThicknesses(), and RunMC().

Float_t CDSimpleMC::fThkFe [private]

Definition at line 134 of file CDSimpleMC.h.

Referenced by CalcPlaneThk(), GetThkFe(), PrintThicknesses(), RunMC(), and SetThkFe().

Float_t CDSimpleMC::fThkPlane [private]

Definition at line 139 of file CDSimpleMC.h.

Referenced by CalcPlaneThk(), CalcRatioScToFe(), PrintThicknesses(), and RunMC().

Float_t CDSimpleMC::fThkSc [private]

Definition at line 136 of file CDSimpleMC.h.

Referenced by CalcPlaneThk(), PrintThicknesses(), and RunMC().

Float_t CDSimpleMC::fThkScTiO2 [private]

Definition at line 137 of file CDSimpleMC.h.

Referenced by CalcPlaneThk(), PrintThicknesses(), and RunMC().

Definition at line 113 of file CDSimpleMC.h.

Referenced by GetTotalNumScPlanesHit(), and RunMC().

Double_t CDSimpleMC::fTotalScEnLoss [private]

Definition at line 112 of file CDSimpleMC.h.

Referenced by GetTotalScEnLoss(), and RunMC().

std::vector<Double_t> CDSimpleMC::fX

Definition at line 59 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), CDAnalysis::BbVsGminos(), and RunMC().

std::vector<Double_t> CDSimpleMC::fXAl

Definition at line 67 of file CDSimpleMC.h.

Referenced by RunMC().

std::vector<Double_t> CDSimpleMC::fXAlPlanes

Definition at line 68 of file CDSimpleMC.h.

Referenced by RunMC().

std::vector<Double_t> CDSimpleMC::fXAlx2

Definition at line 95 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), and RunMC().

std::vector<Double_t> CDSimpleMC::fXFe

Definition at line 63 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), and RunMC().

std::vector<Double_t> CDSimpleMC::fXFePlanes

Definition at line 64 of file CDSimpleMC.h.

Referenced by CDAnalysis::BbVsGminos(), and RunMC().

std::vector<Double_t> CDSimpleMC::fXNotSc

Definition at line 75 of file CDSimpleMC.h.

Referenced by RunMC().

std::vector<Double_t> CDSimpleMC::fXNotScPlanes

Definition at line 76 of file CDSimpleMC.h.

Referenced by CDAnalysis::BbVsGminos(), and RunMC().

std::vector<Double_t> CDSimpleMC::fXPlanes

Definition at line 60 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), CDAnalysis::BbVsGminos(), and RunMC().

std::vector<Double_t> CDSimpleMC::fXPlanesRatio

Definition at line 89 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), and CalcRatioScToFe().

std::vector<Double_t> CDSimpleMC::fXRatio

Definition at line 88 of file CDSimpleMC.h.

Referenced by CalcRatioScToFe().

std::vector<Double_t> CDSimpleMC::fXSc

Definition at line 82 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), and RunMC().

std::vector<Double_t> CDSimpleMC::fXScPlanes

Definition at line 83 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), CDAnalysis::BbVsGminos(), and RunMC().

std::vector<Double_t> CDSimpleMC::fXScTiO2

Definition at line 71 of file CDSimpleMC.h.

Referenced by RunMC().

std::vector<Double_t> CDSimpleMC::fXScTiO2Planes

Definition at line 72 of file CDSimpleMC.h.

Referenced by RunMC().

std::vector<Double_t> CDSimpleMC::fXTiO2x2

Definition at line 93 of file CDSimpleMC.h.

Referenced by CDAnalysis::Bb(), and RunMC().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1