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

new phi calculation of real seeding #1271

Closed
Jeet-bhai opened this issue Feb 2, 2024 · 0 comments · Fixed by #1281
Closed

new phi calculation of real seeding #1271

Jeet-bhai opened this issue Feb 2, 2024 · 0 comments · Fixed by #1281

Comments

@Jeet-bhai
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The standard phi calculation in TrackSeeding.cc is giving a lot of error. It is dependent on charge, and this dependency is creating problem

Describe the solution you'd like
We can calculate phi, purely geometrically, by using tangent vectors and dot products.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@Jeet-bhai Jeet-bhai linked a pull request Feb 2, 2024 that will close this issue
4 tasks
github-merge-queue bot pushed a commit that referenced this issue Feb 21, 2024
Closes: #1271
Closes: #1272

### Briefly, what does this PR introduce?
It calculates the charge more correctly. 

Before the change
```
events->Scan("CentralTrackSeedingResults.phi:CentralTrackSeedingResults.phi-atan2(MCParticles.momentum.y[0],MCParticles.momentum.x[0]):CentralTrackSeedingResults.charge","abs(CentralTrackSeedingResults.phi-atan2(MCParticles.momentum.y[0],MCParticles.momentum.x[0]))>0.5")
***********************************************************
*    Row   * Instance * CentralTr * CentralTr * CentralTr *
***********************************************************
*      457 *        0 * 3.1368908 * 6.2784049 *        -1 *
*      457 *        2 * 3.1409514 * 6.2824654 *        -1 *
*     1051 *        0 * 3.1248598 *  6.197864 *        -1 *
*     1541 *        2 * -2.652385 * -3.144119 *        -1 *
*     1593 *        0 * 2.1453850 * 3.1149456 *         1 *
*     1719 *        0 * 3.1414830 * 6.2790422 *        -1 *
*     1719 *        1 * 3.1376869 * 6.2752461 *        -1 *
*     1759 *        0 * 3.1079447 * 6.2340577 *        -1 *
*     1759 *        3 * 3.1407167 * 6.2668297 *        -1 *
*     2268 *        0 * -2.926911 * -3.144877 *        -1 *
*     2360 *        2 * -0.291468 * -3.144404 *        -1 *
*     2748 *        0 * 1.2643282 * 3.1381311 *        -1 *
*     3101 *        2 * 1.1373429 *  3.139108 *        -1 *
*     3460 *        4 * -0.901838 * -3.160678 *        -1 *
*     3464 *        0 * 3.1107549 * 6.2227986 *         1 *
*     3533 *        1 * 3.1413474 * 6.2821147 *        -1 *
*     3533 *        2 * 3.1400566 * 6.2808239 *        -1 *
*     3533 *        3 * 3.1406669 * 6.2814343 *        -1 *
*     3602 *        0 * 2.7184147 * 3.1398609 *         1 *
*     4080 *        2 * 0.1672719 * 1.5374061 *        -1 *
*     5168 *        2 * 1.1847635 * 3.1383791 *        -1 *
*     6023 *        2 * 0.1832947 * 3.1397418 *         1 *
*     6634 *        2 * 0.1372623 * 3.1390230 *        -1 *
*     6654 *        1 * 3.1401174 * 6.2715614 *        -1 *
*     6979 *        2 * 1.2488478 * 3.1390423 *        -1 *
Type <CR> to continue or q to quit ==> 
*     7302 *        2 * 0.0834536 * 3.1398086 *         1 *
*     7641 *        2 * 1.4545679 * 3.1399058 *         1 *
*     7896 *        0 * 3.1225175 * 6.2049581 *         1 *
*     8508 *        2 * -2.191989 * -3.143604 *         1 *
*     9033 *        2 * 1.2532205 * 3.1398001 *         1 *
*     9094 *        4 * -3.139707 * -6.280495 *        -1 *
*     9779 *        0 * 1.0651279 * 3.1089109 *        -1 *
*     9786 *        2 * -1.552465 * -3.143571 *        -1 *
***********************************************************
==> 33 selected entries
```

