Print

Print


Hi Joey,

this is not really a bug but a feature.

All the software is built using tracking geometries where the magnetic field is along the z-coordinate. This is the normal solenoidal field e.g. collider,  setup which is where much of the core sw has been developed. We can use this by having a "tracking frame/coordinate system" where most of the detailed tracking is done. It's annoying but not too bad as it's only a simple rotation with 90 degree as you've noticed.

The good thing is that there are a lot of helpful geometry tools that you can use (and more detailed stuff as well which I'm sure you're will find useful later). Feel free to ask more specific question on that here as well.

As an example of your specific problem you can use this util class to rotate and translate your vectors

org.lcsim.hps.recon.tracking.TrackerHitUtils.java

Two examples on what it could look like (I haven't tested this exact code but it should work).

Example to go from global to tracking:

Hep3Vector mc_particle_position_in_global_frame;
Hep3Matrix detToTrk = TrackerHitUtils. detToTrackRotationMatrix();
Hep3Vector mc_particle_position_in_tracking_frame = VecOp.mult(detToTrk,Hep3Vector mc_particle_position_in_global_frame);

Example to go from tracking to global:

Hep3Vector track_position_in_tracking_frame;
Hep3Matrix detToTrk = TrackerHitUtils. detToTrackRotationMatrix();
Hep3Vector track_position_in_global_frame= VecOp.mult(VecOp.inverse(detToTrk),track_position_in_tracking_frame);

Have a look at that and other functions in there as well.

Does that help?

/Pelle


On Oct 5, 2012, at 6:56 PM, Joey Reichert wrote:

Hi HPS-Software,

I'm using the HPSTrackingBunchedMC.lcsim steering file with my own analysis driver, along with a .slcio file of simulated events. The input file uses a coordinate system with z as the beamline, so when my analysis driver accesses the MCParticles, they're using z as beamline, as expected. However, the reconstructed tracks being passed to my analysis driver appear to be using x as beamline, which means the reconstruction process is rotating the frame at some point, but never rotating it back. Is this a fixable bug? Of course, the alternative is to simply send z to x, x to y, etc. for the tracks, but it is definitely more confusing when the MCParticles use a different set of coordinates!

Thanks for the help,
Joey Reichert

________________________________

Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1


########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1