%CERTIFY%

Winter2012TopPhotonPrescriptions

e/gamma recommendations on photons for Winter2012 conferences analyses

Links to announcements in Hypernews archive

Links to e/gamma CP official TWiki under "Recommendations for data analysis" in main e/gamma CP TWiki


Necessary tools for D3PD analyses

egammaAnalysisUtils

PhotonIDTool

FudgeMCTool

List of important announcements for the tools in Hypernews archive


Practical prescriptions for an user analysis

in what follows assume that photons is a PhotonD3PDObject and photons.cl_E()->at(i) corresponds to cluster Et of the i-th photon

Energy re-scaling & MC photon smearing

In header file:

#include "egammaAnalysisUtils/EnergyRescaler.h"

public:
   eg2011::EnergyRescaler eRescale;

private:
   double factor;  // energy scale correction factor for photon (data)
   double factorEUp;  // 1 sigma up for systematic
   double factorEDn;  // 1 sigma down for systematic
   double alpha;  // for investigating shifts due to photon energy re-scaling: photon energy scale factor (alpha)
   double errUp;  // it's error +1 sigma
   double errDn;  // it's error -1 sigma

In implementation file:

  eRescale.useDefaultCalibConstants("2011");

  std::string part_type;
  if (photons.isConv()->at(i) == 0) {
    part_type = "UNCONVERTED_PHOTON";
  } else {
    part_type = "CONVERTED_PHOTON";
  }

  if (!isMonteCarlo) {  // for DATA photons

    factor    = eRescale.applyEnergyCorrectionGeV(photons.cl_eta()->at(i),
                                                  photons.cl_phi()->at(i),
                                                  photons.cl_E()->at(i)/1000.,
                                                  (photons.cl_E()->at(i) / cosh(photons.etas2()->at(i)))/1000.,
                                                  0,
                                                  part_type)
                                               / (photons.cl_E()->at(i)/1000.);

    factorEUp = eRescale.applyEnergyCorrectionGeV(photons.cl_eta()->at(i),
                                                  photons.cl_phi()->at(i),
                                                  photons.cl_E()->at(i)/1000.,
                                                  (photons.cl_E()->at(i) / cosh(photons.etas2()->at(i)))/1000.,
                                                  2,
                                                  part_type)
                                               / (photons.cl_E()->at(i)/1000.);

    factorEDn = eRescale.applyEnergyCorrectionGeV(photons.cl_eta()->at(i),
                                                  photons.cl_phi()->at(i),
                                                  photons.cl_E()->at(i)/1000.,
                                                  (photons.cl_E()->at(i) / cosh(photons.etas2()->at(i)))/1000.,
                                                  1,
                                                  part_type)
                                               / (photons.cl_E()->at(i)/1000.);

    errDn = 0.;
    errUp = 0.;
    eRescale.getErrorGeV(photons.cl_eta()->at(i),
                         (photons.cl_E()->at(i) / cosh(photons.etas2()->at(i)))/1000.,
                         errUp,
                         errDn,
                         part_type);

    double energyCentral = eRescale.applyEnergyCorrectionGeV(photons.cl_eta()->at(i),
                                                             photons.cl_phi()->at(i),
                                                             photons.cl_E()->at(i)/1000.,
                                                             (photons.cl_E()->at(i) / cosh(photons.etas2()->at(i)))/1000.,
                                                             0,
                                                             part_type);
    if (fabs(photons.cl_eta()->at(i)) < 1.37) {
      h_phEscale_uncertReal_Up->Fill(photons.cl_pt()->at(i)*factor/1000., errUp, 1.0);
      h_phEscale_uncertReal_Dn->Fill(photons.cl_pt()->at(i)*factor/1000., errDn, 1.0);
      h_alpha_alphaErrUp->Fill(alpha, errUp);
      h_alpha_alphaErrDn->Fill(alpha, errDn);
    }

  } else {  // smearing correction for MC photons

    smearcorr = eRescale.getSmearingCorrectionGeV(photons.cl_eta()->at(i),
                                                  photons.cl_E()->at(i)/1000.,
                                                  0,
                                                  mcWithConstantTerm,
                                                  "2011");
    factor = smearcorr;

  }

Photon tight ID by fudging the shower variables

In header file:

#include "PhotonIDTool/PhotonIDTool.h"
#include "FudgeMCTool/FudgeMCTool.h"

In implementation file:

  if (!isMonteCarlo) {  // Identification cuts for DATA photons

    PhotonIDTool idtool(factor*photons.cl_E()->at(i) / cosh(photons.etas2()->at(i)),
                        fabs(photons.etas2()->at(i)),
                        photons.Ethad1()->at(i),
                        photons.Ethad()->at(i),
                        factor*photons.E277()->at(i),
                        factor*photons.E237()->at(i),
                        factor*photons.E233()->at(i),
                        photons.weta2()->at(i),
                        photons.f1()->at(i),
                        factor*photons.emaxs1()->at(i),
                        factor*photons.Emax2()->at(i),
                        factor*photons.Emins1()->at(i),
                        photons.fside()->at(i),
                        photons.wstot()->at(i),
                        photons.ws3()->at(i),
                        photons.isConv()->at(i) );


    if (idtool.PhotonCutsTight(6) != 1) { return false; }  // require tight photon ID

  } else {  // for MC photons

    double et     = (photons.cl_E()->at(i)) / cosh(fabs(photons.etas2()->at(i)));
    double rhad1  = et != 0. ? photons.Ethad1()->at(i) / et : 0.;
    double rhad   = et != 0. ? photons.Ethad()->at(i) / et : 0.;
    double e277   = photons.E277()->at(i);
    double e237   = photons.E237()->at(i);
    double e233   = photons.E233()->at(i);
    double reta   = e277 != 0. ? e237 / e277 : 0.;
    double rphi   = e237 != 0. ? e233 / e237 : 0.;
    double weta2  = photons.weta2()->at(i);
    double f1     = photons.f1()->at(i);
    double fside  = photons.fside()->at(i);
    double wtot   = photons.wstot()->at(i);
    double w1     = photons.ws3()->at(i);
    double deltae = (photons.Emax2()->at(i) - photons.Emins1()->at(i));
    double eratio = (photons.emaxs1()->at(i) + photons.Emax2()->at(i)) != 0 ? (photons.emaxs1()->at(i) - photons.Emax2()->at(i)) / (photons.emaxs1()->at(i) + photons.Emax2()->at(i)) : 0.;

    FudgeMCTool fudgeTool(et, fabs(photons.etas2()->at(i)), photons.isConv()->at(i), 5);  // pre-selection set as 5

    fudgeTool.FudgeShowers(et, fabs(photons.etas2()->at(i)),
                           rhad1, rhad,
                           e277, reta, rphi,
                           weta2,
                           f1, fside,
                           wtot, w1,
                           deltae, eratio,
                           photons.isConv()->at(i) );

    PhotonIDTool idtool   (et, photons.etas2()->at(i),
                           rhad1, rhad,
                           e277, reta, rphi,
                           weta2,
                           f1, fside,
                           wtot, w1,
                           deltae, eratio,
                           photons.isConv()->at(i) );

    if (idtool.PhotonCutsTight(6) != 1) { return false; }  // require tight photon ID

  }

Photon OQ (Object Quality) requirement

  if ((photons.OQ()->at(i) & 34214) != 0) { return false; }

Photon cleaning

In both data and MC one must apply the following:

   if ((photons.OQ()->at(i) & 134217728) != 0
       &&
       (factor*photons.E237()->at(i) > 0.98
        ||
        factor*photons.E233()->at(i) > 1.0
        ||
        (photons.OQ()->at(i) & 67108864) != 0)) { return false; }

After the above cleaning, some bad clusters may remain. We should check by hand at the end of our analysis (looking at event display and LAr data quality informations) the photons satisfying:

  if ((photons.OQ()->at(i) & 134217728) != 0) {
    std::cerr << "this photon has a LArCleaning > 0.8. This can be a bad photon, especially if reta/rphi are close to 1 or if the timing is large (~ 10ns)" << std::endl;
  }

-- KatsumasaIkematsu - 24-Feb-2012

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2012-02-24 - KatsumasaIkematsu
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback