Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:04

0001 #ifndef RecoMuon_SeedGenerator_MuonSeedCreator_H
0002 #define RecoMuon_SeedGenerator_MuonSeedCreator_H
0003 
0004 /** \class MuonSeedCreator
0005  *  
0006  * Creates seed from vector of segment
0007  *
0008  * Determine pt of seed using various combination of segments from different layers (stations)
0009  * Parameterization used to determine pt between layers i and j:
0010  *
0011  * pt = [ c_0 + c_1 * (Delta phi_ij) + c_2 * (Delta phi_ij)^2 ] / eta
0012  *
0013  * \author Dominique Fortin - UCR 
0014  */
0015 
0016 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0017 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
0018 #include "RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h"
0019 
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 
0022 #include <vector>
0023 
0024 class RecHit;
0025 class Plane;
0026 class GeomDet;
0027 class MagneticField;
0028 class MuonTransientTrackingRecHit;
0029 
0030 class MuonSeedCreator {
0031 public:
0032   typedef MuonTransientTrackingRecHit::MuonRecHitContainer SegmentContainer;
0033 
0034   /// Constructor
0035   explicit MuonSeedCreator(const edm::ParameterSet& pset);
0036 
0037   /// Destructor
0038   ~MuonSeedCreator();
0039 
0040   // Operations
0041 
0042   /// Cache Magnetic Field for current event
0043   void setBField(const MagneticField* theField) { BField = theField; };
0044 
0045   /// Create a seed from set of segments
0046   TrajectorySeed createSeed(
0047       int type, const SegmentContainer& seg, const std::vector<int>& layers, int NShower, int NShowerSeg);
0048 
0049 private:
0050   /// Estimate transverse momentum of track from CSC measurements
0051   void estimatePtCSC(const SegmentContainer& seg, const std::vector<int>& layers, double& pt, double& spt);
0052 
0053   /// Estimate transverse momentum of track from CSC + DT measurements
0054   void estimatePtOverlap(const SegmentContainer& seg, const std::vector<int>& layers, double& pt, double& spt);
0055 
0056   /// Estimate transverse momentum of track from DT measurements
0057   void estimatePtDT(const SegmentContainer& seg, const std::vector<int>& layers, double& pt, double& spt);
0058 
0059   /// Estimate transverse momentum of track from single segment
0060   void estimatePtSingle(const SegmentContainer& seg, const std::vector<int>& layers, double& pt, double& spt);
0061 
0062   /// Estimate transverse momentum of track from showering segment
0063   void estimatePtShowering(int& NShowers, int& NShowerSeg, double& pt, double& spt);
0064 
0065   /// Compute weighted mean pt from different pt estimators
0066   void weightedPt(const std::vector<double>& ptEstimate,
0067                   const std::vector<double>& sptEstimate,
0068                   double& ptAvg,
0069                   double& sptAvg);
0070 
0071   /// Compute pt from parameters
0072   std::vector<double> getPt(const std::vector<double>& vParameters, double eta, double dPhi);
0073 
0074   /// Scale the dPhi from segment position
0075   double scaledPhi(double dphi, double t1);
0076 
0077   // Miminum and maximum pt momentum of a track
0078   float theMinMomentum;
0079   float theMaxMomentum;
0080   float defaultMomentum;
0081 
0082   // Error on pt estimate which prevents weighted average from blowing up ( spt --> 0 )
0083   double sysError;
0084 
0085   // Flag for internal debugging
0086   bool debug;
0087 
0088   // Cache Magnetic Field for current event
0089   const MagneticField* BField;
0090 
0091   // seed parameters vectors
0092   std::vector<double> DT12;
0093   std::vector<double> DT13;
0094   std::vector<double> DT14;
0095   std::vector<double> DT23;
0096   std::vector<double> DT24;
0097   std::vector<double> DT34;
0098 
0099   std::vector<double> CSC01;
0100   std::vector<double> CSC12;
0101   std::vector<double> CSC02;
0102   std::vector<double> CSC13;
0103   std::vector<double> CSC03;
0104   std::vector<double> CSC14;
0105   std::vector<double> CSC23;
0106   std::vector<double> CSC24;
0107   std::vector<double> CSC34;
0108 
0109   std::vector<double> OL1213;
0110   std::vector<double> OL1222;
0111   std::vector<double> OL1232;
0112   std::vector<double> OL2213;
0113   std::vector<double> OL2222;
0114 
0115   std::vector<double> SME11;
0116   std::vector<double> SME12;
0117   std::vector<double> SME13;
0118   std::vector<double> SME21;
0119   std::vector<double> SME22;
0120   std::vector<double> SME31;
0121   std::vector<double> SME32;
0122   std::vector<double> SME41;
0123 
0124   std::vector<double> SMB10;
0125   std::vector<double> SMB11;
0126   std::vector<double> SMB12;
0127   std::vector<double> SMB20;
0128   std::vector<double> SMB21;
0129   std::vector<double> SMB22;
0130   std::vector<double> SMB30;
0131   std::vector<double> SMB31;
0132   std::vector<double> SMB32;
0133 
0134   // dphi scaling factors
0135 
0136   std::vector<double> CSC01_1;
0137   std::vector<double> CSC12_1;
0138   std::vector<double> CSC12_2;
0139   std::vector<double> CSC12_3;
0140   std::vector<double> CSC13_2;
0141   std::vector<double> CSC13_3;
0142   std::vector<double> CSC14_3;
0143   std::vector<double> CSC23_1;
0144   std::vector<double> CSC23_2;
0145   std::vector<double> CSC24_1;
0146   std::vector<double> CSC34_1;
0147 
0148   std::vector<double> DT12_1;
0149   std::vector<double> DT12_2;
0150   std::vector<double> DT13_1;
0151   std::vector<double> DT13_2;
0152   std::vector<double> DT14_1;
0153   std::vector<double> DT14_2;
0154   std::vector<double> DT23_1;
0155   std::vector<double> DT23_2;
0156   std::vector<double> DT24_1;
0157   std::vector<double> DT24_2;
0158   std::vector<double> DT34_1;
0159   std::vector<double> DT34_2;
0160 
0161   std::vector<double> OL_1213;
0162   std::vector<double> OL_1222;
0163   std::vector<double> OL_1232;
0164   std::vector<double> OL_2213;
0165   std::vector<double> OL_2222;
0166 
0167   std::vector<double> SMB_10S;
0168   std::vector<double> SMB_11S;
0169   std::vector<double> SMB_12S;
0170   std::vector<double> SMB_20S;
0171   std::vector<double> SMB_21S;
0172   std::vector<double> SMB_22S;
0173   std::vector<double> SMB_30S;
0174   std::vector<double> SMB_31S;
0175   std::vector<double> SMB_32S;
0176 
0177   std::vector<double> SME_11S;
0178   std::vector<double> SME_12S;
0179   std::vector<double> SME_13S;
0180   std::vector<double> SME_21S;
0181   std::vector<double> SME_22S;
0182 };
0183 #endif