CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTSegmentExtendedCand.cc
Go to the documentation of this file.
1 /******* \class DTSegmentExtendedCand *******
2  *
3  * Description:
4  *
5  * detailed description
6  *
7  * \author : Stefano Lacaprara - INFN LNL <stefano.lacaprara@pd.infn.it>
8  * $date : 15/05/2008 17:50:32 CEST $
9  *
10  * Modification:
11  *
12  *********************************/
13 
14 /* This Class Header */
16 
17 /* Collaborating Class Header */
18 
19 /* C++ Headers */
20 #include <iostream>
21 using namespace std;
22 
23 /* ====================================================================== */
24 
25 /* Constructor */
26 
27 /* Destructor */
28 
29 /* Operations */
31  LocalPoint posAtSL =
32  position()+direction()*(clus.pos.z()-position().z())/cos(direction().theta());
33  // cout << "pos :" << clus.pos << " posAtSL " << posAtSL << endl;
34  static float errScaleFact=10.;
35  static float minError=25.; // (cm)
36  // cout << "clus.err.xx() " << clus.err << endl;
37  return fabs((posAtSL-clus.pos).x())<max(errScaleFact*sqrt(clus.err.xx()), minError);
38 }
39 
40 unsigned int DTSegmentExtendedCand::nHits() const {
41  return DTSegmentCand::nHits()+theClus.size();
42 }
43 
45  if (superLayer()->id().superLayer()==2)
46  return DTSegmentCand::nHits()>=nHitsMin && chi2()/NDOF() < chi2max*2.;
47  return DTSegmentCand::nHits()>=nHitsMin && chi2()/NDOF() < chi2max ;
48 }
float xx() const
Definition: LocalError.h:24
virtual bool good() const
const T & max(const T &a, const T &b)
T sqrt(T t)
Definition: SSEVec.h:46
T z() const
Definition: PV3DBase.h:63
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
bool isCompatible(const DTSegmentExtendedCand::DTSLRecClusterForFit &clus)
virtual unsigned int nHits() const
virtual unsigned int nHits() const
Definition: DTSegmentCand.h:62
static int position[264][3]
Definition: ReadPGInfo.cc:509