CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
L2MuonSeedGenerator Class Reference

#include <L2MuonSeedGenerator.h>

Inheritance diagram for L2MuonSeedGenerator:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L2MuonSeedGenerator (const edm::ParameterSet &)
 Constructor. More...
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~L2MuonSeedGenerator ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

const TrajectorySeedassociateOfflineSeedToL1 (edm::Handle< edm::View< TrajectorySeed > > &, std::vector< int > &, TrajectoryStateOnSurface &)
 

Private Attributes

MeasurementEstimatortheEstimator
 
edm::InputTag theL1GMTReadoutCollection
 
const double theL1MaxEta
 
const double theL1MinPt
 
const unsigned theL1MinQuality
 
edm::InputTag theOfflineSeedLabel
 
std::string thePropagatorName
 
MuonServiceProxytheService
 the event setup proxy, it takes care the services update More...
 
edm::InputTag theSource
 
const bool useOfflineSeed
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

L2 muon seed generator: Transform the L1 informations in seeds for the L2 muon reconstruction

Date:
2012/03/15 19:21:21
Revision:
1.16
Author
A.Everett, R.Bellan, J. Alcaraz

ORCA's author: N. Neumeister

L2 muon seed generator: Transform the L1 informations in seeds for the L2 muon reconstruction

Date:
2012/01/24 10:58:53
Revision:
1.7
Author
A.Everett, R.Bellan

ORCA's author: N. Neumeister

Definition at line 33 of file L2MuonSeedGenerator.h.

Constructor & Destructor Documentation

L2MuonSeedGenerator::L2MuonSeedGenerator ( const edm::ParameterSet iConfig)
explicit

Constructor.

Definition at line 64 of file L2MuonSeedGenerator.cc.

References Chi2MeasurementEstimatorESProducer_cfi::Chi2MeasurementEstimator, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), MuonServiceProxy_cff::MuonServiceProxy, theEstimator, theOfflineSeedLabel, theService, and useOfflineSeed.

