1 #ifndef SPACE_CHARGE_TEST
2 #define SPACE_CHARGE_TEST
5 #include "art/Framework/Core/EDAnalyzer.h"
6 #include "art/Framework/Core/ModuleMacros.h"
7 #include "art/Framework/Principal/Event.h"
8 #include "art/Framework/Principal/Handle.h"
9 #include "art/Framework/Principal/Run.h"
10 #include "art/Framework/Principal/SubRun.h"
11 #include "art/Framework/Services/Registry/ServiceHandle.h"
12 #include "art_root_io/TFileService.h"
13 #include "fhiclcpp/ParameterSet.h"
24 namespace SpaceChargeTools
36 virtual void beginJob()
override;
37 virtual void endJob()
override;
40 void analyze(art::Event
const &
e)
override;
61 art::ServiceHandle<art::TFileService> fileServiceHandle;
63 hDx = fileServiceHandle->make<TH1D>(
"hDx",
"", 150, -1.0, 0.6);
64 hDy = fileServiceHandle->make<TH1D>(
"hDy",
"", 150, -6.0, 6.0);
65 hDz = fileServiceHandle->make<TH1D>(
"hDz",
"", 150, -6.0, 6.0);
66 hEx = fileServiceHandle->make<TH1D>(
"hEx",
"", 100, -0.06, 0.06);
67 hEy = fileServiceHandle->make<TH1D>(
"hEy",
"", 100, -0.04, 0.04);
68 hEz = fileServiceHandle->make<TH1D>(
"hEz",
"", 100, -0.04, 0.04);
82 auto const* SCE = lar::providerFrom<spacecharge::SpaceChargeService>();
83 cout <<
"Is Spatial SCE enabled? " <<
bool(SCE->EnableSimSpatialSCE()) << endl;
84 cout <<
"Is E-field SCE enabled? " <<
bool(SCE->EnableSimEfieldSCE()) << endl;
87 for(
int iX = xMin; iX <= xMax - nSkip; iX++)
90 for(
int iY = yMin; iY <= yMax - nSkip; iY++)
93 for(
int iZ = zMin; iZ <= zMax - nSkip; iZ++)
96 cout << iX <<
", " << iY <<
", " << iZ << endl;
98 geo::Point_t point = {double(iX), double(iY), double(iZ)};
101 if(!((spatialOffsets.X() == spatialOffsets.X()) &&
102 (spatialOffsets.Y() == spatialOffsets.Y()) &&
103 (spatialOffsets.Z() == 0.0)))
105 hDx->Fill(spatialOffsets.X());
106 hDy->Fill(spatialOffsets.Y());
107 hDz->Fill(spatialOffsets.Z());
111 if(!((efieldOffsets.X() == efieldOffsets.X()) &&
112 (efieldOffsets.Y() == efieldOffsets.Y()) &&
113 (efieldOffsets.Z() == 0.0)))
115 hEx->Fill(efieldOffsets.X());
116 hEy->Fill(efieldOffsets.Y());
117 hEz->Fill(efieldOffsets.Z());
126 #endif //SPACE_CHARGE_TEST
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
process_name opflashCryo1 flashfilter analyze
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
Utilities related to art service access.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
BEGIN_PROLOG could also be cout