Fork me on GitHub

Changeset 4aec383 in git


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

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cards/delphes_card_CMS_CSCCluster.tcl

    r157fe13 r4aec383  
    623623  set OutputArray cluster
    624624
     625  set EtaCutMax 1.9
     626
    625627  # efficiency formula for Csc Cluster, as a function of LLP decay vertex in R, Z and hadronic and EM energy
    626628  set EfficiencyFormula {
     
    650652    (Ehad >= 200.0)*(0.2404))
    651653  }
     654  set EtaCutFormula {
     655    (decayZ < 6320 || (decayZ < 7240 && decayR > 2750)) * (1.8) +
     656    ( !(decayZ < 6320 || (decayZ < 7240 && decayR > 2750)) && decayZ < 9700) * (1.6) +
     657    (decayZ >= 9700) * (1.8)
     658  }
     659
    652660}
    653661######################
  • 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);
  • modules/CscClusterId.h

    r157fe13 r4aec383  
    4646private:
    4747  DelphesCscClusterFormula *fFormula; //!
     48  DelphesCscClusterFormula *fEtaFormula; //!
     49  Double_t fEtaCutMax;
    4850
    4951  TIterator *fItInputArray; //!
  • modules/LLPFilter.cc

    r157fe13 r4aec383  
    8181  fRequireDecayRegion = GetBool("RequireDecayRegion", 0);
    8282
    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)
     83  fDecayRegionRMax = GetDouble("DecayRegionRMax", 0.0); //mm
     84  fDecayRegionRMin = GetDouble("DecayRegionRMin", 0.0); //mm
     85  fDecayRegionZMax = GetDouble("DecayRegionZMax", 0.0); //mm
     86  fDecayRegionZMin = GetDouble("DecayRegionZMin", 0.0); //mm
     87  fDecayRegionEtaMax = GetDouble("DecayRegionEtaMax", 0.0); // requirement on abs(eta)
     88  fDecayRegionEtaMin = GetDouble("DecayRegionEtaMin", 0.0); //requirement on abs(eta)
    8989
    9090
  • modules/LLPFilter.h

    r157fe13 r4aec383  
    5252  Double_t fPTMin; //!
    5353  Bool_t fRequireDecayRegion;
    54   Int_t fDecayRegionRMax;
    55   Int_t fDecayRegionRMin;
    56   Int_t fDecayRegionZMax;
    57   Int_t fDecayRegionZMin;
    58   Int_t fDecayRegionEtaMax;
    59   Int_t fDecayRegionEtaMin;
     54  Double_t fDecayRegionRMax;
     55  Double_t fDecayRegionRMin;
     56  Double_t fDecayRegionZMax;
     57  Double_t fDecayRegionZMin;
     58  Double_t fDecayRegionEtaMax;
     59  Double_t fDecayRegionEtaMin;
    6060  Int_t fDaughterNumber;
    6161  Bool_t fInvert; //!
Note: See TracChangeset for help on using the changeset viewer.