IAP GITLAB

Commit 8cbb1001 authored by Tanguy Pierog's avatar Tanguy Pierog

after test on invariant mass reconstruction in pi0, it appears that energy...

after test on invariant mass reconstruction in pi0, it appears that energy rescaling should be done before decay to avoid reconstruction problems.
As a consequence, if ibreit is used, energy is not rescaled later and their is a small energy violation due to small mass shift (less than 1GeV in total).


git-svn-id: https://devel-ik.fzk.de/svn/mc/crmc/trunk@4910 c7a5e08c-de06-0410-9364-b41cf42a0b17
parent f60e5922
......@@ -153,6 +153,7 @@ c Fix final particles and some event parameters
c Fill HEP common
call hepmcstore(iout) !use hepmcstore for all models to be sure to get same vertex structure
c call xInvMass(ievent) !invariant mass distribution
c optional Statistic information (only with debug level ish=1)
call astati
......@@ -1038,3 +1039,71 @@ C COMPLETE INITIALIZATION BY SKIPPING (NTOT2*MODCNS+NTOT) RANDOMNUMBERS
RETURN
END
cc----------------------------------------------------------------------
c subroutine xInvMass(iii)
cc----------------------------------------------------------------------
cc Subroutine to plot invariant mass distribution from photons
cc----------------------------------------------------------------------
c include 'epos.inc'
c parameter (nmbin=3000)
c double precision sumE,sumP,xmass,xmmin,xmmax,dmass,dn(nmbin)
c save
c if(iii.eq.1)then
c xmmin=0.133d0 !minimum mass
c xmmax=0.136d0 !maximum mass
c dmass=(xmmax-xmmin)/(nmbin-1)
c do i=1,nmbin
c dn(i)=0.d0
c enddo
c xncount=0.
c endif
cc loop over all pairs of photons to reconstruct invariant mass
c do k=1,nptl
c if(istptl(k).eq.0.and.idhep(k).eq.22)then
c do l=k+1,nptl
c if(istptl(l).eq.0.and.idhep(l).eq.22)then
c sumE=phep(4,k)+phep(4,l)
c sumP=0.d0
c do j=1,3
c sumP=sumP+(phep(j,k)+phep(j,l))**2
c enddo
c sumP=sqrt(sumP)
c xmass=(sumE+sumP)*(sumE-sumP)
c xmass=sign(sqrt(abs(xmass)),xmass)
c i=int((xmass-xmmin)/dmass)+1
cc if(iorptl(k).eq.iorptl(l).and.abs(xmass-0.135).gt.0.01)then
cc print *,k,l,i,xmass,xncount
cc . ,iorptl(k),idhep(iorptl(k))
cc print *,phep(1,k),phep(2,k),phep(3,k),phep(4,k)
cc print *,phep(1,l),phep(2,l),phep(3,l),phep(4,l)
cc print *,sumE,sumP,(sumE+sumP)*(sumE-sumP)
cc endif
c if(i.ge.1.and.i.le.nmbin)then
c dn(i)=dn(i)+1.
c xncount=xncount+1.
c endif
cc endif
c endif
c enddo
c endif
c enddo
c if(iii.eq.nevent.and.xncount.gt.0.)then
cc plot distribution
c write(ifhi,'(a)') 'newpage zone 1 1 1'
c write(ifhi,'(a)') '!##################################'
c write(ifhi,'(a,i3)') '! photon invariant mass '
c write(ifhi,'(a)') '!##################################'
c write(ifhi,'(a)') ' openhisto htyp lbu xmod lin ymod log '
c write(ifhi,'(a)') 'text 0.10 0.00 ""xaxis Mass (GeV) "" '
c write(ifhi,'(a)') 'text 0.10 0.00 ""yabis 1/N dN/dM "" '
c write(ifhi,'(a,2e11.3)') 'xrange ',xmmin,xmmax
c write(ifhi,'(a,2e11.3)') 'yrange ',1.,xncount
c write(ifhi,'(a)') ' array 3'
c do i=1,nmbin
c xmass=xmmin+(i-1)*dmass
c write(ifhi,'(3e16.8)')xmass,dn(i),sqrt(dn(i))
c enddo
c write(ifhi,'(a)') ' endarray closehisto plot 0'
c endif
c end
......@@ -5646,10 +5646,10 @@ c nptlx=nptl+1
nbdky=nptl
call bjinta(ier)
if(ier.eq.1)goto 3
if(iappl.eq.1.and.irescl.eq.1)then
call utresc(iret)
if(iret.gt.0)goto 3
endif
c if(iappl.eq.1.and.irescl.eq.1)then
c call utresc(iret)
c if(iret.gt.0)goto 3
c endif
c calculates numbers of spectators:
......
......@@ -69,6 +69,10 @@ c -------------------------------------------------
5000 continue
nptlbd=nptl
if(irescl.eq.1)then
call utresc(iret)
if(iret.gt.0)goto 1001
endif
call xSpaceTime
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment