17 #include "art_root_io/TFileService.h" 19 #include "canvas/Persistency/Common/FindManyP.h" 29 #include "TLorentzVector.h" 130 fStartEdepHist =
tfs->make<TH3D>(
"fStartEdepHist",
"fStartEdepHist",50,-240.,240.,50,-750.,800.,50,-50.,560.);
131 fTrackEdepHist =
tfs->make<TH3D>(
"fTrackEdepHist",
"fTrackEdepHist",50,-240.,240.,50,-750.,800.,50,-50.,560.);
132 fShowerEdepHist =
tfs->make<TH3D>(
"fShowerEdepHist",
"fShowerEdepHist",50,-240.,240.,50,-750.,800.,50,-50.,560.);
146 fConvDistHist =
tfs->make<TH1D>(
"fConvDistHist",
"fConvDistHist",100,0.,50.);
174 unsigned int nTries = 0;
185 std::cout <<
"Number of attemps at finding deposition vertex = " << nTries <<
"." <<
std::endl;
191 for(
auto const&
channel : (*simChanHandle))
195 auto const& timeSlices =
channel.TDCIDEMap();
196 for(
auto const&
t : timeSlices)
198 auto const& eDeps =
t.second;
199 for(
auto const& eDep : eDeps)
203 if(trackLength < 2.5 /* && eDep.z >=
zi*/)
220 for(
auto const& particle : (*particleHandle))
222 if(particle.Process() ==
"primary")
237 fMCdEdxHist =
tfs->make<TH1D>(
"fMCdEdxHist",
";dE/dx (MeV/cm)",200,0.0,10.);
244 std::cout <<
"Events with < 0.5 dE/dx entry: ";
252 std::cout <<
"Finding Deposition Vertex... " <<
std::endl;
253 for(
auto const&
channel : SCHandle)
257 auto const& timeSlices =
channel.TDCIDEMap();
258 for(
auto const&
t : timeSlices)
260 auto const& eDeps =
t.second;
261 for(
auto const& eDep : eDeps)
263 if( (eDep.z <
zi) && (eDep.energy > 0.) && (eDep.z >
ziFalse) )
277 std::cout <<
"Checking for Deposition Vertex" <<
std::endl;
280 for(
auto const&
channel : SCHandle)
284 auto const& timeSlices =
channel.TDCIDEMap();
285 for(
auto const&
t : timeSlices)
287 auto const& eDeps =
t.second;
288 for(
auto const& eDep : eDeps)
290 track = std::sqrt( (eDep.x-x)*(eDep.x-x) + (eDep.y-y)*(eDep.y-y) + (eDep.z-z)*(eDep.z-z) );
291 if(track < 2.5 && eDep.energy > 0.)
307 #endif // dEdx_Module art::ServiceHandle< geo::Geometry > fGeom
Store parameters for running LArG4.
dEdx(fhicl::ParameterSet const &pset)
std::string fSimulationProducerLabel
SigType_t SignalType(geo::PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
EDAnalyzer(fhicl::ParameterSet const &pset)
void checkDepositionVertex(std::vector< sim::SimChannel > SCHandle, double x, double y, double z)
art framework interface to geometry description
void reconfigure(fhicl::ParameterSet const &pset)
#define DEFINE_ART_MODULE(klass)
void findDepositionVertex(std::vector< sim::SimChannel > SCHandle)
art::ServiceHandle< art::TFileService > tfs
T get(std::string const &key) const
void analyze(const art::Event &evt)
Definition of data types for geometry description.
void beginRun(const art::Run &run)
EventNumber_t event() const
std::vector< unsigned int > fNullList
QTextStream & endl(QTextStream &s)
Event finding and building.
std::vector< double > fMCdEdxVec
Signal from collection planes.