\section{Pandora\-P\-F\-A\-Calibrator Class Reference}
\label{classPandoraPFACalibrator}\index{Pandora\-P\-F\-A\-Calibrator@{Pandora\-P\-F\-A\-Calibrator}}


\doxyref{Pandora\-P\-F\-A\-Calibrator}{p.}{classPandoraPFACalibrator} is a processor to aid calibration of Pandora\-P\-F\-A.  




{\ttfamily \#include $<$Pandora\-P\-F\-A\-Calibrator.\-h$>$}

Inheritance diagram for Pandora\-P\-F\-A\-Calibrator\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classPandoraPFACalibrator}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual Processor $\ast$ {\bfseries new\-Processor} ()\label{classPandoraPFACalibrator_aa6c319d82bac9d449e94c0fbb561c641}

\item 
virtual void {\bf init} ()
\begin{DoxyCompactList}\small\item\em Called at the begin of the job before anything is read. \end{DoxyCompactList}\item 
virtual void {\bf process\-Run\-Header} (L\-C\-Run\-Header $\ast$run)\label{classPandoraPFACalibrator_a466a05289f097b1639a782777453ff31}

\begin{DoxyCompactList}\small\item\em Called for every run. \end{DoxyCompactList}\item 
virtual void {\bf process\-Event} (L\-C\-Event $\ast$evt)\label{classPandoraPFACalibrator_a165bef29255546d5215599c7ebdd0c80}

\begin{DoxyCompactList}\small\item\em Called for every event -\/ the working horse. \end{DoxyCompactList}\item 
virtual void {\bf check} (L\-C\-Event $\ast$evt)\label{classPandoraPFACalibrator_a263105e7356c1eefd67f54e3aa46e1fe}

\begin{DoxyCompactList}\small\item\em Check. \end{DoxyCompactList}\item 
virtual void {\bf end} ()\label{classPandoraPFACalibrator_a67bd0f0b52fce626c1f4cbd6cd1d866b}

\begin{DoxyCompactList}\small\item\em Called after data processing for clean up. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\doxyref{Pandora\-P\-F\-A\-Calibrator}{p.}{classPandoraPFACalibrator} is a processor to aid calibration of Pandora\-P\-F\-A. 


\begin{DoxyPre}
There are three sets of constants that need to be calibrated:
  i) CaloDigi raw hit to GeV
 ii) PandoraPFA energy in GeV -> MIP equivalent conversion
iii) PandoraPFA MIP equivalent -> PFO energy
One might expect that factor iii) is the reciprocal of factor ii). However,
due to the isolation cuts used in PandoraPFA this is not quite the case.\end{DoxyPre}



\begin{DoxyPre}\subsection*{MC Samples:
}\end{DoxyPre}



\begin{DoxyPre}
  o the calibration constants will depend on the Mokka ECAL and HCAL 
    drivers, the GEANT4 physics list, and potentially the version of 
    GEANT4 used to generate the events.
  o to calibrate PandoraPFA generate the following samples with the
    same version of Mokka/Geant4 used for the main event samples:
       o 10000 10 GeV photons with flat phi and flat cosine(theta) distributions
       o 10000 10 GeV K0L with flat phi and flat cosine(theta) distributions
       o 10000 10 GeV mu+/-\end{DoxyPre}



\begin{DoxyPre}\subsection*{Calibration Procedure:
}\end{DoxyPre}



\begin{DoxyPre}
i) Calibration of Mokka hits
  o Using the photon sample, tune the calibration parameters in digitisation processor
    e.g. <parameter name="CalibrECAL" type="FloatVec">XX YY</parameter>
    to so that the histogram fCalEnergy is centred on 10 GeV. It is recommended 
    that the calibration constants for the different layers should be in the ratio
    of the absorber thicknesses, i.e. 1:2 for ILD\_o1\_v05.
  o Repeat with the 10 GeV KL sample to fix 
    <parameter name="CalibrHCAL" type="FloatVec">ZZ</parameter>
ii) PandoraPFA MIP calibration
  o Using the muon sample, tune the parameters:
    <parameter name="ECALMIPcalibration" type="float">AA</parameter>
    <parameter name="HCALMIPcalibration" type="float">BB</parameter>
    so that fEcalMIPcorr and fHcalMIPcorr peak at approximately one. This
    set the scale for the energy deposited by a "minimum ionizing particle".
iii) PandoraPFA ECAL/HCAL calibration
  o Using the photon sample run PandoraPFA and \doxyref{PandoraPFACalibrator}{p.}{classPandoraPFACalibrator} and determine
    <parameter name="ECalToEMGeVCalibration" type="float">XX</parameter>
    <parameter name="HCalToEMGeVCalibration" type="float">YY</parameter>
    so that fPFA peaks at 10 GeV. It is recommended to set the response to
    hadrons to be the same as that for EM showers, i.e. ECalToEMGeVCalibration = HCalToEMGeVCalibration
  o Using the K0L sample, examine the profile of a plot of ECALToHAD energy vs HCALToHAD energy,
    expecting the profile to be a straight line of gradient -1, intercepting both axes at 10GeV.
    However, it may be necessary, for optimal jet energy resolution, to deweight the ECALToHAD contribution.
    Set the parameters below accordingly:
    <parameter name="ECalToHadGeVCalibrationBarrel" type="float">AA</parameter>
    <parameter name="ECalToHadGeVCalibrationEndCap" type="float">BB</parameter>
    <parameter name="HCalToHadGeVCalibration" type="float">CC</parameter>
\end{DoxyPre}
 

\subsection{Member Function Documentation}
\index{Pandora\-P\-F\-A\-Calibrator@{Pandora\-P\-F\-A\-Calibrator}!init@{init}}
\index{init@{init}!PandoraPFACalibrator@{Pandora\-P\-F\-A\-Calibrator}}
\subsubsection[{init}]{\setlength{\rightskip}{0pt plus 5cm}void Pandora\-P\-F\-A\-Calibrator\-::init (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classPandoraPFACalibrator_a2dfc6f42bf427a84bf5470c42eb37170}


Called at the begin of the job before anything is read. 

Use to initialize the processor, e.\-g. book histograms. 

The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
Pandora\-P\-F\-A\-Calibrator.\-h\item 
Pandora\-P\-F\-A\-Calibrator.\-cc\end{DoxyCompactItemize}
