Skip to content

Commit

Permalink
Use ConstructedAt instead of remove pythonization for TClonesArray
Browse files Browse the repository at this point in the history
  • Loading branch information
olantwin committed Nov 12, 2024
1 parent a15dca9 commit b9309d0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 67 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ it in future.

### Fixed

* Use ConstructedAt instead of remove pythonization for TClonesArray

### Changed

### Removed

* Remove Millepede
* Remove outdated example shipEvent_ex.py

## 24.11

Expand Down
4 changes: 2 additions & 2 deletions muonShieldOptimization/makeMuonDIS.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def rotate(ctheta,stheta,cphi,sphi,px,py,pz):
for n in range(nMult):
dPart.Clear()
iMuon.Clear()
iMuon[0] = muPart
iMuon.ConstructedAt(0).Use(muPart)
myPythia.GenerateEvent()
# remove all unnecessary stuff
myPythia.Pyedit(2)
Expand All @@ -99,7 +99,7 @@ def rotate(ctheta,stheta,cphi,sphi,px,py,pz):
# copy to branch
nPart = dPart.GetEntries()
if dPart.GetSize() == nPart: dPart.Expand(nPart+10)
dPart[nPart] = part
dPart.ConstructedAt(nPart).Use(part)
nMade+=1
if nMade%10000==0: print('made so far ',nMade)
dTree.Fill()
Expand Down
4 changes: 2 additions & 2 deletions muonShieldOptimization/muDIS_mergeFiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ def merge():
sTree.GetEvent(n)
dPart.Clear()
iMuon.Clear()
iMuon[0] = sTree.InMuon[0]
iMuon.ConstructedAt(0).Use(sTree.InMuon[0])
for part in sTree.Particles:
nPart = dPart.GetEntries()
if dPart.GetSize() == nPart: dPart.Expand(nPart+10)
dPart[nPart] = part
dPart.ConstructedAt(nPart).Use(part)
dPartBranch.Fill()
iMuonBranch.Fill()
nTree.Fill()
Expand Down
63 changes: 0 additions & 63 deletions python/shipEvent_ex.py

This file was deleted.

0 comments on commit b9309d0

Please sign in to comment.