Next Last Mapping for the EPD in 2023

I was too optimistic in: drupal.star.bnl.gov/STAR/blog/rjreed/Last-Mapping-EPD-2023-DSMs-etc

What happened since then?  Well, the West EPD was uninstalled and then reinstalled and then uninstalled and then reinstalled.  We did install the East as well.  As of right now, both sides of the EPD are in and light tighted.

Another change was that QT32Ds were put into:
 EQ1 0x12  board 2
 EQ2 0x14  board 4
 EQ3 0x16  board 6
 EQ4 0x16  board 6

So theoretically, everything should work.  There's a few things we would want to check for sure, one is whether the 5 dead tiles from earlier have been remapped properly in the database.  I have a note of "We took a spare QT32B connector from the EPD cabinet (looks like there was one more, plus 2 QT32C connectors) and connected the 5 "bad" tiles from earlier."
MISMATCH!!! ew/pp/tt = -1/1/16  Should be EQ4 BD4 (i.e. 3rd board) CH 16
MISMATCH!!! ew/pp/tt = 1/2/4    Should be EQ2 BD10 CH10  Dead?
MISMATCH!!! ew/pp/tt = 1/2/14   Should be EQ2 BD14 CH02  Dead?
MISMATCH!!! ew/pp/tt = 1/3/13   Should be EQ2 BD14 Ch07
MISMATCH!!! ew/pp/tt = 1/6/1    Should be EQ3 BD8  Ch17  Dead?
These all seemed to be dead....
My note then says "We then added another QT32B connector to EQ3 Bd 6 Ch 8-12 (I believe)".

The mapping has then gone bad, there were several things that seemed to be an issue.
EQ2 -> Times out and then the shift crew without other information removes it.  This can be solved by power cycling (crate 100) and trying again.
qtd -> We need to add these to the node tree separately.
SiPM PCBs unplugging -> This results in some tiles that register as zero.
L2 was down -> Apparently this was clicked on and not back in, which makes things weird.

Mike decided to create a 12 patterns test.  My attention will not work with this, at least not with not setting the bias for the gui where I can see where I am.  Not enough coffee.

So, I decided to try to take another mapping test, under the theory that if I got EQ2 up and running, confirmed the node tree, and Tristan/Eugenia plugged in the connector, that it should all work.  And that we would never have to take the EPD down again.

Of course, HPSS takes forever.... I did run on the *.dat files, and produced:
drupal.star.bnl.gov/STAR/system/files/Compare_big_05052023.pdf

This made me realize that I should have a separate setting for Bs and Cs, things just really are too different.  (Unfortunately the Ds look more like Cs and I think aren't being separated, but baby steps.)
int lowLimitB[4] = {-1,10,99,3001};
  int hiLimitB[4]  = {9,100,3000,5000};
  int lowLimitC[4] = {-1,10,129,3001};
  int hiLimitC[4]  = {9,130,3000,5000};
Some other oddities:
EQ2 Board 4 (QTD) has some double structures going on.  Weird.
EQ2 Board 10 Ch 10 -> EW1, PP2, TT4 seems dead.  Oh well.
EQ2 Board 14 Ch 2 -> EW1 PP2 TT14 seems dead.  That's two.
I see these are all the ones that should've been remapped....
My code is picking up the mapping from the db, I believe.... Though I haven't thought much about the time stamp in the reader, which really is going to be something for another day.
EQ2 Board 14 Ch 7 --> EW1 PP3 TT13
EQ3 Board 8 Ch 17 -> EW1 PP6 TT1
EQ4 Board 4 Ch 16 -> EW0 PP1 TT16

Pedestal subtraction seems to have done something odd for the following QTD channels:
EQ4 Board 6 Ch 2 -> EW0 PP1 TT26
EQ4 Board 6 Ch 6 -> EW0 PP1 TT30
EQ4 Board 6 Ch 17  -> EW0 PP3 TT25
EQ4 Board 6 Ch 21 -> EW0 PP3 TT29
EQ4 Board 6 Ch 24 -> EW0 PP4 TT24
And really the rest.... Bored now....

With the levels in mind, I ran the code over the files Maria produced earlier.  I really love how sometimes the bfc fails, and if I just run it again, it passes....


Key files:
/star/u/mstefaniak/EPD/test7Pattern02may23/OutputDir/st_physics_24122043_raw_0000001.daq
/star/u/mstefaniak/EPD/test7Pattern02may23/OutputDir/st_physics_24122044_raw_0000001.daq
/star/u/mstefaniak/EPD/test7Pattern02may23/OutputDir/st_physics_24122045_raw_0000001.daq
/star/u/mstefaniak/EPD/test7Pattern02may23/OutputDir/st_physics_24122046_raw_0000001.daq
/star/u/mstefaniak/EPD/test7Pattern02may23/OutputDir/st_physics_24122047_raw_0000001.daq
/star/u/mstefaniak/EPD/test7Pattern02may23/OutputDir/st_physics_24122048_raw_0000001.daq
/star/u/mstefaniak/EPD/test7Pattern02may23/OutputDir/st_physics_24122049_raw_0000001.daq

Unfortunately, that didn't seem to really fix things.....  But so much was off or weird....

(You can see it at:
drupal.star.bnl.gov/STAR/system/files/MappingDay122_Maria.pdf

I wonder if Mike will read down to this point...