ProtoDUNE XYZ Calibration Service Jonathan Paley ProtoDUNE - - PowerPoint PPT Presentation

protodune xyz calibration service
SMART_READER_LITE
LIVE PREVIEW

ProtoDUNE XYZ Calibration Service Jonathan Paley ProtoDUNE - - PowerPoint PPT Presentation

ProtoDUNE XYZ Calibration Service Jonathan Paley ProtoDUNE Sim/Reco Meeting August 15, 2018 Jonathan M. Paley 1 XYZ Calibrations Plane 1 X Correction Plane 1 Negative X Correction 600 2 1.2 Y Coordinate (cm) Correction 500 1 1.5


slide-1
SLIDE 1

Jonathan M. Paley 1

ProtoDUNE XYZ Calibration Service

Jonathan Paley ProtoDUNE Sim/Reco Meeting August 15, 2018

slide-2
SLIDE 2

Jonathan M. Paley

XYZ Calibrations

2

  • Corrections are to be applied to hits as a function of (x,y,z). Calibration

constants provided to me by Ajib Paudel.

  • There are also overall “normalization” corrections that need to be applied,

determined for each plane.

200 − 200

X Coordinate (cm)

0.2 0.4 0.6 0.8 1 1.2

Correction Plane 1 X Correction

200 400 600

Z Coordinate (cm)

100 200 300 400 500 600

Y Coordinate (cm)

0.5 1 1.5 2

Plane 1 Negative X Correction

slide-3
SLIDE 3

Jonathan M. Paley

XYZ Calibrations - Database Implementation

3

  • The contents of the histograms and the normalization corrections have

been pushed to the calibration conditions database.

  • Currently, the condb is not set up to store “arrays” of data (experts are

considering how to implement this). So the individual (plane,[“side”],bins) are stored as channel numbers.

  • The validity time for the MC constants from Ajib is set to “0”. In the future,

when we have constants derived from data, I recommend we use the first run number of the data set used to derive the constants.

  • Constants are written to a .csv file (of a particular format), and then we use

the “writeConditionsCSVToDB” utility in nutools (part of larsoft) to push to the database.

  • Write permissions to the database are limited to those who will be

responsible for maintaining their tables. Please contact me if you have a table you want to write to.

slide-4
SLIDE 4

Jonathan M. Paley

XYZ Calibrations - Offline Interface

4

  • Added two new packages to dunetpc: dune/Calib (contains the data

providers) and dune/CalibServices (contains the art services that provide pointers to the data providers).

  • Data provider class:

class XYZCalibProtoDUNE : public XYZCalib { public: XYZCalibProtoDUNE(); XYZCalibProtoDUNE(fhicl::ParameterSet const& pset); XYZCalibProtoDUNE(XYZCalibProtoDUNE const&) = delete; virtual ~XYZCalibProtoDUNE() = default; bool Configure(fhicl::ParameterSet const& pset); bool Update(uint64_t ts=0); virtual double GetNormCorr(int plane) override; virtual double GetXCorr(int plane, double x) override; virtual double GetYZCorr(int plane, int side, double y, double z) override; void SetIsMC(bool v) { fIsMC = v; } void SetNormCorr(int plane, double val); void SetXCorr(int plane, double x, double dx, double val); void SetYZCorr(int plane, int side, double y, double dx, double val); void SetUseCondb(bool v) { fUseCondbXYZCorr = v; } void SetXCorrFileName(std::string f) { fXCorrFileName=f; } void SetYZCorrFileName(std::string f) { fYZCorrFileName=f; } void SetNormCorrFileName(std::string f) { fNormCorrFileName=f; } void SetInterpolate(bool v) { fInterpolate = v; }

0 is negative, 1 is positive

slide-5
SLIDE 5

Jonathan M. Paley

XYZ Calibrations - Offline Interface

5

  • Added two new packages to dunetpc: dune/Calib (contains the data

providers) and dune/CalibServices (contains the art services that provide pointers to the data providers).

  • Data provider class:

void SetIsMC(bool v) { fIsMC = v; } void SetNormCorr(int plane, double val); void SetXCorr(int plane, double x, double dx, double val); void SetYZCorr(int plane, int side, double y, double dx, double val); void SetUseCondb(bool v) { fUseCondbXYZCorr = v; } void SetXCorrFileName(std::string f) { fXCorrFileName=f; } void SetYZCorrFileName(std::string f) { fYZCorrFileName=f; } void SetNormCorrFileName(std::string f) { fNormCorrFileName=f; } void SetInterpolate(bool v) { fInterpolate = v; }

  • Can be used outside of art.

Simply instantiate the object, and call the appropriate methods to configure and load the constants.

  • Always set the data “type” (data
  • vs. mc) via the SetIsMC method.
  • Corrections are stored as Root

histograms, there is an option to use the Interpolate method. Default is to return the value of the bin.

slide-6
SLIDE 6

Jonathan M. Paley

XYZ Calibrations - art Service

6

  • Added two new packages to dunetpc: dune/Calib (contains the data

providers) and dune/CalibServices (contains the art services that provide pointers to the data providers).

  • Data provider class:

void SetIsMC(bool v) { fIsMC = v; } void SetNormCorr(int plane, double val); void SetXCorr(int plane, double x, double dx, double val); void SetYZCorr(int plane, int side, double y, double dx, double val); void SetUseCondb(bool v) { fUseCondbXYZCorr = v; } void SetXCorrFileName(std::string f) { fXCorrFileName=f; } void SetYZCorrFileName(std::string f) { fYZCorrFileName=f; } void SetNormCorrFileName(std::string f) { fNormCorrFileName=f; } void SetInterpolate(bool v) { fInterpolate = v; }

  • Can read from an

independent .csv file if you don’t want to rely on the database.

  • Can also override specific

values, but this should only be done by experts.

slide-7
SLIDE 7

Jonathan M. Paley

  • Standard approach of simply

providing pointer to the data provider class, and calling “Update” at “preBeginRun”.

  • Defaults are to use the constants

in the database, and to not interpolate (Tingjun reported non-negligible performance cost when interpolating).

XYZ Calibrations - art Service

7

  • Added two new packages to dunetpc: dune/Calib (contains the data

providers) and dune/CalibServices (contains the art services that provide pointers to the data providers).

  • Service class:

BEGIN_PROLOG protodune_xyzcalib : { service_provider: "XYZCalibServiceProtoDUNE" UseCondbXYZCorr: true Interpolate: false XCorrFileName: "" YZCorrFileName: "" NormCorrFileName: "" XCorrDBTag: "" YZCorrDBTag: "" NormCorrDBTag: "" } END_PROLOG