A-A-Abdelhamid / LLP_Sleptons_RPV_SUSY

Here you can find MadGraph5 cards, diagrams, logs, plots, and code used in the project
2 stars 1 forks source link

Expected Events (Monday 8/21/23) #10

Open A-A-Abdelhamid opened 1 year ago

A-A-Abdelhamid commented 1 year ago

This is the function that uses a random number generator and efficiencies from the paper to select or neglect events that passed the acceptance cut :

def eff_func (lepton1, lepton2):

  x1= lepton1.momentum.pt()
  y1= abs(CalcD0(lepton1))

  x2= lepton2.momentum.pt()
  y2= abs(CalcD0(lepton2))

  binX1 = hist.GetXaxis().FindBin(x1)
  binY1 = hist.GetYaxis().FindBin(y1)
  if binY1 ==0:
    binY1=1

  binX2 = hist.GetXaxis().FindBin(x2)
  binY2 = hist.GetYaxis().FindBin(y2)
  if binY2 ==0:
    binY2=1

  eff_value1= hist.GetBinContent(binX1, binY1)
  eff_value2= hist.GetBinContent(binX2, binY2)

  rand1= random.random()
  rand2= random.random()
  global pass1
  global pass2
  pass1 = False
  pass2=False

  if rand1 < eff_value1:
    pass1 = True
  else:
    pass1 = False

  if rand2 < eff_value2:
    pass2 = True
  else:
    pass2 = False

  if pass1 == True and pass2 == True:
    return True
  else:
    return False

For events with only 2 muons satisfying the acceptance cuts, using the function is straightforward.

In case there is more than 2 muons, the code uses the function with the leading two highest Pt muons, if one or both of them is not selected, then it removes whatever did not pass the efficeniy selection and looks at the next two leading muons

if cond== False:

            if pass1 == False:
              leptons.remove(leptons[0])

            if pass2 == False:
              leptons.remove(leptons[1])

            if len(leptons) >= 2:

              for lepton in leptons:

                cond= eff_func(leptons[0],leptons[1])
                if cond == True:
                  good_event=good_event+1

                  break
                if  cond == False:
                  if pass1 == False:
                    leptons.remove(leptons[0])

                  if pass2 == False:
                    leptons.remove(leptons[1])
                if len(leptons)==1:
                  break

The entire code for the whole selection process is here

Right now I'm getting surviving event counts of 1696, 1753, and 1756. Of course the number changes every time I run the code.

I probably should ask it to run the code 10,000 times or so then to average the number of surviving events.

Assuming that the surviving events are ~1600-1700, we need to convert (normalize) them to the actual expected observed events based on the cross-section and luminosity. equation-4

Putting number of surviving events (N_MC) to be 1700 for now, the cross-section of 400-GeV right-handed smuon pair creation is 0.0005221 pb and the luminosity from the paper is 139 fb-1

Putting these together, I calculated the number of expected observed events to be 6.169 event

If I did not make a mistake somewhere , then this means that the 400 GeV right-handed smuons with 0.1 ns lifetime would be excluded by this search.

I still need to get the uncertainties for the efficiencies, and use them in my calculation along with the uncertainty in the cross section