CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/src/RecoTracker/ConversionSeedGenerators/interface/Conv4HitsReco2.h

Go to the documentation of this file.
00001 //
00002 //      Simple photon conversion seeding class (inc)
00003 //
00004 //      Author: E Song
00005 //
00006 //      Version: 1;     6 Aug 2012
00007 //
00008 
00009 #ifndef Conv4HitsReco2_h
00010 #define Conv4HitsReco2_h
00011 
00012 #include <iostream>
00013 #include <iomanip>
00014 #include <math.h>
00015 #include "DataFormats/Math/interface/Vector3D.h"
00016 #include "DataFormats/Math/interface/Point3D.h"
00017 
00018 class Conv4HitsReco2 {
00019 
00020         public:
00021         Conv4HitsReco2(math::XYZVector &, math::XYZVector &, math::XYZVector &, math::XYZVector &, math::XYZVector &);
00022         Conv4HitsReco2();
00023         ~Conv4HitsReco2();
00024 
00025         // Main publics
00026         int ConversionCandidate(math::XYZVector&, double&, double&);
00027         void Reconstruct(); // Not directly called when in use
00028         void Dump();
00029         void Refresh(math::XYZVector &vPhotVertex, math::XYZVector &h1, math::XYZVector &h2, math::XYZVector &h3, math::XYZVector &h4);
00030 
00031         math::XYZVector GetPlusCenter(double &);
00032         math::XYZVector GetMinusCenter(double &);
00033 
00034         // Optional publics
00035         void SetMaxNumberOfIterations(int val) { fMaxNumberOfIterations=val; };
00036         void SetRadiusECut(double val) { fRadiusECut=val; };
00037         void SetPhiECut(double val) { fPhiECut=val; };
00038         void SetRECut(double val) { fRECut=val; };
00039         void SetFixedNumberOfIterations(double val) { fFixedNumberOfIterations=val; };
00040         void SetBField(double val) { fBField=val; };
00041 
00042         double GetRecPhi() { return fRecPhi; };
00043         double GetRecR() { return fRecR; };     
00044         double GetRecR1() { return fRecR1; };
00045         double GetRecR2() { return fRecR2; };
00046         int GetLoop() { return fLoop; };
00047 
00048         bool RegisterUnsolvable(int &num) { if (fSolved==1) return true; else {num+=1; return false;}};
00049         bool RegisterUnsolvable() { if (fSolved==1) return true; else return false; };
00050         bool RegisterBadSign(int &num) { if (fSignSatisfied==1) return true; else {num+=1; return false;}};
00051         bool RegisterBadSign() { if (fSignSatisfied==1) return true; else return false; };
00052         bool RegisterBadConverge(int &num) { if (fCutSatisfied==1) return true; else {num+=1; return false;}};
00053         bool RegisterBadConverge() { if (fCutSatisfied==1) return true; else return false;};
00054 
00055         private:
00056         void LocalTransformation(math::XYZVector v11, math::XYZVector v12, math::XYZVector v21, math::XYZVector v22,
00057                                  math::XYZVector &V11, math::XYZVector &V12, math::XYZVector &V21, math::XYZVector &V22,
00058                                  double Phi);
00059         math::XYZVector fHitv11, fHitv12, fHitv21, fHitv22;
00060         math::XYZVector fPV;
00061         math::XYZVector fRecV, fRecC1, fRecC2;
00062         
00063         double fRecPhi;
00064         double fRecR;
00065         double fRecR1;
00066         double fRecR2;  // original input coordinates in cm,
00067 
00068         int fCutSatisfied;      // Target cut met within iters?
00069         int fSignSatisfied;     // All values positive?
00070         int fSolved;            // No break due to /0 or no real root?
00071 
00072         int fMaxNumberOfIterations;
00073         int fLoop;      // The number of loops actually performed
00074         int fFixedNumberOfIterations;   // Default 0: use cuts.  If > 0, employ fixed loop.
00075         double fRadiusECut;
00076         double fPhiECut;
00077         double fRECut;  // Note that these cuts are NOT independent.
00078 
00079         double fRadiusE;
00080         double fPhiE;
00081         double fRE;
00082         double fBField; // tesla
00083 };
00084 
00085 #endif