after the change:
```
events->Scan("CentralTrackSeedingResults.phi:CentralTrackSeedingResults.phi-atan2(MCParticles.momentum.y[0],MCParticles.momentum.x[0]):CentralTrackSeedingResults.charge","abs(CentralTrackSeedingResults.phi-atan2(MCParticles.momentum.y[0],MCParticles.momentum.x[0]))>0.5")
***********************************************************
*    Row   * Instance * CentralTr * CentralTr * CentralTr *
***********************************************************
*      457 *        0 * 3.1368908 * 6.2784049 *        -1 *
*      457 *        2 * 3.1409514 * 6.2824654 *        -1 *
*     1051 *        0 * 3.1248598 *  6.197864 *        -1 *
*     1719 *        0 * 3.1414830 * 6.2790422 *        -1 *
*     1719 *        1 * 3.1376869 * 6.2752461 *        -1 *
*     1759 *        0 * 3.1079447 * 6.2340577 *        -1 *
*     1759 *        3 * 3.1407167 * 6.2668297 *        -1 *
*     3464 *        0 * 3.1107549 * 6.2227986 *         1 *
*     3533 *        1 * 3.1413474 * 6.2821147 *        -1 *
*     3533 *        2 * 3.1400566 * 6.2808239 *        -1 *
*     3533 *        3 * 3.1406669 * 6.2814343 *        -1 *
*     4080 *        2 * 0.1672719 * 1.5374061 *        -1 *
*     6654 *        1 * 3.1401174 * 6.2715614 *        -1 *
*     7896 *        0 * 3.1225175 * 6.2049581 *         1 *
*     9094 *        4 * -3.139707 * -6.280495 *        -1 *
***********************************************************
==> 15 selected entries
```



