Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DFDCPseudo_factory Class Reference

class DFDCPseudo_factory: definition for a JFactory that produces pseudopoints from anode hits and DFDCCathodeClusters. For now, it is purely geometry-based. More...

#include <DFDCPseudo_factory.h>

+ Inheritance diagram for DFDCPseudo_factory:

Public Member Functions

 DFDCPseudo_factory ()
 DFDCPseudo_factory::DFDCPseudo_factory(): default constructor – initializes log file. More...
 
 ~DFDCPseudo_factory ()
 DFDCPseudo_factory::~DFDCPseudo_factory(): default destructor – closes log file. More...
 

Protected Member Functions

jerror_t init (void)
 DFDCPseudo_factory::evnt(): this is the place that anode hits and DFDCCathodeClusters are organized into pseudopoints. For now, this is done purely by geometry, with no drift information. See also DFDCPseudo_factory::makePseudo(). More...
 
jerror_t evnt (JEventLoop *eventLoop, uint64_t eventNo)
 DFDCPseudo_factory::evnt(): this is the place that anode hits and DFDCCathodeClusters are organized into pseudopoints. More...
 
jerror_t brun (JEventLoop *loop, int32_t runnumber)
 
jerror_t erun (void)
 
void makePseudo (vector< const DFDCHit * > &x, vector< const DFDCCathodeCluster * > &u, vector< const DFDCCathodeCluster * > &v, int layer, vector< const DMCTrackHit * > &mctrackhits)
 DFDCPseudo_factory::makePseudo(): performs UV+X matching to create pseudopoints. More...
 
void CalcMeanTime (const vector< const DFDCHit * > &H, double &t, double &t_rms)
 DFDCPseudo_factory::CalcMeanTime() Calculates mean and RMS time for a cluster of cathode hits. More...
 
void CalcMeanTime (vector< const DFDCHit * >::const_iterator peak, double &t, double &t_rms)
 
jerror_t FindCentroid (const vector< const DFDCHit * > &H, vector< const DFDCHit * >::const_iterator peak, vector< centroid_t > &centroids)
 DFDCPseudo_factory::FindCentroid() Calculates the centroids of groups of three adjacent strips containing a peak. More...
 
jerror_t FindNewParmVec (const DMatrix3x1 &N, const DMatrix3x1 &X, const DMatrix3x1 &F, const DMatrix3x3 &J, const DMatrix3x1 &par, DMatrix3x1 &newpar)
 DFDCPseudo_factory::FindNewParmVec() Routine used by FindCentroid to backtrack along the direction of the Newton step if the step is too large in order to avoid conditions where the iteration procedure starts to diverge. The procedure uses a scalar quantity f= 1/2 F.F for this purpose. Algorithm described in Numerical Recipes in C, pp. 383-389. More...
 
jerror_t TwoStripCluster (const vector< const DFDCHit * > &H, vector< const DFDCHit * >::const_iterator peak, vector< centroid_t > &centroids)
 DFDCPseudo_factory::TwoStripCluster() Calculates the center-of-gravity of two adjacent strips. More...
 
jerror_t ThreeStripCluster (const vector< const DFDCHit * > &H, vector< const DFDCHit * >::const_iterator peak, vector< centroid_t > &centroids)
 DFDCPseudo_factory::ThreeStripCluster() Calculates the center-of-gravity of Three adjacent strips. More...
 

Private Attributes

vector< vector< DFDCWire * > > fdcwires
 
vector< vector< DFDCCathode * > > fdccathodes
 
vector< double > xshifts
 
vector< double > yshifts
 
double dX [4]
 
double dY [4]
 
double ROUT_FIDUCIAL
 
double RIN_FIDUCIAL
 
double r2_out
 
double r2_in
 
double STRIP_ANODE_TIME_CUT
 
unsigned int MAX_ALLOWED_FDC_HITS
 
bool DEBUG_HISTS
 
bool USE_FDC
 
double MIDDLE_STRIP_THRESHOLD
 
double FDC_RES_PAR1
 
double FDC_RES_PAR2
 
double CHARGE_THRESHOLD
 
double DELTA_X_CUT
 
TH2F * qv_vs_qu
 
TH2F * dtv_vs_dtu
 
