HighLAND
Classes | Typedefs | Enumerations | Functions | Variables
si_syst Namespace Reference

Classes

class  ParticleHistory
 
class  ParticleSIManager
 Manager. More...
 
class  ParticleSIPropagator
 
struct  ParticleState
 A simple structure to represent a state object: position, direction, momentum, charge. More...
 
class  SISystInput
 A simple class to provide the data for the systematic itself: a collection of particles with the relevant history. More...
 
struct  SIXSecData
 A simple structure to repesent a pair: xsection value and its uncertainty. More...
 

Typedefs

typedef std::vector< std::pair< AnaTrueParticleB *, std::vector< AnaTrueParticleB * > > > ParentsAndDaughters
 Basic structures to be able to associate a track with its "relatives".
 
typedef std::vector< std::pair< AnaTrueParticleB *, std::vector< AnaTrueParticleB * > > >::iterator ParentsAndDaughtersIt
 

Enumerations

enum  InteractionType { kNoInteraction = 0, kElastic, kInelastic }
 Enums. More...
 
enum  MaterialEnum {
  kCarbon = 0, kOxygen, kAluminium, kIron,
  kAlG10, kWaterSystem, kG10, kFGDGlue,
  kG10Roha, kCounter
}
 

Functions

Double_t GetZoverAMaterial (TGeoNode *)
 
Double_t GetIMaterial (TGeoNode *node)
 
Double_t GetIElement (Int_t Z)
 
MaterialEnum GetMaterialEnum (const std::string &)
 Get the material enum given a material name.
 
Double_t BetheBloch (const ParticleState &)
 
Double_t BetheBloch (const ParticleState &, TGeoNode *)
 
void TakeSmallStep (ParticleState &, const Double_t &)
 Propagate a state in a small step.
 
void TakeSmallStep (ParticleState &, const Double_t &, TGeoNode *)
 

Variables

const TVector3 field = TVector3(0.2, 0., 0.)
 Constants. More...
 
const Double_t K = 0.307075
 Bethe-Bloch constants.
 

Detailed Description

A general class to do various business related to secondary interactions: retrieve particles of intereset and

Enumeration Type Documentation

§ InteractionType

Enums.

Interaction types, keep a wide list here, one can add what needed

Definition at line 45 of file SecondaryInteractionSystematic.hxx.

45  {
46  kNoInteraction = 0, // particle does not interact in the volume of interest
47  kElastic,
48  kInelastic
49  };

§ MaterialEnum

Enumerate various materials of interest Will be moved to secondary interactions syst...

Definition at line 54 of file SecondaryInteractionSystematic.hxx.

54  {
55  kCarbon = 0, // probably better to use exact Z values, but want to be able to do simple loops etc
56  kOxygen,
57  kAluminium,
58  kIron,
59  kAlG10,
60  kWaterSystem,
61  kG10,
62  kFGDGlue,
63  kG10Roha,
64  kCounter
65  };

Function Documentation

§ BetheBloch() [1/2]

Double_t si_syst::BetheBloch ( const ParticleState )

Propagation Bethe-Bloch dEdX given particle state + TGeoNode (the particle is currently crossing) to specify material properties

§ BetheBloch() [2/2]

Double_t si_syst::BetheBloch ( const ParticleState state,
TGeoNode *  node 
)

Bethe-Bloch dEdX given particle state + TGeoNode (the particle is currently crossing) to specify material properties this is not to read the node if already avaiable

Definition at line 184 of file SecondaryInteractionSystematic.cxx.

184  {
185  //********************************************************************
186 
187 
188  TGeoVolume *volume = node->GetVolume();
189  TGeoMaterial *material = volume->GetMaterial();
190 
191  // Now, set up the values that we need for the dEdX
192  Double_t betagamma = state.Momentum/state.Mass;
193  Double_t energy = sqrt(state.Momentum*state.Momentum + state.Mass*state.Mass);
194  Double_t beta = state.Momentum/energy;
195  Double_t gamma = betagamma/beta;
196  Double_t T_max = (2*units::mass_electron*pow(betagamma,2))/(1 + 2*gamma*(units::mass_electron/state.Mass) + pow(units::mass_electron/state.Mass,2));
197 
198  // Potential
199  Double_t I = GetIMaterial(node)*(1E-6); //Make sure to convert to MeV!
200 
201  // The conversion factor converts the density stored in the geometry to g/cm^3
202  Double_t rho = (1000.0/(6.2415e21))*(material->GetDensity());
203 
204  Double_t ZoverA = si_syst::GetZoverAMaterial(node);
205  //0.1 to convert to mm
206  return 0.1*rho*K*1.*(ZoverA)*(1/pow(beta,2))*((1.0/2.0)*log(2*units::mass_electron*pow(betagamma,2)*T_max/pow(I,2)) - pow(beta,2));
207 
208 }
const Double_t K
Bethe-Bloch constants.
Double_t GetZoverAMaterial(TGeoNode *)

§ GetIElement()

Double_t si_syst::GetIElement ( Int_t  Z)

Takes in an atomic number and returns the Mean Ionization Potential for that element, from http://physics.nist.gov/PhysRefData/XrayMassCoef/tab1.html Only filled for elements present in ND280UserDetectorConstruction.cc Uses units of eV. Must be converted to MeV later.

Definition at line 74 of file SecondaryInteractionSystematic.cxx.

74  {
75  //********************************************************************
76  switch(Z){
77  case 1: //Hydrogen
78  return 19.2;
79  case 5: //Boron
80  return 76.0;
81  case 6: //Carbon
82  return 78.0;
83  case 7: //Nitrogen
84  return 82.0;
85  case 8: //Oxygen
86  return 95.0;
87  case 9: //Fluorine
88  return 115.0;
89  case 11: //Sodium
90  return 149.0;
91  case 13: //Aluminum
92  return 166.0;
93  case 14: //Silicon
94  return 173.0;
95  case 17: //Chlorine
96  return 174.0;
97  case 18: //Argon
98  return 188.0;
99  case 22: //Titanium
100  return 233.0;
101  case 26: //Iron
102  return 286.0;
103  case 27: //Cobalt
104  return 297.0;
105  case 29: //Copper
106  return 322.0;
107  case 30: //Zinc
108  return 330.0;
109  case 50: //Tin
110  return 488.0;
111  case 82: //Lead
112  return 823.0;
113  default: //If unrecognized, just assume FGD scintillator.
114  return 68.7;
115  }
116 }

§ GetIMaterial()

Double_t si_syst::GetIMaterial ( TGeoNode *  node)

Calculates the effective mean excitation energy for Equation taken from Leo p.29. Material properties retrieved from node

Definition at line 149 of file SecondaryInteractionSystematic.cxx.

149  {
150  //********************************************************************
151 
152  TGeoVolume *volume = node->GetVolume();
153  TGeoMaterial *material = volume->GetMaterial();
154  TGeoMixture *mixture = (TGeoMixture*)material;
155 
156  Double_t ZoverA = GetZoverAMaterial(node);
157 
158  Double_t lnI = 0;
159 
160  //Get the number of elements
161  Int_t NElements = mixture->GetNelements();
162 
163  //Get the Z values for the material constituents.
164  Double_t* Zmixt = mixture->GetZmixt();
165 
166  //Get the A values for the material constituents.
167  Double_t* Amixt = mixture->GetAmixt();
168 
169  //Get the weight by mass of the elements.
170  Double_t* Wmixt = mixture->GetWmixt();
171 
172  //lnIeff = sum(w_i*(Z_i/A_i)*lnI_i)/(Z/A)
173  for(Int_t i = 0; i < NElements; i++){
174 
175  lnI += (Wmixt[i]*(Zmixt[i]/Amixt[i])*log(GetIElement((Int_t)Zmixt[i])))/ZoverA;
176  }
177 
178  return exp(lnI);
179 }

§ GetZoverAMaterial()

Double_t si_syst::GetZoverAMaterial ( TGeoNode *  node)

General kinematics methods ZoverA, material properties retrieved from node

Definition at line 119 of file SecondaryInteractionSystematic.cxx.

