21 private_OpHitLabel(pSet.
get<
art::InputTag>(
"OpHitLabel",
"ophit")),
22 private_BtrLabel(pSet.
get<
art::InputTag>(
"BTRLabel",
"largeant"))
37 mDir = std::make_unique<art::TFileDirectory>(private_service_tfs->mkdir(
"hists",
"hists"));
38 widths = private_service_tfs->make<TH1D>(
"ophit_widths",
"width of ophits", 1000, -1, 2001);
46 std::vector<art::Ptr<recob::OpHit>> ophitList;
47 auto ophitHandle = evt.
getHandle<std::vector<recob::OpHit> >(private_OpHitLabel);
51 std::vector<art::Ptr<sim::OpDetBacktrackerRecord>> btrList;
52 auto btrHandle = evt.
getHandle<std::vector<sim::OpDetBacktrackerRecord> >(private_BtrLabel);
56 for(
auto& btr : btrList ){
58 UInt_t
opdet = btr->OpDetNum();
59 auto empIt = sdp_time_hists.emplace(std::make_pair(opdet, dummy));
60 if(empIt.second==
true){
61 TString histName = TString(
"SDPTime")+TString(
std::to_string(opdet))+TString(
"Hist");
62 TString histTitle = TString(
"PD ")+TString(
std::to_string(opdet))+TString(
" SDP Times.");
63 TH1D* tmphist1 = mDir->make<TH1D>(histName, histTitle, 30000, -1500000, 1500000);
64 empIt.first->second =
std::move(tmphist1);
66 auto time_sdps = btr->timePDclockSDPsMap();
67 for(
auto& time_sdp : time_sdps ){
68 double time = time_sdp.first;
69 empIt.first->second->Fill(time);
73 for (
auto& ophit : ophitList ){
75 UInt_t
opdet = private_service_geom->OpDetFromOpChannel(ophit->OpChannel());
76 auto empIt = detTimeHist.emplace(std::make_pair(opdet, dummy));
82 if(empIt.second==
true){
83 TString histName = TString(
"PD")+TString(
std::to_string(opdet))+TString(
"Hist");
84 TString histTitle = TString(
"PD ")+TString(
std::to_string(opdet))+TString(
" OpHit Times.");
91 TH1D* tmphist1 = mDir->make<TH1D>(histName, histTitle, 30000, -1500000, 1500000);
92 empIt.first->second =
std::move(tmphist1);
98 if((private_service_pbt->OpHitToSimSDPs_Ps(ophit)).
size()>1){
99 double time = ophit->PeakTime() * 1000;
100 double width = ophit->Width() * 1000;
102 empIt.first->second->Fill(time);
112 void HitSdpPlotter::endJob(){
def analyze(root, level, gtrees, gbranches, doprint)
Handle< PROD > getHandle(SelectorBase const &) const
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
#define DEFINE_ART_MODULE(klass)
cet::LibraryManager dummy("noplugin")
auto const & get(AssnsNode< L, R, D > const &r)
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
std::string to_string(ModuleType const mt)