CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ElectronSeedAnalyzer Class Reference
Inheritance diagram for ElectronSeedAnalyzer:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
 ElectronSeedAnalyzer (const edm::ParameterSet &conf)
 
void endJob () override
 
 ~ElectronSeedAnalyzer () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

edm::InputTag beamSpot_
 
TH1F * histecaldriveneMCmatched_
 
TH1F * histecaldrivenetaMCmatched_
 
TH1F * histecaldrivenptMCmatched_
 
TH1F * histeclu_
 
TH1F * histeffeta_
 
TH1F * histeffpt_
 
TH1F * histeMC_
 
TH1F * histeMCmatched_
 
TH1F * histeoverp_
 
TH1F * histeta_
 
TH1F * histetaclu_
 
TH1F * histetaMC_
 
TH1F * histetaMCmatched_
 
TH1F * histetclu_
 
TFile * histfile_
 
TH1I * histnbclus_
 
TH1I * histnbseeds_
 
TH1I * histnrseeds_
 
TH1F * histp_
 
TH1F * histpt_
 
TH1F * histptMC_
 
TH1F * histptMCmatched_
 
TH1F * histq_
 
TH1F * histtrackerdriveneMCmatched_
 
TH1F * histtrackerdrivenetaMCmatched_
 
TH1F * histtrackerdrivenptMCmatched_
 
edm::InputTag inputCollection_
 
float mcEnergy [10]
 
float mcEta [10]
 
float mcPhi [10]
 
float mcPt [10]
 
float mcQ [10]
 
float seedDphi1 [10]
 
float seedDphi2 [10]
 
float seedDrz1 [10]
 
float seedDrz2 [10]
 
float seedEta [10]
 
int seedLayer1 [10]
 
int seedLayer2 [10]
 
float seedMomentum [10]
 
float seedPhi [10]
 
float seedPhi1 [10]
 
float seedPhi2 [10]
 
float seedPt [10]
 
float seedQ [10]
 
float seedRz1 [10]
 
float seedRz2 [10]
 
int seedSide1 [10]
 
int seedSide2 [10]
 
int seedSubdet1 [10]
 
int seedSubdet2 [10]
 
float superclusterEnergy [10]
 
float superclusterEt [10]
 
float superclusterEta [10]
 
float superclusterPhi [10]
 
TrajectoryStateTransform transformer_
 
TTree * tree_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 52 of file ElectronSeedAnalyzer.cc.

Constructor & Destructor Documentation

◆ ElectronSeedAnalyzer()

ElectronSeedAnalyzer::ElectronSeedAnalyzer ( const edm::ParameterSet conf)
explicit

Definition at line 111 of file ElectronSeedAnalyzer.cc.

112  : beamSpot_(conf.getParameter<edm::InputTag>("beamSpot")) {
113  inputCollection_ = conf.getParameter<edm::InputTag>("inputCollection");
114  histfile_ = new TFile("electronpixelseeds.root", "RECREATE");
115 }

References edm::ParameterSet::getParameter(), histfile_, and inputCollection_.

◆ ~ElectronSeedAnalyzer()

ElectronSeedAnalyzer::~ElectronSeedAnalyzer ( )
override

Definition at line 228 of file ElectronSeedAnalyzer.cc.

228  {
229  // do anything here that needs to be done at desctruction time
230  // (e.g. close files, deallocate resources etc.)
231  //tree_->Print();
232  histfile_->Write();
233  histeMC_->Write();
234  histfile_->Close();
235 }

References histeMC_, and histfile_.

Member Function Documentation

◆ analyze()

