Fork me on GitHub

Changeset 157fe13 in git for modules/LLPFilter.cc


Ignore:
Timestamp:
Jan 12, 2022, 8:20:47 PM (3 years ago)
Author:
christinaw97 <christina.wang@…>
Children:
4aec383
Parents:
d1ab205
Message:

LLPFilter hard-coded decay region requirements are moved to configuration cards

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/LLPFilter.cc

    rd1ab205 r157fe13  
    2222 *  The classification of EM and hadronic energy of LLP is based on instructions from the HEPData entry for the CMS paper searching
    2323 *  for neutral LLPs in the CMS endcap muon detectors: https://www.hepdata.net/record/104408
     24 *  Muons and neutrinos are ignored. Photons, electrons, and pi0 are EM energy and everything else is hadronic energy.
    2425 *
    2526 *  \author Christina Wang
     
    7778
    7879  fInvert = GetBool("Invert", false);
    79   fDecayRegion = GetInt("DecayRegion", 0);
    8080  fDaughterNumber = GetInt("DaughterNumber", 0);
    81 
     81  fRequireDecayRegion = GetBool("RequireDecayRegion", 0);
     82
     83  fDecayRegionRMax = GetInt("DecayRegionRMax", 0); //mm
     84  fDecayRegionRMin = GetInt("DecayRegionRMin", 0); //mm
     85  fDecayRegionZMax = GetInt("DecayRegionZMax", 0); //mm
     86  fDecayRegionZMin = GetInt("DecayRegionZMin", 0); //mm
     87  fDecayRegionEtaMax = GetInt("DecayRegionEtaMax", 0); // requirement on abs(eta)
     88  fDecayRegionEtaMin = GetInt("DecayRegionEtaMin", 0); //requirement on abs(eta)
    8289
    8390
     
    148155    const TLorentzVector &candidateProdPosition = candidate->Position;
    149156    const TLorentzVector &candidateDecayPosition = candidate->DecayPosition;
    150     // TLorentzVector candidateDecayPosition;
    151157    pt = candidateMomentum.Pt();
    152158    eta = candidateMomentum.Eta();
     
    184190      if (tempCandidate->M1 == -1) continue;
    185191
    186       // candidateDecayPosition = daughter->Position;
    187 
     192      // assign LLP EM or hadronic energy, depending on the daughter ID
    188193      if (abs(daughterPdg)==11 || abs(daughterPdg)==22 || abs(daughterPdg)==111)candidate->Eem += daughterMomentum.E();
    189194      else candidate->Ehad += daughterMomentum.E();
    190195    }
    191196
    192     // used detector geometry in Figure 4.1.1, page141 from CERN-LHCC-97-032: https://cds.cern.ch/record/343814?ln=en
    193     // decayRegion = 0: no cuts on decay region
    194     // decayRegion = 1: select LLP that decays in CSC volume
    195     // decayRegion = 2: select LLP that decays outside of calorimeters
    196     if (fDecayRegion == 1)
     197    if (fRequireDecayRegion)
    197198    {
    198       if (abs(eta) < 2
    199          && abs(candidateDecayPosition.Z())<11000 && abs(candidateDecayPosition.Z())>4000
    200          && sqrt(pow(candidateDecayPosition.X(),2)+pow(candidateDecayPosition.Y(),2)) < 6955)
     199      if (abs(eta) < fDecayRegionEtaMax && abs(eta) > fDecayRegionEtaMin
     200         && abs(candidateDecayPosition.Z()) < fDecayRegionZMax && abs(candidateDecayPosition.Z()) > fDecayRegionZMin
     201         && sqrt(pow(candidateDecayPosition.X(),2)+pow(candidateDecayPosition.Y(),2)) < fDecayRegionRMax
     202         && sqrt(pow(candidateDecayPosition.X(),2)+pow(candidateDecayPosition.Y(),2)) > fDecayRegionRMin)
    201203      {
    202204        fOutputArray->Add(candidate);
     
    204206
    205207    }
    206     else if(fDecayRegion == 2)
    207     {
    208       if (abs(candidateDecayPosition.Z()) > 5680 && sqrt(pow(candidateDecayPosition.X(),2)+pow(candidateDecayPosition.Y(),2)) > 3000)
    209       {
    210         fOutputArray->Add(candidate);
    211       }
    212     }
    213208    else{
    214209      fOutputArray->Add(candidate);
Note: See TracChangeset for help on using the changeset viewer.