TH2F * uv_dt_vs_u
 
TH2F * uv_dt_vs_v
 
TH2F * v_wire_dt_vs_wire
 
TH2F * tv_vs_tu
 
TH2F * u_wire_dt_vs_wire
 
TH2F * Hxy [24]
 
TH2F * ut_vs_u
 
TH2F * vt_vs_v
 
TH2F * v_vs_u
 
TH2F * dx_vs_dE
 
TH1F * u_cl_size
 
TH1F * v_cl_size
 
TH1F * u_cl_n
 
TH1F * v_cl_n
 
TH1F * x_dist_2
 
TH1F * x_dist_3
 
TH1F * x_dist_23
 
TH1F * x_dist_33
 
TH1F * d_uv
 

Detailed Description

class DFDCPseudo_factory: definition for a JFactory that produces pseudopoints from anode hits and DFDCCathodeClusters. For now, it is purely geometry-based.

Definition at line 39 of file DFDCPseudo_factory.h.

Constructor & Destructor Documentation

DFDCPseudo_factory::DFDCPseudo_factory ( )

DFDCPseudo_factory::DFDCPseudo_factory(): default constructor – initializes log file.

Definition at line 63 of file DFDCPseudo_factory.cc.

DFDCPseudo_factory::~DFDCPseudo_factory ( )

DFDCPseudo_factory::~DFDCPseudo_factory(): default destructor – closes log file.

Definition at line 72 of file DFDCPseudo_factory.cc.

References fdccathodes, and fdcwires.

Member Function Documentation

void DFDCPseudo_factory::CalcMeanTime ( const vector< const DFDCHit * > &  H,
double &  t,
double &  t_rms 
)
protected

DFDCPseudo_factory::CalcMeanTime() Calculates mean and RMS time for a cluster of cathode hits.

DFDCPseudo_factory::CalcMeanTime() Calculate the mean and rms of the times of the hits passed in "H". The contents of H should be pointers to a single cluster in a cathode plane.

Definition at line 652 of file DFDCPseudo_factory.cc.

References sqrt().

void DFDCPseudo_factory::CalcMeanTime ( vector< const DFDCHit * >::const_iterator  peak,
double &  t,
double &  t_rms 
)
protected

Definition at line 667 of file DFDCPseudo_factory.cc.

References sqrt().

jerror_t DFDCPseudo_factory::erun ( void  )
protected

Definition at line 258 of file DFDCPseudo_factory.cc.

References fdccathodes, and fdcwires.

jerror_t DFDCPseudo_factory::evnt ( JEventLoop *  eventLoop,
uint64_t  eventNo 
)
protected

DFDCPseudo_factory::evnt(): this is the place that anode hits and DFDCCathodeClusters are organized into pseudopoints.

Definition at line 283 of file DFDCPseudo_factory.cc.

References _DBG_, DFDCAnode_gLayer_cmp(), DFDCPseudo_cmp(), makePseudo(), MAX_ALLOWED_FDC_HITS, and USE_FDC.

jerror_t DFDCPseudo_factory::FindCentroid ( const vector< const DFDCHit * > &  H,
vector< const DFDCHit * >::const_iterator  peak,
vector< centroid_t > &  centroids 
)
protected

DFDCPseudo_factory::FindCentroid() Calculates the centroids of groups of three adjacent strips containing a peak.

DFDCPseudo_factory::FindCentroid() Uses the Newton-Raphson method for solving the set of non-linear equations describing the charge distribution over 3 strips for the peak position x0, the anode charge qa, and the "width" parameter k2. See Numerical Recipes in C p.379-383. Updates list of centroids.

Definition at line 693 of file DFDCPseudo_factory.cc.

References A_OVER_H, f, F, fdccathodes, FindNewParmVec(), xstream::base64::index(), ITER_MAX, K2, MIDDLE_STRIP_THRESHOLD, centroid_t::numstrips, ONE_OVER_H, centroid_t::pos, centroid_t::q, centroid_t::q_from_pulse_height, QA, sum, centroid_t::t, centroid_t::t_rms, temp, TOLF, TOLX, X, and X0.

Referenced by makePseudo().

