LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
opdet::OpFlashAnaAlg Class Reference

#include "OpFlashAnaAlg.h"

Classes

struct  FlashAnaStruct
 
struct  HitAnaStruct
 

Public Member Functions

 OpFlashAnaAlg ()
 
void SetOpFlashTree (TTree *, bool makeOpDetPEHist=true)
 
void SetOpHitTree (TTree *)
 
void FillOpFlashes (const std::vector< recob::OpFlash > &)
 
void FillOpHits (const std::vector< recob::OpHit > &)
 

Private Member Functions

void FillOpFlashTree (const std::vector< recob::OpFlash > &)
 
void FillOpHitTree (const std::vector< recob::OpHit > &)
 

Private Attributes

FlashAnaStruct fOpFlashAnaStruct
 
bool fMakeOpDetPEHist
 
TTree * fOpFlashTree
 
HitAnaStruct fOpHitAnaStruct
 
TTree * fOpHitTree
 

Detailed Description

Definition at line 24 of file OpFlashAnaAlg.h.

Constructor & Destructor Documentation

opdet::OpFlashAnaAlg::OpFlashAnaAlg ( )
inline

Member Function Documentation

void opdet::OpFlashAnaAlg::FillOpFlashes ( const std::vector< recob::OpFlash > &  flashVector)

Definition at line 25 of file OpFlashAnaAlg.cxx.

References FillOpFlashTree(), and fOpFlashTree.

Referenced by opdet::OpFlashSimpleAna::analyze(), and OpFlashAnaAlg().

26 {
27  if (fOpFlashTree) FillOpFlashTree(flashVector);
28 }
void FillOpFlashTree(const std::vector< recob::OpFlash > &)
void opdet::OpFlashAnaAlg::FillOpFlashTree ( const std::vector< recob::OpFlash > &  flashVector)
private

Definition at line 35 of file OpFlashAnaAlg.cxx.

References opdet::OpFlashAnaAlg::FlashAnaStruct::FlashAbsTime, opdet::OpFlashAnaAlg::FlashAnaStruct::FlashFastToTotal, opdet::OpFlashAnaAlg::FlashAnaStruct::FlashFrame, opdet::OpFlashAnaAlg::FlashAnaStruct::FlashInBeamFrame, opdet::OpFlashAnaAlg::FlashAnaStruct::FlashOnBeamTime, opdet::OpFlashAnaAlg::FlashAnaStruct::FlashOpDetPEHist, opdet::OpFlashAnaAlg::FlashAnaStruct::FlashTime, opdet::OpFlashAnaAlg::FlashAnaStruct::FlashTimeWidth, opdet::OpFlashAnaAlg::FlashAnaStruct::FlashTotalPE, opdet::OpFlashAnaAlg::FlashAnaStruct::FlashY, opdet::OpFlashAnaAlg::FlashAnaStruct::FlashYWidth, opdet::OpFlashAnaAlg::FlashAnaStruct::FlashZ, opdet::OpFlashAnaAlg::FlashAnaStruct::FlashZWidth, fMakeOpDetPEHist, fOpFlashAnaStruct, and fOpFlashTree.

Referenced by FillOpFlashes().

36 {
37  for (auto const& flash : flashVector) {
38 
39  fOpFlashAnaStruct.FlashTime = flash.Time();
40  fOpFlashAnaStruct.FlashTimeWidth = flash.TimeWidth();
41  fOpFlashAnaStruct.FlashAbsTime = flash.AbsTime();
42  fOpFlashAnaStruct.FlashFrame = flash.Frame();
43  fOpFlashAnaStruct.FlashY = flash.YCenter();
44  fOpFlashAnaStruct.FlashYWidth = flash.YWidth();
45  fOpFlashAnaStruct.FlashZ = flash.ZCenter();
46  fOpFlashAnaStruct.FlashZWidth = flash.ZWidth();
47  fOpFlashAnaStruct.FlashInBeamFrame = flash.InBeamFrame();
48  fOpFlashAnaStruct.FlashOnBeamTime = flash.OnBeamTime();
49  fOpFlashAnaStruct.FlashFastToTotal = flash.FastToTotal();
50  fOpFlashAnaStruct.FlashTotalPE = flash.TotalPE();
51 
52  if (fMakeOpDetPEHist) {
53  int n_opdets = flash.WireCenters().size();
54  fOpFlashAnaStruct.FlashOpDetPEHist->SetBins(n_opdets, -0.5, (float)n_opdets - 0.5);
55  for (int i = 0; i < n_opdets; i++)
56  fOpFlashAnaStruct.FlashOpDetPEHist->SetBinContent(i + 1, flash.PE(i));
57  }
58 
59  fOpFlashTree->Fill();
60  }
61 }
FlashAnaStruct fOpFlashAnaStruct
Definition: OpFlashAnaAlg.h:61
void opdet::OpFlashAnaAlg::FillOpHits ( const std::vector< recob::OpHit > &  hitVector)

