lawrenceleejr / FragmentationStudy

2 stars 1 forks source link

Herwig Investigations - Events w/ no jets above 50 GeV #8

Closed cbell1402 closed 1 year ago

cbell1402 commented 1 year ago

98 GeV that’s not accounted for in event 1. Start looking at the Particle collection and see if you take all the status=1 particles and sum their four momentum, that things balance

lawrenceleejr commented 1 year ago

Hijacking this ticket. This will be about the investigation of events that have no jets above 50 GeV. This is to confirm our reading of the TTree Draw command issue.

cbell1402 commented 1 year ago

For the first point - I may be confusing myself with how break and continue statements work. If I use

if GenJet.PT < 50:
      pt_num += 1
      break
('number of events PT < 50: ', 63698)

 if GenJet.PT > 50:
      pt_num += 1
      break
('number of events PT < 50: ', 30544)

With continue statments instead -

if GenJet.PT < 50:
      pt_num += 1
      continue
('number of events PT < 50: ', 110680)

 if GenJet.PT > 50:
      pt_num += 1
      continue
('number of events PT < 50: ', 70158)
cbell1402 commented 1 year ago

So, after further investigation, I think the correct number is either the first or third statement. I'm thinking the break statement (the first) is the more correct one. But, if I understand this correctly, with the break it will count the first jet in an event with PT less than 50 and then move on. I believe that should prevent double or triple counting.

So, it looks like the number of events with PT < 50 is 63698.

lawrenceleejr commented 1 year ago

To calculate this number, you want to know how many events have nothing above 50 GeV, so that's the same as saying, if you find an event that has a jet above 50 GeV, then it shouldn't go into this number.

But unfortunately I think, if I've understood correctly, none of the things you have above are that. See what I mean? I would suggest setting a variable hasJetAbove50GeV = false and then loop over the jets and set it to true if you find something above 50 GeV. You then want to count the number of events where that variable is still false at the end of that loop. See what I mean?

cbell1402 commented 1 year ago

Yes, I think that works better. The following is simplified.

for entry in range(0, numberOfEntries):
    hasJetAbove50GeV = False

    for ijet in range(branchGenJet.GetEntries()):
        if GenJet.PT < 50:
            hasJetAbove50GeV = True

    if hasJetAbove50GeV is True:
        pt_num += 1

This returns ('number of events PT < 50: ', 63698) So, it does appear this is around 70k.

lawrenceleejr commented 1 year ago

Good! Now we need to figure out what all those events are. We have a TeV of energy around. Where did it all go? Print out the particle collection for the first few events that are weird like this?

cbell1402 commented 1 year ago

I adjusted the script to run over both GenJets and particles. Attached is an output text file. I ran over the first ten events, three of which have jets with PT < 50 GeV. In the text file is the event, jet number, GenJet.PT, P, NCharged, NNeutrals, and then followed by all the particle IDs and statuses of that event. Please let me know if more info is needed or if I ran this incorrectly. herwig_script_output.txt

lawrenceleejr commented 1 year ago

Good! You have the structure right. So looking at event 6, we have a single GenJet and its pT is only 28 GeV. So this is a bit weird already. For the particle information, can you output it in a format where each particle gets just one printed line and that line has the following information:

ID, Status, Px, Py, Pz, E

That will then give us enough information to understand what happened under the hood in these events.

cbell1402 commented 1 year ago

Here you go! herwig_script_output_update.txt

lawrenceleejr commented 1 year ago

Thanks @cbell1402!! Looking at event 6.

The GenJet collection has a single jet with pt 28 GeV and P 91 GeV. For our records but also to explain things a bit, I'll break down some of the print out.

Particle ID: 23, Particle Status: 11, Px: -0.000000, Py: 0.000000, Pz: 495.147980, E: 503.616638 Particle ID: 11, Particle Status: 4, Px: 0.000000, Py: 0.000000, Pz: 500.000000, E: 500.000000 Particle ID: 22, Particle Status: 1, Px: 0.000000, Py: 0.000000, Pz: 0.617697, E: 0.617697 Particle ID: 11, Particle Status: 11, Px: -0.000000, Py: 0.000000, Pz: 499.382294, E: 499.382294 Particle ID: -11, Particle Status: 4, Px: 0.000000, Py: 0.000000, Pz: -500.000000, E: 500.000000 Particle ID: 22, Particle Status: 1, Px: 0.000000, Py: 0.000000, Pz: -495.765656, E: 495.765656 Particle ID: -11, Particle Status: 11, Px: -0.000000, Py: 0.000000, Pz: -4.234330, E: 4.234330