### What kind of change does this PR introduce?
- [x ] Bug fix (issue #__)
- [ ] New feature (issue #__)
- [x ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ x] Tests for the changes have been added
- [x ] Documentation has been added / updated
- [x ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
no
### Does this PR change default behavior?
no

---------

Co-authored-by: Jeetendra Gupta <jeetendragupta@Jeetendras-MacBook-Air.local>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
simonge pushed a commit that referenced this issue Feb 27, 2024
Closes: #1271
Closes: #1272

### Briefly, what does this PR introduce?
It calculates the charge more correctly. 

Before the change
```
events->Scan("CentralTrackSeedingResults.phi:CentralTrackSeedingResults.phi-atan2(MCParticles.momentum.y[0],MCParticles.momentum.x[0]):CentralTrackSeedingResults.charge","abs(CentralTrackSeedingResults.phi-atan2(MCParticles.momentum.y[0],MCParticles.momentum.x[0]))>0.5")
***********************************************************
*    Row   * Instance * CentralTr * CentralTr * CentralTr *
***********************************************************
*      457 *        0 * 3.1368908 * 6.2784049 *        -1 *
*      457 *        2 * 3.1409514 * 6.2824654 *        -1 *
*     1051 *        0 * 3.1248598 *  6.197864 *        -1 *
*     1541 *        2 * -2.652385 * -3.144119 *        -1 *
*     1593 *        0 * 2.1453850 * 3.1149456 *         1 *
*     1719 *        0 * 3.1414830 * 6.2790422 *        -1 *
*     1719 *        1 * 3.1376869 * 6.2752461 *        -1 *
*     1759 *        0 * 3.1079447 * 6.2340577 *        -1 *
*     1759 *        3 * 3.1407167 * 6.2668297 *        -1 *
*     2268 *        0 * -2.926911 * -3.144877 *        -1 *
*     2360 *        2 * -0.291468 * -3.144404 *        -1 *
*     2748 *        0 * 1.2643282 * 3.1381311 *        -1 *
*     3101 *        2 * 1.1373429 *  3.139108 *        -1 *
*     3460 *        4 * -0.901838 * -3.160678 *        -1 *
*     3464 *        0 * 3.1107549 * 6.2227986 *         1 *
*     3533 *        1 * 3.1413474 * 6.2821147 *        -1 *
*     3533 *        2 * 3.1400566 * 6.2808239 *        -1 *
*     3533 *        3 * 3.1406669 * 6.2814343 *        -1 *
*     3602 *        0 * 2.7184147 * 3.1398609 *         1 *
*     4080 *        2 * 0.1672719 * 1.5374061 *        -1 *
*     5168 *        2 * 1.1847635 * 3.1383791 *        -1 *
*     6023 *        2 * 0.1832947 * 3.1397418 *         1 *
*     6634 *        2 * 0.1372623 * 3.1390230 *        -1 *
*     6654 *        1 * 3.1401174 * 6.2715614 *        -1 *
*     6979 *        2 * 1.2488478 * 3.1390423 *        -1 *
Type <CR> to continue or q to quit ==> 
*     7302 *        2 * 0.0834536 * 3.1398086 *         1 *
*     7641 *        2 * 1.4545679 * 3.1399058 *         1 *
*     7896 *        0 * 3.1225175 * 6.2049581 *         1 *
*     8508 *        2 * -2.191989 * -3.143604 *         1 *
*     9033 *        2 * 1.2532205 * 3.1398001 *         1 *
*     9094 *        4 * -3.139707 * -6.280495 *        -1 *
*     9779 *        0 * 1.0651279 * 3.1089109 *        -1 *
*     9786 *        2 * -1.552465 * -3.143571 *        -1 *
***********************************************************
==> 33 selected entries
```

after the change:
```
events->Scan("CentralTrackSeedingResults.phi:CentralTrackSeedingResults.phi-atan2(MCParticles.momentum.y[0],MCParticles.momentum.x[0]):CentralTrackSeedingResults.charge","abs(CentralTrackSeedingResults.phi-atan2(MCParticles.momentum.y[0],MCParticles.momentum.x[0]))>0.5")
***********************************************************
*    Row   * Instance * CentralTr * CentralTr * CentralTr *
***********************************************************
*      457 *        0 * 3.1368908 * 6.2784049 *        -1 *
*      457 *        2 * 3.1409514 * 6.2824654 *        -1 *
*     1051 *        0 * 3.1248598 *  6.197864 *        -1 *
*     1719 *        0 * 3.1414830 * 6.2790422 *        -1 *
*     1719 *        1 * 3.1376869 * 6.2752461 *        -1 *
*     1759 *        0 * 3.1079447 * 6.2340577 *        -1 *
*     1759 *        3 * 3.1407167 * 6.2668297 *        -1 *
*     3464 *        0 * 3.1107549 * 6.2227986 *         1 *
*     3533 *        1 * 3.1413474 * 6.2821147 *        -1 *
*     3533 *        2 * 3.1400566 * 6.2808239 *        -1 *
*     3533 *        3 * 3.1406669 * 6.2814343 *        -1 *
*     4080 *        2 * 0.1672719 * 1.5374061 *        -1 *
*     6654 *        1 * 3.1401174 * 6.2715614 *        -1 *
*     7896 *        0 * 3.1225175 * 6.2049581 *         1 *
*     9094 *        4 * -3.139707 * -6.280495 *        -1 *
***********************************************************
==> 15 selected entries
```



### What kind of change does this PR introduce?
- [x ] Bug fix (issue #__)
- [ ] New feature (issue #__)
- [x ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ x] Tests for the changes have been added
- [x ] Documentation has been added / updated
- [x ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
no
### Does this PR change default behavior?
no

---------

Co-authored-by: Jeetendra Gupta <jeetendragupta@Jeetendras-MacBook-Air.local>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant