24 fOpHitTree->Branch(fOpHitTree->GetName(),
26 fOpHitAnaStruct.LeafList.c_str());
31 if(fOpFlashTree) FillOpFlashTree(flashVector);
36 if(fOpHitTree) FillOpHitTree(hitVector);
41 for(
auto const& flash : flashVector){
43 fOpFlashAnaStruct.FlashTime = flash.Time();
44 fOpFlashAnaStruct.FlashTimeWidth = flash.TimeWidth();
45 fOpFlashAnaStruct.FlashAbsTime = flash.AbsTime();
46 fOpFlashAnaStruct.FlashFrame = flash.Frame();
47 fOpFlashAnaStruct.FlashY = flash.YCenter();
48 fOpFlashAnaStruct.FlashYWidth = flash.YWidth();
49 fOpFlashAnaStruct.FlashZ = flash.ZCenter();
50 fOpFlashAnaStruct.FlashZWidth = flash.ZWidth();
51 fOpFlashAnaStruct.FlashInBeamFrame = flash.InBeamFrame();
52 fOpFlashAnaStruct.FlashOnBeamTime = flash.OnBeamTime();
53 fOpFlashAnaStruct.FlashFastToTotal = flash.FastToTotal();
54 fOpFlashAnaStruct.FlashTotalPE = flash.TotalPE();
57 int n_opdets = flash.WireCenters().size();
58 fOpFlashAnaStruct.FlashOpDetPEHist->SetBins(n_opdets,-0.5,(
float)n_opdets-0.5);
59 for(
int i=0; i<n_opdets; i++)
60 fOpFlashAnaStruct.FlashOpDetPEHist->SetBinContent(i+1,flash.PE(i));
69 for(
auto const&
hit : hitVector){
71 fOpHitAnaStruct.HitPeakTime =
hit.PeakTime();
72 fOpHitAnaStruct.HitPeakTimeAbs =
hit.PeakTimeAbs();
73 fOpHitAnaStruct.HitWidth =
hit.Width();
74 fOpHitAnaStruct.HitArea =
hit.Area();
75 fOpHitAnaStruct.HitAmplitude =
hit.Amplitude();
76 fOpHitAnaStruct.HitFastToTotal =
hit.FastToTotal();
77 fOpHitAnaStruct.HitPE =
hit.PE();
78 fOpHitAnaStruct.HitFrame =
hit.Frame();
79 fOpHitAnaStruct.HitOpChannel =
hit.OpChannel();
void FillOpFlashes(const std::vector< recob::OpFlash > &)
void FillOpHits(const std::vector< recob::OpHit > &)
void SetOpFlashTree(TTree *, bool makeOpDetPEHist=true)
FlashAnaStruct fOpFlashAnaStruct
void SetOpHitTree(TTree *)
void FillOpFlashTree(const std::vector< recob::OpFlash > &)
void FillOpHitTree(const std::vector< recob::OpHit > &)