DUNE / dune-tms

DUNE ND Temporary Muon Spectrometer
0 stars 2 forks source link

how to create two TMS_Kalman objects for the same track without having the creation of the first object affect the creation of the second one #179

Open xiaoyan1997 opened 1 week ago

xiaoyan1997 commented 1 week ago

https://github.com/DUNE/dune-tms/blob/f5647abebb2cfcb306e1219b4a2a5147c59a97fd/src/TMS_Reco.cpp#L735 here two TMS_Kalman objects are created for one track. First TMS_Klman object assumes a negative charge, calculates the chi square, the second object assumes a positive charge and calculates the chi square.Then compare the chi square of those two objects and choose the sign of the smaller one as the sign of the charge. The problem is that the creation of the first object will affect the creation of the second one. For example, if you comment out the code that creates the second one and then run the code, save the result, and then you comment out the code that creates the first one, run the code and save the result. You compare those two results with the result that you run the two simultaneously, you will find that they are different(Actually the first object will be the same, but the second one will be different compared with the result of creating it without having the first ).