#include <RecoMuon/MuonSeedGenerator/src/MuonOverlapSeedFromRecHits.h>
Public Member Functions | |
bool | makeSeed (MuonTransientTrackingRecHit::ConstMuonRecHitPointer barrelHit, MuonTransientTrackingRecHit::ConstMuonRecHitPointer endcapHit, TrajectorySeed &result) const |
bool | makeSeed2 (MuonTransientTrackingRecHit::ConstMuonRecHitPointer barrelHit, MuonTransientTrackingRecHit::ConstMuonRecHitPointer endcapHit, TrajectorySeed &result) const |
MuonOverlapSeedFromRecHits () | |
std::vector< TrajectorySeed > | seeds () const |
virtual | ~MuonOverlapSeedFromRecHits () |
Private Types | |
typedef std::map< std::pair < int, int >, std::pair < double, double > > | ConstantsMap |
Private Member Functions | |
void | fillConstants (int dtStation, int cscChamberType, double c1, double c2) |
bool | makeSeed (const MuonRecHitContainer &barrelHits, const MuonRecHitContainer &endcapHits, TrajectorySeed &seed) const |
Private Attributes | |
ConstantsMap | theConstantsMap |
Definition at line 7 of file MuonOverlapSeedFromRecHits.h.
typedef std::map< std::pair<int, int>, std::pair<double, double> > MuonOverlapSeedFromRecHits::ConstantsMap [private] |
Definition at line 34 of file MuonOverlapSeedFromRecHits.h.
MuonOverlapSeedFromRecHits::MuonOverlapSeedFromRecHits | ( | ) |
Definition at line 15 of file MuonOverlapSeedFromRecHits.cc.
References fillConstants().
00016 : MuonSeedFromRecHits() 00017 { 00018 //FIXME make configurable 00019 // parameters for the fit of dphi between chambers vs. eta 00020 // pt = (c1 + c2 abs(eta))/ dphi 00021 fillConstants(1,4, 1.14, -0.883); 00022 fillConstants(1,6, 0.782, -0.509); 00023 fillConstants(1,8, 0.2823, -0.0706); 00024 fillConstants(2,4, 0.3649, -0.2865); 00025 fillConstants(2,6, 0.3703, -0.3507); 00026 00027 }
virtual MuonOverlapSeedFromRecHits::~MuonOverlapSeedFromRecHits | ( | ) | [inline, virtual] |
void MuonOverlapSeedFromRecHits::fillConstants | ( | int | dtStation, | |
int | cscChamberType, | |||
double | c1, | |||
double | c2 | |||
) | [private] |
Definition at line 30 of file MuonOverlapSeedFromRecHits.cc.
References theConstantsMap.
Referenced by MuonOverlapSeedFromRecHits().
00031 { 00032 theConstantsMap[std::make_pair(dtStation,cscChamberType)] = std::make_pair(c1, c2); 00033 }
bool MuonOverlapSeedFromRecHits::makeSeed | ( | const MuonRecHitContainer & | barrelHits, | |
const MuonRecHitContainer & | endcapHits, | |||
TrajectorySeed & | seed | |||
) | const [private] |
bool MuonOverlapSeedFromRecHits::makeSeed | ( | MuonTransientTrackingRecHit::ConstMuonRecHitPointer | barrelHit, | |
MuonTransientTrackingRecHit::ConstMuonRecHitPointer | endcapHit, | |||
TrajectorySeed & | result | |||
) | const |
Definition at line 79 of file MuonOverlapSeedFromRecHits.cc.
References c1, c2, MuonSeedFromRecHits::createSeed(), eta, getDQMSummary::key, theConstantsMap, and CSCChamberSpecs::whatChamberType().
00082 { 00083 DTChamberId dtId(barrelHit->geographicalId().rawId()); 00084 int dtStation = dtId.station(); 00085 00086 00087 CSCDetId cscId(endcapHit->geographicalId().rawId()); 00088 int cscChamberType = CSCChamberSpecs::whatChamberType(cscId.station(), cscId.ring()); 00089 //std::cout << " CSC " << cscChamberType << std::endl; 00090 00091 00092 00093 // find the parametrization constants 00094 std::pair<int, int> key(dtStation, cscChamberType); 00095 ConstantsMap::const_iterator mapItr = theConstantsMap.find(key); 00096 if(mapItr != theConstantsMap.end()) 00097 { 00098 00099 double dphi = (*barrelHit).globalPosition().phi() - (*endcapHit).globalPosition().phi(); 00100 00101 if(dphi > M_PI) dphi -= 2*M_PI; 00102 if(dphi < -M_PI) dphi += 2*M_PI; 00103 double eta = (*barrelHit).globalPosition().eta(); 00104 00105 double c1 = mapItr->second.first; 00106 double c2 = mapItr->second.second; 00107 // the parametrization 00108 double pt = (c1 + c2 * fabs(eta) ) / dphi; 00109 double minpt = 3.; 00110 float sigmapt = 25.; 00111 // if too small, probably an error. Keep trying. 00112 if(fabs(pt) > minpt) 00113 { 00114 double maxpt = 2000.; 00115 if(pt > maxpt) { 00116 pt = maxpt; 00117 sigmapt = maxpt; 00118 } 00119 if(pt < -maxpt) { 00120 pt = -maxpt; 00121 sigmapt = maxpt; 00122 } 00123 } 00124 00125 // use the endcap hit, since segments at the edge of the barrel 00126 // might just be 2D 00127 result = createSeed(pt, sigmapt, endcapHit); 00128 //std::cout << "OVERLAPFITTED PT " << pt << " dphi " << dphi << " eta " << eta << std::endl; 00129 return true; 00130 } 00131 return false; 00132 }
bool MuonOverlapSeedFromRecHits::makeSeed2 | ( | MuonTransientTrackingRecHit::ConstMuonRecHitPointer | barrelHit, | |
MuonTransientTrackingRecHit::ConstMuonRecHitPointer | endcapHit, | |||
TrajectorySeed & | result | |||
) | const |
Definition at line 136 of file MuonOverlapSeedFromRecHits.cc.
References MuonSeedFromRecHits::createSeed(), MuonSeedPtExtractor::pT_extract(), and MuonSeedFromRecHits::thePtExtractor.
Referenced by seeds().
00139 { 00140 std::vector<double> pts = thePtExtractor->pT_extract(barrelHit, endcapHit); 00141 double minpt = 3.; 00142 double pt = pts[0]; 00143 double sigmapt = pts[1]; 00144 // if too small, probably an error. Keep trying. 00145 if(pt != 0) { 00146 if(fabs(pt) > minpt) 00147 { 00148 double maxpt = 2000.; 00149 if(pt > maxpt) { 00150 pt = maxpt; 00151 sigmapt = maxpt; 00152 } 00153 if(pt < -maxpt) { 00154 pt = -maxpt; 00155 sigmapt = maxpt; 00156 } 00157 } 00158 00159 // use the endcap hit, since segments at the edge of the barrel 00160 // might just be 2D 00161 result = createSeed(pt, sigmapt, endcapHit); 00162 //std::cout << "OVERLAPFITTED PT " << pt << " dphi " << dphi << " eta " << eta << std::endl; 00163 return true; 00164 } 00165 return false; 00166 }
std::vector< TrajectorySeed > MuonOverlapSeedFromRecHits::seeds | ( | ) | const |
Definition at line 36 of file MuonOverlapSeedFromRecHits.cc.
References end, iter, makeSeed2(), HLT_VtxMuL3::result, and MuonSeedFromRecHits::theRhits.
Referenced by MuonSeedFinder::seeds().
00037 { 00038 std::vector<TrajectorySeed> result; 00039 //@@ doesn't handle overlap between ME11 and ME12 correctly 00040 // sort by station 00041 MuonRecHitContainer barrelHits, endcapHits; 00042 for ( MuonRecHitContainer::const_iterator iter = theRhits.begin(), end = theRhits.end(); 00043 iter != end; ++iter) 00044 { 00045 if((*iter)->isDT()) 00046 { 00047 barrelHits.push_back(*iter); 00048 } 00049 else 00050 { 00051 endcapHits.push_back(*iter); 00052 } 00053 } 00054 00055 for ( MuonRecHitContainer::const_iterator barrelHitItr = barrelHits.begin(), 00056 lastBarrelHit = barrelHits.end(); 00057 barrelHitItr != lastBarrelHit; ++barrelHitItr) 00058 { 00059 for ( MuonRecHitContainer::const_iterator endcapHitItr = endcapHits.begin(), 00060 lastEndcapHit = endcapHits.end(); 00061 endcapHitItr != lastEndcapHit; ++endcapHitItr) 00062 { 00063 TrajectorySeed seed; 00064 bool good = makeSeed2(*barrelHitItr, *endcapHitItr, seed); 00065 if(good) result.push_back(seed); 00066 // try just one seed 00067 return result; 00068 } 00069 } 00070 00071 //std::cout << "Overlap hits " << barrelHits.size() << " " 00072 // << endcapHits.size() << std::endl; 00073 00074 return result; 00075 }
Definition at line 35 of file MuonOverlapSeedFromRecHits.h.
Referenced by fillConstants(), and makeSeed().