Creating deformable map in root TCanvas

57 views Asked by At

I have some data that I'm plotting on a TH2F through the command-line interface of ROOT. I have a TTree* called goodtree, and I plot the XY positions of events in a detector as follows:

root [1] TCanvas *can = new TCanvas("can","can",800,800)
root [2] goodtree->Draw("y:x>>h1(400,-200,200,400,-200,200)","r<200","colz")

I also want to make normalized area plots, by looking at r^2 versus theta:

root [3] goodtree->Draw("r*r:t>>h2(400,-3.14,3.14,400,0,41000)","r<200","colz")

This part is fine. What I want to do next is overlay a map onto the XY plot, and have it automatically deform to the correct positions on the R^2T plot. What I mean is, this is a particle detector and uses photomultiplier tubes (PMTs) which have a circular cross-section in XY. I want to be able to overlay a map onto h1 which shows the outlines of these PMTs (which are in a honeycomb pattern). This I can also do very quickly with a script.

The tough bit is that I want to be able to define this map in XY, and plot it overtop of the R^2T data points. Is there a way do do this easily without having to calculate the positions, widths, and heights of all of these deformed ellipses by hand?

0

There are 0 answers