Verifying EPD spatial position by correlating with BBC signals

Since the BBC sits directly behind the EPD (for runs 2018 and 2019 at least), we can analyze cosmic triggers which cause a signal in a BBC tile, and hopefully see signals in the "correct" EPD tiles.  This is a great way of giving confidence that our mapping is correct.
  • Things like the Seven Patterns test, verify the map from SlowControlGui(→FEE→RX→QT→DAQ)→StEvent.  One could also say it tests the map from "TUFF space" to "StEvent space".  If we pass that test, then TWO databases (slow control/GUI and the offline database) would have to conspire to "trick" us.
  • The EPD-BBC cosmic correlations are really a spatial test.  Which is the entire point, right?  Under the assumption that we know where the BBC tiles physically are (see photos at bottom), this test gives us confirmation all the way from SpatialPoint(→EpdTile→FB→SiPM→FEE→RX→QT→DAQ)→StEvent.  There is no better test than that!
    • Now, the BBC only sits behind EPD tiles 1-10, so in principle we are only checking the mapping of those.  However, tiles in a supersector do not move relative to one another, unless it is dropped and smashes apart, at which point we have bigger problems.  And signals cannot get "mismatched" in a fiber bundle since everything is glued permanently in place.  So, checking the spatial positions of tiles 1-10 is equivalent to checking all 744 tiles.
I have discussed this test for the pre-2018 cosmics, but here I will document it further, including step-by-step instructions.




First of all, the EPD geometry and numbering system and (especially!) the BBC geometry and numbering system are nontrivial.  Use the StEpdUtil classes StEpdGeom and StBbcGeom.  Respect object-oriented coding and use the classes through the interfaces.  If it won't compile or load or whatever, then figure out the problem and fix it.  Do not go mucking around and snipping out code segments because you are in a hurry.  You have been warned.

If you want to see the numbering in real space,
> cvs co StRoot/StEpdUtil
> cons
> root4star StRoot/StEpdUtil/Macros/DrawBoth.C




STEP 1:  Okay, your first step is to analyze some STAR data taken with a cosmic trigger.  I'll assume you have the muDsts, and you are going to use my code to start the analysis:

> cvs co offline/users/lisa/StRoot/EpdAnalMaker
> cd offline/users/lisa
> stardev  <---- if necessary.  Since this is usually done at the beginning of the run and the StTriggerData object format might have recently changed, then starpro might not be appropriate
> cons
> root4star -b runAnalMaker.C\(100000,\"MuDsts.list\"\)   <----- MuDsts.list is the list of muDsts.  You have to make this.

you should play with thresholds which may be set as arguments to the macro, to clean things up.

This will make a file with a bunch of 2D histograms with names like EpdEastWhenBbcEastPmt14fires.

STEP 2: Now you will run a macro to analyze that file

> cvs co StRoot/StEpdUtil
> cons    <------ if necessary.  In principle should not be, but perhaps I've changed something that didn't propagate to the library yet.
> root4star StRoot/StEpdUtil/Operations/BbcCosmicTest/SeeEpdBbcCosmics.C\(\"finalout.root\"\)

This will make a 32-page pdf file showing where the EPD hits were, when each PMT fired.  Superimposed will be the position of the BBC tiles associated with that BBC PMT.








Appendix:  In all of this, we are assuming we know where the BBC tiles are.  How can we be so sure?


Well, it's pretty easy, really!  The fibers never get disconnected from the phototubes and they never get disconnected from the tiles.  So you just have to know where the tiles sit in space, and that's easy since there are so few of them and they are clearly marked from the back.  Here is Akio and Bill putting them onto the West side.