These are the beam particles because you can see they only have z momentum. If you look at the parentage information, you'll find that this is an electron and a positron where you then actually emit a collinear Z (23) and a collinear high energy photon (22) as well.

Particle ID: -5, Particle Status: 11, Px: -13.465781, Py: 38.382969, Pz: 362.742645, E: 365.040314 Particle ID: 5, Particle Status: 11, Px: 13.465781, Py: -38.382969, Pz: 132.405334, E: 138.576309 Particle ID: 5, Particle Status: 11, Px: 11.207990, Py: -31.947344, Pz: 137.785889, E: 143.393906 Particle ID: -5, Particle Status: 11, Px: -11.207990, Py: 31.947344, Pz: 357.362091, E: 360.222717

Lots of energy in a b and anti b quark pair. You can see they balance each other in the transverse plane. But they carry hundreds of GeV of energy. This is already incompatible with the GenJet collection... But notice that they are very forward. (much more Z pt than transverse to the beam)

Particle ID: 11, Particle Status: 11, Px: -0.000000, Py: 0.000000, Pz: 499.382294, E: 499.382294 Particle ID: -11, Particle Status: 11, Px: -0.000000, Py: 0.000000, Pz: -4.234330, E: 4.234330

Beam stuff again.

Now I'm going to focus on the high energy stuff.

Particle ID: -5, Particle Status: 11, Px: -17.876652, Py: 25.904470, Pz: 309.922974, E: 311.557159 Particle ID: 21, Particle Status: 11, Px: 6.668661, Py: 6.042872, Pz: 47.439117, E: 48.665577 Particle ID: 21, Particle Status: 11, Px: 4.714432, Py: 1.287663, Pz: 20.489759, E: 21.085936 Particle ID: 21, Particle Status: 11, Px: 1.954229, Py: 4.755208, Pz: 26.949360, E: 27.579639 Particle ID: 2, Particle Status: 11, Px: 1.284680, Py: 0.421211, Pz: 6.963510, E: 7.100980 Particle ID: -2, Particle Status: 11, Px: 3.429751, Py: 0.866452, Pz: 13.526250, E: 13.984956 Particle ID: 2, Particle Status: 11, Px: 2.363208, Py: 4.020656, Pz: 24.981371, E: 25.415054 Particle ID: -2, Particle Status: 11, Px: -0.408979, Py: 0.734553, Pz: 1.967987, E: 2.164586

Particle ID: 5, Particle Status: 11, Px: 11.312735, Py: -31.046825, Pz: 109.521423, E: 115.098946 Particle ID: 21, Particle Status: 11, Px: -0.104745, Py: -0.900518, Pz: 28.264471, E: 28.294960

Particle ID: 5, Particle Status: 11, Px: 11.270219, Py: -30.838724, Pz: 96.775269, E: 102.315674 Particle ID: 21, Particle Status: 11, Px: 0.042516, Py: -0.208100, Pz: 12.746154, E: 12.783272 Particle ID: 3, Particle Status: 11, Px: 0.063738, Py: -0.120419, Pz: 4.536524, E: 4.560823 Particle ID: -3, Particle Status: 11, Px: -0.021222, Py: -0.087681, Pz: 8.209630, E: 8.222448 Particle ID: 2, Particle Status: 11, Px: 0.009926, Py: -0.440458, Pz: 6.536877, E: 6.559762 Particle ID: -2, Particle Status: 11, Px: -0.114671, Py: -0.460060, Pz: 21.727594, E: 21.735197 Particle ID: 81, Particle Status: 11, Px: -0.399053, Py: 0.294095, Pz: 8.504864, E: 8.724348 Particle ID: 81, Particle Status: 11, Px: -0.050933, Py: -0.580479, Pz: 26.264118, E: 26.296021 Particle ID: 81, Particle Status: 11, Px: 11.248997, Py: -30.926407, Pz: 104.984894, E: 110.538124 Particle ID: 81, Particle Status: 11, Px: -16.591970, Py: 26.325682, Pz: 316.886475, E: 318.658142 Particle ID: 81, Particle Status: 11, Px: 5.792960, Py: 4.887108, Pz: 38.507622, E: 39.400009

These 81 are just bookkeeping and not real.

Particle ID: 10215, Particle Status: 2, Px: -0.280542, Py: 0.276928, Pz: 8.006590, E: 8.193221 Particle ID: -211, Particle Status: 1, Px: -0.118511, Py: 0.017167, Pz: 0.498274, E: 0.531127 Particle ID: 111, Particle Status: 2, Px: -0.079118, Py: -0.299894, Pz: 9.574569, E: 9.580543 Particle ID: -323, Particle Status: 2, Px: 0.028184, Py: -0.280585, Pz: 16.689548, E: 16.715479 Particle ID: -523, Particle Status: 2, Px: 11.609285, Py: -29.746090, Pz: 97.007317, E: 102.266228 Particle ID: 10325, Particle Status: 2, Px: -0.360289, Py: -1.180317, Pz: 7.977578, E: 8.271897 Particle ID: 20523, Particle Status: 2, Px: -17.756981, Py: 25.906178, Pz: 301.882080, E: 303.566711 Particle ID: 30223, Particle Status: 2, Px: 1.165010, Py: 0.419505, Pz: 15.004381, E: 15.091418 Particle ID: -215, Particle Status: 2, Px: 2.104150, Py: 1.318843, Pz: 12.299670, E: 12.610698 Particle ID: 30213, Particle Status: 2, Px: 3.688810, Py: 3.568265, Pz: 26.207952, E: 26.789312

Some hadrons below. We're well into the hadronization now.

