Fork me on GitHub

Changeset 4aec383 in git for modules/CscClusterId.cc


Ignore:
Timestamp:
Jan 12, 2022, 9:07:49 PM (3 years ago)
Author:
christinaw97 <christina.wang@…>
Children:
2a1d95e
Parents:
157fe13
Message:

remove hard-coded portions of CscClusterId to card

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/CscClusterId.cc

    r157fe13 r4aec383  
    2121  *  This module is specific to the CMS paper searching for neutral LLPs in the CMS endcap muon detectors: https://arxiv.org/abs/2107.04838
    2222  *  It is implemented based on the cut_based_id.py function provided in the HEPData entry of the paper: https://www.hepdata.net/record/104408
     23  *  to reproduce the cut-based ID efficiency of the CMS paper.
    2324  *
    2425  *  \author Christina Wang
     
    4849#include <sstream>
    4950#include <stdexcept>
    50 
     51#include "assert.h"
    5152using namespace std;
    5253
     
    5455
    5556CscClusterId::CscClusterId() :
    56   fFormula(0), fItInputArray(0)
     57  fFormula(0), fEtaFormula(0), fItInputArray(0)
    5758{
    5859  fFormula = new DelphesCscClusterFormula;
     60  fEtaFormula = new DelphesCscClusterFormula;
    5961}
    6062
     
    6466{
    6567  if(fFormula) delete fFormula;
     68  if(fEtaFormula) delete fEtaFormula;
    6669}
    6770
     
    7376
    7477  fFormula->Compile(GetString("EfficiencyFormula", "1.0"));
     78  fEtaFormula->Compile(GetString("EtaCutFormula", "1.0"));
     79  fEtaCutMax = GetDouble("EtaCutMax", 999.0);
    7580
    7681  // import input array
     
    114119    eta = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Eta());
    115120
     121    // calculate the NStation > 1 efficiency, implemented according to Additional Figure 8 in HEPData
    116122    NStationEff = fFormula->Eval(decayR, decayZ, Ehad);
    117123
    118     // assign average station for the cluster
    119     if (decayZ < 6320) avgStation = 1;
    120     else if (decayZ < 7240 && decayR > 2750)avgStation = 1;
    121     else if (decayZ < 8500) avgStation = 2;
    122     else if (decayZ < 9700) avgStation = 3;
    123     else avgStation = 4;
    124 
    125     // if NStation == 1, different eta cut is applied
    126     if (avgStation == 1) eta_cut = 1.8;
    127     else if (avgStation == 2) eta_cut = 1.6;
    128     else if (avgStation == 3) eta_cut = 1.6;
    129     else if (avgStation == 4) eta_cut = 1.8;
    130     if(gRandom->Uniform() > NStationEff*(abs(eta)<1.9)+(1.0-NStationEff)*(abs(eta)<eta_cut)) continue;
     124    // depending on the decay region (station Number), different eta cut is applied, implemented based on cut_based_id.py in HEPData
     125    float eta_cut = fEtaFormula->Eval(decayR, decayZ);
     126    if(gRandom->Uniform() > NStationEff*(abs(eta)<fEtaCutMax)+(1.0-NStationEff)*(abs(eta)<eta_cut)) continue;
    131127
    132128    fOutputArray->Add(candidate);
Note: See TracChangeset for help on using the changeset viewer.