[Halld-offline] vertex bug?

David Lawrence davidl at jlab.org
Fri Jun 29 08:37:50 EDT 2012


Hi Matt,

   I see the first event is at 80cm, but subsequent ones are at other 
values. However, when I look at the code, there is a problem. It looks 
like the RNDM array is not being filled prior to using it to determine 
z. The array is filled later when determining the momentum and angle 
values. I can imagine this leading to 2 different behaviors:

1. If the same memory is used on subsequent calls, the z position will 
be correlated with the kinematics of the previous event, but will change 
event to event

2. If the array memory is reset to zero, a single value (in our case 
80cm) will always be used.


The behavior could be compiler dependent, hence the different behavior 
you are seeing. I'm probably getting behavior 1. which is why my first 
event is always at z=80cm, but others are dependent on the random number 
seed.

I will add the card as you suggest, fix the initialization of the RNDM 
array, and add comments to the control.in file. I'll announce on the 
offline list when it is done.

Regards,
-David

On 6/29/12 7:33 AM, Matthew Shepherd wrote:
> David,
>
> This isn't quite the behavior I'm seeing.  I'm seeing every vertex generated at 80 cm.
>
> I can imagine cases where one would want both a distribution and only at the center of target.  An extra control card might be a good idea with some default behavior that is outlined in the comments.
>
> Matt
>
>
> On Jun 28, 2012, at 1:26 PM, David Lawrence wrote:
>
>> Hi All,
>>
>>    It looks like this was put in along with some other changes to the
>> vertex handling in March of this year (revision 8887). It evenly
>> distributes the vertex z-position for the particle gun over a 30cm span
>> centered on the SCAP z position. We could revert this or add another
>> control card to turn on/off the distributed target behavior. Any
>> preferences?
>>
>> Regards,
>> -David
>>
>> On 6/28/12 12:42 PM, Puneet Khetarpal wrote:
>>> Hi Matt,
>>>
>>> I see the same behavior in HDGeant for DMCThrown as well. The smearing
>>> of the vertex is across all three dimensions. I'm not sure if this is
>>> supposed to be a bug or a feature.
>>>
>>> Puneet
>>>
>>> http://about.me/puneetk
>>>
>>> "No word is true until it is eaten" - 36 Lessons of Vivec, Sermon 27
>>>
>>>
>>> On Thu, Jun 28, 2012 at 12:38 PM, Matthew Shepherd<mashephe at indiana.edu>   wrote:
>>>> Hi all,
>>>>
>>>> In working on the photon efficiency studies for the new PID design I noticed a bug (?) with the simulation.  I'm using the particle gun with the SCAP card setting the z vertex to 65.  However, the DMCThrown objects (viewed in hdview2) report a vertex of 80.  The reconstruction, with Paul's change, uses 65 for the vertex.  Does anyone else see this?
>>>>
>>>> BTW (off topic, but related to our discussion yesterday), another good reason for using the center of target for default photon reconstruction is that it removes the dependency of basic photon reconstruction on tracking.  This is probably an order of magnitude or more speedup if one just wants to run photon reconstruction (without track-shower matching, of course).
>>>>
>>>> Matt
>>>> _______________________________________________
>>>> Halld-offline mailing list
>>>> Halld-offline at jlab.org
>>>> https://mailman.jlab.org/mailman/listinfo/halld-offline
>>> _______________________________________________
>>> Halld-offline mailing list
>>> Halld-offline at jlab.org
>>> https://mailman.jlab.org/mailman/listinfo/halld-offline
>> _______________________________________________
>> Halld-offline mailing list
>> Halld-offline at jlab.org
>> https://mailman.jlab.org/mailman/listinfo/halld-offline



More information about the Halld-offline mailing list