Skip to content
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

Event library interface #103

Closed
wants to merge 68 commits into from
Closed

Conversation

cjbacchus
Copy link

for review meeting Thurs 7 May

candreop and others added 30 commits March 9, 2020 16:26
…to hack things. The physics is of course wrong.
…ct lepton universality in NC interactions, and fix a couple of bugs with the lepton flavour in those same interactions.
@candreop candreop added this to the 3.2.0 release milestone Jul 6, 2020
@mroda88 mroda88 added the framework Framework related issues or improvements label Oct 14, 2020
@mroda88
Copy link
Member

mroda88 commented Nov 25, 2020

I tested the code. There is still come problem with the definition of daughter/mother relations

@cjbacchus
Copy link
Author

Can you be more specific?

@mroda88
Copy link
Member

mroda88 commented Nov 25, 2020

|GENIE GHEP Event Record [print level:   3]                                                                        |
|------------------------------------------------------------------------------------------------------------------|
| Idx |          Name | Ist |        PDG |   Mother  | Daughter  |      Px |      Py |      Pz |       E |      m  | 
|------------------------------------------------------------------------------------------------------------------|
|   0 |         nu_mu |   0 |         14 |  -1 |  -1 |   2 |   3 |   0.000 |   0.000 |   1.310 |   1.310 |   0.000 | 
|   1 |           C12 |   0 | 1000060120 |  -1 |  -1 |   3 |   4 |   0.000 |   0.000 |   0.000 |  11.175 |  11.175 | 
|   2 |       neutron |  11 |       2112 |  -1 |  -1 |   3 |   3 |   0.000 |   0.000 |   0.000 |   0.940 |   0.940 | 
|   3 |           mu+ |   1 |        -13 |   0 |  -1 |  -1 |  -1 |  -0.062 |   0.530 |   0.919 |   1.068 |   0.106 | 
|   4 |        proton |   1 |       2212 |   1 |  -1 |  -1 |  -1 |   0.167 |  -0.645 |   0.177 |   1.164 |   0.938 | 
|------------------------------------------------------------------------------------------------------------------|
|       Fin-Init:                                                |   0.105 |  -0.115 |  -0.214 | -10.253 |         | 
|------------------------------------------------------------------------------------------------------------------|

This is a snippet from one event. I don't know how it could be that the muon is coming out of a neutron. But I'm writing here to keep track of things, it's not necessary something you have to fix.

@cjbacchus
Copy link
Author

Am I misreading that? Doesn't it say the mother index is zero, ie the neutrino?

@mroda88
Copy link
Member

mroda88 commented Nov 25, 2020

yes, it says that and the daughter of the neutron is the muon as well.

@mroda88 mroda88 self-assigned this Nov 26, 2020
Copy link
Member

@mroda88 mroda88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There a few major mistakes that makes the whole point of this library not even useful. I'll work on the fixes

-->
<param_set name="EventLibraryInterface">
<param type="string" name="VldContext"> </param>
<param type="int" name="NModules"> 1 </param>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a dedicated inital state appender or the flux driver will never work properly

@@ -80,6 +80,7 @@ class ProcessInfo : public TObject {
bool IsWeakNC (void) const;
bool IsWeakMix (void) const;
bool IsDarkMatter (void) const;
bool IsExternalGen (void) const;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try to find a way to not mix physics and framework.

@@ -51,7 +51,8 @@ typedef enum EScatteringType {
kScIMDAnnihilation,
kScDarkMatterElastic = 101,
kScDarkMatterDeepInelastic,
kScDarkMatterElectron
kScDarkMatterElectron,
kScExternalGen = 900
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably it is better to define this negative as it's not physics

const int lastHad = (rec->parts.size() == nLep) ? -1 : 1+rec->parts.size();

// Neutrino is a parent to the lepton(s)
event->AddParticle(init_state.ProbePdg(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do this, we destroy the whole point of this exercise because we bypass the flux drivers that specifies the direction

0, 0, 0, PDGLibrary::Instance()->Find(tgt_pdgc)->Mass(),
0, 0, 0, 0);

// Include nuclear target in this position (2) by convention
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not always the case, it should be dropped and it certainly it is not supposed to be taken from the Summary at this stage

@mroda88 mroda88 modified the milestones: 3.2.0 release, 3.2.2 Release Nov 26, 2020
if(up.Dot(z) == 0) up = TVector3(1, 0, 0);

const TVector3 x = up.Cross(z).Unit(); // Perpendicular to neutrino and up
const TVector3 y = x.Cross(z).Unit(); // Defines the third axis
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be -y

@mroda88
Copy link
Member

mroda88 commented Dec 4, 2020

Merged manually

@mroda88 mroda88 closed this Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework Framework related issues or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants