gordonwatts / CalRatioTrainer

1 stars 2 forks source link

What, exactly, is etaPos, and why often so large? #189

Closed gordonwatts closed 10 months ago

gordonwatts commented 12 months ago

It can often be around 2 or 3 (or even 4) different from the jet eta. Understand how we are doing the matching and make sure it is correct. This might be more of an issue with geometry and quite correct.

gordonwatts commented 12 months ago

Same for phiDir - and make sure to update the test in test_convert_divert which checks these to make sure they are reasonable!

gordonwatts commented 11 months ago

Here is an example of etaDir - most of them seem tob e zeros: image

gordonwatts commented 10 months ago

There are two kinds of variables, according to the note:

I am not sure I see how these muon segments can be used with out detailed knowledge of how the detector works!

gordonwatts commented 10 months ago

Inconsistent phi/eta adjustment:

    mseg_deta_pos = mseg_list.etaPos - jet_list.eta  # type: ignore
    mseg_list["etaPos"] = mseg_deta_pos  # type: ignore
    mseg_dphi_pos = rectify(np, mseg_list.phiPos - jet_list.phi)  # type: ignore
    mseg_list["phiPos"] = mseg_dphi_pos  # type: ignore
    mseg_dphi_dir = rectify(np, mseg_list.phiDir - jet_list.phi)  # type: ignore
    mseg_list["phiDir"] = mseg_dphi_dir  # type: ignore

Why not the eta? :-)

gordonwatts commented 10 months ago

And here is the C++ pre-processing:

        for (int i=0; i < 30; i++){
                indexArray[i] = i;
                if (mseg_etaPos_arr[i] != 0)  mseg_etaPos_arr_copy[i] = mseg_etaPos_arr[i] - jet_eta;
                else mseg_etaPos_arr_copy[i] = mseg_etaPos_arr[i];
                if ( mseg_phiPos_arr[i] != 0 ) mseg_phiPos_arr[i] = mseg_phiPos_arr[i] - jet_phi;
                else mseg_phiPos_arr[i] = 9999999;
                mseg_etaDir_arr_copy[i] = mseg_etaDir_arr[i];
                if ( mseg_phiDir_arr[i] != 0) mseg_phiDir_arr_copy[i] = mseg_phiDir_arr[i] - jet_phi;
                else mseg_phiDir_arr_copy[i] = mseg_phiDir_arr[i];
                mseg_t0_arr_copy[i] = mseg_t0_arr[i];
                mseg_chiSquared_arr_copy[i] = mseg_chiSquared_arr[i];
        }
gordonwatts commented 10 months ago

Ok - so that preprocessing looks good! This all makes sense.