|
| MagDriftAna (fhicl::ParameterSet const &pset) |
|
virtual | ~MagDriftAna () |
|
void | analyze (const art::Event &evt) |
| read/write access to event More...
|
|
void | beginJob () |
|
void | endJob () |
|
void | reconfigure (fhicl::ParameterSet const &p) |
|
void | ensureHists () |
|
std::string | workerType () const |
|
bool | modifiesEvent () const |
|
void | registerProducts (MasterProductRegistry &, ProductDescriptions &, ModuleDescription const &) |
|
std::string const & | processName () const |
|
bool | wantAllEvents () const |
|
bool | wantEvent (Event const &e) |
|
fhicl::ParameterSetID | selectorConfig () const |
|
art::Handle< art::TriggerResults > | getTriggerResults (Event const &e) const |
|
template<typename T , BranchType = InEvent> |
ProductToken< T > | consumes (InputTag const &) |
|
template<typename T , art::BranchType BT> |
art::ProductToken< T > | consumes (InputTag const &it) |
|
template<typename T , BranchType = InEvent> |
void | consumesMany () |
|
template<typename Element , BranchType = InEvent> |
ViewToken< Element > | consumesView (InputTag const &) |
|
template<typename T , art::BranchType BT> |
art::ViewToken< T > | consumesView (InputTag const &it) |
|
template<typename T , BranchType = InEvent> |
ProductToken< T > | mayConsume (InputTag const &) |
|
template<typename T , art::BranchType BT> |
art::ProductToken< T > | mayConsume (InputTag const &it) |
|
template<typename T , BranchType = InEvent> |
void | mayConsumeMany () |
|
template<typename Element , BranchType = InEvent> |
ViewToken< Element > | mayConsumeView (InputTag const &) |
|
template<typename T , art::BranchType BT> |
art::ViewToken< T > | mayConsumeView (InputTag const &it) |
|
base_engine_t & | createEngine (seed_t seed) |
|
base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make) |
|
base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label) |
|
seed_t | get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1) |
|
Base class for creation of raw signals on wires.
Definition at line 60 of file MagDriftAna_module.cc.
void hit::MagDriftAna::analyze |
( |
const art::Event & |
evt | ) |
|
read/write access to event
Definition at line 242 of file MagDriftAna_module.cc.
References DEFINE_ART_MODULE, ensureHists(), fChargeXpos, fChargeYpos, fChargeZpos, fDeltaZoverX, fDeltaZoverXAway, fDeltaZvsX, fDriftDeltaZ, fDriftDeltaZAway, fFFTHitFinderModuleLabel, fHitZpos, art::fill_ptr_vector(), art::DataViewImpl::getByLabel(), geo::WireGeo::GetCenter(), hits(), cheat::BackTrackerService::HitToXYZ(), art::Event::isRealData(), geo::GeometryCore::Nplanes(), geo::TPCGeo::Plane(), geo::PlaneID::Plane, geo::TPCID::TPC, geo::GeometryCore::TPC(), geo::PlaneGeo::Wire(), geo::WireID::Wire, geo::WireID::WireID(), and geo::TPCGeo::WirePitch().
246 throw cet::exception(
"MagDriftAna: ") <<
"Not for use on Data yet...\n";
266 std::vector< art::Ptr<recob::Hit> >
hits;
276 for (
auto itr : hits) {
278 hitWireID = itr->
WireID();
286 double w0pos[3] = {0.};
289 double Charge = itr->Integral();
293 std::vector<double> xyz = bt_serv->
HitToXYZ(itr);
296 double ChargeZpos = xyz[2];
309 double DeltaZ = HitZpos-ChargeZpos;
316 if (xyz[0] > (
fChargeYpos->GetXaxis()->GetXmax() * 0.80) ) {
const std::vector< double > HitToXYZ(const recob::Hit &hit)
WireGeo const & Wire(unsigned int iwire) const
std::string fFFTHitFinderModuleLabel
WireID_t Wire
Index of the wire within its plane.
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
double WirePitch(unsigned plane=0) const
Returns the center of the TPC volume in world coordinates [cm].
PlaneID_t Plane
Index of the plane within its TPC.
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
TPCGeo const & TPC(unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified TPC.
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
void GetCenter(double *xyz, double localz=0.0) const
Fills the world coordinate of a point on the wire.
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
TPCID_t TPC
Index of the TPC within its cryostat.
WireID()=default
Default constructor: an invalid TPC ID.
cet::coded_exception< error, detail::translate > exception
void hit::MagDriftAna::ensureHists |
( |
| ) |
|
Definition at line 145 of file MagDriftAna_module.cc.
References detinfo::DetectorProperties::DriftVelocity(), e, detinfo::DetectorProperties::Efield(), fChargeXpos, fChargeYpos, fChargeZpos, fDeltaZoverX, fDeltaZoverXAway, fDeltaZvsX, fDirCosY, fDirCosZ, fDriftDeltaZ, fDriftDeltaZAway, fHitZpos, geo::TPCGeo::HalfHeight(), geo::TPCGeo::HalfWidth(), initDone, geo::TPCGeo::Length(), LOG_VERBATIM, art::TFileDirectory::make(), max, detinfo::DetectorProperties::Temperature(), and geo::GeometryCore::TPC().
Referenced by analyze().
155 double Efield = detprop->
Efield();
157 double DriftVelocity = detprop->
DriftVelocity(Efield,Temperature)/1000.;
162 fDirCosY = -DriftVelocity * MagField->FieldAtPoint().z() / Efield;
163 fDirCosZ = +DriftVelocity * MagField->FieldAtPoint().y() / Efield;
176 double zScale =
std::max(fDirCosZ/2.0,4
e-4);
180 "MC X charge depositions; X (cm); Events",
183 "MC Y charge depositions; Y (cm); Events",
184 101, -halfHeight, halfHeight);
186 "MC Z charge depositions; Z (cm); Events",
189 "Z charge collection; Z (cm); Events",
193 "Z drift of charge; delta Z (cm); Events",
194 101, -5*zScale*width, 5*zScale*width);
196 "Z drift of charge; delta Z/X; Events",
197 51, -10*zScale, 10*zScale);
199 "delta Z vs X; X (cm); delta Z (cm), Events",
201 51, -20*zScale, 20*zScale);
205 tfs->
make<TH1D>(
"hDriftDeltaZAway",
206 "Z drift of charge (long drift); delta Z (cm); Events",
207 101, -5*zScale*width, 5*zScale*width);
209 tfs->
make<TH1D>(
"hDeltaZoverXAway",
210 "Z drift of charge (long drift); delta Z/X; Events",
211 51, -10*zScale, 10*zScale);
double Length() const
Length is associated with z coordinate [cm].
virtual double Temperature() const =0
double HalfHeight() const
Height is associated with y coordinate [cm].
T * make(ARGS...args) const
virtual double DriftVelocity(double efield=0., double temperature=0.) const =0
TPCGeo const & TPC(unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified TPC.
#define LOG_VERBATIM(category)
virtual double Efield(unsigned int planegap=0) const =0
Returns the nominal electric field in the specified volume.
double HalfWidth() const
Width is associated with x coordinate [cm].