31 #include "NovaDAQConventions/DAQConventions.h" 74 mf::LogWarning(
"CloseInTime") <<
"attempting to run MC truth check on " 75 <<
"things without truth, bail";
84 for(
size_t h = 0;
h < hithdl->size(); ++
h){
89 for(
size_t s = 0;
s < allhits.
size(); ++
s){
90 if(bt->
IsNoise(allhits[
s]))
continue;
95 double hitTime = allhits[
s]->TNS();
97 const std::vector<sim::PhotonSignal> photVec = bt->
CellToPhotonSignal(allhits[s]->Plane(),allhits[s]->Cell());
99 for(
size_t j = 0;
j < photVec.size(); ++
j){
100 double photTime = photVec[
j].TimeMean();
124 else {
fTimeDiff = tfs->
make<TH1D>(
"TimeDiff",
";Photon Time - Hit TNS;Hits",100, -750, 750);}
126 fTimeExtend = tfs->
make<TH1D>(
"TimeExtend",
";Photon Time - Hit TNS;Hits",1000, -10000, 10000);
std::string fHitModuleLabel
label for module making the hits
back track the reconstruction to the simulation
virtual void analyze(const art::Event &e)
Simple module to analyze MC cosmics distributions.
TH1D * fTimeDiff
histogram of the difference between the time of photon signals in the cell and a cell hit's time ...
DEFINE_ART_MODULE(TestTMapFile)
TH1D * fTimeExtend
same as TimeDiff, but with an extend range to see the behavior of the tails
bool IsNoise(const art::Ptr< rb::CellHit > &hit) const
Is this hit not associated with any particles?
novadaq::cnv::DetId fDetID
detector id, used to decide histogram extent
void push_back(Ptr< U > const &p)
virtual void beginRun(art::Run const &r)
Prototype Near Detector on the surface at FNAL.
T get(std::string const &key) const
novadaq::cnv::DetId DetId() const
Prefer ds::DetectorService::DetId() instead.
virtual void reconfigure(fhicl::ParameterSet const &p)
CloseInTime(const fhicl::ParameterSet &p)
EDAnalyzer(Table< Config > const &config)
const std::vector< sim::PhotonSignal > CellToPhotonSignal(unsigned int const &plane, unsigned int const &cell) const
Returns the PhotonSignals contributing the signal in the specified cell. WARNING: Use with extreme ca...
T * make(ARGS...args) const
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
bool HaveTruthInfo() const
Is this a file with truth info in? (Is BackTracker going to be any use to you?)
Encapsulate the geometry of one entire detector (near, far, ndos)