119  {
120  //********************************************************************
121  TGeoVolume *volume = node->GetVolume();
122  TGeoMaterial *material = volume->GetMaterial();
123  TGeoMixture *mixture = (TGeoMixture*)material;
124 
125  Double_t ZoverA = 0;
126 
127  // Get the number of elements
128  Int_t NElements = mixture->GetNelements();
129 
130  // Get the Z values for the material constituents.
131  Double_t* Zmixt = mixture->GetZmixt();
132 
133  // Get the A values for the material constituents.
134  Double_t* Amixt = mixture->GetAmixt();
135 
136  // Get the weight by mass of the elements.
137  Double_t* Wmixt = mixture->GetWmixt();
138 
139  // Compute Z/A
140  for(Int_t i = 0; i < NElements; i++){
141 
142  ZoverA += Wmixt[i]*(Zmixt[i]/Amixt[i]);
143 
144  }
145  return ZoverA;
146 }

§ TakeSmallStep()

void si_syst::TakeSmallStep ( ParticleState state,
const Double_t &  stepLength,
TGeoNode *  node 
)

Propagate a state in a small step provided the node (material properties) and a step this is not to read the node if already avaiable

Definition at line 211 of file SecondaryInteractionSystematic.cxx.

211  {
212  //********************************************************************
213 
214  //Find the initial kinetic energy.
215  Double_t initEkin = anaUtils::ComputeKineticEnergy(state.Momentum, state.Mass);
216 
217  //Find the initial direction at the beginning of the step
218  TVector3 initDir = state.Dir;
219 
220  Double_t p = state.Momentum;
221  Double_t betagamma = p / state.Mass;
222  Double_t beta = p /(initEkin + state.Mass);
223  Double_t gamma = betagamma / beta;
224 
225  Double_t dEdx = BetheBloch(state, node);
226 
227  //Remember, it is dE/dx * length in material * density of material
228  //Used 1.032 g/cm^3, the density of the scintillator bars (from TN-91), as opposed
229  //to the full module density which took into account the G10, glue, and fiber.
230  //Factor of 0.1 to convert the mm tracklength to cm.
231  Double_t finalEkin = initEkin - dEdx*(0.1)*stepLength;
232 
233  if (finalEkin <= 0 ){
234  state.Dir = TVector3(0., 0., 0.);
235  state.Momentum = 0.;
236  return;
237  }
238 
239  //Now, since we're taking small steps, we're assuming that the change in momentum is small, so we'll
240  //just use the initial momentum as the feed through into the helix code.
241  //The velocity of the pion in m/s)
242  //PDG speed of light value: 299 792 458 m/s
243  Double_t c = 299792458;
244  TVector3 initVelocity = beta*c*initDir;
245 
246  //dp/dt = q(v x B), where p = \beta\gamma*mc
247  //1 unit of charge is 1.602176e-19 Coulombs
248  TVector3 dpdt = 1.*(1.602176e-19)*initVelocity.Cross(field);
249 
250  //So the change in momentum is therefore dpdt*dt, where dt = stepLength/initVelocity.Mag()
251  //0.001 converts stepLength from mm to m.
252  Double_t dt = ((0.001*stepLength)/initVelocity.Mag());
253  TVector3 dp = dpdt*dt;
254 
255  //So that we're working all in the same units, use gamma*m*initVelocity to get the initial momentum back
256  //(i.e. p = gamma*m*v)
257  //Convert m_pi from MeV/c^2 to kg with factor of 1.782662e-30
258  TVector3 pFinal = gamma*state.Mass*(1.782662e-30)*initVelocity + dp;
259 
260  //Now we know the final momentum in kg*m/s. The Lorentz force only changes the direction and not the
261  //magnitude of the momentum. So, all we care about is the direction.
262  state.Dir = pFinal*(1/pFinal.Mag());
263 
264  //The final position of a step is going to be
265  //the result of going the step length in the direction of the initial momentum.
266  //The final momentum is going to be the final kinetic energy converted back to a momentum
267  //and in the direction of the final direction.
268  // set new position
269  state.Pos += stepLength*initDir;
270 
271  state.Momentum = sqrt(pow(finalEkin + state.Mass, 2) - pow(state.Mass, 2));
272 
273  return;
274 
275 }
Double_t BetheBloch(const ParticleState &)
Float_t ComputeKineticEnergy(Float_t mom, Float_t mass)
Compute kinetic energy given momentum and mass.

Variable Documentation

§ field

const TVector3 si_syst::field = TVector3(0.2, 0., 0.)

Constants.

The magnetic field is 0.2 T in the x direction –> used for stepping –> keep it general

Definition at line 33 of file SecondaryInteractionSystematic.hxx.