17 #define MAX_DEFLECTION 0.15
25 #define ONE_OVER_H 2.0
26 #define ALPHA 1e-4 // rate parameter for Newton step backtracking algorithm
27 #define W_EFF 30.2e-9 // GeV
29 #define ELECTRON_CHARGE 1.6022e-4 // fC
74 for (
unsigned int i=0;i<
fdcwires.size();i++){
75 for (
unsigned int j=0;j<
fdcwires[i].size();j++){
106 gPARMS->SetDefaultParameter(
"FDC:ROUT_FIDUCIAL",ROUT_FIDUCIAL,
"Outer fiducial radius of FDC in cm");
107 gPARMS->SetDefaultParameter(
"FDC:RIN_FIDUCIAL",RIN_FIDUCIAL,
"Inner fiducial radius of FDC in cm");
108 gPARMS->SetDefaultParameter(
"FDC:MAX_ALLOWED_FDC_HITS",
MAX_ALLOWED_FDC_HITS,
"Max. number of FDC hits (includes both cathode strips and wires hits) to allow before considering event too busy to attempt FDC tracking");
109 gPARMS->SetDefaultParameter(
"FDC:STRIP_ANODE_TIME_CUT",
STRIP_ANODE_TIME_CUT,
"maximum time difference between strips and wires (in ns)");
110 gPARMS->SetDefaultParameter(
"FDC:CHARGE_THRESHOLD",
CHARGE_THRESHOLD,
"Minimum average charge on both cathode planes (in pC)");
111 gPARMS->SetDefaultParameter(
"FDC:DELTA_X_CUT",
DELTA_X_CUT,
"Maximum distance between reconstructed wire position and wire position");
114 gPARMS->SetDefaultParameter(
"FDC:DEBUG_HISTS",
DEBUG_HISTS);
132 _DBG_<<
"FDC geometry not available!" <<endl;
136 _DBG_<<
"FDC geometry not available!" <<endl;
142 dgeom->
Get(
"//posXYZ[@volume='forwardDC_package_1']/@X_Y_Z",offsets);
145 dgeom->
Get(
"//posXYZ[@volume='forwardDC_package_2']/@X_Y_Z",offsets);
148 dgeom->
Get(
"//posXYZ[@volume='forwardDC_package_3']/@X_Y_Z",offsets);
151 dgeom->
Get(
"//posXYZ[@volume='forwardDC_package_4']/@X_Y_Z",offsets);
157 JCalibration * jcalib = dapp->GetJCalibration(runnumber);
158 vector<map<string,double> >vals;
159 if (jcalib->Get(
"FDC/cell_offsets",vals)==
false){
160 for(
unsigned int i=0; i<vals.size(); i++){
161 map<string,double> &row = vals[i];
164 xshifts.push_back(row[
"xshift"]);
165 yshifts.push_back(row[
"yshift"]);
169 map<string, double> fdcparms;
172 jcalib->Get(
"FDC/fdc_resolution_parms",fdcparms);
181 v_vs_u=(TH2F*)gROOT->FindObject(
"v_vs_u");
182 if (!
v_vs_u)
v_vs_u=
new TH2F(
"v_vs_u",
"v vs u",192,0.5,192.5,192,0.5,192.5);
184 qv_vs_qu= (TH2F*) gROOT->FindObject(
"qv_vs_qu");
185 if (!
qv_vs_qu)
qv_vs_qu=
new TH2F(
"qv_vs_qu",
"Anode charge from each cathode",100,0,20000,100,0,20000);
187 tv_vs_tu= (TH2F*) gROOT->FindObject(
"tv_vs_tu");
188 if (!
tv_vs_tu)
tv_vs_tu=
new TH2F(
"tv_vs_tu",
"t(v) vs t(u)",100,-100,250,100,-100,250);
190 dtv_vs_dtu= (TH2F*) gROOT->FindObject(
"dtv_vs_dtu");
191 if (!
dtv_vs_dtu)
dtv_vs_dtu=
new TH2F(
"dtv_vs_dtu",
"t(wire)-t(v) vs t(wire)-t(u)",200,-100,100,200,-100,100);
195 96,0.5,96.5,100,-500,500);
198 96,0.5,96.5,100,-500,500);
199 uv_dt_vs_u=(TH2F *) gROOT->FindObject(
"uv_dt_vs_u");
201 192,0.5,192.5,100,-50,50);
202 uv_dt_vs_v=(TH2F *) gROOT->FindObject(
"uv_dt_vs_v");
204 192,0.5,192.5,100,-50,50);
206 ut_vs_u=(TH2F *) gROOT->FindObject(
"ut_vs_u");
208 192,0.5,192.5,100,0,1000);
209 vt_vs_v=(TH2F *) gROOT->FindObject(
"vt_vs_v");
211 192,0.5,192.5,100,0,1000);
213 dx_vs_dE=(TH2F*)gROOT->FindObject(
"dx_vs_dE");
217 u_cl_size=(TH1F*)gROOT->FindObject(
"u_cl_size");
219 v_cl_size=(TH1F*)gROOT->FindObject(
"v_cl_size");
222 u_cl_n=(TH1F*)gROOT->FindObject(
"u_cl_n");
223 if (!
u_cl_n)
u_cl_n=
new TH1F(
"u_cl_n",
"u_cl_n",20,.5,20.5);
224 v_cl_n=(TH1F*)gROOT->FindObject(
"v_cl_n");
225 if (!
v_cl_n)
v_cl_n=
new TH1F(
"v_cl_n",
"v_cl_n",20,.5,20.5);
227 x_dist_2=(TH1F*)gROOT->FindObject(
"x_dist_2");
230 x_dist_3=(TH1F*)gROOT->FindObject(
"x_dist_3");
233 x_dist_23=(TH1F*)gROOT->FindObject(
"x_dist_23");
236 x_dist_33=(TH1F*)gROOT->FindObject(
"x_dist_33");
239 d_uv=(TH1F*)gROOT->FindObject(
"d_uv");
240 if (!
d_uv)
d_uv=
new TH1F(
"d_uv",
"d_uv",100,0,50);
243 for (
unsigned int i=0;i<24;i++){
246 Hxy[i]=(TH2F *) gROOT->FindObject(hname);
248 Hxy[i]=
new TH2F(hname,hname,4000,-50,50,200,-50,50);
260 for (
unsigned int i=0;i<
fdcwires.size();i++){
261 for (
unsigned int j=0;j<
fdcwires[i].size();j++){
269 for (
unsigned int j=0;j<
fdccathodes[i].size();j++){
287 vector<const DFDCHit*> fdcHits;
288 eventLoop->Get(fdcHits);
289 if (fdcHits.size()==0)
return NOERROR;
295 _DBG_<<
"Too many hits in FDC ("<<fdcHits.size()<<
", max="<<
MAX_ALLOWED_FDC_HITS<<
")! Pseudopoint reconstruction in FDC bypassed for event "<<eventLoop->GetJEvent().GetEventNumber()<<endl;
300 vector<const DFDCCathodeCluster*> cathClus;
301 eventLoop->Get(cathClus);
302 if (cathClus.size()==0)
return NOERROR;
305 vector<const DFDCHit*> xHits;
306 for (
unsigned int i=0; i < fdcHits.size(); i++)
307 if (fdcHits[i]->type == 0)
308 xHits.push_back(fdcHits[i]);
313 vector<const DFDCCathodeCluster*> uClus;
314 vector<const DFDCCathodeCluster*> vClus;
315 for (
unsigned int i=0; i < cathClus.size(); i++) {
316 if (cathClus[i]->plane == 1)
317 vClus.push_back(cathClus[i]);
319 uClus.push_back(cathClus[i]);
327 vector<const DMCTrackHit*> mctrackhits;
328 eventLoop->Get(mctrackhits);
330 vector<const DFDCCathodeCluster*>::iterator uIt = uClus.begin();
331 vector<const DFDCCathodeCluster*>::iterator vIt = vClus.begin();
332 vector<const DFDCHit*>::iterator xIt = xHits.begin();
336 vector<const DFDCCathodeCluster*> oneLayerU;
337 vector<const DFDCCathodeCluster*> oneLayerV;
338 vector<const DFDCHit*> oneLayerX;
339 for (
int iLayer=1; iLayer <= 24; iLayer++) {
340 for (; ((uIt != uClus.end() && (*uIt)->gLayer == iLayer)); uIt++)
341 oneLayerU.push_back(*uIt);
342 for (; ((vIt != vClus.end() && (*vIt)->gLayer == iLayer)); vIt++)
343 oneLayerV.push_back(*vIt);
344 for (; ((xIt != xHits.end() && (*xIt)->gLayer == iLayer)); xIt++)
345 oneLayerX.push_back(*xIt);
346 if (oneLayerU.size()>0 && oneLayerV.size()>0 && oneLayerX.size()>0)
347 makePseudo(oneLayerX, oneLayerU, oneLayerV,iLayer, mctrackhits);
363 vector<const DFDCCathodeCluster*>&
u,
364 vector<const DFDCCathodeCluster*>& v,
366 vector<const DMCTrackHit*> &mctrackhits)
368 vector<const DFDCHit*>::iterator xIt;
369 vector<centroid_t>upeaks;
370 vector<centroid_t>vpeaks;
376 for (
unsigned int i=0;i<u.size();i++){
379 if (u[i]->members.size()>2){
380 for (vector<const DFDCHit*>::const_iterator strip=u[i]->members.begin()+1;strip+1!=u[i]->members.end();strip++){
384 unsigned int index=2*((*strip)->gLayer-1)+(1-(*strip)->plane/2);
389 NTemp(0) = double ((*(strip-1))->pulse_height);
390 NTemp(1) = double ((*(strip))->pulse_height);
391 NTemp(2) = double ((*(strip+1))->pulse_height);
392 NTempRaw(0) = double ((*(strip-1))->pulse_height_raw);
393 NTempRaw(1) = double ((*(strip))->pulse_height_raw);
394 NTempRaw(2) = double ((*(strip+1))->pulse_height_raw);
395 indexTemp(0) = (*(strip-1))->element;
396 indexTemp(1) = (*(strip))->element;
397 indexTemp(2) = (*(strip+1))->element;
398 upeaks[upeaks.size()-1].cluster=i;
399 upeaks[upeaks.size()-1].X = XTemp;
400 upeaks[upeaks.size()-1].N = NTemp;
401 upeaks[upeaks.size()-1].NRaw = NTempRaw;
402 upeaks[upeaks.size()-1].index = indexTemp;
404 else if (u[i]->members.size()==3){
406 upeaks[upeaks.size()-1].cluster=i;
411 else if (u[i]->members.size()==2){
412 for (vector<const DFDCHit*>::const_iterator strip=u[i]->members.begin();strip+1!=u[i]->members.end();strip++){
414 upeaks[upeaks.size()-1].cluster=i;
420 for (
unsigned int i=0;i<v.size();i++){
423 if (v[i]->members.size()>2){
424 for (vector<const DFDCHit*>::const_iterator strip=v[i]->members.begin()+1;strip+1!=v[i]->members.end();strip++){
428 unsigned int index=2*((*strip)->gLayer-1)+(1-(*strip)->plane/2);
433 NTemp(0) = double ((*(strip-1))->pulse_height);
434 NTemp(1) = double ((*(strip))->pulse_height);
435 NTemp(2) = double ((*(strip+1))->pulse_height);
436 NTempRaw(0) = double ((*(strip-1))->pulse_height_raw);
437 NTempRaw(1) = double ((*(strip))->pulse_height_raw);
438 NTempRaw(2) = double ((*(strip+1))->pulse_height_raw);
439 indexTemp(0) = (*(strip-1))->element;
440 indexTemp(1) = (*(strip))->element;
441 indexTemp(2) = (*(strip+1))->element;
442 vpeaks[vpeaks.size()-1].cluster=i;
443 vpeaks[vpeaks.size()-1].X = XTemp;
444 vpeaks[vpeaks.size()-1].N = NTemp;
445 vpeaks[vpeaks.size()-1].NRaw = NTempRaw;
446 vpeaks[vpeaks.size()-1].index = indexTemp;
448 else if (v[i]->members.size()==3){
450 vpeaks[vpeaks.size()-1].cluster=i;
455 else if (v[i]->members.size()==2){
456 for (vector<const DFDCHit*>::const_iterator strip=v[i]->members.begin();strip+1!=v[i]->members.end();strip++){
458 vpeaks[vpeaks.size()-1].cluster=i;
463 if (upeaks.size()*vpeaks.size()>0){
465 unsigned int ilay=layer-1;
466 unsigned int ind=2*ilay;
471 for (
unsigned int i=0;i<upeaks.size();i++){
472 for (
unsigned int j=0;j<vpeaks.size();j++){
476 vpeaks[j].pos,phi_v);
478 vpeaks[j].pos,phi_v);
480 for(xIt=x.begin();xIt!=x.end();xIt++){
483 double x_from_wire=wire->
u;
489 double r2test=x_from_wire*x_from_wire+y_from_strips*y_from_strips;
490 double delta_x=x_from_wire-x_from_strips;
493 if (upeaks[i].numstrips == 3 && vpeaks[j].numstrips == 3)
x_dist_3->Fill(delta_x);
494 if (upeaks[i].numstrips == 2 && vpeaks[j].numstrips == 2)
x_dist_2->Fill(delta_x);
495 if (upeaks[i].numstrips == 2 && vpeaks[j].numstrips == 3)
x_dist_23->Fill(delta_x);
496 else if (upeaks[i].numstrips == 3 && vpeaks[j].numstrips == 2)
x_dist_23->Fill(delta_x);
498 if (upeaks[i].numstrips == 3 && vpeaks[j].numstrips == 10)
x_dist_33->Fill(delta_x);
499 else if (upeaks[i].numstrips == 10 && vpeaks[j].numstrips == 3)
x_dist_33->Fill(delta_x);
503 if (old_wire_num==(*xIt)->element)
continue;
507 double dt1 = (*xIt)->t - upeaks[i].t;
508 double dt2 = (*xIt)->t - vpeaks[j].t;
515 tv_vs_tu->Fill(upeaks[i].t, vpeaks[j].t);
521 int uid=u[upeaks[i].cluster]->members[1]->element;
522 int vid=v[vpeaks[j].cluster]->members[1]->element;
525 v[vpeaks[j].cluster]->members[1]->GetSingle(vdigihit);
527 u[upeaks[i].cluster]->members[1]->GetSingle(udigihit);
528 if (vdigihit!=NULL && udigihit!=NULL){
552 u_cl_n->Fill(upeaks[i].numstrips);
553 v_cl_n->Fill(vpeaks[j].numstrips);
557 double q_cathodes=0.5*(upeaks[i].q+vpeaks[j].q);
559 double dE=charge_to_energy*q_cathodes;
560 double q_from_pulse_height=5.0e-4*(upeaks[i].q_from_pulse_height
561 +vpeaks[j].q_from_pulse_height);
563 double dE_amp=charge_to_energy*q_from_pulse_height;
566 qv_vs_qu->Fill(upeaks[i].q,vpeaks[j].q);
570 old_wire_num=(*xIt)->element;
572 int status=upeaks[i].numstrips+vpeaks[j].numstrips;
576 newPseu->
phi_u=phi_u;
577 newPseu->
phi_v=phi_v;
578 newPseu->
u = upeaks[i].pos;
579 newPseu->
v = vpeaks[j].pos;
580 newPseu->
t_u = upeaks[i].t;
581 newPseu->
t_v = vpeaks[j].t;
584 newPseu->
w = x_from_wire+
xshifts[ilay];
586 newPseu->
w_c = x_from_strips+xshifts[ilay];
587 newPseu->
s = y_from_strips+
yshifts[ilay];
590 newPseu->
wire = wire;
591 newPseu->
time = (*xIt)->t;
594 newPseu->
itrack = (*xIt)->itrack;
596 newPseu->AddAssociatedObject(v[vpeaks[j].cluster]);
597 newPseu->AddAssociatedObject(u[upeaks[i].cluster]);
601 newPseu->
q = q_from_pulse_height;
607 if(newPseu->
wire==NULL){
608 _DBG_<<
"newPseu->wire=NULL! This shouldn't happen. Complain to staylor@jlab.org"<<endl;
612 double sinangle=newPseu->
wire->
udir(0);
613 double cosangle=newPseu->
wire->
udir(1);
614 unsigned int pack_id=(layer-1)/6;
615 newPseu->
s+=
dY[pack_id]*cosangle+
dX[pack_id]*sinangle;
617 newPseu->
xy.Set((newPseu->
w)*cosangle+(newPseu->
s)*sinangle,
618 -(newPseu->
w)*sinangle+(newPseu->
s)*cosangle);
622 newPseu->
covxx=sigx2*cosangle*cosangle+sigy2*sinangle*sinangle;
623 newPseu->
covyy=sigx2*sinangle*sinangle+sigy2*cosangle*cosangle;
624 newPseu->
covxy=(sigy2-sigx2)*sinangle*cosangle;
628 if(mctrackhit)newPseu->AddAssociatedObject(mctrackhit);
630 _data.push_back(newPseu);
633 Hxy[ilay]->Fill(newPseu->
w_c,newPseu->
s);
634 if (ilay==6)
dx_vs_dE->Fill(q_from_pulse_height,0.2588*delta_x);
638 }
else _DBG_ <<
"Bad wire " << (*xIt)->element <<endl;
656 for(
unsigned int i=0; i<H.size(); i++)t+=H[i]->t;
657 if(H.size()>0)t/=(
double)H.size();
661 for(
unsigned int i=0; i<H.size(); i++)t_rms+=pow((
double)(H[i]->t-t),2.0);
662 if(H.size()>0)t_rms =
sqrt(t_rms/(
double)H.size());
671 for (vector<const DFDCHit*>::const_iterator j=peak-1;j<=peak+1;j++){
678 for (vector<const DFDCHit*>::const_iterator j=peak-1;j<=peak+1;j++){
679 t_rms+=((*j)->t-t)*((*j)->t-t);
681 t_rms=
sqrt(t_rms/3.);
694 vector<const DFDCHit *>::const_iterator peak,
695 vector<centroid_t>¢roids){
697 double err_diff1=0.,err_diff2=0.;
710 return VALUE_OUT_OF_RANGE;
714 if ((*peak)->pulse_height-(*(peak-1))->pulse_height > err_diff1
715 && (*peak)->pulse_height-(*(peak+1))->pulse_height > err_diff2){
723 unsigned int index=2*((*peak)->gLayer-1)+(1-(*peak)->plane/2);
725 for (vector<const DFDCHit*>::const_iterator j=peak-1;j<=peak+1;j++){
727 N(i)=double((*j)->pulse_height);
736 double errf=0.,errx=0;
737 for (
int iter=1;iter<=
ITER_MAX;iter++){
746 double tanh_p=tanh(argp);
747 double tanh_m=tanh(argm);
748 double tanh2_p=tanh_p*tanh_p;
749 double tanh2_m=tanh_m*tanh_m;
750 double q_over_4=0.25*par(
QA);
754 J(i,
K2)=-q_over_4*(argp/par(
K2)*(1.-tanh2_p)
755 -argm/par(
K2)*(1.-tanh2_m));
756 J(i,
X0)=-q_over_4*par(
K2)*(tanh2_m-tanh2_p);
757 F(i)=N(i)-q_over_4*
f(i);
758 double new_errf=fabs(
F(i));
759 if (new_errf>errf) errf=new_errf;
771 double sum_f=
f(0)+
f(1)+
f(2);
772 for (vector<const DFDCHit*>::const_iterator j=peak-1;j<=peak+1;j++){
773 sum+=double((*j)->q);
778 centroids.push_back(temp);
788 double new_err=fabs(par(i)-newpar(i));
789 if (new_err>errx) errx=new_err;
800 double sum_f=
f(0)+
f(1)+
f(2);
801 for (vector<const DFDCHit*>::const_iterator j=peak-1;j<=peak+1;j++){
802 sum+=double((*j)->q);
807 centroids.push_back(temp);
814 return INFINITE_RECURSION;
840 double slope=(-1.0)*F.
Mag2();
844 return VALUE_OUT_OF_RANGE;
848 double lambda_temp,lambda2=lambda;
856 newpar=par+lambda*fullstep;
859 for (
int i=0;i<3;i++){
863 newF(i)=N(i)-0.25*newpar(
QA)*(tanh(argp)-tanh(argm));
865 newf=0.5*newF.
Mag2();
871 else if (newf<=f+
ALPHA*lambda*slope){
877 lambda_temp=-0.5*slope/(newf-f-slope);
880 double temp1=newf-f-lambda*slope;
881 double temp2=f2-f-lambda2*slope;
882 double one_over_lambda2_sq=1./(lambda2*lambda2);
883 double one_over_lambda_sq=1./(lambda*lambda);
884 double one_over_lambda_diff=1./(lambda-lambda2);
885 double a=(temp1*one_over_lambda_sq-temp2*one_over_lambda2_sq)*one_over_lambda_diff;
886 double b=(-lambda2*temp1*one_over_lambda_sq+lambda*temp2*one_over_lambda2_sq)
887 *one_over_lambda_diff;
888 if (a==0.0) lambda_temp=-0.5*slope/b;
890 double disc=b*b-3.0*a*slope;
891 if (disc<0.0) lambda_temp=0.5*lambda;
892 else if (b<=0.0) lambda_temp=(-b+
sqrt(disc))/(3.*a);
893 else lambda_temp=-slope/(b+
sqrt(disc));
896 if (lambda_temp>0.5*lambda) lambda_temp=0.5*lambda;
902 lambda=(lambda_temp>0.1*lambda ? lambda_temp : 0.1*lambda);
915 vector<const DFDCHit *>::const_iterator peak,
916 vector<centroid_t>¢roids){
920 return VALUE_OUT_OF_RANGE;
923 unsigned int index1=2*((*peak)->gLayer-1)+(1-(*peak)->plane/2);
924 unsigned int index2=2*((*(peak+1))->gLayer-1)+(1-(*(peak+1))->plane/2);
927 if (index1 != index2)
return VALUE_OUT_OF_RANGE;
929 double pos1=
fdccathodes[index1][(*peak)->element-1]->u;
930 double pos2=
fdccathodes[index2][(*(peak+1))->element-1]->u;
932 double amp1=double((*peak)->pulse_height);
933 double amp2=double((*(peak+1))->pulse_height);
934 double sum=amp1+amp2;
936 double t1=double((*peak)->t);
937 double t2=double((*(peak+1))->t);
940 temp.
pos=(pos1*amp1+pos2*amp2)/sum;
945 double pos_corr = 0.05;
946 (amp2 > amp1) ? temp.
pos+=pos_corr : temp.
pos-=pos_corr;
953 (amp2 > amp1) ? temp.
t=t2 : temp.
t=t1;
957 centroids.push_back(temp);
969 vector<const DFDCHit *>::const_iterator peak,
970 vector<centroid_t>¢roids){
976 return VALUE_OUT_OF_RANGE;
984 double q_from_pulse_height = 0;
985 for (vector<const DFDCHit*>::const_iterator j=peak-1;j<=peak+1;j++){
986 unsigned int index=2*((*j)->gLayer-1)+(1-(*j)->plane/2);
989 double amp=double((*j)->pulse_height);
998 q_from_pulse_height=amp;
1007 double pos_corr = 0.1;
1010 temp.
pos=wsum/sum + i_corr*pos_corr;
1019 centroids.push_back(temp);
unsigned int MAX_ALLOWED_FDC_HITS
DVector2 xy
rough x,y coordinates in lab coordinate system
DFDCPseudo_factory()
DFDCPseudo_factory::DFDCPseudo_factory(): default constructor – initializes log file.
DMatrix3x3 Invert() const
static bool fdcxhit_cmp(const DFDCHit *a, const DFDCHit *b)
double q
< energy deposition, from pulse height
int status
status word for pseudopoint
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.
double t_v
time of the two cathode clusters
sprintf(text,"Post KinFit Cut")
bool Get(string xpath, string &sval) const
const DFDCWire * wire
DFDCWire for this wire.
double MIDDLE_STRIP_THRESHOLD
double q_from_pulse_height
class DFDCPseudo: definition for a reconstructed point in the FDC
jerror_t brun(JEventLoop *loop, int32_t runnumber)
static char index(char c)
static const DMCTrackHit * GetMCTrackHit(const DCoordinateSystem *wire, double rdrift, vector< const DMCTrackHit * > &mctrackhits, int trackno_filter=-1)
jerror_t FindCentroid(const vector< const DFDCHit * > &H, vector< const DFDCHit * >::const_iterator peak, vector< centroid_t > ¢roids)
DFDCPseudo_factory::FindCentroid() Calculates the centroids of groups of three adjacent strips contai...
double ds
local coordinate of pseudopoint in the direction along the wire and its uncertainty ...
double phi_v
rotation angles for cathode planes
~DFDCPseudo_factory()
DFDCPseudo_factory::~DFDCPseudo_factory(): default destructor – closes log file.
bool DFDCPseudo_cmp(const DFDCPseudo *a, const DFDCPseudo *b)
jerror_t init(void)
DFDCPseudo_factory::evnt(): this is the place that anode hits and DFDCCathodeClusters are organized i...
centroid_t cluster_v
Cathode cluster centroids, Useful for gain/strip pitch calibration.
double dE
energy deposition, from integral
jerror_t ThreeStripCluster(const vector< const DFDCHit * > &H, vector< const DFDCHit * >::const_iterator peak, vector< centroid_t > ¢roids)
DFDCPseudo_factory::ThreeStripCluster() Calculates the center-of-gravity of Three adjacent strips...
DGeometry * GetDGeometry(unsigned int run_number)
bool DFDCAnode_gLayer_cmp(const DFDCHit *a, const DFDCHit *b)
DFDCAnode_gLayer_cmp(): non-member function passed to std::sort() to sort DFDCHit pointers for the an...
static float getYLocalStrips(float u, float v)
DFDCGeometry::getYLocalStrips() Compute the y-coordinate in the layer coordinate system from the stri...
double s
< wire position computed from cathode data, assuming the avalanche occurs at the wire ...
vector< vector< DFDCCathode * > > fdccathodes
double covyy
Covariance terms for (x,y)
double time
time corresponding to this pseudopoint.
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...
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
jerror_t TwoStripCluster(const vector< const DFDCHit * > &H, vector< const DFDCHit * >::const_iterator peak, vector< centroid_t > ¢roids)
DFDCPseudo_factory::TwoStripCluster() Calculates the center-of-gravity of two adjacent strips...
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...
bool GetFDCCathodes(vector< vector< DFDCCathode * > > &fdccathodes) const
bool GetFDCWires(vector< vector< DFDCWire * > > &fdcwires) const
jerror_t evnt(JEventLoop *eventLoop, uint64_t eventNo)
DFDCPseudo_factory::evnt(): this is the place that anode hits and DFDCCathodeClusters are organized i...
double dw
local coordinate of pseudopoint in the direction perpendicular to the wires and its uncertainty ...
static float getXLocalStrips(float u, float v)
DFDCGeometry::getXLocalStrips() Compute the x-coordinate in the layer coordinate system from the stri...
vector< vector< DFDCWire * > > fdcwires
double v
centroid positions in the two cathode views
double STRIP_ANODE_TIME_CUT
class DFDCHit: definition for a basic FDC hit data type.