Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:27:13

0001 #ifndef CosmicMuonProducer_DirectMuonNavigation_H
0002 #define CosmicMuonProducer_DirectMuonNavigation_H
0003 /** \file DirectMuonNavigation
0004  *
0005  *  do a straight line extrapolation to
0006  *  find out compatible DetLayers with a given FTS 
0007  *
0008  *  \author Chang Liu  -  Purdue University
0009  */
0010 
0011 #include "FWCore/Framework/interface/ESHandle.h"
0012 #include "DataFormats/GeometrySurface/interface/BoundCylinder.h"
0013 #include "TrackingTools/DetLayers/interface/DetLayer.h"
0014 #include "TrackingTools/DetLayers/interface/BarrelDetLayer.h"
0015 #include "TrackingTools/DetLayers/interface/ForwardDetLayer.h"
0016 #include "FWCore/Framework/interface/EventSetup.h"
0017 #include "RecoMuon/DetLayers/interface/MuonDetLayerGeometry.h"
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 
0020 class DirectMuonNavigation {
0021 public:
0022   /* Constructor */
0023   DirectMuonNavigation(const edm::ESHandle<MuonDetLayerGeometry>&);
0024 
0025   DirectMuonNavigation(const edm::ESHandle<MuonDetLayerGeometry>&, const edm::ParameterSet&);
0026 
0027   DirectMuonNavigation* clone() const { return new DirectMuonNavigation(*this); }
0028 
0029   /* Destructor */
0030   ~DirectMuonNavigation() {}
0031 
0032   std::vector<const DetLayer*> compatibleLayers(const FreeTrajectoryState& fts,
0033                                                 PropagationDirection timeDirection) const;
0034 
0035   std::vector<const DetLayer*> compatibleEndcapLayers(const FreeTrajectoryState& fts,
0036                                                       PropagationDirection timeDirection) const;
0037 
0038 private:
0039   void inOutBarrel(const FreeTrajectoryState&, std::vector<const DetLayer*>&) const;
0040   void outInBarrel(const FreeTrajectoryState&, std::vector<const DetLayer*>&) const;
0041 
0042   void inOutForward(const FreeTrajectoryState&, std::vector<const DetLayer*>&) const;
0043   void outInForward(const FreeTrajectoryState&, std::vector<const DetLayer*>&) const;
0044 
0045   void inOutBackward(const FreeTrajectoryState&, std::vector<const DetLayer*>&) const;
0046   void outInBackward(const FreeTrajectoryState&, std::vector<const DetLayer*>&) const;
0047 
0048   bool checkCompatible(const FreeTrajectoryState& fts, const BarrelDetLayer*) const;
0049   bool checkCompatible(const FreeTrajectoryState& fts, const ForwardDetLayer*) const;
0050   bool outward(const FreeTrajectoryState& fts) const;
0051 
0052   edm::ESHandle<MuonDetLayerGeometry> theMuonDetLayerGeometry;
0053   float epsilon_;
0054   bool theEndcapFlag;
0055   bool theBarrelFlag;
0056 };
0057 #endif