CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/TrackingTools/TrackRefitter/interface/RefitDirection.h

Go to the documentation of this file.
00001 #ifndef TrackingTools_TrackRefitter_RefitDirection_H
00002 #define TrackingTools_TrackRefitter_RefitDirection_H
00003 
00012 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
00013 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00014 
00015 class RefitDirection {
00016 
00017 public:
00018   
00019   enum GeometricalDirection{insideOut, outsideIn, undetermined};
00020   
00022   RefitDirection(){
00023     thePropagationDirection = anyDirection;
00024     theGeoDirection = undetermined;
00025   }
00026 
00027   RefitDirection(std::string& type){ 
00028 
00029     thePropagationDirection = anyDirection;
00030     theGeoDirection = undetermined;
00031  
00032     if (type == "alongMomentum") thePropagationDirection = alongMomentum;
00033     else if (type == "oppositeToMomentum") thePropagationDirection = oppositeToMomentum;
00034     else if (type == "insideOut") theGeoDirection = insideOut;
00035     else if (type == "outsideIn") theGeoDirection = outsideIn;
00036     else 
00037       throw cms::Exception("RefitDirection") 
00038         <<"Wrong refit direction chosen in TrackTransformer ParameterSet"
00039         << "\n"
00040         << "Possible choices are:"
00041         << "\n"
00042         << "RefitDirection = [alongMomentum, oppositeToMomentum, insideOut, outsideIn]";
00043   }
00044   
00046   virtual ~RefitDirection(){};
00047 
00048   // Operations
00049   inline GeometricalDirection geometricalDirection() const {
00050     if(theGeoDirection == undetermined) LogTrace("Reco|TrackingTools|TrackTransformer") << "Try to use undetermined geometrical direction";
00051     return theGeoDirection;
00052   }
00053   inline PropagationDirection propagationDirection() const {
00054     if(thePropagationDirection == anyDirection) LogTrace("Reco|TrackingTools|TrackTransformer") << "Try to use anyDirection as propagation direction";
00055     return thePropagationDirection;
00056   }
00057   
00058 protected:
00059   
00060 private:
00061   GeometricalDirection theGeoDirection;
00062   PropagationDirection thePropagationDirection;
00063 };
00064 #endif
00065