Particle ID: 513, Particle Status: 2, Px: -15.449277, Py: 23.200748, Pz: 268.298462, E: 269.795074 Particle ID: 211, Particle Status: 1, Px: -2.307704, Py: 2.705429, Pz: 33.583618, E: 33.771641 Particle ID: 223, Particle Status: 2, Px: 0.853684, Py: 0.300168, Pz: 10.897578, E: 10.961653 Particle ID: 211, Particle Status: 1, Px: 0.160953, Py: 0.060060, Pz: 2.094291, E: 2.105956 Particle ID: -211, Particle Status: 1, Px: 0.150373, Py: 0.059277, Pz: 2.012511, E: 2.023810 Particle ID: 113, Particle Status: 2, Px: -0.050303, Py: 0.774216, Pz: 6.403402, E: 6.493222 Particle ID: 211, Particle Status: 1, Px: -0.230238, Py: -0.497288, Pz: 1.603188, E: 1.699999 Particle ID: 22, Particle Status: 1, Px: -0.103239, Py: -0.295884, Pz: 8.746774, E: 8.752386 Particle ID: 22, Particle Status: 1, Px: 0.024121, Py: -0.004010, Pz: 0.827795, E: 0.828156 Particle ID: -321, Particle Status: 1, Px: -0.246979, Py: -0.290692, Pz: 11.332331, E: 11.349490 Particle ID: 111, Particle Status: 2, Px: 0.275163, Py: 0.010107, Pz: 5.357219, E: 5.365988 Particle ID: -213, Particle Status: 2, Px: 1.233210, Py: 0.811630, Pz: 5.640946, E: 5.874777 Particle ID: 111, Particle Status: 2, Px: 0.870940, Py: 0.507213, Pz: 6.658724, E: 6.735920 Particle ID: 111, Particle Status: 2, Px: 1.094402, Py: 0.191259, Pz: 4.982510, E: 5.106655 Particle ID: 100211, Particle Status: 2, Px: 2.594408, Py: 3.377006, Pz: 21.225441, E: 21.682657 Particle ID: 22, Particle Status: 1, Px: 0.068219, Py: -0.270079, Pz: 0.933406, E: 0.974086 Particle ID: -521, Particle Status: 2, Px: 11.541067, Py: -29.476011, Pz: 96.073914, E: 101.292137 Particle ID: 321, Particle Status: 1, Px: -0.264647, Py: -0.644403, Pz: 3.571153, E: 3.671804 Particle ID: 225, Particle Status: 2, Px: -0.095643, Py: -0.535915, Pz: 4.406425, E: 4.600093 Particle ID: 22, Particle Status: 1, Px: -0.026077, Py: 0.014114, Pz: 0.486253, E: 0.487157 Particle ID: 511, Particle Status: 11, Px: -15.423200, Py: 23.186634, Pz: 267.812225, E: 269.307922 Particle ID: 511, Particle Status: 2, Px: -15.423200, Py: 23.186634, Pz: 267.812225, E: 269.307922 Particle ID: -411, Particle Status: 2, Px: -1.885039, Py: 2.783341, Pz: 38.848412, E: 39.038376 Particle ID: -13, Particle Status: 1, Px: -5.634227, Py: 8.611665, Pz: 96.782974, E: 97.328621 Particle ID: 14, Particle Status: 1, Px: -7.903934, Py: 11.791629, Pz: 132.180832, E: 132.940918 Particle ID: 310, Particle Status: 2, Px: -1.156090, Py: 1.304540, Pz: 12.921621, E: 13.048153 Particle ID: -211, Particle Status: 1, Px: -0.224535, Py: 0.370966, Pz: 3.429367, E: 3.459490 Particle ID: 111, Particle Status: 2, Px: -0.504414, Py: 1.107834, Pz: 22.497423, E: 22.530735 Particle ID: 211, Particle Status: 1, Px: -0.949432, Py: 0.965112, Pz: 10.773670, E: 10.859296 Particle ID: -211, Particle Status: 1, Px: -0.206658, Py: 0.339428, Pz: 2.147952, E: 2.188857 Particle ID: 22, Particle Status: 1, Px: -0.296668, Py: 0.592859, Pz: 13.385073, E: 13.401480 Particle ID: 22, Particle Status: 1, Px: -0.207747, Py: 0.514975, Pz: 9.112350, E: 9.129254 Particle ID: -211, Particle Status: 1, Px: 0.663492, Py: 0.117988, Pz: 5.531092, E: 5.573742 Particle ID: 213, Particle Status: 2, Px: 0.190192, Py: 0.182180, Pz: 5.366486, E: 5.387910 Particle ID: 111, Particle Status: 2, Px: 0.153262, Py: -0.028986, Pz: 3.142235, E: 3.148998 Particle ID: 211, Particle Status: 1, Px: 0.036930, Py: 0.211166, Pz: 2.224251, E: 2.238912 Particle ID: 22, Particle Status: 1, Px: 0.153167, Py: -0.067734, Pz: 2.524500, E: 2.530049 Particle ID: 22, Particle Status: 1, Px: 0.000095, Py: 0.038748, Pz: 0.617735, E: 0.618949 Particle ID: 211, Particle Status: 1, Px: 0.100964, Py: 0.275728, Pz: 0.794422, E: 0.858374 Particle ID: -211, Particle Status: 1, Px: -0.151267, Py: 0.498488, Pz: 5.608981, E: 5.634848 Particle ID: 22, Particle Status: 1, Px: 0.062562, Py: -0.047984, Pz: 0.951888, E: 0.955148 Particle ID: 22, Particle Status: 1, Px: 0.212601, Py: 0.058091, Pz: 4.405331, E: 4.410840 Particle ID: 111, Particle Status: 2, Px: 0.297945, Py: -0.001990, Pz: 0.617823, E: 0.699070 Particle ID: -211, Particle Status: 1, Px: 0.935265, Py: 0.813620, Pz: 5.023123, E: 5.175707 Particle ID: 22, Particle Status: 1, Px: 0.488120, Py: 0.206411, Pz: 3.440966, E: 3.481539 Particle ID: 22, Particle Status: 1, Px: 0.382820, Py: 0.300801, Pz: 3.217758, E: 3.254382 Particle ID: 22, Particle Status: 1, Px: 0.309293, Py: 0.011315, Pz: 0.588702, E: 0.665102 Particle ID: 22, Particle Status: 1, Px: -0.011349, Py: -0.013305, Pz: 0.029121, E: 0.033968 Particle ID: 22, Particle Status: 1, Px: 0.117444, Py: -0.020601, Pz: 0.565523, E: 0.577956 Particle ID: 22, Particle Status: 1, Px: 0.976958, Py: 0.211860, Pz: 4.416987, E: 4.528698 Particle ID: 111, Particle Status: 2, Px: 0.182290, Py: 0.045835, Pz: 1.547307, E: 1.564515 Particle ID: 213, Particle Status: 2, Px: 2.412118, Py: 3.331171, Pz: 19.678135, E: 20.118143 Particle ID: 22, Particle Status: 1, Px: 0.024600, Py: -0.033182, Pz: 0.564317, E: 0.565827 Particle ID: 22, Particle Status: 1, Px: 0.157690, Py: 0.079016, Pz: 0.982990, E: 0.998688 Particle ID: 111, Particle Status: 2, Px: 2.275037, Py: 3.053841, Pz: 17.211132, E: 17.627905 Particle ID: 211, Particle Status: 1, Px: 0.137081, Py: 0.277330, Pz: 2.467003, E: 2.490238 Particle ID: 22, Particle Status: 1, Px: 0.346581, Py: 0.474472, Pz: 2.438703, E: 2.508489 Particle ID: 22, Particle Status: 1, Px: 1.928456, Py: 2.579370, Pz: 14.772429, E: 15.119416 Particle ID: 413, Particle Status: 2, Px: 5.551000, Py: -13.993246, Pz: 40.902771, E: 43.631435 Particle ID: 111, Particle Status: 2, Px: 5.577907, Py: -13.245028, Pz: 48.209675, E: 50.306408 Particle ID: -211, Particle Status: 1, Px: 0.173768, Py: -1.909053, Pz: 5.282459, E: 5.621257 Particle ID: -211, Particle Status: 1, Px: 0.238393, Py: -0.328684, Pz: 1.679009, E: 1.733036 Particle ID: 421, Particle Status: 2, Px: 5.186133, Py: -13.020668, Pz: 37.981956, E: 40.528267 Particle ID: 211, Particle Status: 1, Px: 0.364866, Py: -0.972578, Pz: 2.920813, E: 3.103170 Particle ID: 22, Particle Status: 1, Px: 4.675403, Py: -11.208894, Pz: 40.828606, E: 42.596638 Particle ID: 22, Particle Status: 1, Px: 0.902503, Py: -2.036134, Pz: 7.381071, E: 7.709771 Particle ID: -323, Particle Status: 2, Px: 3.128162, Py: -8.065536, Pz: 24.071753, E: 25.595192 Particle ID: -11, Particle Status: 1, Px: 0.852347, Py: -1.629109, Pz: 3.792408, E: 4.214600 Particle ID: 12, Particle Status: 1, Px: 1.205624, Py: -3.326023, Pz: 10.117795, E: 10.718476 Particle ID: -311, Particle Status: 11, Px: 2.948849, Py: -7.114548, Pz: 21.136677, E: 22.501537 Particle ID: -211, Particle Status: 1, Px: 0.179313, Py: -0.950988, Pz: 2.935077, E: 3.093653 Particle ID: 310, Particle Status: 2, Px: 2.948849, Py: -7.114548, Pz: 21.136677, E: 22.501537 Particle ID: 211, Particle Status: 1, Px: 0.362397, Py: -0.925695, Pz: 3.022914, E: 3.185236 Particle ID: -211, Particle Status: 1, Px: 2.586452, Py: -6.188853, Pz: 18.113762, E: 19.316301 Particle ID: -211, Particle Status: 1, Px: -0.597186, Py: -0.184562, Pz: 2.863200, E: 2.933955 Particle ID: 211, Particle Status: 1, Px: 0.501544, Py: -0.351352, Pz: 1.543225, E: 1.666138

I think what's happening here is that the jets are forward and not being picked up in the GenJet collection probably because of some eta cut. That's probably reasonable. All of that energy wants to go somewhere and it wants to produce lower mass stuff. So it's producing a lower mass thing and kicking it in the forward direction. So this might be ok. Just another sign that this sample was not what we were looking for. Looks like we just need #9 so that we can control the process a little better.

Calling this ticket done.