@@ -525,7 +525,10 @@ public boolean processDataEventUser(DataEvent event) {
525525 if (!event .hasBank ("AHDC::hits" )) {return false ;}
526526
527527 /// tmp: misalignement with respect to the center of the AHDC (mm)
528- double clas_alignement = +75 ;
528+ double torus = runBank .getFloat ("torus" , 0 );
529+ // inbending --> torus -1 --> 10.6 GeV run
530+ // outbending --> torus +1 --> 2.24 GeV run
531+ double clas_alignement = (torus > 0 ) ? +67 : +36 ; // this is the opposite value of the ahdc alignement with respect to CLAS that is a negative number
529532 double atof_alignement = 0 ;
530533
531534 /// Read the electron vertex
@@ -538,17 +541,21 @@ public boolean processDataEventUser(DataEvent event) {
538541 if (recBank .getInt ("pid" , row ) == 11 ) {
539542 vz_electron = 10 *recBank .getFloat ("vz" ,row ); // conversion in mm
540543 IsVertexDefined = true ;
541-
542-
543- //double px = recBank.getFloat("px",row);
544- //double py = recBank.getFloat("py",row);
545- //double pz = recBank.getFloat("pz",row);
546- //double p = Math.sqrt(px*px+py*py+pz*pz);
547- //double theta = Math.acos(pz/p);
548-
549- // set the resolutions on r and z! to be done
550- vz_error2 [0 ] = 0.09 ; // should depend on p and theta
551- vz_error2 [2 ] = 64 ; // should depend on p and theta
544+
545+ int status = recBank .getShort ("status" , row );
546+
547+ // If the electron is not from the FT, we can assign a finite resolution
548+ if (Math .abs (status ) / 1000 != 1 ) {
549+ //double px = recBank.getFloat("px",row);
550+ //double py = recBank.getFloat("py",row);
551+ //double pz = recBank.getFloat("pz",row);
552+ //double p = Math.sqrt(px*px+py*py+pz*pz);
553+ //double theta = Math.acos(pz/p);
554+
555+ // set the resolutions on r and z! to be done
556+ vz_error2 [0 ] = 0.09 ; // should depend on p and theta
557+ vz_error2 [2 ] = 64 ; // should depend on p and theta
558+ }
552559
553560 break ; // only look at the first electron
554561 }
0 commit comments