void ElectronSeedAnalyzer::analyze ( const edm::Event e,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 237 of file ElectronSeedAnalyzer.cc.

237  {
238  //Retrieve tracker topology from geometry
240  iSetup.get<TrackerTopologyRcd>().get(tTopo);
241 
243  edm::ESHandle<MagneticField> theMagField;
244  iSetup.get<TrackerDigiGeometryRecord>().get(pDD);
245  iSetup.get<IdealMagneticFieldRecord>().get(theMagField);
246 
247  // get beam spot
248  edm::Handle<reco::BeamSpot> theBeamSpot;
249  e.getByLabel(beamSpot_, theBeamSpot);
250 
251  // get seeds
252 
254  e.getByLabel(inputCollection_, elSeeds);
255  edm::LogInfo("") << "\n\n =================> Treating event " << e.id() << " Number of seeds "
256  << elSeeds.product()->size();
257  int is = 0;
258 
259  float mass = .000511; // electron propagation
260  PropagatorWithMaterial *prop1stLayer = new PropagatorWithMaterial(oppositeToMomentum, mass, &(*theMagField));
261  PropagatorWithMaterial *prop2ndLayer = new PropagatorWithMaterial(alongMomentum, mass, &(*theMagField));
262 
263  float dphi1 = 0., dphi2 = 0., drz1 = 0., drz2 = 0.;
264  float phi1 = 0., phi2 = 0., rz1 = 0., rz2 = 0.;
265 
266  for (ElectronSeedCollection::const_iterator MyS = (*elSeeds).begin(); MyS != (*elSeeds).end(); ++MyS) {
267  LogDebug("") << "\nSeed nr " << is << ": ";
268  const TrajectorySeed::RecHitRange r = MyS->recHits();
269  LogDebug("") << " Number of RecHits= " << (*MyS).nHits();
270  const GeomDet *det1 = nullptr;
271  const GeomDet *det2 = nullptr;
272 
273  auto it = r.begin();
274  DetId id1 = (*it).geographicalId();
275  det1 = pDD->idToDet(id1);
276  LogDebug("") << " First hit local x,y,z " << (*it).localPosition() << " det " << id1.det() << " subdet "
277  << id1.subdetId();
278  LogDebug("") << " First hit global " << det1->toGlobal((*it).localPosition());
279  //std::cout <<" First hit local x,y,z "<<(*it).localPosition()<<" det "<<id1.det()<<" subdet "<<id1.subdetId()<< std::endl;
280  //std::cout <<" First hit global "<<det1->toGlobal((*it).localPosition())<< std::endl;
281  it++;
282  DetId id2 = (*it).geographicalId();
283  det2 = pDD->idToDet(id2);
284  LogDebug("") << " Second hit local x,y,z " << (*it).localPosition() << " det " << id2.det() << " subdet "
285  << id2.subdetId();
286  LogDebug("") << " Second hit global " << det2->toGlobal((*it).localPosition());
287  //std::cout <<" Second hit local x,y,z "<<(*it).localPosition()<<" det "<<id2.det()<<" subdet "<<id2.subdetId()<< std::endl;
288  //std::cout <<" Second hit global "<<det2->toGlobal((*it).localPosition()) << std::endl;
289 
290  // state on last det
291  const GeomDet *det = nullptr;
292  for (auto const &recHit : r) {
293  det = pDD->idToDet(recHit.geographicalId());
294  }
296  trajectoryStateTransform::transientState((*MyS).startingState(), &(det->surface()), &(*theMagField));
297 
298  // debug
299 
300  LogDebug("") << " ElectronSeed outermost state position: " << t.globalPosition();
301  LogDebug("") << " ElectronSeed outermost state momentum: " << t.globalMomentum();
302  edm::RefToBase<CaloCluster> caloCluster = (*MyS).caloCluster();
303  if (caloCluster.isNull())
304  continue;
306  LogDebug("") << " ElectronSeed superCluster energy: " << theClus->energy() << ", position: " << theClus->position();
307  LogDebug("") << " ElectronSeed outermost state Pt: " << t.globalMomentum().perp();
308  LogDebug("") << " ElectronSeed supercluster Et: "
309  << theClus->energy() * sin(2. * atan(exp(-theClus->position().eta())));
310  LogDebug("") << " ElectronSeed outermost momentum direction eta: " << t.globalMomentum().eta();
311  LogDebug("") << " ElectronSeed supercluster eta: " << theClus->position().eta();
312  LogDebug("") << " ElectronSeed seed charge: " << (*MyS).getCharge();
313  LogDebug("") << " ElectronSeed E/p: " << theClus->energy() / t.globalMomentum().mag();
314 
315  // retreive SC and compute distances between hit position and prediction the same
316  // way as in the PixelHitMatcher
317 
318  // inputs are charge, cluster position, vertex position, cluster energy and B field
319  int charge = int((*MyS).getCharge());
320  GlobalPoint xmeas(theClus->position().x(), theClus->position().y(), theClus->position().z());
321  GlobalPoint vprim(theBeamSpot->position().x(), theBeamSpot->position().y(), theBeamSpot->position().z());
322  float energy = theClus->energy();
323 
324  auto fts = trackingTools::ftsFromVertexToPoint(*theMagField, xmeas, vprim, energy, charge);
325  //std::cout << "[PixelHitMatcher::compatibleSeeds] fts position, momentum " <<
326  // fts.parameters().position() << " " << fts.parameters().momentum() << std::endl;
327 
329  TrajectoryStateOnSurface tsos(fts, *bpb(fts.position(), fts.momentum()));
330 
331  // TrajectorySeed::range r=(*seeds.product())[i].recHits();
332  // TrajectorySeed::range r=(*seeds)[i].recHits();
333 
334  // first Hit
335  it = r.begin();
336  DetId id = (*it).geographicalId();
337  const GeomDet *geomdet = pDD->idToDet((*it).geographicalId());
338  LocalPoint lp = (*it).localPosition();
339  GlobalPoint hitPos = geomdet->surface().toGlobal(lp);
340 
342  tsos1 = prop1stLayer->propagate(tsos, geomdet->surface());
343 
344  if (tsos1.isValid()) {
345  //UB add test on phidiff
346  float SCl_phi = xmeas.phi();
347  float localDphi = SCl_phi - hitPos.phi();
348  if (localDphi > CLHEP::pi)
349  localDphi -= (2 * CLHEP::pi);
350  if (localDphi < -CLHEP::pi)
351  localDphi += (2 * CLHEP::pi);
352  if (std::abs(localDphi) > 2.5)
353  continue;
354 
355  phi1 = hitPos.phi();
356  dphi1 = hitPos.phi() - tsos1.globalPosition().phi();
357  rz1 = hitPos.perp();
358  drz1 = hitPos.perp() - tsos1.globalPosition().perp();
359  if (id.subdetId() % 2 == 1) {
360  drz1 = hitPos.z() - tsos1.globalPosition().z();
361  rz1 = hitPos.z();
362  }
363 
364  // now second Hit
365  it++;
366  DetId id2 = (*it).geographicalId();
367  const GeomDet *geomdet2 = pDD->idToDet((*it).geographicalId());
369 
370  // compute the z vertex from the cluster point and the found pixel hit
371  double pxHit1z = hitPos.z();
372  double pxHit1x = hitPos.x();
373  double pxHit1y = hitPos.y();
374  double r1diff = (pxHit1x - vprim.x()) * (pxHit1x - vprim.x()) + (pxHit1y - vprim.y()) * (pxHit1y - vprim.y());
375  r1diff = sqrt(r1diff);
376  double r2diff = (xmeas.x() - pxHit1x) * (xmeas.x() - pxHit1x) + (xmeas.y() - pxHit1y) * (xmeas.y() - pxHit1y);
377  r2diff = sqrt(r2diff);
378  double zVertexPred = pxHit1z - r1diff * (xmeas.z() - pxHit1z) / r2diff;
379 
380  GlobalPoint vertexPred(vprim.x(), vprim.y(), zVertexPred);
381 
382  auto fts2 = trackingTools::ftsFromVertexToPoint(*theMagField, hitPos, vertexPred, energy, charge);
383  tsos2 = prop2ndLayer->propagate(fts2, geomdet2->surface());
384 
385  if (tsos2.isValid()) {
386  LocalPoint lp2 = (*it).localPosition();
387  GlobalPoint hitPos2 = geomdet2->surface().toGlobal(lp2);
388  phi2 = hitPos2.phi();
389  dphi2 = hitPos2.phi() - tsos2.globalPosition().phi();
390  rz2 = hitPos2.perp();
391  drz2 = hitPos2.perp() - tsos2.globalPosition().perp();
392  if (id2.subdetId() % 2 == 1) {
393  rz2 = hitPos2.z();
394  drz2 = hitPos2.z() - tsos2.globalPosition().z();
395  }
396  }
397  }
398 
399  // fill the tree and histos
400 
401  histpt_->Fill(t.globalMomentum().perp());
402  histetclu_->Fill(theClus->energy() * sin(2. * atan(exp(-theClus->position().eta()))));
403  histeta_->Fill(t.globalMomentum().eta());
404  histetaclu_->Fill(theClus->position().eta());
405  histq_->Fill((*MyS).getCharge());
406  histeoverp_->Fill(theClus->energy() / t.globalMomentum().mag());
407 
408  if (is < 10) {
409  superclusterEnergy[is] = theClus->energy();
410  superclusterEta[is] = theClus->position().eta();
411  superclusterPhi[is] = theClus->position().phi();
412  superclusterEt[is] = theClus->energy() * sin(2. * atan(exp(-theClus->position().eta())));
413  seedMomentum[is] = t.globalMomentum().mag();
414  seedEta[is] = t.globalMomentum().eta();
415  seedPhi[is] = t.globalMomentum().phi();
416  seedPt[is] = t.globalMomentum().perp();
417  seedQ[is] = (*MyS).getCharge();
418  seedSubdet1[is] = id1.subdetId();
419  seedLayer1[is] = tTopo->layer(id1);
420  seedSide1[is] = tTopo->side(id1);
421  seedPhi1[is] = phi1;
422  seedRz1[is] = rz1;
423  seedDphi1[is] = dphi1;
424  seedDrz1[is] = drz1;
425  seedSubdet2[is] = id2.subdetId();
426  seedLayer2[is] = tTopo->layer(id2);
427  seedSide2[is] = tTopo->side(id2);
428  seedDphi2[is] = dphi2;
429  seedDrz2[is] = drz2;
430  seedPhi2[is] = phi2;
431  seedRz2[is] = rz2;
432  }
433 
434  is++;
435  }
436 
437  histnbseeds_->Fill(elSeeds.product()->size());
438 
439  // get input clusters
440 
442  //CC to be changed according to supercluster input
443  e.getByLabel("correctedHybridSuperClusters", clusters);
444  histnbclus_->Fill(clusters.product()->size());
445  if (!clusters.product()->empty())
446  histnrseeds_->Fill(elSeeds.product()->size());
447  // get MC information
448 
450  // this one is empty branch in current test files
451  //e.getByLabel("generatorSmeared", "", HepMCEvt);
452  //e.getByLabel("source", "", HepMCEvt);
453  e.getByLabel("generatorSmeared", "", HepMCEvt);
454 
455  const HepMC::GenEvent *MCEvt = HepMCEvt->GetEvent();
456  HepMC::GenParticle *genPc = nullptr;
457  HepMC::FourVector pAssSim;
458  int ip = 0;
459  for (HepMC::GenEvent::particle_const_iterator partIter = MCEvt->particles_begin(); partIter != MCEvt->particles_end();
460  ++partIter) {
461  for (HepMC::GenEvent::vertex_const_iterator vertIter = MCEvt->vertices_begin(); vertIter != MCEvt->vertices_end();
462  ++vertIter) {
463  // CLHEP::HepLorentzVector creation = (*partIter)->CreationVertex();
464  HepMC::GenVertex *creation = (*partIter)->production_vertex();
465  // CLHEP::HepLorentzVector momentum = (*partIter)->Momentum();
466  HepMC::FourVector momentum = (*partIter)->momentum();
467  // HepPDT::ParticleID id = (*partIter)->particleID(); // electrons and positrons are 11 and -11
468  int id = (*partIter)->pdg_id(); // electrons and positrons are 11 and -11
469  LogDebug("") << "MC particle id " << id << ", creationVertex " << (*creation) << " cm, initialMomentum "
470  << momentum.rho() << " GeV/c" << std::endl;
471 
472  if (id == 11 || id == -11) {
473  // single primary electrons or electrons from Zs or Ws
474  HepMC::GenParticle *mother = nullptr;
475  if ((*partIter)->production_vertex()) {
476  if ((*partIter)->production_vertex()->particles_begin(HepMC::parents) !=
477  (*partIter)->production_vertex()->particles_end(HepMC::parents))
478  mother = *((*partIter)->production_vertex()->particles_begin(HepMC::parents));
479  }
480  if (((mother == nullptr) || ((mother != nullptr) && (mother->pdg_id() == 23)) ||
481  ((mother != nullptr) && (mother->pdg_id() == 32)) ||
482  ((mother != nullptr) && (std::abs(mother->pdg_id()) == 24)))) {
483  genPc = (*partIter);
484  pAssSim = genPc->momentum();
485 
486  // EWK fiducial
487  //if (pAssSim.perp()> 100. || std::abs(pAssSim.eta())> 2.5) continue;
488  //if (pAssSim.perp()< 20. || (std::abs(pAssSim.eta())> 1.4442 && std::abs(pAssSim.eta())< 1.56) || std::abs(pAssSim.eta())> 2.5) continue;
489  // reconstruction fiducial
490  //if (pAssSim.perp()< 5. || std::abs(pAssSim.eta())> 2.5) continue;
491  if (std::abs(pAssSim.eta()) > 2.5)
492  continue;
493 
494  histptMC_->Fill(pAssSim.perp());
495  histetaMC_->Fill(pAssSim.eta());
496  histeMC_->Fill(pAssSim.rho());
497 
498  // looking for the best matching gsf electron
499  bool okSeedFound = false;
500  double seedOkRatio = 999999.;
501 
502  // find best matched seed
503  reco::ElectronSeed bestElectronSeed;
504  for (ElectronSeedCollection::const_iterator gsfIter = (*elSeeds).begin(); gsfIter != (*elSeeds).end();
505  ++gsfIter) {
506  const GeomDet *det = nullptr;
507  for (auto const &recHit : gsfIter->recHits()) {
508  det = pDD->idToDet(recHit.geographicalId());
509  }
511  trajectoryStateTransform::transientState(gsfIter->startingState(), &(det->surface()), &(*theMagField));
512 
513  float eta = t.globalMomentum().eta();
514  float phi = t.globalMomentum().phi();
515  float p = t.globalMomentum().mag();
516  double dphi = phi - pAssSim.phi();
517  if (std::abs(dphi) > CLHEP::pi)
518  dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
519  double deltaR = sqrt(std::pow((eta - pAssSim.eta()), 2) + std::pow(dphi, 2));
520  if (deltaR < 0.15) {
521  // if ( deltaR < 0.3 ){
522  //if ( (genPc->pdg_id() == 11) && (gsfIter->charge() < 0.) || (genPc->pdg_id() == -11) &&
523  //(gsfIter->charge() > 0.) ){
524  double tmpSeedRatio = p / pAssSim.t();
525  if (std::abs(tmpSeedRatio - 1) < std::abs(seedOkRatio - 1)) {
526  seedOkRatio = tmpSeedRatio;
527  bestElectronSeed = *gsfIter;
528  okSeedFound = true;
529  }
530  //}
531  }
532  } // loop over rec ele to look for the best one
533 
534  // analysis when the mc track is found
535  if (okSeedFound) {
536  histptMCmatched_->Fill(pAssSim.perp());
537  histetaMCmatched_->Fill(pAssSim.eta());
538  histeMCmatched_->Fill(pAssSim.rho());
539  if (ip < 10) {
540  mcEnergy[ip] = pAssSim.rho();
541  mcEta[ip] = pAssSim.eta();
542  mcPhi[ip] = pAssSim.phi();
543  mcPt[ip] = pAssSim.perp();
544  mcQ[ip] = ((id == 11) ? -1. : +1.);
545  }
546  }
547 
548  // efficiency for ecal driven only
549  okSeedFound = false;
550  seedOkRatio = 999999.;
551 
552  // find best matched seed
553  for (ElectronSeedCollection::const_iterator gsfIter = (*elSeeds).begin(); gsfIter != (*elSeeds).end();
554  ++gsfIter) {
555  const GeomDet *det = nullptr;
556  for (auto const &recHit : gsfIter->recHits()) {
557  det = pDD->idToDet(recHit.geographicalId());
558  }
560  trajectoryStateTransform::transientState(gsfIter->startingState(), &(det->surface()), &(*theMagField));
561 
562  float eta = t.globalMomentum().eta();
563  float phi = t.globalMomentum().phi();
564  float p = t.globalMomentum().mag();
565  double dphi = phi - pAssSim.phi();
566  if (std::abs(dphi) > CLHEP::pi)
567  dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
568  double deltaR = sqrt(std::pow((eta - pAssSim.eta()), 2) + std::pow(dphi, 2));
569  if (gsfIter->isEcalDriven()) {
570  if (deltaR < 0.15) {
571  // if ( deltaR < 0.3 ){
572  //if ( (genPc->pdg_id() == 11) && (gsfIter->charge() < 0.) || (genPc->pdg_id() == -11) &&
573  //(gsfIter->charge() > 0.) ){
574  double tmpSeedRatio = p / pAssSim.t();
575  if (std::abs(tmpSeedRatio - 1) < std::abs(seedOkRatio - 1)) {
576  seedOkRatio = tmpSeedRatio;
577  bestElectronSeed = *gsfIter;
578  okSeedFound = true;
579  }
580  //}
581  }
582  } // end if ecal driven
583  } // loop over rec ele to look for the best one
584 
585  // analysis when the mc track is found
586  if (okSeedFound) {
587  histecaldrivenptMCmatched_->Fill(pAssSim.perp());
588  histecaldrivenetaMCmatched_->Fill(pAssSim.eta());
589  histecaldriveneMCmatched_->Fill(pAssSim.rho());
590  }
591 
592  // efficiency for tracker driven only
593  okSeedFound = false;
594  seedOkRatio = 999999.;
595 
596  // find best matched seed
597  for (ElectronSeedCollection::const_iterator gsfIter = (*elSeeds).begin(); gsfIter != (*elSeeds).end();
598  ++gsfIter) {
599  const GeomDet *det = nullptr;
600  for (auto const &recHit : gsfIter->recHits()) {
601  det = pDD->idToDet(recHit.geographicalId());
602  }
604  trajectoryStateTransform::transientState(gsfIter->startingState(), &(det->surface()), &(*theMagField));
605 
606  float eta = t.globalMomentum().eta();
607  float phi = t.globalMomentum().phi();
608  float p = t.globalMomentum().mag();
609  double dphi = phi - pAssSim.phi();
610  if (std::abs(dphi) > CLHEP::pi)
611  dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
612  double deltaR = sqrt(std::pow((eta - pAssSim.eta()), 2) + std::pow(dphi, 2));
613  if (gsfIter->isTrackerDriven()) {
614  if (deltaR < 0.15) {
615  // if ( deltaR < 0.3 ){
616  //if ( (genPc->pdg_id() == 11) && (gsfIter->charge() < 0.) || (genPc->pdg_id() == -11) &&
617  //(gsfIter->charge() > 0.) ){
618  double tmpSeedRatio = p / pAssSim.t();
619  if (std::abs(tmpSeedRatio - 1) < std::abs(seedOkRatio - 1)) {
620  seedOkRatio = tmpSeedRatio;
621  bestElectronSeed = *gsfIter;
622  okSeedFound = true;
623  }
624  //}
625  }
626  } // end if ecal driven
627  } // loop over rec ele to look for the best one
628 
629  // analysis when the mc track is found
630  if (okSeedFound) {
631  histtrackerdrivenptMCmatched_->Fill(pAssSim.perp());
632  histtrackerdrivenetaMCmatched_->Fill(pAssSim.eta());
633  histtrackerdriveneMCmatched_->Fill(pAssSim.rho());
634  }
635 
636  } // end if mother W or Z
637 
638  } // end if gen part is electron
639 
640  } // end loop on vertices
641 
642  ip++;
643 
644  } // end loop on gen particles
645 
646  //tree_->Fill();
647 }

References funct::abs(), alongMomentum, beamSpot_, edm::RefToBase< T >::castTo(), ALCARECOTkAlJpsiMuMu_cff::charge, bsc_activity_cfg::clusters, PbPb_ZMuSkimMuonDPG_cff::deltaR, MillePedeFileConverter_cfg::e, HCALHighEnergyHPDFilter_cfi::energy, PVValHelper::eta, JetChargeProducer_cfi::exp, trackingTools::ftsFromVertexToPoint(), GenParticle::GenParticle, edm::EventSetup::get(), get, edm::HepMCProduct::GetEvent(), TrajectoryStateOnSurface::globalPosition(), histecaldriveneMCmatched_, histecaldrivenetaMCmatched_, histecaldrivenptMCmatched_, histeMC_, histeMCmatched_, histeoverp_, histeta_, histetaclu_, histetaMC_, histetaMCmatched_, histetclu_, histnbclus_, histnbseeds_, histnrseeds_, histpt_, histptMC_, histptMCmatched_, histq_, histtrackerdriveneMCmatched_, histtrackerdrivenetaMCmatched_, histtrackerdrivenptMCmatched_, globals_cff::id1, globals_cff::id2, TrackerGeometry::idToDet(), inputCollection_, createfilelist::int, edm::RefToBase< T >::isNull(), TrajectoryStateOnSurface::isValid(), TrackerTopology::layer(), LogDebug, EgHLTOffHistBins_cfi::mass, mcEnergy, mcEta, mcPhi, mcPt, mcQ, oppositeToMomentum, AlCaHLTBitMon_ParallelJobs::p, parents, PV3DBase< T, PVType, FrameType >::perp(), phi, PV3DBase< T, PVType, FrameType >::phi(), pi, reco::BeamSpot::position(), funct::pow(), edm::Handle< T >::product(), PropagatorWithMaterial::propagate(), alignCSCRings::r, rpcPointValidation_cfi::recHit, seedDphi1, seedDphi2, seedDrz1, seedDrz2, seedEta, seedLayer1, seedLayer2, seedMomentum, seedPhi, seedPhi1, seedPhi2, seedPt, seedQ, seedRz1, seedRz2, seedSide1, seedSide2, seedSubdet1, seedSubdet2, TrackerTopology::side(), funct::sin(), mathSSE::sqrt(), superclusterEnergy, superclusterEt, superclusterEta, superclusterPhi, GeomDet::surface(), submitPVValidationJobs::t, GeomDet::toGlobal(), Surface::toGlobal(), trajectoryStateTransform::transientState(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

◆ beginJob()

void ElectronSeedAnalyzer::beginJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 117 of file ElectronSeedAnalyzer.cc.

117  {
118  histfile_->cd();
119  tree_ = new TTree("ElectronSeeds", "ElectronSeed validation ntuple");
120  tree_->Branch("mcEnergy", mcEnergy, "mcEnergy[10]/F");
121  tree_->Branch("mcEta", mcEta, "mcEta[10]/F");
122  tree_->Branch("mcPhi", mcPhi, "mcPhi[10]/F");
123  tree_->Branch("mcPt", mcPt, "mcPt[10]/F");
124  tree_->Branch("mcQ", mcQ, "mcQ[10]/F");
125  tree_->Branch("superclusterEnergy", superclusterEnergy, "superclusterEnergy[10]/F");
126  tree_->Branch("superclusterEta", superclusterEta, "superclusterEta[10]/F");
127  tree_->Branch("superclusterPhi", superclusterPhi, "superclusterPhi[10]/F");
128  tree_->Branch("superclusterEt", superclusterEt, "superclusterEt[10]/F");
129  tree_->Branch("seedMomentum", seedMomentum, "seedMomentum[10]/F");
130  tree_->Branch("seedEta", seedEta, "seedEta[10]/F");
131  tree_->Branch("seedPhi", seedPhi, "seedPhi[10]/F");
132  tree_->Branch("seedPt", seedPt, "seedPt[10]/F");
133  tree_->Branch("seedQ", seedQ, "seedQ[10]/F");
134  tree_->Branch("seedSubdet1", seedSubdet1, "seedSubdet1[10]/I");
135  tree_->Branch("seedLayer1", seedLayer1, "seedLayer1[10]/I");
136  tree_->Branch("seedSide1", seedSide1, "seedSide1[10]/I");
137  tree_->Branch("seedPhi1", seedPhi1, "seedPhi1[10]/F");
138  tree_->Branch("seedDphi1", seedDphi1, "seedDphi1[10]/F");
139  tree_->Branch("seedDrz1", seedDrz1, "seedDrz1[10]/F");
140  tree_->Branch("seedRz1", seedRz1, "seedRz1[10]/F");
141  tree_->Branch("seedSubdet2", seedSubdet2, "seedSubdet2[10]/I");
142  tree_->Branch("seedLayer2", seedLayer2, "seedLayer2[10]/I");
143  tree_->Branch("seedSide2", seedSide2, "seedSide2[10]/I");
144  tree_->Branch("seedPhi2", seedPhi2, "seedPhi2[10]/F");
145  tree_->Branch("seedDphi2", seedDphi2, "seedDphi2[10]/F");
146  tree_->Branch("seedRz2", seedRz2, "seedRz2[10]/F");
147  tree_->Branch("seedDrz2", seedDrz2, "seedDrz2[10]/F");
148  histeMC_ = new TH1F("eMC", "MC particle energy", 100, 0., 100.);
149  histeMCmatched_ = new TH1F("eMCmatched", "matched MC particle energy", 100, 0., 100.);
151  new TH1F("ecaldriveneMCmatched", "matched MC particle energy, ecal driven", 100, 0., 100.);
153  new TH1F("trackerdriveneMCmatched", "matched MC particle energy, tracker driven", 100, 0., 100.);
154  histp_ = new TH1F("p", "seed p", 100, 0., 100.);
155  histeclu_ = new TH1F("clus energy", "supercluster energy", 100, 0., 100.);
156  histpt_ = new TH1F("pt", "seed pt", 100, 0., 100.);
157  histptMC_ = new TH1F("ptMC", "MC particle pt", 100, 0., 100.);
158  histptMCmatched_ = new TH1F("ptMCmatched", "matched MC particle pt", 100, 0., 100.);
159  histecaldrivenptMCmatched_ = new TH1F("ecaldrivenptMCmatched", "matched MC particle pt, ecal driven", 100, 0., 100.);
161  new TH1F("trackerdrivenptMCmatched", "matched MC particle pt, tracker driven", 100, 0., 100.);
162  histetclu_ = new TH1F("Et", "supercluster Et", 100, 0., 100.);
163  histeffpt_ = new TH1F("pt eff", "seed effciency vs pt", 100, 0., 100.);
164  histeta_ = new TH1F("seed eta", "seed eta", 100, -2.5, 2.5);
165  histetaMC_ = new TH1F("etaMC", "MC particle eta", 100, -2.5, 2.5);
166  histetaMCmatched_ = new TH1F("etaMCmatched", "matched MC particle eta", 100, -2.5, 2.5);
168  new TH1F("ecaldrivenetaMCmatched", "matched MC particle eta, ecal driven", 100, -2.5, 2.5);
170  new TH1F("trackerdrivenetaMCmatched", "matched MC particle eta, tracker driven", 100, -2.5, 2.5);
171  histetaclu_ = new TH1F("clus eta", "supercluster eta", 100, -2.5, 2.5);
172  histeffeta_ = new TH1F("eta eff", "seed effciency vs eta", 100, -2.5, 2.5);
173  histq_ = new TH1F("q", "seed charge", 100, -2.5, 2.5);
174  histeoverp_ = new TH1F("E/p", "seed E/p", 100, 0., 10.);
175  histnbseeds_ = new TH1I("nrs", "Nr of seeds ", 50, 0., 25.);
176  histnbclus_ = new TH1I("nrclus", "Nr of superclusters ", 50, 0., 25.);
177  histnrseeds_ = new TH1I("ns", "Nr of seeds if clusters", 50, 0., 25.);
178 }

References histecaldriveneMCmatched_, histecaldrivenetaMCmatched_, histecaldrivenptMCmatched_, histeclu_, histeffeta_, histeffpt_, histeMC_, histeMCmatched_, histeoverp_, histeta_, histetaclu_, histetaMC_, histetaMCmatched_, histetclu_, histfile_, histnbclus_, histnbseeds_, histnrseeds_, histp_, histpt_, histptMC_, histptMCmatched_, histq_, histtrackerdriveneMCmatched_, histtrackerdrivenetaMCmatched_, histtrackerdrivenptMCmatched_, mcEnergy, mcEta, mcPhi, mcPt, mcQ, seedDphi1, seedDphi2, seedDrz1, seedDrz2, seedEta, seedLayer1, seedLayer2, seedMomentum, seedPhi, seedPhi1, seedPhi2, seedPt, seedQ, seedRz1, seedRz2, seedSide1, seedSide2, seedSubdet1, seedSubdet2, superclusterEnergy, superclusterEt, superclusterEta, superclusterPhi, and tree_.

◆ endJob()

void ElectronSeedAnalyzer::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 180 of file ElectronSeedAnalyzer.cc.

180  {
181  histfile_->cd();
182  tree_->Print();
183  tree_->Write();
184 
185  // efficiency vs eta
186  TH1F *histetaEff = (TH1F *)histetaMCmatched_->Clone("histetaEff");
187  histetaEff->Reset();
188  histetaEff->Divide(histetaMCmatched_, histeta_, 1, 1, "b");
189  histetaEff->Print();
190  histetaEff->GetXaxis()->SetTitle("#eta");
191  histetaEff->GetYaxis()->SetTitle("Efficiency");
192 
193  // efficiency vs pt
194  TH1F *histptEff = (TH1F *)histptMCmatched_->Clone("histotEff");
195  histptEff->Reset();
196  histptEff->Divide(histptMCmatched_, histpt_, 1, 1, "b");
197  histptEff->Print();
198  histptEff->GetXaxis()->SetTitle("p_{T}");
199  histptEff->GetYaxis()->SetTitle("Efficiency");
200 
201  histeMCmatched_->Write();
202  histecaldriveneMCmatched_->Write();
204  histeMC_->Write();
205  histp_->Write();
206  histeclu_->Write();
207  histpt_->Write();
208  histptMCmatched_->Write();
211  histptMC_->Write();
212  histetclu_->Write();
213  histeffpt_->Write();
214  histeta_->Write();
215  histetaMCmatched_->Write();
218  histetaMC_->Write();
219  histetaclu_->Write();
220  histeffeta_->Write();
221  histq_->Write();
222  histeoverp_->Write();
223  histnbseeds_->Write();
224  histnbclus_->Write();
225  histnrseeds_->Write();
226 }

References histecaldriveneMCmatched_, histecaldrivenetaMCmatched_, histecaldrivenptMCmatched_, histeclu_, histeffeta_, histeffpt_, histeMC_, histeMCmatched_, histeoverp_, histeta_, histetaclu_, histetaMC_, histetaMCmatched_, histetclu_, histfile_, histnbclus_, histnbseeds_, histnrseeds_, histp_, histpt_, histptMC_, histptMCmatched_, histq_, histtrackerdriveneMCmatched_, histtrackerdrivenetaMCmatched_, histtrackerdrivenptMCmatched_, and tree_.

Member Data Documentation

◆ beamSpot_

edm::InputTag ElectronSeedAnalyzer::beamSpot_
private

Definition at line 100 of file ElectronSeedAnalyzer.cc.

Referenced by analyze().

◆ histecaldriveneMCmatched_

TH1F* ElectronSeedAnalyzer::histecaldriveneMCmatched_
private

Definition at line 75 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histecaldrivenetaMCmatched_

TH1F* ElectronSeedAnalyzer::histecaldrivenetaMCmatched_
private

Definition at line 89 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histecaldrivenptMCmatched_

TH1F* ElectronSeedAnalyzer::histecaldrivenptMCmatched_
private

Definition at line 82 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histeclu_

TH1F* ElectronSeedAnalyzer::histeclu_
private

Definition at line 78 of file ElectronSeedAnalyzer.cc.

Referenced by beginJob(), and endJob().

◆ histeffeta_

TH1F* ElectronSeedAnalyzer::histeffeta_
private

Definition at line 92 of file ElectronSeedAnalyzer.cc.

Referenced by beginJob(), and endJob().

◆ histeffpt_

TH1F* ElectronSeedAnalyzer::histeffpt_
private

Definition at line 85 of file ElectronSeedAnalyzer.cc.

Referenced by beginJob(), and endJob().

◆ histeMC_

TH1F* ElectronSeedAnalyzer::histeMC_
private

Definition at line 73 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), endJob(), and ~ElectronSeedAnalyzer().

◆ histeMCmatched_

TH1F* ElectronSeedAnalyzer::histeMCmatched_
private

Definition at line 74 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histeoverp_

TH1F* ElectronSeedAnalyzer::histeoverp_
private

Definition at line 94 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histeta_

TH1F* ElectronSeedAnalyzer::histeta_
private

Definition at line 86 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histetaclu_

TH1F* ElectronSeedAnalyzer::histetaclu_
private

Definition at line 91 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histetaMC_

TH1F* ElectronSeedAnalyzer::histetaMC_
private

Definition at line 87 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histetaMCmatched_

TH1F* ElectronSeedAnalyzer::histetaMCmatched_
private

Definition at line 88 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histetclu_

TH1F* ElectronSeedAnalyzer::histetclu_
private

Definition at line 84 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histfile_

TFile* ElectronSeedAnalyzer::histfile_
private

◆ histnbclus_

TH1I* ElectronSeedAnalyzer::histnbclus_
private

Definition at line 97 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histnbseeds_

TH1I* ElectronSeedAnalyzer::histnbseeds_
private

Definition at line 96 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histnrseeds_

TH1I* ElectronSeedAnalyzer::histnrseeds_
private

Definition at line 95 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histp_

TH1F* ElectronSeedAnalyzer::histp_
private

Definition at line 77 of file ElectronSeedAnalyzer.cc.

Referenced by beginJob(), and endJob().

◆ histpt_

TH1F* ElectronSeedAnalyzer::histpt_
private

Definition at line 79 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histptMC_

TH1F* ElectronSeedAnalyzer::histptMC_
private

Definition at line 80 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histptMCmatched_

TH1F* ElectronSeedAnalyzer::histptMCmatched_
private

Definition at line 81 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histq_

TH1F* ElectronSeedAnalyzer::histq_
private

Definition at line 93 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histtrackerdriveneMCmatched_

TH1F* ElectronSeedAnalyzer::histtrackerdriveneMCmatched_
private

Definition at line 76 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histtrackerdrivenetaMCmatched_

TH1F* ElectronSeedAnalyzer::histtrackerdrivenetaMCmatched_
private

Definition at line 90 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ histtrackerdrivenptMCmatched_

TH1F* ElectronSeedAnalyzer::histtrackerdrivenptMCmatched_
private

Definition at line 83 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ inputCollection_

edm::InputTag ElectronSeedAnalyzer::inputCollection_
private

Definition at line 99 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and ElectronSeedAnalyzer().

◆ mcEnergy

float ElectronSeedAnalyzer::mcEnergy[10]
private

Definition at line 65 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ mcEta

float ElectronSeedAnalyzer::mcEta[10]
private

Definition at line 65 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ mcPhi

float ElectronSeedAnalyzer::mcPhi[10]
private

Definition at line 65 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ mcPt

float ElectronSeedAnalyzer::mcPt[10]
private

Definition at line 65 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ mcQ

float ElectronSeedAnalyzer::mcQ[10]
private

Definition at line 65 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedDphi1

float ElectronSeedAnalyzer::seedDphi1[10]
private

Definition at line 71 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedDphi2

float ElectronSeedAnalyzer::seedDphi2[10]
private

Definition at line 71 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedDrz1

float ElectronSeedAnalyzer::seedDrz1[10]
private

Definition at line 71 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedDrz2

float ElectronSeedAnalyzer::seedDrz2[10]
private

Definition at line 71 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedEta

float ElectronSeedAnalyzer::seedEta[10]
private

Definition at line 67 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedLayer1

int ElectronSeedAnalyzer::seedLayer1[10]
private

Definition at line 69 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedLayer2

int ElectronSeedAnalyzer::seedLayer2[10]
private

Definition at line 69 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedMomentum

float ElectronSeedAnalyzer::seedMomentum[10]
private

Definition at line 67 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedPhi

float ElectronSeedAnalyzer::seedPhi[10]
private

Definition at line 67 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedPhi1

float ElectronSeedAnalyzer::seedPhi1[10]
private

Definition at line 72 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedPhi2

float ElectronSeedAnalyzer::seedPhi2[10]
private

Definition at line 72 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedPt

float ElectronSeedAnalyzer::seedPt[10]
private

Definition at line 67 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedQ

float ElectronSeedAnalyzer::seedQ[10]
private

Definition at line 67 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedRz1

float ElectronSeedAnalyzer::seedRz1[10]
private

Definition at line 72 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedRz2

float ElectronSeedAnalyzer::seedRz2[10]
private

Definition at line 72 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedSide1

int ElectronSeedAnalyzer::seedSide1[10]
private

Definition at line 70 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedSide2

int ElectronSeedAnalyzer::seedSide2[10]
private

Definition at line 70 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedSubdet1

int ElectronSeedAnalyzer::seedSubdet1[10]
private

Definition at line 68 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ seedSubdet2

int ElectronSeedAnalyzer::seedSubdet2[10]
private

Definition at line 68 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ superclusterEnergy

float ElectronSeedAnalyzer::superclusterEnergy[10]
private

Definition at line 66 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ superclusterEt

float ElectronSeedAnalyzer::superclusterEt[10]
private

Definition at line 66 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ superclusterEta

float ElectronSeedAnalyzer::superclusterEta[10]
private

Definition at line 66 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ superclusterPhi

float ElectronSeedAnalyzer::superclusterPhi[10]
private

Definition at line 66 of file ElectronSeedAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ transformer_

TrajectoryStateTransform ElectronSeedAnalyzer::transformer_
private

Definition at line 61 of file ElectronSeedAnalyzer.cc.

◆ tree_

TTree* ElectronSeedAnalyzer::tree_
private

Definition at line 64 of file ElectronSeedAnalyzer.cc.

Referenced by beginJob(), and endJob().

TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
ElectronSeedAnalyzer::histecaldrivenetaMCmatched_
TH1F * histecaldrivenetaMCmatched_
Definition: ElectronSeedAnalyzer.cc:89
edm::RefToBase::isNull
bool isNull() const
Checks for null.
Definition: RefToBase.h:295
ElectronSeedAnalyzer::superclusterEt
float superclusterEt[10]
Definition: ElectronSeedAnalyzer.cc:66
TrackerTopology::side
unsigned int side(const DetId &id) const
Definition: TrackerTopology.cc:28
ElectronSeedAnalyzer::histtrackerdriveneMCmatched_
TH1F * histtrackerdriveneMCmatched_
Definition: ElectronSeedAnalyzer.cc:76
ElectronSeedAnalyzer::histnbseeds_
TH1I * histnbseeds_
Definition: ElectronSeedAnalyzer.cc:96
GeomDet
Definition: GeomDet.h:27
ElectronSeedAnalyzer::histecaldriveneMCmatched_
TH1F * histecaldriveneMCmatched_
Definition: ElectronSeedAnalyzer.cc:75
edm::Handle::product
T const * product() const
Definition: Handle.h:70
PropagatorWithMaterial::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
ElectronSeedAnalyzer::histfile_
TFile * histfile_
Definition: ElectronSeedAnalyzer.cc:63
ElectronSeedAnalyzer::seedDrz1
float seedDrz1[10]
Definition: ElectronSeedAnalyzer.cc:71
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
globals_cff.id1
id1
Definition: globals_cff.py:33
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
ElectronSeedAnalyzer::histpt_
TH1F * histpt_
Definition: ElectronSeedAnalyzer.cc:79
ElectronSeedAnalyzer::histeta_
TH1F * histeta_
Definition: ElectronSeedAnalyzer.cc:86
ElectronSeedAnalyzer::superclusterEta
float superclusterEta[10]
Definition: ElectronSeedAnalyzer.cc:66
ElectronSeedAnalyzer::seedMomentum
float seedMomentum[10]
Definition: ElectronSeedAnalyzer.cc:67
oppositeToMomentum
Definition: PropagationDirection.h:4
TrackerTopology::layer
unsigned int layer(const DetId &id) const
Definition: TrackerTopology.cc:47
ElectronSeedAnalyzer::histtrackerdrivenetaMCmatched_
TH1F * histtrackerdrivenetaMCmatched_
Definition: ElectronSeedAnalyzer.cc:90
ElectronSeedAnalyzer::mcEta
float mcEta[10]
Definition: ElectronSeedAnalyzer.cc:65
ElectronSeedAnalyzer::histeMCmatched_
TH1F * histeMCmatched_
Definition: ElectronSeedAnalyzer.cc:74
ElectronSeedAnalyzer::seedSide2
int seedSide2[10]
Definition: ElectronSeedAnalyzer.cc:70
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
ElectronSeedAnalyzer::histeffpt_
TH1F * histeffpt_
Definition: ElectronSeedAnalyzer.cc:85
edm::Handle< reco::BeamSpot >
ElectronSeedAnalyzer::seedSubdet1
int seedSubdet1[10]
Definition: ElectronSeedAnalyzer.cc:68
ElectronSeedAnalyzer::seedPhi2
float seedPhi2[10]
Definition: ElectronSeedAnalyzer.cc:72
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
ElectronSeedAnalyzer::histeffeta_
TH1F * histeffeta_
Definition: ElectronSeedAnalyzer.cc:92
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
ElectronSeedAnalyzer::histtrackerdrivenptMCmatched_
TH1F * histtrackerdrivenptMCmatched_
Definition: ElectronSeedAnalyzer.cc:83
edm::Ref< SuperClusterCollection >
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
DetId
Definition: DetId.h:17
ElectronSeedAnalyzer::histnrseeds_
TH1I * histnrseeds_
Definition: ElectronSeedAnalyzer.cc:95
ElectronSeedAnalyzer::histnbclus_
TH1I * histnbclus_
Definition: ElectronSeedAnalyzer.cc:97
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
edm::Range
Definition: Range.h:11
PropagatorWithMaterial
Definition: PropagatorWithMaterial.h:25
reco::ElectronSeed
Definition: ElectronSeed.h:51
trackingTools::ftsFromVertexToPoint
FreeTrajectoryState ftsFromVertexToPoint(MagneticField const &magField, GlobalPoint const &xmeas, GlobalPoint const &xvert, float momentum, TrackCharge charge)
Definition: ftsFromVertexToPoint.cc:17
ElectronSeedAnalyzer::seedDphi1
float seedDphi1[10]
Definition: ElectronSeedAnalyzer.cc:71
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
ElectronSeedAnalyzer::seedLayer2
int seedLayer2[10]
Definition: ElectronSeedAnalyzer.cc:69
PVValHelper::eta
Definition: PVValidationHelpers.h:70
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:16
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
edm::ESHandle< TrackerTopology >
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
ElectronSeedAnalyzer::mcPhi
float mcPhi[10]
Definition: ElectronSeedAnalyzer.cc:65
ElectronSeedAnalyzer::seedPhi1
float seedPhi1[10]
Definition: ElectronSeedAnalyzer.cc:72
reco::BeamSpot::position
const Point & position() const
position
Definition: BeamSpot.h:59
Point3DBase< float, GlobalTag >
ElectronSeedAnalyzer::seedPhi
float seedPhi[10]
Definition: ElectronSeedAnalyzer.cc:67
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
ElectronSeedAnalyzer::histetaMC_
TH1F * histetaMC_
Definition: ElectronSeedAnalyzer.cc:87
ElectronSeedAnalyzer::histeclu_
TH1F * histeclu_
Definition: ElectronSeedAnalyzer.cc:78
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
GeomDet::toGlobal
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
ElectronSeedAnalyzer::seedDrz2
float seedDrz2[10]
Definition: ElectronSeedAnalyzer.cc:71
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
ElectronSeedAnalyzer::histeMC_
TH1F * histeMC_
Definition: ElectronSeedAnalyzer.cc:73
ElectronSeedAnalyzer::tree_
TTree * tree_
Definition: ElectronSeedAnalyzer.cc:64
ElectronSeedAnalyzer::histeoverp_
TH1F * histeoverp_
Definition: ElectronSeedAnalyzer.cc:94
ElectronSeedAnalyzer::histecaldrivenptMCmatched_
TH1F * histecaldrivenptMCmatched_
Definition: ElectronSeedAnalyzer.cc:82
ElectronSeedAnalyzer::mcEnergy
float mcEnergy[10]
Definition: ElectronSeedAnalyzer.cc:65
ElectronSeedAnalyzer::histetaclu_
TH1F * histetaclu_
Definition: ElectronSeedAnalyzer.cc:91
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
createfilelist.int
int
Definition: createfilelist.py:10
trajectoryStateTransform::transientState
TrajectoryStateOnSurface transientState(const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field)
Definition: TrajectoryStateTransform.cc:35
ElectronSeedAnalyzer::beamSpot_
edm::InputTag beamSpot_
Definition: ElectronSeedAnalyzer.cc:100
ElectronSeedAnalyzer::histetaMCmatched_
TH1F * histetaMCmatched_
Definition: ElectronSeedAnalyzer.cc:88
ElectronSeedAnalyzer::histetclu_
TH1F * histetclu_
Definition: ElectronSeedAnalyzer.cc:84
edm::RefToBase::castTo
REF castTo() const
Definition: RefToBase.h:257
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:37
get
#define get
ElectronSeedAnalyzer::histq_
TH1F * histq_
Definition: ElectronSeedAnalyzer.cc:93
alignCSCRings.r
r
Definition: alignCSCRings.py:93
ElectronSeedAnalyzer::seedEta
float seedEta[10]
Definition: ElectronSeedAnalyzer.cc:67
ElectronSeedAnalyzer::seedRz2
float seedRz2[10]
Definition: ElectronSeedAnalyzer.cc:72
DDAxes::phi
ElectronSeedAnalyzer::seedRz1
float seedRz1[10]
Definition: ElectronSeedAnalyzer.cc:72
ElectronSeedAnalyzer::mcQ
float mcQ[10]
Definition: ElectronSeedAnalyzer.cc:65
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
ElectronSeedAnalyzer::seedDphi2
float seedDphi2[10]
Definition: ElectronSeedAnalyzer.cc:71
ElectronSeedAnalyzer::seedLayer1
int seedLayer1[10]
Definition: ElectronSeedAnalyzer.cc:69
ElectronSeedAnalyzer::seedPt
float seedPt[10]
Definition: ElectronSeedAnalyzer.cc:67
ElectronSeedAnalyzer::seedSide1
int seedSide1[10]
Definition: ElectronSeedAnalyzer.cc:70
PerpendicularBoundPlaneBuilder
Definition: PerpendicularBoundPlaneBuilder.h:11
ElectronSeedAnalyzer::seedSubdet2
int seedSubdet2[10]
Definition: ElectronSeedAnalyzer.cc:68
ElectronSeedAnalyzer::superclusterPhi
float superclusterPhi[10]
Definition: ElectronSeedAnalyzer.cc:66
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::RefToBase< CaloCluster >
ElectronSeedAnalyzer::histptMC_
TH1F * histptMC_
Definition: ElectronSeedAnalyzer.cc:80
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
ElectronSeedAnalyzer::mcPt
float mcPt[10]
Definition: ElectronSeedAnalyzer.cc:65
pi
const Double_t pi
Definition: trackSplitPlot.h:36
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ElectronSeedAnalyzer::superclusterEnergy
float superclusterEnergy[10]
Definition: ElectronSeedAnalyzer.cc:66
ElectronSeedAnalyzer::histptMCmatched_
TH1F * histptMCmatched_
Definition: ElectronSeedAnalyzer.cc:81
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
globals_cff.id2
id2
Definition: globals_cff.py:34
ElectronSeedAnalyzer::histp_
TH1F * histp_
Definition: ElectronSeedAnalyzer.cc:77
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
parents
TPRegexp parents
Definition: eve_filter.cc:21
ElectronSeedAnalyzer::inputCollection_
edm::InputTag inputCollection_
Definition: ElectronSeedAnalyzer.cc:99
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
ElectronSeedAnalyzer::seedQ
float seedQ[10]
Definition: ElectronSeedAnalyzer.cc:67
edm::InputTag
Definition: InputTag.h:15
alongMomentum
Definition: PropagationDirection.h:4
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37