StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuHelix.cxx
1 /***************************************************************************
2  *
3  * $Id: StMuHelix.cxx,v 1.5 2009/12/01 21:56:35 tone421 Exp $
4  * Author: Frank Laue, BNL, laue@bnl.gov
5  *
6  ***************************************************************************/
7 
8 #include "StMuHelix.h"
9 
10 StMuHelix::StMuHelix(const StPhysicalHelixD &hh, double field) {
11  mP = hh.momentum(field*kilogauss);
12  mOrigin = hh.origin();
13  mQ = hh.charge( field*kilogauss );
14  mB = field;
15 }
16 
17 int StMuHelix::bad() const
18 {
19  double qwe;
20  if(!mOrigin.valid()) return 10;
21  if(!mP.valid ()) return 20;
22 
23  qwe = fabs(mP.x())+fabs(mP.y());
24  if (qwe <=1.e-10) return 21;
25 
26  if (abs(mQ) > 10) return 30;
27 
28  if (!::finite(mB)) return 40;
29  if (fabs(mB) > 1000) return 41;
30  return 0;
31 }
32 StPhysicalHelix StMuHelix::helix() const
33 {
34  return StPhysicalHelix(mP,mOrigin,mB*kilogauss,mQ);
35 }
36 
37 ClassImp(StMuHelix)
38 /***************************************************************************
39  *
40  * $Log: StMuHelix.cxx,v $
41  * Revision 1.5 2009/12/01 21:56:35 tone421
42  * Implemented changes as per http://www.star.bnl.gov/rt2/Ticket/Display.html?id=1734
43  *
44  * Revision 1.4 2009/07/07 19:37:58 perev
45  * helix() method added
46  *
47  * Revision 1.3 2003/10/30 20:08:13 perev
48  * Check of quality added
49  *
50  * Revision 1.2 2003/10/28 18:57:56 perev
51  * BadData protection added
52  *
53  * Revision 1.1 2002/03/08 17:04:18 laue
54  * initial revision
55  *
56  *
57  **************************************************************************/
const StThreeVector< double > & origin() const
-sign(q*B);
Definition: StHelix.hh:224