SsdEmbedding Maker

03/01 :
add protection in StSsdEmbeddingMaker for when no ssdhit table is found.
And in St_spa_Maker because then no sls_strip from StssdEmbeddingMaker is produced.
At the third event, g2t_track Table seems empty.
--> done

second thing : at the third event, in writeStripTtable, all indexes are empty (signal, idmcTrack)
maybe sls_strip->purge()  is missing.

03/03 :
it seems there is a offset between IdR and IdM

03/26 :

example (in the first event of the bfcMixer macro) :

I have 9 hits from Geant :

StSsdEmbeddingMaker:INFO  - mNumOfGeantHits = 9

After IdealToReal() method, I end up with 7 hits :

p=0 geant = 0 after-geom = 0
p=1 geant = 1 after-geom = 1
p=2 geant = 2 after-geom = 2
p=3 geant = 3 after-geom = 3
p=4 geant = 4 after-geom = -1
p=5 geant = 5 after-geom = 5
p=6 geant = 6 after-geom = -1
p=7 geant = 7 after-geom = 7
p=8 geant = 8 after-geom = 8
initial col size =9 final collection size =7

2 hits are rejected : their indexes (-1) is different than the one from Geant

At the end of the spa_maker (daq behavior), I have 16 strips that are converted in 1 hit.

For the merging method (real data + simu), if I required to sum only the same strips (ie same wafer, ladder,side and id), I end up with :

merging simu+real = 3
StSsdAddMaker:INFO  - ####        NUMBER OF SPA STRIPS 3        ####
StSsdAddMaker:INFO  - ####      NUMBER OF CLUSTER P SIDE 1      ####
StSsdAddMaker:INFO  - ####      NUMBER OF CLUSTER N SIDE 1      ####
ok, found idMcTrack=7  i=0   j=0
ok, found idMcTrack=7  i=0   j=1
ok, found idMcTrack=7  i=0   j=2
StSsdAddMaker:INFO  - ####   -> 2 CLUSTERS WRITTEN INTO TABLE       ####
****       Remark: 0  solved packages     ****
StSsdAddMaker:INFO  - ####   -> 1 PACKAGES IN THE SSD           ####
ok, found idMcTrack=7  i=0   j=0
ok, found idMcTrack=7  i=0   j=1
idTruth =7
StSsdAddMaker:INFO  - ####   -> 1 HITS WRITTEN INTO TABLE       ####
StSsdAddMaker:INFO  - ####   -> 1 HITS WRITTEN INTO CONTAINER   ####
StSsdAddMaker:INFO  - ####        END OF SSD NEW POINT MAKER       ####
StSsdAddMaker:INFO  - #################################################

The problem is when looking at the TrackMapNtuple.root  :

root.exe [1] SsdHitNtuple.Scan("IdM:IdR")                            
************************************
*    Row   *       IdM *       IdR *
************************************
*        0 *         0 *         7 *
*        1 *         7 *         0 *
*        2 *         4 *         0 *
*        3 *         2 *         0 *
*        4 *         9 *         0 *
*        5 *         6 *         0 *
*        6 *         8 *         0 *
*        7 *        10 *        0 *
*        8 *         1 *         0 *
*        9 *         3 *         0 *
************************************
There is an offset between IdM and IdR, where I don't a zero for the first entry in IdM