-
Notifications
You must be signed in to change notification settings - Fork 107
Electron velocity distribution implementation #245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
bf759a2
488c5b5
0091d82
97d3b62
ce5ce58
4818287
25f5f70
1e548e7
b659cf6
ea7aab6
9f6370e
7d95362
a6e8e30
adceb50
434b453
85be41f
1b83195
96c62bc
f04b94f
2e514de
d02c852
bdf8cbc
249014b
dc4c3e9
8b168d9
b22a7b8
31e2b84
2dad9e6
3113afd
ee1d502
96e54d7
006aace
ffe624a
b141d46
d24897e
d79839d
857d608
ec49505
8556ebf
bb815d7
0f44460
c3e0f09
714547a
e8134ed
8b5e6a2
f1141d2
0f2a533
e08200e
8eab513
711f807
2e6aeda
4aceefc
61feaed
450dd40
ce1b78d
2541091
83645ac
b48167b
255d217
6cf3d4b
7b4e1b8
22ff840
7e78002
1d67653
b012e16
9bf362f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?xml version="1.0" encoding="ISO-8859-1"?> | ||
|
|
||
| <!-- | ||
| Configuration for the Bohr Electron Velocity | ||
|
|
||
| Configurable Parameters: | ||
| ............................................................................................................. | ||
| Name Type Optional Comment Default | ||
| ............................................................................................................. | ||
|
|
||
| --> | ||
|
|
||
| <alg_conf> | ||
| <param_set name="Default"> | ||
| </param_set> | ||
|
|
||
| </alg_conf> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?xml version="1.0" encoding="ISO-8859-1"?> | ||
|
|
||
| <!-- | ||
| Configuration for the Static Electron Velocity | ||
|
|
||
| Configurable Parameters: | ||
| ............................................................................................................. | ||
| Name Type Optional Comment Default | ||
| ............................................................................................................. | ||
|
|
||
| --> | ||
|
|
||
| <alg_conf> | ||
| <param_set name="Default"> | ||
| </param_set> | ||
|
|
||
| </alg_conf> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,9 @@ | |
|
|
||
| Costas Andreopoulos <constantinos.andreopoulos \at cern.ch> | ||
| University of Liverpool & STFC Rutherford Appleton Laboratory | ||
|
|
||
| Changes required to implement the Electron Velocity module | ||
| were installed by Brinden Carlson (Univ. of Florida) | ||
| */ | ||
| //____________________________________________________________________________ | ||
|
|
||
|
|
@@ -80,7 +83,8 @@ fA(0), | |
| fTgtPDG(0), | ||
| fHitNucPDG(0), | ||
| fHitSeaQrk(false), | ||
| fHitNucP4(0) | ||
| fHitNucP4(0), | ||
| fHitEleP4(0) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we really need this? Meaning. You cannot hit at the same time both the nucleon and the electron. So you can store the electron momentum information in the nucleon. Did you think about it? What troubles do we get ourselves into if we avoid creating more memory?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we'll talk about this |
||
| { | ||
|
|
||
| } | ||
|
|
@@ -105,12 +109,14 @@ void Target::Init(void) | |
| fHitQrkPDG = 0; | ||
| fHitSeaQrk = false; | ||
| fHitNucP4 = new TLorentzVector(0,0,0,kNucleonMass); | ||
| fHitEleP4 = new TLorentzVector(0,0,0,kElectronMass); | ||
| fHitNucRad = 0.; | ||
| } | ||
| //___________________________________________________________________________ | ||
| void Target::CleanUp(void) | ||
| { | ||
| delete fHitNucP4; | ||
| delete fHitEleP4; | ||
| } | ||
| //___________________________________________________________________________ | ||
| void Target::Copy(const Target & tgt) | ||
|
|
@@ -144,6 +150,10 @@ void Target::Copy(const Target & tgt) | |
| // a nucleon (p or n) or a di-nucleon cluster (p+p, p+n, n+n) | ||
| this->ForceHitNucValidity(); | ||
| } | ||
| if (tgt.fHitNucPDG == 0 && tgt.fHitQrkPDG == 0 && tgt.fHitSeaQrk == 0){ //No interaction with nucleus -> interaction with electron | ||
| const TLorentzVector& p4 = *(tgt.fHitEleP4); | ||
| *fHitEleP4 = *tgt.fHitEleP4 ; | ||
| } | ||
| } | ||
| //___________________________________________________________________________ | ||
| void Target::SetId(int pdgc) | ||
|
|
@@ -192,6 +202,12 @@ void Target::SetHitNucP4(const TLorentzVector & p4) | |
| fHitNucP4 = new TLorentzVector(p4); | ||
| } | ||
| //___________________________________________________________________________ | ||
| void Target::SetHitEleP4(const TLorentzVector & p4) | ||
| { | ||
| if(fHitEleP4) delete fHitEleP4; | ||
| fHitEleP4 = new TLorentzVector(p4); | ||
| } | ||
| //___________________________________________________________________________ | ||
| void Target::SetHitSeaQrk(bool tf) | ||
| { | ||
| fHitSeaQrk = tf; | ||
|
|
@@ -254,6 +270,15 @@ TLorentzVector * Target::HitNucP4Ptr(void) const | |
| return fHitNucP4; | ||
| } | ||
| //___________________________________________________________________________ | ||
| TLorentzVector * Target::HitEleP4Ptr(void) const | ||
| { | ||
| if(!fHitEleP4) { | ||
| LOG("Target", pWARN) << "Returning NULL struck electron 4-momentum"; | ||
| return 0; | ||
| } | ||
| return fHitEleP4; | ||
| } | ||
| //___________________________________________________________________________ | ||
| bool Target::IsFreeNucleon(void) const | ||
| { | ||
| return (fA == 1 && (fZ == 0 || fZ == 1)); | ||
|
|
@@ -264,6 +289,11 @@ bool Target::IsProton(void) const | |
| return (fA == 1 && fZ == 1); | ||
| } | ||
| //___________________________________________________________________________ | ||
| bool Target::IsElectron(void) const | ||
| { | ||
| return (fA == 0 && fZ == 0); //No nucleons | ||
| } | ||
| //___________________________________________________________________________ | ||
| bool Target::IsNeutron(void) const | ||
| { | ||
| return (fA == 1 && fZ == 0); | ||
|
|
@@ -289,6 +319,15 @@ bool Target::HitNucIsSet(void) const | |
| return ok; | ||
| } | ||
| //___________________________________________________________________________ | ||
| bool Target::HitEleIsSet(void) const | ||
| { | ||
| bool ok = fHitNucPDG == 0 && | ||
| fHitQrkPDG == 0 && | ||
| fHitSeaQrk == 0; //Hit no quarks | ||
|
|
||
| return ok; | ||
| } | ||
| //___________________________________________________________________________ | ||
| bool Target::HitQrkIsSet(void) const | ||
| { | ||
| return ( | ||
|
|
@@ -417,6 +456,10 @@ void Target::Print(ostream & stream) const | |
| << utils::print::BoolAsYNString(this->HitSeaQrk()) | ||
| << ")"; | ||
| } | ||
| if( this->HitEleIsSet() ) { | ||
| TParticlePDG * q = PDGLibrary::Instance()->Find(fHitQrkPDG); | ||
| stream << " struck electron = "; | ||
| } | ||
| } | ||
| //___________________________________________________________________________ | ||
| bool Target::Compare(const Target & target) const | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.