Definition at line 30 of file OpFlashAnaAlg.cxx.

References FillOpHitTree(), and fOpHitTree.

Referenced by opdet::OpFlashSimpleAna::analyze(), and OpFlashAnaAlg().

31 {
32  if (fOpHitTree) FillOpHitTree(hitVector);
33 }
void FillOpHitTree(const std::vector< recob::OpHit > &)
void opdet::OpFlashAnaAlg::FillOpHitTree ( const std::vector< recob::OpHit > &  hitVector)
private

Definition at line 63 of file OpFlashAnaAlg.cxx.

References fOpHitAnaStruct, fOpHitTree, opdet::OpFlashAnaAlg::HitAnaStruct::HitAmplitude, opdet::OpFlashAnaAlg::HitAnaStruct::HitArea, opdet::OpFlashAnaAlg::HitAnaStruct::HitFastToTotal, opdet::OpFlashAnaAlg::HitAnaStruct::HitFrame, opdet::OpFlashAnaAlg::HitAnaStruct::HitOpChannel, opdet::OpFlashAnaAlg::HitAnaStruct::HitPE, opdet::OpFlashAnaAlg::HitAnaStruct::HitPeakTime, opdet::OpFlashAnaAlg::HitAnaStruct::HitPeakTimeAbs, and opdet::OpFlashAnaAlg::HitAnaStruct::HitWidth.

Referenced by FillOpHits().

64 {
65  for (auto const& hit : hitVector) {
66 
67  fOpHitAnaStruct.HitPeakTime = hit.PeakTime();
68  fOpHitAnaStruct.HitPeakTimeAbs = hit.PeakTimeAbs();
69  fOpHitAnaStruct.HitWidth = hit.Width();
70  fOpHitAnaStruct.HitArea = hit.Area();
71  fOpHitAnaStruct.HitAmplitude = hit.Amplitude();
72  fOpHitAnaStruct.HitFastToTotal = hit.FastToTotal();
73  fOpHitAnaStruct.HitPE = hit.PE();
74  fOpHitAnaStruct.HitFrame = hit.Frame();
75  fOpHitAnaStruct.HitOpChannel = hit.OpChannel();
76 
77  fOpHitTree->Fill();
78  }
79 }
HitAnaStruct fOpHitAnaStruct
Definition: OpFlashAnaAlg.h:84
Detector simulation of raw signals on wires.
void opdet::OpFlashAnaAlg::SetOpFlashTree ( TTree *  tree,
bool  makeOpDetPEHist = true 
)

Definition at line 5 of file OpFlashAnaAlg.cxx.

References opdet::OpFlashAnaAlg::FlashAnaStruct::FlashOpDetPEHist, fMakeOpDetPEHist, fOpFlashAnaStruct, fOpFlashTree, and opdet::OpFlashAnaAlg::FlashAnaStruct::LeafList.

Referenced by opdet::OpFlashSimpleAna::beginJob(), and OpFlashAnaAlg().

6 {
7  fOpFlashTree = tree;
8  fMakeOpDetPEHist = makeOpDetPEHist;
9 
10  fOpFlashTree->Branch(
12  if (fMakeOpDetPEHist) {
13  fOpFlashAnaStruct.FlashOpDetPEHist->SetName("hOpDetPEs");
14  fOpFlashAnaStruct.FlashOpDetPEHist->SetTitle("PEs per Optical Detector; OpDet Number; PE");
15  fOpFlashTree->Branch("flash_OpDetPEHist", "TH1D", &(fOpFlashAnaStruct.FlashOpDetPEHist));
16  }
17 }
FlashAnaStruct fOpFlashAnaStruct
Definition: OpFlashAnaAlg.h:61
void opdet::OpFlashAnaAlg::SetOpHitTree ( TTree *  tree)

Member Data Documentation

bool opdet::OpFlashAnaAlg::fMakeOpDetPEHist
private

Definition at line 62 of file OpFlashAnaAlg.h.

Referenced by FillOpFlashTree(), OpFlashAnaAlg(), and SetOpFlashTree().

FlashAnaStruct opdet::OpFlashAnaAlg::fOpFlashAnaStruct
private

Definition at line 61 of file OpFlashAnaAlg.h.

Referenced by FillOpFlashTree(), and SetOpFlashTree().

TTree* opdet::OpFlashAnaAlg::fOpFlashTree
private

Definition at line 64 of file OpFlashAnaAlg.h.

Referenced by FillOpFlashes(), FillOpFlashTree(), and SetOpFlashTree().

HitAnaStruct opdet::OpFlashAnaAlg::fOpHitAnaStruct
private

Definition at line 84 of file OpFlashAnaAlg.h.

Referenced by FillOpHitTree(), and SetOpHitTree().

TTree* opdet::OpFlashAnaAlg::fOpHitTree
private

Definition at line 86 of file OpFlashAnaAlg.h.

Referenced by FillOpHits(), FillOpHitTree(), and SetOpHitTree().


The documentation for this class was generated from the following files: