All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Functions
CRTHitConverter_module.cc File Reference
#include "art/Framework/Core/EDProducer.h"
#include "art/Framework/Core/ModuleMacros.h"
#include "art/Framework/Principal/Event.h"
#include "art/Framework/Principal/Handle.h"
#include "art/Framework/Principal/Run.h"
#include "art/Framework/Principal/SubRun.h"
#include "canvas/Utilities/InputTag.h"
#include "fhiclcpp/ParameterSet.h"
#include "messagefacility/MessageLogger/MessageLogger.h"
#include "lardata/Utilities/AssociationUtil.h"
#include "sbnobj/Common/CRT/CRTHit.hh"
#include "sbnobj/Common/CRT/CRTHit_Legacy.hh"
#include <memory>

Go to the source code of this file.

Classes

class  sbn::CRTHitConverter
 

Namespaces

 sbn
 This module creates Common Analysis Files.
 

Functions

sbn::crt::CRTHit SBNDCRTHit (const sbnd::crt::CRTHit &inp)
 
sbn::crt::CRTHit ICARUSCRTHit (const icarus::crt::CRTHit &inp)
 

Function Documentation

sbn::crt::CRTHit ICARUSCRTHit ( const icarus::crt::CRTHit inp)

Definition at line 75 of file CRTHitConverter_module.cc.

75  {
76  sbn::crt::CRTHit ret;
77  ret.feb_id = inp.feb_id;
78  ret.pesmap = inp.pesmap;
79  // convert ADC -> PE's
80  // TODO: fix -- hardcoded for now as temporary hack
81  unsigned n_strip = 2;
82  double baseline = 63.6; // ADC
83  double gain = 70; // ADC / PE
84  ret.peshit = (inp.peshit - n_strip*baseline) / (gain * n_strip);
85  ret.ts0_s = inp.ts0_s;
86  ret.ts0_s_corr = inp.ts0_s_corr;
87  ret.ts0_ns = inp.ts0_ns;
88  ret.ts0_ns_corr = inp.ts0_ns_corr;
89 
90  ret.ts1_ns = inp.ts1_ns;
91 
92  ret.plane = inp.plane;
93  ret.x_pos = inp.x_pos;
94  ret.x_err = inp.x_err;
95  ret.y_pos = inp.y_pos;
96  ret.y_err = inp.y_err;
97  ret.z_pos = inp.z_pos;
98  ret.z_err = inp.z_err;
99  ret.tagger = inp.tagger;
100  return ret;
101 }
float z_err
position uncertainty in z-direction (cm).
Definition: CRTHit.hh:43
float x_err
position uncertainty in x-direction (cm).
Definition: CRTHit.hh:39
std::map< uint8_t, std::vector< std::pair< int, float > > > pesmap
Saves signal hit information (FEB, local-channel and PE) .
Definition: CRTHit.hh:26
std::vector< uint8_t > feb_id
FEB address.
Definition: CRTHit.hh:25
double ts1_ns
Timestamp T1 ([signal time w.r.t. Trigger time]), in UTC absolute time scale in nanoseconds from the ...
Definition: CRTHit.hh:34
int plane
Name of the CRT wall (in the form of numbers).
Definition: CRTHit.hh:36
float peshit
Total photo-electron (PE) in a crt hit.
Definition: CRTHit.hh:27
float y_err
position uncertainty in y-direction (cm).
Definition: CRTHit.hh:41
double ts0_ns_corr
[Honestly, not sure at this point, it was there since long time (BB)]
Definition: CRTHit.hh:33
double ts0_s_corr
[Honestly, not sure at this point, it was there since long time (BB)]
Definition: CRTHit.hh:30
uint64_t ts0_s
Second-only part of timestamp T0.
Definition: CRTHit.hh:29
float z_pos
position in z-direction (cm).
Definition: CRTHit.hh:42
double ts0_ns
Timestamp T0 (from White Rabbit), in UTC absolute time scale in nanoseconds from the Epoch...
Definition: CRTHit.hh:32
std::map< uint8_t, std::vector< std::pair< int, float > > > pesmap
BEGIN_PROLOG baseline
float y_pos
position in y-direction (cm).
Definition: CRTHit.hh:40
float x_pos
position in x-direction (cm).
Definition: CRTHit.hh:38
std::string tagger
Name of the CRT wall (in the form of strings).
Definition: CRTHit.hh:45
std::vector< uint8_t > feb_id
sbn::crt::CRTHit SBNDCRTHit ( const sbnd::crt::CRTHit inp)

Definition at line 54 of file CRTHitConverter_module.cc.

54  {
55  sbn::crt::CRTHit ret;
56 
57  ret.peshit = inp.peshit;
58  ret.ts0_s = inp.ts0_s;
59  ret.ts0_s_corr = inp.ts0_s_corr;
60  ret.ts0_ns = inp.ts0_ns;
61  ret.ts0_ns_corr = inp.ts0_ns_corr;
62  ret.ts1_ns = inp.ts1_ns;
63  ret.plane = inp.plane;
64  ret.x_pos = inp.x_pos;
65  ret.x_err = inp.x_err;
66  ret.y_pos = inp.y_pos;
67  ret.y_err = inp.y_err;
68  ret.z_pos = inp.z_pos;
69  ret.z_err = inp.z_err;
70  ret.tagger = inp.tagger;
71 
72  return ret;
73 }
float z_err
position uncertainty in z-direction (cm).
Definition: CRTHit.hh:43
float x_err
position uncertainty in x-direction (cm).
Definition: CRTHit.hh:39
double ts1_ns
Timestamp T1 ([signal time w.r.t. Trigger time]), in UTC absolute time scale in nanoseconds from the ...
Definition: CRTHit.hh:34
int plane
Name of the CRT wall (in the form of numbers).
Definition: CRTHit.hh:36
float peshit
Total photo-electron (PE) in a crt hit.
Definition: CRTHit.hh:27
float y_err
position uncertainty in y-direction (cm).
Definition: CRTHit.hh:41
double ts0_ns_corr
[Honestly, not sure at this point, it was there since long time (BB)]
Definition: CRTHit.hh:33
double ts0_s_corr
[Honestly, not sure at this point, it was there since long time (BB)]
Definition: CRTHit.hh:30
uint64_t ts0_s
Second-only part of timestamp T0.
Definition: CRTHit.hh:29
float z_pos
position in z-direction (cm).
Definition: CRTHit.hh:42
double ts0_ns
Timestamp T0 (from White Rabbit), in UTC absolute time scale in nanoseconds from the Epoch...
Definition: CRTHit.hh:32
float y_pos
position in y-direction (cm).
Definition: CRTHit.hh:40
float x_pos
position in x-direction (cm).
Definition: CRTHit.hh:38
std::string tagger
Name of the CRT wall (in the form of strings).
Definition: CRTHit.hh:45
std::string tagger