64  :
65  theSource(iConfig.getParameter<InputTag>("InputObjects")),
66  theL1GMTReadoutCollection(iConfig.getParameter<InputTag>("GMTReadoutCollection")),
67  thePropagatorName(iConfig.getParameter<string>("Propagator")),
68  theL1MinPt(iConfig.getParameter<double>("L1MinPt")),
69  theL1MaxEta(iConfig.getParameter<double>("L1MaxEta")),
70  theL1MinQuality(iConfig.getParameter<unsigned int>("L1MinQuality")),
71  useOfflineSeed(iConfig.getUntrackedParameter<bool>("UseOfflineSeed", false)){
72 
73  // service parameters
74  ParameterSet serviceParameters = iConfig.getParameter<ParameterSet>("ServiceParameters");
75 
76  // the services
77  theService = new MuonServiceProxy(serviceParameters);
78 
79  // the estimator
81 
82  if(useOfflineSeed)
83  theOfflineSeedLabel = iConfig.getUntrackedParameter<InputTag>("OfflineSeedLabel");
84 
85  produces<L2MuonTrajectorySeedCollection>();
86 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag theL1GMTReadoutCollection
const unsigned theL1MinQuality
MeasurementEstimator * theEstimator
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
edm::InputTag theOfflineSeedLabel
L2MuonSeedGenerator::~L2MuonSeedGenerator ( )

Destructor.

Definition at line 89 of file L2MuonSeedGenerator.cc.

References theEstimator, and theService.

89  {
90  if (theService) delete theService;
91  if (theEstimator) delete theEstimator;
92 }
MeasurementEstimator * theEstimator
MuonServiceProxy * theService
the event setup proxy, it takes care the services update

Member Function Documentation

const TrajectorySeed * L2MuonSeedGenerator::associateOfflineSeedToL1 ( edm::Handle< edm::View< TrajectorySeed > > &  offseeds,
std::vector< int > &  offseedMap,
TrajectoryStateOnSurface newTsos 
)
private

Definition at line 333 of file L2MuonSeedGenerator.cc.

References edm::View< T >::begin(), deltaR(), MuonPatternRecoDumper::dumpMuonId(), PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::globalPosition(), LogDebug, Geom::Phi< T >::phi(), PV3DBase< T, PVType, FrameType >::phi(), AlCaHLTBitMon_QueryRunRegistry::string, TrajectoryStateOnSurface::surface(), thePropagatorName, and theService.

Referenced by produce().

335  {
336 
337  const std::string metlabel = "Muon|RecoMuon|L2MuonSeedGenerator";
338  MuonPatternRecoDumper debugtmp;
339 
340  edm::View<TrajectorySeed>::const_iterator offseed, endOffseed = offseeds->end();
341  const TrajectorySeed *selOffseed = 0;
342  double bestDr = 99999.;
343  unsigned int nOffseed(0);
344  int lastOffseed(-1);
345 
346  for(offseed=offseeds->begin(); offseed!=endOffseed; ++offseed, ++nOffseed) {
347  if(offseedMap[nOffseed]!=0) continue;
348  GlobalPoint glbPos = theService->trackingGeometry()->idToDet(offseed->startingState().detId())->surface().toGlobal(offseed->startingState().parameters().position());
349  GlobalVector glbMom = theService->trackingGeometry()->idToDet(offseed->startingState().detId())->surface().toGlobal(offseed->startingState().parameters().momentum());
350 
351  // Preliminary check
352  double preDr = deltaR( newTsos.globalPosition().eta(), newTsos.globalPosition().phi(), glbPos.eta(), glbPos.phi() );
353  if(preDr > 1.0) continue;
354 
355  const FreeTrajectoryState offseedFTS(glbPos, glbMom, offseed->startingState().parameters().charge(), &*theService->magneticField());
356  TrajectoryStateOnSurface offseedTsos = theService->propagator(thePropagatorName)->propagate(offseedFTS, newTsos.surface());
357  LogDebug(metlabel) << "Offline seed info: Det and State" << std::endl;
358  LogDebug(metlabel) << debugtmp.dumpMuonId(offseed->startingState().detId()) << std::endl;
359  //LogDebug(metlabel) << "(x, y, z) = (" << newTSOS.globalPosition().x() << ", "
360  // << newTSOS.globalPosition().y() << ", " << newTSOS.globalPosition().z() << ")" << std::endl;
361  LogDebug(metlabel) << "pos: (r=" << offseedFTS.position().mag() << ", phi="
362  << offseedFTS.position().phi() << ", eta=" << offseedFTS.position().eta() << ")" << std::endl;
363  LogDebug(metlabel) << "mom: (q*pt=" << offseedFTS.charge()*offseedFTS.momentum().perp() << ", phi="
364  << offseedFTS.momentum().phi() << ", eta=" << offseedFTS.momentum().eta() << ")" << std::endl << std::endl;
365  //LogDebug(metlabel) << debugtmp.dumpFTS(offseedFTS) << std::endl;
366 
367  if(offseedTsos.isValid()) {
368  LogDebug(metlabel) << "Offline seed info after propagation to L1 layer:" << std::endl;
369  //LogDebug(metlabel) << "(x, y, z) = (" << offseedTsos.globalPosition().x() << ", "
370  // << offseedTsos.globalPosition().y() << ", " << offseedTsos.globalPosition().z() << ")" << std::endl;
371  LogDebug(metlabel) << "pos: (r=" << offseedTsos.globalPosition().mag() << ", phi="
372  << offseedTsos.globalPosition().phi() << ", eta=" << offseedTsos.globalPosition().eta() << ")" << std::endl;
373  LogDebug(metlabel) << "mom: (q*pt=" << offseedTsos.charge()*offseedTsos.globalMomentum().perp() << ", phi="
374  << offseedTsos.globalMomentum().phi() << ", eta=" << offseedTsos.globalMomentum().eta() << ")" << std::endl << std::endl;
375  //LogDebug(metlabel) << debugtmp.dumpTSOS(offseedTsos) << std::endl;
376  double newDr = deltaR( newTsos.globalPosition().eta(), newTsos.globalPosition().phi(),
377  offseedTsos.globalPosition().eta(), offseedTsos.globalPosition().phi() );
378  LogDebug(metlabel) << " -- DR = " << newDr << std::endl;
379  if( newDr<0.3 && newDr<bestDr ) {
380  LogDebug(metlabel) << " --> OK! " << newDr << std::endl << std::endl;
381  selOffseed = &*offseed;
382  bestDr = newDr;
383  offseedMap[nOffseed] = 1;
384  if(lastOffseed>-1) offseedMap[lastOffseed] = 0;
385  lastOffseed = nOffseed;
386  }
387  else {
388  LogDebug(metlabel) << " --> Rejected. " << newDr << std::endl << std::endl;
389  }
390  }
391  else {
392  LogDebug(metlabel) << "Invalid offline seed TSOS after propagation!" << std::endl << std::endl;
393  }
394  }
395 
396  return selOffseed;
397 }
#define LogDebug(id)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
GlobalPoint globalPosition() const
std::string dumpMuonId(const DetId &id) const
const SurfaceType & surface() const
T phi() const
Definition: Phi.h:41
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
T eta() const
Definition: PV3DBase.h:76
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
void L2MuonSeedGenerator::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDProducer.

Definition at line 94 of file L2MuonSeedGenerator.cc.

References alongMomentum, associateOfflineSeedToL1(), Reference_intrackfit_cff::barrel, DeDxDiscriminatorTools::charge(), TrajectoryStateOnSurface::charge(), L1MuGMTCand::charge_valid(), GeometricSearchDet::compatibleDets(), funct::cos(), CSCDetId, debug, DTChamberId, MuonPatternRecoDumper::dumpFTS(), MuonPatternRecoDumper::dumpLayer(), MuonPatternRecoDumper::dumpMuonId(), L1MuGMTCand::empty(), error, PV3DBase< T, PVType, FrameType >::eta(), eta(), create_public_lumi_plots::exp, GeomDet::geographicalId(), L1MuGMTReadoutRecord::getBrlRPCCands(), edm::Event::getByLabel(), L1MuGMTReadoutRecord::getCSCCands(), L1MuGMTReadoutRecord::getDTBXCands(), L1MuGMTExtendedCand::getDTCSCIndex(), L1MuGMTReadoutRecord::getFwdRPCCands(), L1MuGMTExtendedCand::getRPCIndex(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), customizeTrackingMonitorSeedNumber::idx, L1MuGMTExtendedCand::isFwd(), L1MuGMTExtendedCand::isRPC(), TrajectoryStateOnSurface::isValid(), LogDebug, LogTrace, PV3DBase< T, PVType, FrameType >::mag(), metname, convertSQLitetoXML_cfg::output, PV3DBase< T, PVType, FrameType >::perp(), trajectoryStateTransform::persistentState(), phi, PV3DBase< T, PVType, FrameType >::phi(), Geom::pi(), pos, GeometricSearchDet::position(), edm::Handle< T >::product(), edm::OwnVector< T, P >::push_back(), edm::Event::put(), L1MuGMTCand::quality(), CosmicsPD_Skims::radius, DetId::rawId(), TrajectorySeed::recHits(), funct::sin(), TrajectorySeed::startingState(), evf::utils::state, AlCaHLTBitMon_QueryRunRegistry::string, GeometricSearchDet::surface(), theEstimator, theL1GMTReadoutCollection, theL1MaxEta, theL1MinPt, theL1MinQuality, theOfflineSeedLabel, thePropagatorName, theService, theSource, theta(), useOfflineSeed, and PV3DBase< T, PVType, FrameType >::z().

95 {
96  const std::string metname = "Muon|RecoMuon|L2MuonSeedGenerator";
98 
99  auto_ptr<L2MuonTrajectorySeedCollection> output(new L2MuonTrajectorySeedCollection());
100 
101  // Muon particles and GMT readout collection
103  iEvent.getByLabel(theL1GMTReadoutCollection,gmtrc_handle);
104  L1MuGMTReadoutRecord const& gmtrr = gmtrc_handle.product()->getRecord(0);
105 
107  iEvent.getByLabel(theSource, muColl);
108  LogTrace(metname) << "Number of muons " << muColl->size() << endl;
109 
110  edm::Handle<edm::View<TrajectorySeed> > offlineSeedHandle;
111  vector<int> offlineSeedMap;
112  if(useOfflineSeed) {
113  iEvent.getByLabel(theOfflineSeedLabel, offlineSeedHandle);
114  LogTrace(metname) << "Number of offline seeds " << offlineSeedHandle->size() << endl;
115  offlineSeedMap = vector<int>(offlineSeedHandle->size(), 0);
116  }
117 
118  L1MuonParticleCollection::const_iterator it;
119  L1MuonParticleRef::key_type l1ParticleIndex = 0;
120 
121  for(it = muColl->begin(); it != muColl->end(); ++it,++l1ParticleIndex) {
122 
123  const L1MuGMTExtendedCand muonCand = (*it).gmtMuonCand();
124  unsigned int quality = 0;
125  bool valid_charge = false;;
126 
127  if ( muonCand.empty() ) {
128  LogWarning(metname) << "L2MuonSeedGenerator: WARNING, no L1MuGMTCand! " << endl;
129  LogWarning(metname) << "L2MuonSeedGenerator: this should make sense only within MC tests" << endl;
130  // FIXME! Temporary to handle the MC input
131  quality = 7;
132  valid_charge = true;
133  }
134  else {
135  quality = muonCand.quality();
136  valid_charge = muonCand.charge_valid();
137  }
138 
139  float pt = (*it).pt();
140  float eta = (*it).eta();
141  float theta = 2*atan(exp(-eta));
142  float phi = (*it).phi();
143  int charge = (*it).charge();
144  // Set charge=0 for the time being if the valid charge bit is zero
145  if (!valid_charge) charge = 0;
146  bool barrel = !(*it).isForward();
147 
148  // Get a better eta and charge from regional information
149  // Phi has the same resolution in GMT than regionally, is not it?
150  if ( !(muonCand.empty()) ) {
151  int idx = -1;
152  vector<L1MuRegionalCand> rmc;
153  if ( !muonCand.isRPC() ) {
154  idx = muonCand.getDTCSCIndex();
155  if (muonCand.isFwd()) rmc = gmtrr.getCSCCands();
156  else rmc = gmtrr.getDTBXCands();
157  } else {
158  idx = muonCand.getRPCIndex();
159  if (muonCand.isFwd()) rmc = gmtrr.getFwdRPCCands();
160  else rmc = gmtrr.getBrlRPCCands();
161  }
162  if (idx>=0) {
163  eta = rmc[idx].etaValue();
164  //phi = rmc[idx].phiValue();
165  // Use this charge if the valid charge bit is zero
166  if (!valid_charge) charge = rmc[idx].chargeValue();
167  }
168  }
169 
170  if ( pt < theL1MinPt || fabs(eta) > theL1MaxEta ) continue;
171 
172  LogTrace(metname) << "New L2 Muon Seed";
173  LogTrace(metname) << "Pt = " << pt << " GeV/c";
174  LogTrace(metname) << "eta = " << eta;
175  LogTrace(metname) << "theta = " << theta << " rad";
176  LogTrace(metname) << "phi = " << phi << " rad";
177  LogTrace(metname) << "charge = "<< charge;
178  LogTrace(metname) << "In Barrel? = "<< barrel;
179 
180  if ( quality <= theL1MinQuality ) continue;
181  LogTrace(metname) << "quality = "<< quality;
182 
183  // Update the services
184  theService->update(iSetup);
185 
186  const DetLayer *detLayer = 0;
187  float radius = 0.;
188 
189  CLHEP::Hep3Vector vec(0.,1.,0.);
190  vec.setTheta(theta);
191  vec.setPhi(phi);
192 
193  // Get the det layer on which the state should be put
194  if ( barrel ){
195  LogTrace(metname) << "The seed is in the barrel";
196 
197  // MB2
198  DetId id = DTChamberId(0,2,0);
199  detLayer = theService->detLayerGeometry()->idToLayer(id);
200  LogTrace(metname) << "L2 Layer: " << debug.dumpLayer(detLayer);
201 
202  const BoundSurface* sur = &(detLayer->surface());
203  const BoundCylinder* bc = dynamic_cast<const BoundCylinder*>(sur);
204 
205  radius = fabs(bc->radius()/sin(theta));
206 
207  LogTrace(metname) << "radius "<<radius;
208 
209  if ( pt < 3.5 ) pt = 3.5;
210  }
211  else {
212  LogTrace(metname) << "The seed is in the endcap";
213 
214  DetId id;
215  // ME2
216  if ( theta < Geom::pi()/2. )
217  id = CSCDetId(1,2,0,0,0);
218  else
219  id = CSCDetId(2,2,0,0,0);
220 
221  detLayer = theService->detLayerGeometry()->idToLayer(id);
222  LogTrace(metname) << "L2 Layer: " << debug.dumpLayer(detLayer);
223 
224  radius = fabs(detLayer->position().z()/cos(theta));
225 
226  if( pt < 1.0) pt = 1.0;
227  }
228 
229  vec.setMag(radius);
230 
231  GlobalPoint pos(vec.x(),vec.y(),vec.z());
232 
233  GlobalVector mom(pt*cos(phi), pt*sin(phi), pt*cos(theta)/sin(theta));
234 
235  GlobalTrajectoryParameters param(pos,mom,charge,&*theService->magneticField());
237 
238  mat[0][0] = (0.25/pt)*(0.25/pt); // sigma^2(charge/abs_momentum)
239  if ( !barrel ) mat[0][0] = (0.4/pt)*(0.4/pt);
240 
241  //Assign q/pt = 0 +- 1/pt if charge has been declared invalid
242  if (!valid_charge) mat[0][0] = (1./pt)*(1./pt);
243 
244  mat[1][1] = 0.05*0.05; // sigma^2(lambda)
245  mat[2][2] = 0.2*0.2; // sigma^2(phi)
246  mat[3][3] = 20.*20.; // sigma^2(x_transverse))
247  mat[4][4] = 20.*20.; // sigma^2(y_transverse))
248 
250 
251  const FreeTrajectoryState state(param,error);
252 
253  LogTrace(metname) << "Free trajectory State from the parameters";
254  LogTrace(metname) << debug.dumpFTS(state);
255 
256  // Propagate the state on the MB2/ME2 surface
257  TrajectoryStateOnSurface tsos = theService->propagator(thePropagatorName)->propagate(state, detLayer->surface());
258 
259  LogTrace(metname) << "State after the propagation on the layer";
260  LogTrace(metname) << debug.dumpLayer(detLayer);
261  LogTrace(metname) << debug.dumpFTS(state);
262 
263  if (tsos.isValid()) {
264  // Get the compatible dets on the layer
265  std::vector< pair<const GeomDet*,TrajectoryStateOnSurface> >
266  detsWithStates = detLayer->compatibleDets(tsos,
267  *theService->propagator(thePropagatorName),
268  *theEstimator);
269  if (detsWithStates.size()){
270 
271  TrajectoryStateOnSurface newTSOS = detsWithStates.front().second;
272  const GeomDet *newTSOSDet = detsWithStates.front().first;
273 
274  LogTrace(metname) << "Most compatible det";
275  LogTrace(metname) << debug.dumpMuonId(newTSOSDet->geographicalId());
276 
277  LogDebug(metname) << "L1 info: Det and State:";
278  LogDebug(metname) << debug.dumpMuonId(newTSOSDet->geographicalId());
279 
280  if (newTSOS.isValid()){
281 
282  //LogDebug(metname) << "(x, y, z) = (" << newTSOS.globalPosition().x() << ", "
283  // << newTSOS.globalPosition().y() << ", " << newTSOS.globalPosition().z() << ")";
284  LogDebug(metname) << "pos: (r=" << newTSOS.globalPosition().mag() << ", phi="
285  << newTSOS.globalPosition().phi() << ", eta=" << newTSOS.globalPosition().eta() << ")";
286  LogDebug(metname) << "mom: (q*pt=" << newTSOS.charge()*newTSOS.globalMomentum().perp() << ", phi="
287  << newTSOS.globalMomentum().phi() << ", eta=" << newTSOS.globalMomentum().eta() << ")";
288 
289  //LogDebug(metname) << "State on it";
290  //LogDebug(metname) << debug.dumpTSOS(newTSOS);
291 
292  //PTrajectoryStateOnDet seedTSOS;
294 
295  if(useOfflineSeed) {
296  const TrajectorySeed *assoOffseed =
297  associateOfflineSeedToL1(offlineSeedHandle, offlineSeedMap, newTSOS);
298 
299  if(assoOffseed!=0) {
300  PTrajectoryStateOnDet const & seedTSOS = assoOffseed->startingState();
302  tsci = assoOffseed->recHits().first,
303  tscie = assoOffseed->recHits().second;
304  for(; tsci!=tscie; ++tsci) {
305  container.push_back(*tsci);
306  }
307  output->push_back(L2MuonTrajectorySeed(seedTSOS,container,alongMomentum,
308  L1MuonParticleRef(muColl,l1ParticleIndex)));
309  }
310  else {
311  // convert the TSOS into a PTSOD
312  PTrajectoryStateOnDet const & seedTSOS = trajectoryStateTransform::persistentState( newTSOS,newTSOSDet->geographicalId().rawId());
313  output->push_back(L2MuonTrajectorySeed(seedTSOS,container,alongMomentum,
314  L1MuonParticleRef(muColl,l1ParticleIndex)));
315  }
316  }
317  else {
318  // convert the TSOS into a PTSOD
319  PTrajectoryStateOnDet const & seedTSOS = trajectoryStateTransform::persistentState( newTSOS,newTSOSDet->geographicalId().rawId());
320  output->push_back(L2MuonTrajectorySeed(seedTSOS,container,alongMomentum,
321  L1MuonParticleRef(muColl,l1ParticleIndex)));
322  }
323  }
324  }
325  }
326  }
327 
328  iEvent.put(output);
329 }
#define LogDebug(id)
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
T perp() const
Definition: PV3DBase.h:72
edm::InputTag theL1GMTReadoutCollection
std::string dumpLayer(const DetLayer *layer) const
const std::string metname
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
Geom::Theta< T > theta() const
GlobalPoint globalPosition() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
T eta() const
std::vector< L1MuRegionalCand > getBrlRPCCands() const
get barrel RPC candidates vector
double charge(const std::vector< uint8_t > &Ampls)
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
std::string dumpMuonId(const DetId &id) const
std::string dumpFTS(const FreeTrajectoryState &fts) const
std::vector< L1MuRegionalCand > getFwdRPCCands() const
get forward RPC candidates vector
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
const TrajectorySeed * associateOfflineSeedToL1(edm::Handle< edm::View< TrajectorySeed > > &, std::vector< int > &, TrajectoryStateOnSurface &)
const unsigned theL1MinQuality
std::vector< L1MuRegionalCand > getCSCCands() const
get CSC candidates vector
void push_back(D *&d)
Definition: OwnVector.h:273
bool empty() const
is it an empty muon candidate?
Definition: L1MuGMTCand.h:66
T mag() const
Definition: PV3DBase.h:67
bool isRPC() const
get RPC bit (true=RPC, false = DT/CSC or matched)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:94
recHitContainer::const_iterator const_iterator
std::vector< L2MuonTrajectorySeed > L2MuonTrajectorySeedCollection
bool charge_valid() const
is the charge valid ?
Definition: L1MuGMTCand.h:140
T z() const
Definition: PV3DBase.h:64
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
unsigned getRPCIndex() const
get index of contributing RPC muon
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
#define LogTrace(id)
unsigned int quality() const
get quality
Definition: L1MuGMTCand.h:95
Definition: DetId.h:20
PTrajectoryStateOnDet const & startingState() const
unsigned getDTCSCIndex() const
get index of contributing DT/CSC muon
MeasurementEstimator * theEstimator
virtual const Surface::PositionType & position() const
Returns position of the surface.
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
std::vector< L1MuRegionalCand > getDTBXCands() const
get DT candidates vector
range recHits() const
T const * product() const
Definition: Handle.h:74
edm::Ref< L1MuonParticleCollection > L1MuonParticleRef
char state
Definition: procUtils.cc:75
T eta() const
Definition: PV3DBase.h:76
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
GlobalVector globalMomentum() const
double pi()
Definition: Pi.h:31
boost::remove_cv< typename boost::remove_reference< argument_type >::type >::type key_type
Definition: Ref.h:170
#define debug
Definition: MEtoEDMFormat.h:34
bool isFwd() const
get forward bit (true=forward, false=barrel)
Definition: DDAxes.h:10
edm::InputTag theOfflineSeedLabel

Member Data Documentation

MeasurementEstimator* L2MuonSeedGenerator::theEstimator
private

Definition at line 60 of file L2MuonSeedGenerator.h.

Referenced by L2MuonSeedGenerator(), produce(), and ~L2MuonSeedGenerator().

edm::InputTag L2MuonSeedGenerator::theL1GMTReadoutCollection
private

Definition at line 48 of file L2MuonSeedGenerator.h.

Referenced by produce().

const double L2MuonSeedGenerator::theL1MaxEta
private

Definition at line 53 of file L2MuonSeedGenerator.h.

Referenced by produce().

const double L2MuonSeedGenerator::theL1MinPt
private

Definition at line 52 of file L2MuonSeedGenerator.h.

Referenced by produce().

const unsigned L2MuonSeedGenerator::theL1MinQuality
private

Definition at line 54 of file L2MuonSeedGenerator.h.

Referenced by produce().

edm::InputTag L2MuonSeedGenerator::theOfflineSeedLabel
private

Definition at line 49 of file L2MuonSeedGenerator.h.

Referenced by L2MuonSeedGenerator(), and produce().

std::string L2MuonSeedGenerator::thePropagatorName
private

Definition at line 50 of file L2MuonSeedGenerator.h.

Referenced by associateOfflineSeedToL1(), and produce().

MuonServiceProxy* L2MuonSeedGenerator::theService
private

the event setup proxy, it takes care the services update

Definition at line 58 of file L2MuonSeedGenerator.h.

Referenced by associateOfflineSeedToL1(), L2MuonSeedGenerator(), produce(), and ~L2MuonSeedGenerator().

edm::InputTag L2MuonSeedGenerator::theSource
private

Definition at line 47 of file L2MuonSeedGenerator.h.

Referenced by produce().

const bool L2MuonSeedGenerator::useOfflineSeed
private

Definition at line 55 of file L2MuonSeedGenerator.h.

Referenced by L2MuonSeedGenerator(), and produce().