Functions
genie::utils::nnbar_osc Namespace Reference

Functions

string AsString (NNBarOscMode_t ndm)
 
bool IsValidMode (NNBarOscMode_t ndm)
 
int AnnihilatingNucleonPdgCode (NNBarOscMode_t ndm)
 
PDGCodeList DecayProductList (NNBarOscMode_t ndm)
 
GHepStatus_t DecayProductStatus (bool in_nucleus, int pdgc)
 

Function Documentation

int genie::utils::nnbar_osc::AnnihilatingNucleonPdgCode ( NNBarOscMode_t  ndm)

Definition at line 103 of file NNBarOscUtils.cxx.

References genie::kNOnto1pip1pim, genie::kNOnto1pip1pim1o, genie::kNOnto1pip1pim1pi0, genie::kNOnto1pip1pim2pi0, genie::kNOnto1pip1pim3pi0, genie::kNOnto2pi0, genie::kNOnto2pip2pim, genie::kNOnto2pip2pim1pi0, genie::kNOnto2pip2pim2pi0, genie::kNOpto1pip1pi0, genie::kNOpto1pip2pi0, genie::kNOpto1pip3pi0, genie::kNOpto2pip1pim1pi0, genie::kNOpto2pip1pim2o, genie::kNOpto2pip1pim2pi0, genie::kNOpto3pip2pim1pi0, genie::kPdgNeutron, and genie::kPdgProton.

Referenced by genie::NNBarOscPrimaryVtxGenerator::AddInitialState().

104 {
105  // name isn't really accurate any more. instead of decayed nucleon, function
106  // returns what particle the oscillated neutron annihilated with -j
107  switch(ndm) {
108  case (kNOpto1pip1pi0) : return kPdgProton; break;
109  case (kNOpto1pip2pi0) : return kPdgProton; break;
110  case (kNOpto1pip3pi0) : return kPdgProton; break;
111  case (kNOpto2pip1pim1pi0) : return kPdgProton; break;
112  case (kNOpto2pip1pim2pi0) : return kPdgProton; break;
113  case (kNOpto2pip1pim2o) : return kPdgProton; break;
114  case (kNOpto3pip2pim1pi0) : return kPdgProton; break;
115  case (kNOnto1pip1pim) : return kPdgNeutron; break;
116  case (kNOnto2pi0) : return kPdgNeutron; break;
117  case (kNOnto1pip1pim1pi0) : return kPdgNeutron; break;
118  case (kNOnto1pip1pim2pi0) : return kPdgNeutron; break;
119  case (kNOnto1pip1pim3pi0) : return kPdgNeutron; break;
120  case (kNOnto2pip2pim) : return kPdgNeutron; break;
121  case (kNOnto2pip2pim1pi0) : return kPdgNeutron; break;
122  case (kNOnto1pip1pim1o) : return kPdgNeutron; break;
123  case (kNOnto2pip2pim2pi0) : return kPdgNeutron; break;
124  default : return 0; break;
125  }
126  return 0;
127 }
const int kPdgProton
Definition: PDGCodes.h:65
const int kPdgNeutron
Definition: PDGCodes.h:67
string genie::utils::nnbar_osc::AsString ( NNBarOscMode_t  ndm)

Definition at line 29 of file NNBarOscUtils.cxx.

References genie::kNOnto1pip1pim, genie::kNOnto1pip1pim1o, genie::kNOnto1pip1pim1pi0, genie::kNOnto1pip1pim2pi0, genie::kNOnto1pip1pim3pi0, genie::kNOnto2pi0, genie::kNOnto2pip2pim, genie::kNOnto2pip2pim1pi0, genie::kNOnto2pip2pim2pi0, genie::kNOpto1pip1pi0, genie::kNOpto1pip2pi0, genie::kNOpto1pip3pi0, genie::kNOpto2pip1pim1pi0, genie::kNOpto2pip1pim2o, genie::kNOpto2pip1pim2pi0, genie::kNOpto3pip2pim1pi0, and genie::kNORandom.

Referenced by GetCommandLineArgs(), and genie::NNBarOscPrimaryVtxGenerator::ProcessEventRecord().

30 {
31  // this just maps the decay mode integers to string descriptors. replaced. -j
32  switch(ndm) {
33  case (kNORandom) : return "Random mode";
34  break;
35  case (kNOpto1pip1pi0) : return "p + nbar --> pi+ pi0";
36  break;
37  case (kNOpto1pip2pi0) : return "p + nbar --> pi+ 2pi0";
38  break;
39  case (kNOpto1pip3pi0) : return "p + nbar --> pi+ 3pi0";
40  break;
41  case (kNOpto2pip1pim1pi0) : return "p + nbar --> 2pi+ pi- pi0";
42  break;
43  case (kNOpto2pip1pim2pi0) : return "p + nbar --> 2pi+ pi- 2pi0";
44  break;
45  case (kNOpto2pip1pim2o) : return "p + nbar --> 2pi+ pi- 2omega";
46  break;
47  case (kNOpto3pip2pim1pi0) : return "p + nbar --> 3pi+ 2pi- pi0";
48  break;
49  case (kNOnto1pip1pim) : return "n + nbar --> pi+ pi-";
50  break;
51  case (kNOnto2pi0) : return "n + nbar --> 2pi0";
52  break;
53  case (kNOnto1pip1pim1pi0) : return "n + nbar --> pi+ pi- pi0";
54  break;
55  case (kNOnto1pip1pim2pi0) : return "n + nbar --> pi+ pi- 2pi0";
56  break;
57  case (kNOnto1pip1pim3pi0) : return "n + nbar --> pi+ pi- 3pi0";
58  break;
59  case (kNOnto2pip2pim) : return "n + nbar --> 2pi+ 2pi-";
60  break;
61  case (kNOnto2pip2pim1pi0) : return "n + nbar --> 2pi+ 2pi- pi0";
62  break;
63  case (kNOnto1pip1pim1o) : return "n + nbar --> pi+ pi- omega";
64  break;
65  case (kNOnto2pip2pim2pi0) : return "n + nbar --> 2pi+ 2pi- 2pi0";
66  break;
67  default : return "?";
68  break;
69  }
70  return "??";
71 }
PDGCodeList genie::utils::nnbar_osc::DecayProductList ( NNBarOscMode_t  ndm)

Definition at line 129 of file NNBarOscUtils.cxx.

References genie::kNOnto1pip1pim, genie::kNOnto1pip1pim1o, genie::kNOnto1pip1pim1pi0, genie::kNOnto1pip1pim2pi0, genie::kNOnto1pip1pim3pi0, genie::kNOnto2pi0, genie::kNOnto2pip2pim, genie::kNOnto2pip2pim1pi0, genie::kNOnto2pip2pim2pi0, genie::kNOpto1pip1pi0, genie::kNOpto1pip2pi0, genie::kNOpto1pip3pi0, genie::kNOpto2pip1pim1pi0, genie::kNOpto2pip1pim2o, genie::kNOpto2pip1pim2pi0, genie::kNOpto3pip2pim1pi0, genie::kPdgomega, genie::kPdgPi0, genie::kPdgPiM, genie::kPdgPiP, and genie::PDGCodeList::push_back().

Referenced by genie::NNBarOscPrimaryVtxGenerator::GenerateDecayProducts().