jerror_t DFDCPseudo_factory::FindNewParmVec ( const DMatrix3x1 N,
const DMatrix3x1 X,
const DMatrix3x1 F,
const DMatrix3x3 J,
const DMatrix3x1 par,
DMatrix3x1 newpar 
)
protected

DFDCPseudo_factory::FindNewParmVec() Routine used by FindCentroid to backtrack along the direction of the Newton step if the step is too large in order to avoid conditions where the iteration procedure starts to diverge. The procedure uses a scalar quantity f= 1/2 F.F for this purpose. Algorithm described in Numerical Recipes in C, pp. 383-389.

Definition at line 827 of file DFDCPseudo_factory.cc.

References A_OVER_H, ALPHA, f, F, f2, DMatrix3x3::Invert(), K2, DMatrix3x1::Mag2(), ONE_OVER_H, QA, sqrt(), X, and X0.

Referenced by FindCentroid().

jerror_t DFDCPseudo_factory::init ( void  )
protected

DFDCPseudo_factory::evnt(): this is the place that anode hits and DFDCCathodeClusters are organized into pseudopoints. For now, this is done purely by geometry, with no drift information. See also DFDCPseudo_factory::makePseudo().

Definition at line 93 of file DFDCPseudo_factory.cc.

References CHARGE_THRESHOLD, DEBUG_HISTS, DELTA_X_CUT, MAX_ALLOWED_FDC_HITS, MIDDLE_STRIP_THRESHOLD, r2_in, r2_out, RIN_FIDUCIAL, ROUT_FIDUCIAL, and STRIP_ANODE_TIME_CUT.

void DFDCPseudo_factory::makePseudo ( vector< const DFDCHit * > &  x,
vector< const DFDCCathodeCluster * > &  u,
vector< const DFDCCathodeCluster * > &  v,
int  layer,
vector< const DMCTrackHit * > &  mctrackhits 
)
protected
jerror_t DFDCPseudo_factory::ThreeStripCluster ( const vector< const DFDCHit * > &  H,
vector< const DFDCHit * >::const_iterator  peak,
vector< centroid_t > &  centroids 
)
protected

DFDCPseudo_factory::ThreeStripCluster() Calculates the center-of-gravity of Three adjacent strips.

DFDCPseudo_factory::ThreeStripCluster() But FindCentroid does not work for Clusters without peak Attempt to recover them with simple center-of-gravity Updates list of centroids.

Definition at line 968 of file DFDCPseudo_factory.cc.

References fdccathodes, xstream::base64::index(), MIDDLE_STRIP_THRESHOLD, centroid_t::numstrips, centroid_t::pos, centroid_t::q, centroid_t::q_from_pulse_height, sum, centroid_t::t, centroid_t::t_rms, and temp.

Referenced by makePseudo().

jerror_t DFDCPseudo_factory::TwoStripCluster ( const vector< const DFDCHit * > &  H,
vector< const DFDCHit * >::const_iterator  peak,
vector< centroid_t > &  centroids 
)
protected

DFDCPseudo_factory::TwoStripCluster() Calculates the center-of-gravity of two adjacent strips.

DFDCPseudo_factory::TwoStripCluster() Almost 10% of all clusters have only two strips But FindCentroid does not work Attempt to recover them with simple center-of-gravity Updates list of centroids.

Definition at line 914 of file DFDCPseudo_factory.cc.

References fdccathodes, MIDDLE_STRIP_THRESHOLD, centroid_t::numstrips, centroid_t::pos, centroid_t::q, centroid_t::q_from_pulse_height, sum, centroid_t::t, t1, centroid_t::t_rms, and temp.

Referenced by makePseudo().

Member Data Documentation

double DFDCPseudo_factory::CHARGE_THRESHOLD
private

Definition at line 133 of file DFDCPseudo_factory.h.

Referenced by init(), and makePseudo().

TH1F* DFDCPseudo_factory::d_uv
private

Definition at line 142 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

bool DFDCPseudo_factory::DEBUG_HISTS
private

Definition at line 130 of file DFDCPseudo_factory.h.

Referenced by brun(), init(), and makePseudo().

double DFDCPseudo_factory::DELTA_X_CUT
private

Definition at line 134 of file DFDCPseudo_factory.h.

Referenced by init(), and makePseudo().

TH2F * DFDCPseudo_factory::dtv_vs_dtu
private

