1 #ifndef DbigEVD4_Module 2 #define DbigEVD4_Module 20 #include "art_root_io/TFileService.h" 22 #include "canvas/Persistency/Common/FindManyP.h" 30 #include "TLorentzVector.h" 149 fnEvts = p.
get<
unsigned int >(
"nEvents");
153 auto const *fDetProp = lar::providerFrom<detinfo::DetectorPropertiesService>();
154 fNticks = fDetProp->NumberTimeSamples();
198 unsigned int minT = 0;
201 float ThumbFactor = 0.85;
202 unsigned int binT = (maxT-minT)*ThumbFactor;
215 std::stringstream hname;
246 hname.str(
""); hname <<
"fAmbigWireU0_" <<
apa <<
"_" <<
evt;
248 hname.str(
""); hname <<
"fCheatWireU0_" <<
apa <<
"_" <<
evt;
250 hname.str(
""); hname <<
"fDisambigWireU0_" <<
apa <<
"_" <<
evt;
253 hname.str(
""); hname <<
"fAmbigWireV0_" <<
apa <<
"_" <<
evt;
255 hname.str(
""); hname <<
"fCheatWireV0_" <<
apa <<
"_" <<
evt;
257 hname.str(
""); hname <<
"fDisambigWireV0_" <<
apa <<
"_" <<
evt;
260 hname.str(
""); hname <<
"fAmbigWireU1_" <<
apa <<
"_" <<
evt;
262 hname.str(
""); hname <<
"fCheatWireU1_" <<
apa <<
"_" <<
evt;
264 hname.str(
""); hname <<
"fDisambigWireU1_" <<
apa <<
"_" <<
evt;
267 hname.str(
""); hname <<
"fAmbigWireV1_" <<
apa <<
"_" <<
evt;
269 hname.str(
""); hname <<
"fCheatWireV1_" <<
apa <<
"_" <<
evt;
271 hname.str(
""); hname <<
"fDisambigWireV1_" <<
apa <<
"_" <<
evt;
285 hname.str(
""); hname <<
"fTimeChanZ0_" <<
apa <<
"_" <<
evt;
286 fTimeChanZ0[evt-1][
apa] = tfs->make<TH2I>( hname.str().c_str(),
"",
287 (fZ0ChanMax - fZ0ChanMin + 1)*ThumbFactor,
288 fZ0ChanMin, fZ0ChanMax,
289 binT, minZ0T, maxZ0T);
291 hname.str(
""); hname <<
"fTimeChanZ1_" <<
apa <<
"_" <<
evt;
292 fTimeChanZ1[evt-1][
apa] = tfs->make<TH2I>( hname.str().c_str(),
"",
293 (fZ1ChanMax - fZ1ChanMin + 1)*ThumbFactor,
294 fZ1ChanMin, fZ1ChanMax, binT, minT, maxT);
321 unsigned int evtIndex = ++
fEvent;
333 for(
auto const&
hit : (*ChHits) ){
336 double startT =
hit.PeakTimeMinusRMS();
337 double endT =
hit.PeakTimePlusRMS();
338 double charge =
hit.PeakAmplitude();
344 for(
size_t i=0; i<wids.size(); i++){
346 unsigned int wire = wids[i].Wire;
348 if( wids[i].TPC % 2 == 0 ){
351 for(
double t = startT;
t <= endT;
t++ ){
356 for(
double t = startT;
t <= endT;
t++ ){
361 for(
double t = startT;
t <= endT;
t++ ){
364 fTimeChanZ0[evtIndex][apa]->Fill(chan, Z0fillT, charge);
368 }
else if( wids[i].TPC % 2 == 1 ){
371 for(
double t = startT;
t <= endT;
t++ ){
376 for(
double t = startT;
t <= endT;
t++ ){
381 for(
double t = startT;
t <= endT;
t++ ){
403 for(
auto const&
hit : (*WidHits) ){
406 unsigned int wire =
hit.WireID().Wire;
407 double startT =
hit.PeakTimeMinusRMS();
408 double endT =
hit.PeakTimePlusRMS();
409 double charge =
hit.PeakAmplitude();
411 if(
hit.WireID().TPC % 2 == 0){
414 for(
double t = startT;
t <= endT;
t++ ){
419 for(
double t = startT;
t <= endT;
t++ ){
424 }
else if(
hit.WireID().TPC % 2 == 1){
427 for(
double t = startT;
t <= endT;
t++ ){
432 for(
double t = startT;
t <= endT;
t++ ){
443 for(
auto const&
hit : (*CheatedHits) ){
446 unsigned int wire =
hit.WireID().Wire;
447 double startT =
hit.PeakTimeMinusRMS();
448 double endT =
hit.PeakTimePlusRMS();
449 double charge =
hit.PeakAmplitude();
451 if(
hit.WireID().TPC % 2 == 0){
454 for(
double t = startT;
t <= endT;
t++ ){
459 for(
double t = startT;
t <= endT;
t++ ){
464 }
else if(
hit.WireID().TPC % 2 == 1){
467 for(
double t = startT;
t <= endT;
t++ ){
472 for(
double t = startT;
t <= endT;
t++ ){
489 #endif // DbigEVD4_Module Store parameters for running LArG4.
std::vector< std::vector< TH2I * > > fAmbigWireU0
DbigEVD4apaFD(fhicl::ParameterSet const &pset)
Declaration of signal hit object.
std::vector< std::vector< TH2I * > > fDisambigWireU1
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
unsigned int fMaxTimeRange
Planes which measure Z direction.
EDAnalyzer(fhicl::ParameterSet const &pset)
std::vector< std::vector< TH2I * > > fCheatWireV1
std::map< unsigned int, unsigned int > fAPAToNumHits
unsigned int Nwires(unsigned int p, unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wires in the specified plane.
std::vector< std::vector< TH2I * > > fAmbigWireU1
unsigned int Nchannels() const
Returns the number of TPC readout channels in the detector.
std::vector< std::vector< TH2I * > > fTimeChanZ0
#define DEFINE_ART_MODULE(klass)
std::vector< std::vector< TH2I * > > fDisambigWireU0
std::vector< std::vector< TH2I * > > fCheatWireV0
std::string fChanHitLabel
std::vector< std::vector< TH2I * > > fAmbigWireV0
void analyze(const art::Event &evt)
T get(std::string const &key) const
art::ServiceHandle< geo::Geometry > fGeom
Declaration of cluster object.
View_t View(geo::PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
Definition of data types for geometry description.
std::vector< std::vector< TH2I * > > fCheatWireU1
unsigned int fChansPerAPA
Detector simulation of raw signals on wires.
unsigned int NTPC(unsigned int cstat=0) const
Returns the total number of TPCs in the specified cryostat.
std::vector< std::vector< TH2I * > > fDisambigWireV1
object containing MC truth information necessary for making RawDigits and doing back tracking ...
std::vector< std::vector< TH2I * > > fAmbigWireV1
std::vector< std::vector< TH2I * > > fDisambigWireV0
std::string fHitCheatLabel
void beginRun(const art::Run &run)
std::vector< std::vector< TH2I * > > fTimeChanZ1
Event finding and building.
std::vector< std::vector< TH2I * > > fCheatWireU0
void reconfigure(fhicl::ParameterSet const &pset)