[Halld-offline] GlueX shower reconstruction
David Lawrence
davidl at jlab.org
Thu Jul 18 00:12:47 EDT 2013
Hi Sean,
First off, I'm CC-ing this to the Hall-D Offline Software mailing
list since this may be of interest to a wider audience.
I can answer the question regarding getting the DBCALHit objects that
were used to make a given DBCALCluster object. You can get to them using
the Associated Objects mechanism built into JANA. First, to see what
types of associated objects a certain object has use hd_dump with the
"-a" flag like this:
> hd_dump -f -s -a -DDBCALCluster hdgeant_smeared.hddm
...
================================================================
Event: 1
DBCALCluster:
r: phi: z: theta: t: E: N_cell:
---------------------------------------------------
65.43 2.52 290.15 0.28 7.77 0.54 7
74.52 0.35 51.66 1.75 2.49 0.31 6
69.02 1.76 170.88 0.58 4.10 0.19 4
[== Associated objects for row 0 ==]
DBCALPoint 0xb6c53a00
0xb6c53b08
0xb6c53c10
0xb6c53d18
0xb6c53ea8
0xb6c53f70
0xb6c54058
[== Associated objects for row 1 ==]
DBCALPoint 0xb6c4f1f0
0xb6c4f288
0xb6c4f380
0xb6c4f488
0xb6c4f590
0xb6c4f698
[== Associated objects for row 2 ==]
DBCALPoint 0xb6c4f8a8
0xb6c53490
0xb6c535e0
0xb6c536e8
This shows that DBCALCluster objects have pointers to DBCALPoint objects
attached as associated objects. You can then do the same exercise but
for DBCALPoint objects to see that they have something called
DBCALUnifiedHit attached. Finally, the DBCALUnifiedHit objects have the
DBCALHit objects attached as associated objects.
To get at these using code, use the Get() method of the data object
itself. In this case, you might write something like this:
vector<const DBCALCluster*> clusters;
loop->Get(clusters);
for(unsigned int i=0; i<clusters.size(); i++){
vector<const DBCALPoint*>points;
clusters[i]->Get(points);
for(unsigned int j=0; j<points.size(); j++){
vector<const DBCALUnifiedHit*>unifiedhits;
points[i]->Get(unifiedhits);
for(unsigned int k=0; k<unifiedhits.size(); k++){
vector<const DBCALHit*>hits;
unifiedhits[i]->Get(hits);
// Do something with the DBCALHit objects
}
}
}
This case is a bit more complicated than most since you want to get at
something that is a few generations back from the DBCALCluster objects.
This should be pretty quick to run though and will give you exactly the
hit objects that were ultimately used to make the cluster. Let me know
if anything is unclear.
Regards,
-Dave
On 7/17/13 9:47 PM, Sean Dobbs wrote:
> Hi Will,
>
> I have some first order results you might find interesting, and have
> attached a few plots to illustrate them.
>
> The file kin_plots.pdf shows some p-theta plots to illustrate the
> kinematics of the reaction that I'm looking at: gamma p -> J/psi + p,
> J/psi -> e+ e-. The proton generally goes into the FCAL, while the
> e-/e+ generally go into the BCAL, and have a wide range of momenta.
> I made a few modifications to your code, to pick out the e-/e+ from
> these events, and it seemed to work fine.
>
> The first two plots in bcal_plots.pdf give the distributions of ADC
> energies for all BCAL hits and the most energetic hit in a cluster,
> respectively. The good part is that only about 6% of hits have
> energies > 4096 - the bad part is that about 60% clusters have a hit
> that's higher than that, and sometimes much higher!
>
> By the way, is there any easy way to backtrack from a DBCALCluster to
> a DBCALHit? I ended up matching the DBCALPoints and DBCALHits by hand.
>
>
> The last plot shows the distribution of dz v. dphi for the e+/e-
> tracks, similar to what you had been showing for pion tracks, and it
> at least looks like the track/shower matching works well for
> electrons. So, it's looking like we might be better off looking at
> shower shape variables to identify electrons, rather than the scalar
> sum of shower energies.
>
> Cheers,
> Sean
>
>
>
> On Thu, Jun 27, 2013 at 7:16 PM, Will Levine <wlevine at gmail.com
> <mailto:wlevine at gmail.com>> wrote:
>
> The BCAL simulation does not currently account for the maximum
> amplitude of the ADC. This is something we are aware of and I am a
> little bit worried about. In theory, this seems like it should be a
> simple thing to fix, but there could be complications (e.g. if the ADC
> saturates, then probably we should set an overflow bit to indicate
> this, but adding this overflow bit would require a change in the data
> model which would be a bigger change),
>
> Something you could do to check how big a problem this will be for you
> is look at the DBCALHit objects in your simulated data. These
> represent ADC hits and contain what is supposed to be the ADC
> amplitude. The ADCs are 12 bits, so we should be worried if a lot of
> these values are over 4096.
>
> I've cc'ed David Lawrence in case he has any other thoughts
>
> On Thu, Jun 27, 2013 at 5:57 PM, Sean Dobbs
> <s-dobbs at northwestern.edu <mailto:s-dobbs at northwestern.edu>> wrote:
> > Hi Will,
> >
> > Thanks for the info! I do have something of a soft spot for
> calorimeters,
> > but the ones that I've worked with before have all been crystal
> > calorimeters, so I'm still learning about this BCAL.
> >
> > I don't mind using the latest version of the code, so I'll let
> you know how
> > things work as soon as I can get the trunk to compile (or find
> an earlier
> > one that will work).
> >
> > One additional question - does the new simulation include
> modelling of the
> > maximum amplitudes in the ADCs?
> >
> >
> > Cheers,
> > Sean
> >
> >
> > On Thu, Jun 27, 2013 at 2:13 PM, Will Levine <wlevine at gmail.com
> <mailto:wlevine at gmail.com>> wrote:
> >>
> >> Hi Sean,
> >> Happy to hear that someone else is interested in the BCAL. I
> hope I can
> >> help.
> >>
> >> The new(ish) BCAL reconstruction code is now enabled by default
> on the
> >> trunk. However it didn't make it into the latest tagged release
> >> (sim-recon-2013-04-22). If you are wedded to using an older
> version,
> >> let me know and I can tell you how to enable the new BCAL code
> (it's
> >> just a few command line switches), but otherwise I would recommend
> >> upgrading to a newer version. One thing to note is that the BCAL
> >> simulation changed as well, so if you have done any simulation you
> >> will have to redo that.
> >>
> >> I've just checked in my code for doing track-shower matching
> studies,
> >> it's available in
> >> sim-recon/src/programs/Analysis/plugins/bcal_matching . It's
> designed
> >> to analyze single-charged-pion events but should only need to be
> >> changed minimally for single-electron events. Hopefully my code is
> >> clear enough.
> >>
> >> Please let me know if you have any questions or complaints or
> feedback.
> >>
> >> Will
> >>
> >> On Thu, Jun 27, 2013 at 12:00 PM, Sean Dobbs
> <s-dobbs at northwestern.edu <mailto:s-dobbs at northwestern.edu>>
> >> wrote:
> >> > Dear Will,
> >> >
> >> > I'm interested in trying out the new BCAL reconstruction
> software that
> >> > you've been working on, with our analysis of gamma p -> J/psi
> + p, J/psi
> >> > ->
> >> > e+ e-, to see how it works with showers high-energy
> electrons. If it's
> >> > in a
> >> > state that you wouldn't mind sharing, can you tell me how to
> properly
> >> > enable
> >> > it?
> >> >
> >> > Also, would you mind sharing the code that you used to make the
> >> > track-shower
> >> > matching plots that you showed in yesterday's offline
> software meeting?
> >> > It's really great to see someone taking a look at this issue,
> and I'd
> >> > like
> >> > to see if I see the same effects in our analysis.
> >> >
> >> >
> >> > Thanks,
> >> > Sean
> >> >
> >> >
> >> > --
> >> > Dr. Sean Dobbs
> >> > Department of Physics & Astronomy
> >> > Northwestern University
> >> > phone: 847-467-2826
> >
> >
> >
> >
> > --
> > Dr. Sean Dobbs
> > Department of Physics & Astronomy
> > Northwestern University
> > phone: 847-467-2826
>
>
>
>
> --
> Dr. Sean Dobbs
> Department of Physics & Astronomy
> Northwestern University
> phone: 847-467-2826
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jlab.org/pipermail/halld-offline/attachments/20130718/4c65b594/attachment-0002.html>
More information about the Halld-offline
mailing list