131 {
132  // ok so i think this is the first function where a straight replacement
133  // isn't gonna cut it. all the nucleon decay modes are two-body, but that is
134  // painfully untrue for nnbar. i just threw aaaaaaallll of the final state
135  // particles into the vector, so let's just hope for the best -j
136 
137  // need to implement a lorentz boost into rest frame of two nucleons -j
138 
139  bool allow_duplicate = true;
140  PDGCodeList decay_products(allow_duplicate);
141 
142  switch(ndm) {
143  case (kNOpto1pip1pi0) :
144  decay_products.push_back(kPdgPiP);
145  decay_products.push_back(kPdgPi0);
146  break;
147  case (kNOpto1pip2pi0) :
148  decay_products.push_back(kPdgPiP);
149  decay_products.push_back(kPdgPi0);
150  decay_products.push_back(kPdgPi0);
151  break;
152  case (kNOpto1pip3pi0) :
153  decay_products.push_back(kPdgPiP);
154  decay_products.push_back(kPdgPi0);
155  decay_products.push_back(kPdgPi0);
156  decay_products.push_back(kPdgPi0);
157  break;
158  case (kNOpto2pip1pim1pi0) :
159  decay_products.push_back(kPdgPiP);
160  decay_products.push_back(kPdgPiP);
161  decay_products.push_back(kPdgPiM);
162  decay_products.push_back(kPdgPi0);
163  break;
164  case (kNOpto2pip1pim2pi0) :
165  decay_products.push_back(kPdgPiP);
166  decay_products.push_back(kPdgPiP);
167  decay_products.push_back(kPdgPiM);
168  decay_products.push_back(kPdgPi0);
169  decay_products.push_back(kPdgPi0);
170  break;
171  case (kNOpto2pip1pim2o) :
172  decay_products.push_back(kPdgPiP);
173  decay_products.push_back(kPdgPiP);
174  decay_products.push_back(kPdgPiM);
175  decay_products.push_back(kPdgomega);
176  decay_products.push_back(kPdgomega);
177  break;
178  case (kNOpto3pip2pim1pi0) :
179  decay_products.push_back(kPdgPiP);
180  decay_products.push_back(kPdgPiP);
181  decay_products.push_back(kPdgPiP);
182  decay_products.push_back(kPdgPiM);
183  decay_products.push_back(kPdgPiM);
184  decay_products.push_back(kPdgPi0);
185  break;
186  case (kNOnto1pip1pim) :
187  decay_products.push_back(kPdgPiP);
188  decay_products.push_back(kPdgPiM);
189  break;
190  case (kNOnto2pi0) :
191  decay_products.push_back(kPdgPi0);
192  decay_products.push_back(kPdgPi0);
193  break;
194  case (kNOnto1pip1pim1pi0) :
195  decay_products.push_back(kPdgPiP);
196  decay_products.push_back(kPdgPiM);
197  decay_products.push_back(kPdgPi0);
198  break;
199  case (kNOnto1pip1pim2pi0) :
200  decay_products.push_back(kPdgPiP);
201  decay_products.push_back(kPdgPiM);
202  decay_products.push_back(kPdgPi0);
203  decay_products.push_back(kPdgPi0);
204  break;
205  case (kNOnto1pip1pim3pi0) :
206  decay_products.push_back(kPdgPiP);
207  decay_products.push_back(kPdgPiM);
208  decay_products.push_back(kPdgPi0);
209  decay_products.push_back(kPdgPi0);
210  decay_products.push_back(kPdgPi0);
211  break;
212  case (kNOnto2pip2pim) :
213  decay_products.push_back(kPdgPiP);
214  decay_products.push_back(kPdgPiP);
215  decay_products.push_back(kPdgPiM);
216  decay_products.push_back(kPdgPiM);
217  break;
218  case (kNOnto2pip2pim1pi0) :
219  decay_products.push_back(kPdgPiP);
220  decay_products.push_back(kPdgPiP);
221  decay_products.push_back(kPdgPiM);
222  decay_products.push_back(kPdgPiM);
223  decay_products.push_back(kPdgPi0);
224  break;
225  case (kNOnto1pip1pim1o) :
226  decay_products.push_back(kPdgPiP);
227  decay_products.push_back(kPdgPiM);
228  decay_products.push_back(kPdgomega);
229  break;
230  case (kNOnto2pip2pim2pi0) :
231  decay_products.push_back(kPdgPiP);
232  decay_products.push_back(kPdgPiP);
233  decay_products.push_back(kPdgPiM);
234  decay_products.push_back(kPdgPiM);
235  decay_products.push_back(kPdgPi0);
236  decay_products.push_back(kPdgPi0);
237  break;
238  default :
239  break;
240  }
241  return decay_products;
242 }
A list of PDG codes.
Definition: PDGCodeList.h:33
const int kPdgomega
Definition: PDGCodes.h:145
const int kPdgPiP
Definition: PDGCodes.h:135
const int kPdgPi0
Definition: PDGCodes.h:137
const int kPdgPiM
Definition: PDGCodes.h:136
GHepStatus_t genie::utils::nnbar_osc::DecayProductStatus ( bool  in_nucleus,
int  pdgc 
)

Definition at line 244 of file NNBarOscUtils.cxx.

References genie::kIStHadronInTheNucleus, genie::kIStStableFinalState, genie::kPdgomega, genie::kPdgPi0, genie::kPdgPiM, and genie::kPdgPiP.

Referenced by genie::NNBarOscPrimaryVtxGenerator::GenerateDecayProducts().

246 {
247  // took out all the irrelevant particles -j
248  if(in_nucleus) {
249  if( pdgc == kPdgPi0 ||
250  pdgc == kPdgPiM ||
251  pdgc == kPdgPiP ||
252  pdgc == kPdgomega)
253  {
254  return kIStHadronInTheNucleus;
255  }
256  }
257 
258  return kIStStableFinalState;
259 }
const int kPdgomega
Definition: PDGCodes.h:145
const int kPdgPiP
Definition: PDGCodes.h:135
const int kPdgPi0
Definition: PDGCodes.h:137
const int kPdgPiM
Definition: PDGCodes.h:136
bool genie::utils::nnbar_osc::IsValidMode ( NNBarOscMode_t  ndm)

Definition at line 73 of file NNBarOscUtils.cxx.

References genie::kNOnto1pip1pim, genie::kNOnto1pip1pim1o, genie::kNOnto1pip1pim1pi0, genie::kNOnto1pip1pim2pi0, genie::kNOnto1pip1pim3pi0, genie::kNOnto2pi0, genie::kNOnto2pip2pim, genie::kNOnto2pip2pim1pi0, genie::kNOnto2pip2pim2pi0, genie::kNOpto1pip1pi0, genie::kNOpto1pip2pi0, genie::kNOpto1pip3pi0, genie::kNOpto2pip1pim1pi0, genie::kNOpto2pip1pim2o, genie::kNOpto2pip1pim2pi0, genie::kNOpto3pip2pim1pi0, and genie::kNORandom.

Referenced by evgen::GENIENeutronOscGen::GENIENeutronOscGen(), and GetCommandLineArgs().

74 {
75  // checks if a mode is valid. just straight replaced. -j
76  switch(ndm) {
77  case (kNORandom) :
78  case (kNOpto1pip1pi0) :
79  case (kNOpto1pip2pi0) :
80  case (kNOpto1pip3pi0) :
81  case (kNOpto2pip1pim1pi0) :
82  case (kNOpto2pip1pim2pi0) :
83  case (kNOpto2pip1pim2o) :
84  case (kNOpto3pip2pim1pi0) :
85  case (kNOnto1pip1pim) :
86  case (kNOnto2pi0) :
87  case (kNOnto1pip1pim1pi0) :
88  case (kNOnto1pip1pim2pi0) :
89  case (kNOnto1pip1pim3pi0) :
90  case (kNOnto2pip2pim) :
91  case (kNOnto2pip2pim1pi0) :
92  case (kNOnto1pip1pim1o) :
93  case (kNOnto2pip2pim2pi0) :
94  return true;
95  break;
96  default :
97  return false;
98  break;
99  }
100  return false;
101 }