Definition at line 136 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

double DFDCPseudo_factory::dX[4]
private

Definition at line 123 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

TH2F * DFDCPseudo_factory::dx_vs_dE
private

Definition at line 140 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

double DFDCPseudo_factory::dY[4]
private

Definition at line 123 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

double DFDCPseudo_factory::FDC_RES_PAR1
private

Definition at line 132 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

double DFDCPseudo_factory::FDC_RES_PAR2
private

Definition at line 132 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

vector<vector<DFDCCathode*> > DFDCPseudo_factory::fdccathodes
private
vector<vector<DFDCWire*> > DFDCPseudo_factory::fdcwires
private

Definition at line 118 of file DFDCPseudo_factory.h.

Referenced by brun(), erun(), makePseudo(), and ~DFDCPseudo_factory().

TH2F* DFDCPseudo_factory::Hxy[24]
private

Definition at line 139 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

unsigned int DFDCPseudo_factory::MAX_ALLOWED_FDC_HITS
private

Definition at line 128 of file DFDCPseudo_factory.h.

Referenced by evnt(), and init().

double DFDCPseudo_factory::MIDDLE_STRIP_THRESHOLD
private

Definition at line 131 of file DFDCPseudo_factory.h.

Referenced by FindCentroid(), init(), ThreeStripCluster(), and TwoStripCluster().

TH2F* DFDCPseudo_factory::qv_vs_qu
private

Definition at line 136 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

double DFDCPseudo_factory::r2_in
private

Definition at line 126 of file DFDCPseudo_factory.h.

Referenced by init(), and makePseudo().

double DFDCPseudo_factory::r2_out
private

Definition at line 126 of file DFDCPseudo_factory.h.

Referenced by init(), and makePseudo().

double DFDCPseudo_factory::RIN_FIDUCIAL
private

Definition at line 125 of file DFDCPseudo_factory.h.

Referenced by init().

double DFDCPseudo_factory::ROUT_FIDUCIAL
private

Definition at line 125 of file DFDCPseudo_factory.h.

Referenced by init().

double DFDCPseudo_factory::STRIP_ANODE_TIME_CUT
private

Definition at line 127 of file DFDCPseudo_factory.h.

Referenced by init(), and makePseudo().

TH2F* DFDCPseudo_factory::tv_vs_tu
private

Definition at line 138 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

TH1F * DFDCPseudo_factory::u_cl_n
private

Definition at line 141 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

TH1F* DFDCPseudo_factory::u_cl_size
private

Definition at line 141 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

TH2F * DFDCPseudo_factory::u_wire_dt_vs_wire
private

Definition at line 138 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

bool DFDCPseudo_factory::USE_FDC
private

Definition at line 130 of file DFDCPseudo_factory.h.

Referenced by brun(), and evnt().

TH2F * DFDCPseudo_factory::ut_vs_u
private

Definition at line 139 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

TH2F* DFDCPseudo_factory::uv_dt_vs_u
private

Definition at line 137 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

TH2F * DFDCPseudo_factory::uv_dt_vs_v
private

Definition at line 137 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

TH1F * DFDCPseudo_factory::v_cl_n
private

Definition at line 141 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

TH1F * DFDCPseudo_factory::v_cl_size
private

Definition at line 141 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

TH2F* DFDCPseudo_factory::v_vs_u
private

Definition at line 140 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

TH2F * DFDCPseudo_factory::v_wire_dt_vs_wire
private

Definition at line 137 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

TH2F * DFDCPseudo_factory::vt_vs_v
private

Definition at line 139 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

TH1F * DFDCPseudo_factory::x_dist_2
private

Definition at line 141 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

TH1F * DFDCPseudo_factory::x_dist_23
private

Definition at line 141 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

TH1F * DFDCPseudo_factory::x_dist_3
private

Definition at line 141 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

TH1F * DFDCPseudo_factory::x_dist_33
private

Definition at line 141 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

vector<double> DFDCPseudo_factory::xshifts
private

Definition at line 120 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().

vector<double> DFDCPseudo_factory::yshifts
private

Definition at line 121 of file DFDCPseudo_factory.h.

Referenced by brun(), and makePseudo().


The documentation for this class was generated from the following files: