CMS 3D CMS Logo

TrackerHitProducer.cc
Go to the documentation of this file.
2 
8 
14 
15 // tracker info
19 
20 // data in edm::event
25 
26 // helper files
27 #include <CLHEP/Vector/LorentzVector.h>
28 #include "CLHEP/Units/GlobalSystemOfUnits.h"
29 
30 #include "TString.h"
31 
32 #include <cmath>
33 #include <memory>
34 #include <cstdlib>
35 
37  : getAllProvenances( iPSet.getParameter<edm::ParameterSet>( "ProvenanceLookup" ).getUntrackedParameter<bool>( "GetAllProvenances", false ) )
38  , printProvenanceInfo( iPSet.getParameter<edm::ParameterSet>( "ProvenanceLookup" ).getUntrackedParameter<bool>( "PrintProvenanceInfo", false ) )
39  , verbosity( iPSet.getUntrackedParameter<int>( "Verbosity", 0 ) )
40  , count( 0 )
41  , nRawGenPart( 0 )
42  , config_( iPSet )
43  , edmHepMCProductToken_( consumes<edm::HepMCProduct>( edm::InputTag( iPSet.getUntrackedParameter<std::string>( "HepMCProductLabel", "source" )
44  , iPSet.getUntrackedParameter<std::string>( "HepMCInputInstance", "" )
45  )
46  )
47  )
48  , edmSimVertexContainerToken_( consumes<edm::SimVertexContainer>( iPSet.getParameter<edm::InputTag>("G4VtxSrc") ) )
49  , edmSimTrackContainerToken_( consumes<edm::SimTrackContainer>( iPSet.getParameter<edm::InputTag>( "G4TrkSrc" ) ) )
50  , edmPSimHitContainer_pxlBrlLow_Token_( consumes<edm::PSimHitContainer>( iPSet.getParameter<edm::InputTag>( "PxlBrlLowSrc" ) ) )
51  , edmPSimHitContainer_pxlBrlHigh_Token_( consumes<edm::PSimHitContainer>( iPSet.getParameter<edm::InputTag>( "PxlBrlHighSrc" ) ) )
52  , edmPSimHitContainer_pxlFwdLow_Token_( consumes<edm::PSimHitContainer>( iPSet.getParameter<edm::InputTag>( "PxlFwdLowSrc" ) ) )
53  , edmPSimHitContainer_pxlFwdHigh_Token_( consumes<edm::PSimHitContainer>( iPSet.getParameter<edm::InputTag>( "PxlFwdHighSrc" ) ) )
54  , edmPSimHitContainer_siTIBLow_Token_( consumes<edm::PSimHitContainer>( iPSet.getParameter<edm::InputTag>( "SiTIBLowSrc" ) ) )
55  , edmPSimHitContainer_siTIBHigh_Token_( consumes<edm::PSimHitContainer>( iPSet.getParameter<edm::InputTag>( "SiTIBHighSrc" ) ) )
56  , edmPSimHitContainer_siTOBLow_Token_( consumes<edm::PSimHitContainer>( iPSet.getParameter<edm::InputTag>( "SiTOBLowSrc" ) ) )
57  , edmPSimHitContainer_siTOBHigh_Token_( consumes<edm::PSimHitContainer>( iPSet.getParameter<edm::InputTag>( "SiTOBHighSrc" ) ) )
58  , edmPSimHitContainer_siTIDLow_Token_( consumes<edm::PSimHitContainer>( iPSet.getParameter<edm::InputTag>( "SiTIDLowSrc" ) ) )
59  , edmPSimHitContainer_siTIDHigh_Token_( consumes<edm::PSimHitContainer>( iPSet.getParameter<edm::InputTag>( "SiTIDHighSrc" ) ) )
60  , edmPSimHitContainer_siTECLow_Token_( consumes<edm::PSimHitContainer>( iPSet.getParameter<edm::InputTag>( "SiTECLowSrc" ) ) )
61  , edmPSimHitContainer_siTECHigh_Token_( consumes<edm::PSimHitContainer>( iPSet.getParameter<edm::InputTag>( "SiTECHighSrc" ) ) )
62  , fName( iPSet.getUntrackedParameter<std::string>( "Name", "" ) )
63  , label( iPSet.getParameter<std::string>( "Label" ) )
64 {
65  // use value of first digit to determine default output level (inclusive)
66  // 0 is none, 1 is basic, 2 is fill output, 3 is gather output
67  verbosity %= 10;
68 
69  // create persistent object
70  produces<PTrackerSimHit>(label);
71 
72  // print out Parameter Set information being used
73  if (verbosity > 0) {
74  edm::LogInfo ("TrackerHitProducer::TrackerHitProducer")
75  << "\n===============================\n"
76  << "Initialized as EDProducer with parameter values:\n"
77  << " Name =" << fName << "\n"
78  << " Verbosity =" << verbosity << "\n"
79  << " Label =" << label << "\n"
80  << " GetProv =" << getAllProvenances << "\n"
81  << " PrintProv =" << printProvenanceInfo << "\n"
82  << " PxlBrlLowSrc = " << iPSet.getParameter<edm::InputTag>("PxlBrlLowSrc").label()
83  << ":" << iPSet.getParameter<edm::InputTag>("PxlBrlLowSrc").instance() << "\n"
84  << " PxlBrlHighSrc = " << iPSet.getParameter<edm::InputTag>("PxlBrlHighSrc").label()
85  << ":" << iPSet.getParameter<edm::InputTag>("PxlBrlHighSrc").instance() << "\n"
86  << " PxlFwdLowSrc = " << iPSet.getParameter<edm::InputTag>("PxlFwdLowSrc").label()
87  << ":" << iPSet.getParameter<edm::InputTag>("PxlFwdLowSrc").instance() << "\n"
88  << " PxlFwdHighSrc = " << iPSet.getParameter<edm::InputTag>("PxlFwdHighSrc").label()
89  << ":" << iPSet.getParameter<edm::InputTag>("PxlFwdHighSrc").instance() << "\n"
90  << " SiTIBLowSrc = " << iPSet.getParameter<edm::InputTag>("SiTIBLowSrc").label()
91  << ":" << iPSet.getParameter<edm::InputTag>("SiTIBLowSrc").instance() << "\n"
92  << " SiTIBHighSrc = " << iPSet.getParameter<edm::InputTag>("SiTIBHighSrc").label()
93  << ":" << iPSet.getParameter<edm::InputTag>("SiTIBHighSrc").instance() << "\n"
94  << " SiTOBLowSrc = " << iPSet.getParameter<edm::InputTag>("SiTOBLowSrc").label()
95  << ":" << iPSet.getParameter<edm::InputTag>("SiTOBLowSrc").instance() << "\n"
96  << " SiTOBHighSrc = " << iPSet.getParameter<edm::InputTag>("SiTOBHighSrc").label()
97  << ":" << iPSet.getParameter<edm::InputTag>("SiTOBHighSrc").instance() << "\n"
98  << " SiTIDLowSrc = " << iPSet.getParameter<edm::InputTag>("SiTIDLowSrc").label()
99  << ":" << iPSet.getParameter<edm::InputTag>("SiTIDLowSrc").instance() << "\n"
100  << " SiTIDHighSrc = " << iPSet.getParameter<edm::InputTag>("SiTIDHighSrc").label()
101  << ":" << iPSet.getParameter<edm::InputTag>("SiTIDHighSrc").instance() << "\n"
102  << " SiTECLowSrc = " << iPSet.getParameter<edm::InputTag>("SiTECLowSrc").label()
103  << ":" << iPSet.getParameter<edm::InputTag>("SiTECLowSrc").instance() << "\n"
104  << " SiTECHighSrc = " << iPSet.getParameter<edm::InputTag>("SiTECHighSrc").label()
105  << ":" << iPSet.getParameter<edm::InputTag>("SiTECHighSrc").instance() << "\n"
106  << "===============================\n"; }
107 }
108 
110 {
111 }
112 
114 {
115  if (verbosity > 0)
116  edm::LogInfo ("TrackerHitProducer::beginJob")
117  << "Starting the job...";
118  clear();
119  return;
120 }
121 
123 {
124  if (verbosity > 0)
125  edm::LogInfo ("TrackerHitProducer::endJob")
126  << "Terminating having processed" << count << "events.";
127  return;
128 }
129 
131  const edm::EventSetup& iSetup)
132 {
133  // keep track of number of events processed
134  ++count;
135 
136  // get event id information
137  edm::RunNumber_t nrun = iEvent.id().run();
138  edm::EventNumber_t nevt = iEvent.id().event();
139 
140  // get event setup information
141  //edm::ESHandle<edm::SetupData> pSetup;
142  //iSetup.get<edm::SetupRecord>().get(pSetup);
143 
144  if (verbosity > 0) {
145  edm::LogInfo ("TrackerHitProducer::produce")
146  << "Processing run" << nrun << "," << "event " << nevt;
147  }
148 
149  // clear event holders
150  clear();
151 
152  // look at information available in the event
153  if (getAllProvenances) {
154 
155  std::vector<const edm::StableProvenance*> AllProv;
156  iEvent.getAllStableProvenance(AllProv);
157 
158  if (verbosity > 0)
159  edm::LogInfo ("TrackerHitProducer::produce")
160  << "Number of Provenances =" << AllProv.size();
161 
162  if (printProvenanceInfo && (verbosity > 0)) {
163  TString eventout("\nProvenance info:\n");
164 
165  for (unsigned int i = 0; i < AllProv.size(); ++i) {
166  eventout += "\n ******************************";
167  eventout += "\n Module : ";
168  eventout += AllProv[i]->moduleLabel();
169  eventout += "\n ProductID process index: ";
170  eventout += AllProv[i]->productID().processIndex();
171  eventout += "\n ProductID product index: ";
172  eventout += AllProv[i]->productID().productIndex();
173  eventout += "\n ClassName : ";
174  eventout += AllProv[i]->className();
175  eventout += "\n InstanceName : ";
176  eventout += AllProv[i]->productInstanceName();
177  eventout += "\n BranchName : ";
178  eventout += AllProv[i]->branchName();
179  }
180  eventout += " ******************************\n";
181  edm::LogInfo("TrackerHitProducer::produce") << eventout;
182  }
183  }
184 
185  // call fill functions
186  //gather G4MC information from event
187  fillG4MC(iEvent);
188  // gather Tracker information from event
189  fillTrk(iEvent,iSetup);
190 
191  if (verbosity > 0)
192  edm::LogInfo ("TrackerHitProducer::produce")
193  << "Done gathering data from event.";
194 
195  // produce object to put into event
196  std::unique_ptr<PTrackerSimHit> pOut(new PTrackerSimHit);
197 
198  if (verbosity > 2)
199  edm::LogInfo ("TrackerHitProducer::produce")
200  << "Saving event contents:";
201 
202  // call store functions
203  // store G4MC information in product
204  storeG4MC(*pOut);
205  // store Tracker information in produce
206  storeTrk(*pOut);
207 
208  // store information in event
209  iEvent.put(std::move(pOut),label);
210 
211  return;
212 }
213 
214 //==================fill and store functions================================
216 {
217 
218  TString eventout;
219  if (verbosity > 0)
220  eventout = "\nGathering info:";
221 
223  // get MC information
226  iEvent.getByToken( edmHepMCProductToken_, HepMCEvt_ );
227  if (!HepMCEvt_.isValid()) {
228  edm::LogError("TrackerHitProducer::fillG4MC")
229  << "Unable to find HepMCProduct in event!";
230  return;
231  }
232  const HepMC::GenEvent* MCEvt = HepMCEvt_->GetEvent();
233  nRawGenPart = MCEvt->particles_size();
234 
235  if (verbosity > 1) {
236  eventout += "\n Number of Raw Particles collected: ";
237  eventout += nRawGenPart;
238  }
239 
241  // get G4Vertex information
244  iEvent.getByToken( edmSimVertexContainerToken_, G4VtxContainer );
245  if (!G4VtxContainer.isValid()) {
246  edm::LogError("TrackerHitProducer::fillG4MC")
247  << "Unable to find SimVertex in event!";
248  return;
249  }
250  int i = 0;
251  edm::SimVertexContainer::const_iterator itVtx;
252  for (itVtx = G4VtxContainer->begin(); itVtx != G4VtxContainer->end();
253  ++itVtx) {
254 
255  ++i;
256 
257  const CLHEP::HepLorentzVector& G4Vtx = CLHEP::HepLorentzVector(itVtx->position().x(),
258  itVtx->position().y(),
259  itVtx->position().z(),
260  itVtx->position().e());
261  G4VtxX.push_back(G4Vtx[0]/micrometer); //cm from code -> micrometer *10000
262  G4VtxY.push_back(G4Vtx[1]/micrometer); //cm from code -> micrometer *10000
263  G4VtxZ.push_back(G4Vtx[2]/millimeter); //cm from code -> millimeter *10
264  }
265 
266  if (verbosity > 1) {
267  eventout += "\n Number of G4Vertices collected: ";
268  eventout += i;
269  }
270 
272  // get G4Track information
275  iEvent.getByToken( edmSimTrackContainerToken_, G4TrkContainer );
276  if (!G4TrkContainer.isValid()) {
277  edm::LogError("TrackerHitProducer::fillG4MC")
278  << "Unable to find SimTrack in event!";
279  return;
280  }
281  i = 0;
282  edm::SimTrackContainer::const_iterator itTrk;
283  for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
284  ++itTrk) {
285 
286  ++i;
287 
288  double etaInit =0, phiInit =0, pInit =0;
289  const CLHEP::HepLorentzVector& G4Trk = CLHEP::HepLorentzVector(itTrk->momentum().x(),
290  itTrk->momentum().y(),
291  itTrk->momentum().z(),
292  itTrk->momentum().e());
293  pInit =sqrt(G4Trk[0]*G4Trk[0]+G4Trk[1]*G4Trk[1]+G4Trk[2]*G4Trk[2]);
294  if ( pInit == 0)
295  edm::LogError("TrackerHitProducer::fillG4MC")
296  << "TrackerTest::INFO: Primary has p = 0 ";
297  else {
298  double costheta = G4Trk[2]/pInit;
299  double theta = acos(TMath::Min(TMath::Max(costheta, -1.),1.));
300  etaInit = -log(tan(theta/2));
301 
302  if ( G4Trk[0] != 0 || G4Trk[1] != 0)
303  phiInit = atan2(G4Trk[1],G4Trk[0]);
304  }
305  G4TrkPt.push_back(sqrt(G4Trk[0]*G4Trk[0]+G4Trk[1]*G4Trk[1])); //GeV
306  G4TrkE.push_back(G4Trk[3]); //GeV
307  G4TrkEta.push_back(etaInit);
308  G4TrkPhi.push_back(phiInit);
309  }
310 
311  if (verbosity > 1) {
312  eventout += "\n Number of G4Tracks collected: ";
313  eventout += i;
314  }
315 
316  if (verbosity > 0)
317  edm::LogInfo("TrackerHitProducer::fillG4MC") << eventout;
318 
319  return;
320 }
321 
323 {
324 
325  if (verbosity > 2) {
326  TString eventout("\nnRawGenPart = ");
327  eventout += nRawGenPart;
328  eventout += "\n nG4Vtx = ";
329  eventout += G4VtxX.size();
330  for (unsigned int i = 0; i < G4VtxX.size(); ++i) {
331  eventout += "\n (x,y,z) = (";
332  eventout += G4VtxX[i];
333  eventout += ", ";
334  eventout += G4VtxY[i];
335  eventout += ", ";
336  eventout += G4VtxZ[i];
337  eventout += ")";
338  }
339  eventout += "\n nG4Trk = ";
340  eventout += G4TrkPt.size();
341  for (unsigned int i = 0; i < G4TrkPt.size(); ++i) {
342  eventout += "\n (pt,e,eta,phi) = (";
343  eventout += G4TrkPt[i];
344  eventout += ", ";
345  eventout += G4TrkE[i];
346  eventout += ")";
347  eventout += G4TrkEta[i];
348  eventout += ")";
349  eventout += G4TrkPhi[i];
350  eventout += ")";
351  }
352  edm::LogInfo("TrackerHitProducer::storeG4MC") << eventout;
353  } // end verbose output
354 
355  product.putRawGenPart(nRawGenPart);
356  product.putG4Vtx(G4VtxX, G4VtxY, G4VtxZ);
358 
359  return;
360 }
361 
363  const edm::EventSetup& iSetup)
364 {
365  TString eventout;
366  int sysID = 0;
367  if (verbosity > 0)
368  eventout = "\nGathering info:";
370  // iterator to access containers
371  edm::PSimHitContainer::const_iterator itHit;
372 // edm::PSimHitContainer theHits;
373 
375  // get Pixel Barrel information
377 
378  // extract low container
379  edm::Handle<edm::PSimHitContainer> PxlBrlLowContainer;
380  iEvent.getByToken( edmPSimHitContainer_pxlBrlLow_Token_, PxlBrlLowContainer );
381  if (!PxlBrlLowContainer.isValid()) {
382  edm::LogError("TrackerHitProducer::fillTrk")
383  << "Unable to find TrackerHitsPixelBarrelLowTof in event!";
384  return;
385  }
386 
387  // place both containers into new container
388 // theHits.insert(theHits.end(),PxlBrlLowContainer->begin(),
389 // PxlBrlLowContainer->end());
390 
391  sysID = 100; // TrackerHitsPixelBarrelLowTof
392  int j = 0;
393  for (itHit = PxlBrlLowContainer->begin(); itHit != PxlBrlLowContainer->end(); ++itHit) {
394 // for (itHit = theHits.begin(); itHit != theHits.end(); ++itHit) {
395 
396  // gather necessary information
397  ++j;
398  HitsSysID.push_back(sysID);
399  HitsDuID.push_back(itHit->detUnitId());
400  HitsTkID.push_back(itHit->trackId());
401  HitsProT.push_back(itHit->processType());
402  HitsParT.push_back(itHit->particleType());
403  HitsP.push_back(itHit->pabs());
404 
405  HitsLpX.push_back(itHit->localPosition().x());
406  HitsLpY.push_back(itHit->localPosition().y());
407  HitsLpZ.push_back(itHit->localPosition().z());
408 
409  HitsLdX.push_back(itHit->localDirection().x());
410  HitsLdY.push_back(itHit->localDirection().y());
411  HitsLdZ.push_back(itHit->localDirection().z());
412  HitsLdTheta.push_back(itHit->localDirection().theta());
413  HitsLdPhi.push_back(itHit->localDirection().phi());
414 
415  HitsExPx.push_back(itHit->exitPoint().x());
416  HitsExPy.push_back(itHit->exitPoint().y());
417  HitsExPz.push_back(itHit->exitPoint().z());
418 
419  HitsEnPx.push_back(itHit->entryPoint().x());
420  HitsEnPy.push_back(itHit->entryPoint().y());
421  HitsEnPz.push_back(itHit->entryPoint().z());
422 
423  HitsEloss.push_back(itHit->energyLoss());
424  HitsToF.push_back(itHit->tof());
425 
426  } // end loop through PxlBrl Hits
427 
428  if (verbosity > 1) {
429  eventout += "\n Number of Pixel Barrel Low TOF Hits collected: ";
430  eventout += j;
431  }
432 
433 // theHits.clear();
434 
435  // extract high container
436  edm::Handle<edm::PSimHitContainer> PxlBrlHighContainer;
437  iEvent.getByToken( edmPSimHitContainer_pxlBrlHigh_Token_, PxlBrlHighContainer );
438  if (!PxlBrlHighContainer.isValid()) {
439  edm::LogError("TrackerHitProducer::fillTrk")
440  << "Unable to find TrackerHitsPixelBarrelHighTof in event!";
441  return;
442  }
443 
444 
445  sysID = 200; // TrackerHitsPixelBarrelHighTof
446  j = 0;
447  for (itHit = PxlBrlHighContainer->begin(); itHit != PxlBrlHighContainer->end(); ++itHit) {
448 
449  // gather necessary information
450  ++j;
451  HitsSysID.push_back(sysID);
452  HitsDuID.push_back(itHit->detUnitId());
453  HitsTkID.push_back(itHit->trackId());
454  HitsProT.push_back(itHit->processType());
455  HitsParT.push_back(itHit->particleType());
456  HitsP.push_back(itHit->pabs());
457 
458  HitsLpX.push_back(itHit->localPosition().x());
459  HitsLpY.push_back(itHit->localPosition().y());
460  HitsLpZ.push_back(itHit->localPosition().z());
461 
462  HitsLdX.push_back(itHit->localDirection().x());
463  HitsLdY.push_back(itHit->localDirection().y());
464  HitsLdZ.push_back(itHit->localDirection().z());
465  HitsLdTheta.push_back(itHit->localDirection().theta());
466  HitsLdPhi.push_back(itHit->localDirection().phi());
467 
468  HitsExPx.push_back(itHit->exitPoint().x());
469  HitsExPy.push_back(itHit->exitPoint().y());
470  HitsExPz.push_back(itHit->exitPoint().z());
471 
472  HitsEnPx.push_back(itHit->entryPoint().x());
473  HitsEnPy.push_back(itHit->entryPoint().y());
474  HitsEnPz.push_back(itHit->entryPoint().z());
475 
476  HitsEloss.push_back(itHit->energyLoss());
477  HitsToF.push_back(itHit->tof());
478 
479  } // end loop through PxlBrl Hits
480 
481  if (verbosity > 1) {
482  eventout += "\n Number of Pixel Barrel High TOF Hits collected: ";
483  eventout += j;
484  }
485 
486 
488  // get Pixel Forward information
490  // extract low container
491  edm::Handle<edm::PSimHitContainer> PxlFwdLowContainer;
492  iEvent.getByToken( edmPSimHitContainer_pxlFwdLow_Token_, PxlFwdLowContainer );
493  if (!PxlFwdLowContainer.isValid()) {
494  edm::LogError("TrackerHitProducer::fillTrk")
495  << "Unable to find TrackerHitsPixelEndcapLowTof in event!";
496  return;
497  }
498 
499  sysID = 300; // TrackerHitsPixelEndcapLowTof
500  j = 0;
501  for (itHit = PxlFwdLowContainer->begin(); itHit != PxlFwdLowContainer->end(); ++itHit) {
502 
503  // gather necessary information
504  ++j;
505  HitsSysID.push_back(sysID);
506  HitsDuID.push_back(itHit->detUnitId());
507  HitsTkID.push_back(itHit->trackId());
508  HitsProT.push_back(itHit->processType());
509  HitsParT.push_back(itHit->particleType());
510  HitsP.push_back(itHit->pabs());
511 
512  HitsLpX.push_back(itHit->localPosition().x());
513  HitsLpY.push_back(itHit->localPosition().y());
514  HitsLpZ.push_back(itHit->localPosition().z());
515 
516  HitsLdX.push_back(itHit->localDirection().x());
517  HitsLdY.push_back(itHit->localDirection().y());
518  HitsLdZ.push_back(itHit->localDirection().z());
519  HitsLdTheta.push_back(itHit->localDirection().theta());
520  HitsLdPhi.push_back(itHit->localDirection().phi());
521 
522  HitsExPx.push_back(itHit->exitPoint().x());
523  HitsExPy.push_back(itHit->exitPoint().y());
524  HitsExPz.push_back(itHit->exitPoint().z());
525 
526  HitsEnPx.push_back(itHit->entryPoint().x());
527  HitsEnPy.push_back(itHit->entryPoint().y());
528  HitsEnPz.push_back(itHit->entryPoint().z());
529 
530  HitsEloss.push_back(itHit->energyLoss());
531  HitsToF.push_back(itHit->tof());
532 
533  } // end loop through PxlFwd Hits
534 
535  if (verbosity > 1) {
536  eventout += "\n Number of Pixel Forward Low TOF Hits collected: ";
537  eventout += j;
538  }
539 
540 
541  // extract high container
542  edm::Handle<edm::PSimHitContainer> PxlFwdHighContainer;
543  iEvent.getByToken( edmPSimHitContainer_pxlFwdHigh_Token_, PxlFwdHighContainer );
544  if (!PxlFwdHighContainer.isValid()) {
545  edm::LogError("TrackerHitProducer::fillTrk")
546  << "Unable to find TrackerHitsPixelEndcapHighTof in event!";
547  return;
548  }
549 
550  sysID = 400; // TrackerHitsPixelEndcapHighTof
551  j = 0;
552  for (itHit = PxlFwdHighContainer->begin(); itHit != PxlFwdHighContainer->end(); ++itHit) {
553 
554  // gather necessary information
555  ++j;
556  HitsSysID.push_back(sysID);
557  HitsDuID.push_back(itHit->detUnitId());
558  HitsTkID.push_back(itHit->trackId());
559  HitsProT.push_back(itHit->processType());
560  HitsParT.push_back(itHit->particleType());
561  HitsP.push_back(itHit->pabs());
562 
563  HitsLpX.push_back(itHit->localPosition().x());
564  HitsLpY.push_back(itHit->localPosition().y());
565  HitsLpZ.push_back(itHit->localPosition().z());
566 
567  HitsLdX.push_back(itHit->localDirection().x());
568  HitsLdY.push_back(itHit->localDirection().y());
569  HitsLdZ.push_back(itHit->localDirection().z());
570  HitsLdTheta.push_back(itHit->localDirection().theta());
571  HitsLdPhi.push_back(itHit->localDirection().phi());
572 
573  HitsExPx.push_back(itHit->exitPoint().x());
574  HitsExPy.push_back(itHit->exitPoint().y());
575  HitsExPz.push_back(itHit->exitPoint().z());
576 
577  HitsEnPx.push_back(itHit->entryPoint().x());
578  HitsEnPy.push_back(itHit->entryPoint().y());
579  HitsEnPz.push_back(itHit->entryPoint().z());
580 
581  HitsEloss.push_back(itHit->energyLoss());
582  HitsToF.push_back(itHit->tof());
583 
584  } // end loop through PxlFwd Hits
585 
586  if (verbosity > 1) {
587  eventout += "\n Number of Pixel Forward High TOF Hits collected: ";
588  eventout += j;
589  }
590 
591 
593  // get Silicon TIB information
595  // extract TIB low container
596  edm::Handle<edm::PSimHitContainer> SiTIBLowContainer;
597  iEvent.getByToken( edmPSimHitContainer_siTIBLow_Token_, SiTIBLowContainer );
598  if (!SiTIBLowContainer.isValid()) {
599  edm::LogError("TrackerHitProducer::fillTrk")
600  << "Unable to find TrackerHitsTIBLowTof in event!";
601  return;
602  }
603 
604  sysID = 10; // TrackerHitsTIBLowTof
605  j = 0;
606  for (itHit = SiTIBLowContainer->begin(); itHit != SiTIBLowContainer->end(); ++itHit) {
607 
608  // gather necessary information
609  ++j;
610  HitsSysID.push_back(sysID);
611  HitsDuID.push_back(itHit->detUnitId());
612  HitsTkID.push_back(itHit->trackId());
613  HitsProT.push_back(itHit->processType());
614  HitsParT.push_back(itHit->particleType());
615  HitsP.push_back(itHit->pabs());
616 
617  HitsLpX.push_back(itHit->localPosition().x());
618  HitsLpY.push_back(itHit->localPosition().y());
619  HitsLpZ.push_back(itHit->localPosition().z());
620 
621  HitsLdX.push_back(itHit->localDirection().x());
622  HitsLdY.push_back(itHit->localDirection().y());
623  HitsLdZ.push_back(itHit->localDirection().z());
624  HitsLdTheta.push_back(itHit->localDirection().theta());
625  HitsLdPhi.push_back(itHit->localDirection().phi());
626 
627  HitsExPx.push_back(itHit->exitPoint().x());
628  HitsExPy.push_back(itHit->exitPoint().y());
629  HitsExPz.push_back(itHit->exitPoint().z());
630 
631  HitsEnPx.push_back(itHit->entryPoint().x());
632  HitsEnPy.push_back(itHit->entryPoint().y());
633  HitsEnPz.push_back(itHit->entryPoint().z());
634 
635  HitsEloss.push_back(itHit->energyLoss());
636  HitsToF.push_back(itHit->tof());
637 
638  } // end loop through PxlFwd Hits
639 
640  if (verbosity > 1) {
641  eventout += "\n Number of TIB low TOF Hits collected: ";
642  eventout += j;
643  }
644 
645 
646  // extract TIB high container
647  edm::Handle<edm::PSimHitContainer> SiTIBHighContainer;
648  iEvent.getByToken( edmPSimHitContainer_siTIBHigh_Token_, SiTIBHighContainer );
649  if (!SiTIBHighContainer.isValid()) {
650  edm::LogError("TrackerHitProducer::fillTrk")
651  << "Unable to find TrackerHitsTIBHighTof in event!";
652  return;
653  }
654 
655  sysID = 20; // TrackerHitsTIBHighTof
656  j = 0;
657  for (itHit = SiTIBHighContainer->begin(); itHit != SiTIBHighContainer->end(); ++itHit) {
658 
659  // gather necessary information
660  ++j;
661  HitsSysID.push_back(sysID);
662  HitsDuID.push_back(itHit->detUnitId());
663  HitsTkID.push_back(itHit->trackId());
664  HitsProT.push_back(itHit->processType());
665  HitsParT.push_back(itHit->particleType());
666  HitsP.push_back(itHit->pabs());
667 
668  HitsLpX.push_back(itHit->localPosition().x());
669  HitsLpY.push_back(itHit->localPosition().y());
670  HitsLpZ.push_back(itHit->localPosition().z());
671 
672  HitsLdX.push_back(itHit->localDirection().x());
673  HitsLdY.push_back(itHit->localDirection().y());
674  HitsLdZ.push_back(itHit->localDirection().z());
675  HitsLdTheta.push_back(itHit->localDirection().theta());
676  HitsLdPhi.push_back(itHit->localDirection().phi());
677 
678  HitsExPx.push_back(itHit->exitPoint().x());
679  HitsExPy.push_back(itHit->exitPoint().y());
680  HitsExPz.push_back(itHit->exitPoint().z());
681 
682  HitsEnPx.push_back(itHit->entryPoint().x());
683  HitsEnPy.push_back(itHit->entryPoint().y());
684  HitsEnPz.push_back(itHit->entryPoint().z());
685 
686  HitsEloss.push_back(itHit->energyLoss());
687  HitsToF.push_back(itHit->tof());
688 
689  } // end loop through PxlFwd Hits
690 
691  if (verbosity > 1) {
692  eventout += "\n Number of TIB high TOF Hits collected: ";
693  eventout += j;
694  }
695 
697  // get Silicon TOB information
699  // extract TOB low container
700  edm::Handle<edm::PSimHitContainer> SiTOBLowContainer;
701  iEvent.getByToken( edmPSimHitContainer_siTOBLow_Token_, SiTOBLowContainer );
702  if (!SiTOBLowContainer.isValid()) {
703  edm::LogError("TrackerHitProducer::fillTrk")
704  << "Unable to find TrackerHitsTOBLowTof in event!";
705  return;
706  }
707 
708  sysID = 30; // TrackerHitsTOBLowTof
709  j = 0;
710  for (itHit = SiTOBLowContainer->begin(); itHit != SiTOBLowContainer->end(); ++itHit) {
711 
712  // gather necessary information
713  ++j;
714  HitsSysID.push_back(sysID);
715  HitsDuID.push_back(itHit->detUnitId());
716  HitsTkID.push_back(itHit->trackId());
717  HitsProT.push_back(itHit->processType());
718  HitsParT.push_back(itHit->particleType());
719  HitsP.push_back(itHit->pabs());
720 
721  HitsLpX.push_back(itHit->localPosition().x());
722  HitsLpY.push_back(itHit->localPosition().y());
723  HitsLpZ.push_back(itHit->localPosition().z());
724 
725  HitsLdX.push_back(itHit->localDirection().x());
726  HitsLdY.push_back(itHit->localDirection().y());
727  HitsLdZ.push_back(itHit->localDirection().z());
728  HitsLdTheta.push_back(itHit->localDirection().theta());
729  HitsLdPhi.push_back(itHit->localDirection().phi());
730 
731  HitsExPx.push_back(itHit->exitPoint().x());
732  HitsExPy.push_back(itHit->exitPoint().y());
733  HitsExPz.push_back(itHit->exitPoint().z());
734 
735  HitsEnPx.push_back(itHit->entryPoint().x());
736  HitsEnPy.push_back(itHit->entryPoint().y());
737  HitsEnPz.push_back(itHit->entryPoint().z());
738 
739  HitsEloss.push_back(itHit->energyLoss());
740  HitsToF.push_back(itHit->tof());
741 
742  } // end loop through PxlFwd Hits
743 
744  if (verbosity > 1) {
745  eventout += "\n Number of TOB low TOF Hits collected: ";
746  eventout += j;
747  }
748 
749  // extract TOB high container
750  edm::Handle<edm::PSimHitContainer> SiTOBHighContainer;
751  iEvent.getByToken( edmPSimHitContainer_siTOBHigh_Token_, SiTOBHighContainer );
752  if (!SiTOBHighContainer.isValid()) {
753  edm::LogError("TrackerHitProducer::fillTrk")
754  << "Unable to find TrackerHitsTOBHighTof in event!";
755  return;
756  }
757 
758  sysID = 40; // TrackerHitsTOBHighTof
759  j = 0;
760  for (itHit = SiTOBHighContainer->begin(); itHit != SiTOBHighContainer->end(); ++itHit) {
761 
762  // gather necessary information
763  ++j;
764  HitsSysID.push_back(sysID);
765  HitsDuID.push_back(itHit->detUnitId());
766  HitsTkID.push_back(itHit->trackId());
767  HitsProT.push_back(itHit->processType());
768  HitsParT.push_back(itHit->particleType());
769  HitsP.push_back(itHit->pabs());
770 
771  HitsLpX.push_back(itHit->localPosition().x());
772  HitsLpY.push_back(itHit->localPosition().y());
773  HitsLpZ.push_back(itHit->localPosition().z());
774 
775  HitsLdX.push_back(itHit->localDirection().x());
776  HitsLdY.push_back(itHit->localDirection().y());
777  HitsLdZ.push_back(itHit->localDirection().z());
778  HitsLdTheta.push_back(itHit->localDirection().theta());
779  HitsLdPhi.push_back(itHit->localDirection().phi());
780 
781  HitsExPx.push_back(itHit->exitPoint().x());
782  HitsExPy.push_back(itHit->exitPoint().y());
783  HitsExPz.push_back(itHit->exitPoint().z());
784 
785  HitsEnPx.push_back(itHit->entryPoint().x());
786  HitsEnPy.push_back(itHit->entryPoint().y());
787  HitsEnPz.push_back(itHit->entryPoint().z());
788 
789  HitsEloss.push_back(itHit->energyLoss());
790  HitsToF.push_back(itHit->tof());
791 
792  } // end loop through SiTOB Hits
793 
794  if (verbosity > 1) {
795  eventout += "\n Number of TOB high TOF Hits collected: ";
796  eventout += j;
797  }
798 
800  // get Silicon TID information
802  // extract TID low container
803  edm::Handle<edm::PSimHitContainer> SiTIDLowContainer;
804  iEvent.getByToken( edmPSimHitContainer_siTIDLow_Token_, SiTIDLowContainer );
805  if (!SiTIDLowContainer.isValid()) {
806  edm::LogError("TrackerHitProducer::fillTrk")
807  << "Unable to find TrackerHitsTIDLowTof in event!";
808  return;
809  }
810 
811  sysID = 50; // TrackerHitsTIDLowTof
812  j = 0;
813  for (itHit = SiTIDLowContainer->begin(); itHit != SiTIDLowContainer->end(); ++itHit) {
814 
815  // gather necessary information
816  ++j;
817  HitsSysID.push_back(sysID);
818  HitsDuID.push_back(itHit->detUnitId());
819  HitsTkID.push_back(itHit->trackId());
820  HitsProT.push_back(itHit->processType());
821  HitsParT.push_back(itHit->particleType());
822  HitsP.push_back(itHit->pabs());
823 
824  HitsLpX.push_back(itHit->localPosition().x());
825  HitsLpY.push_back(itHit->localPosition().y());
826  HitsLpZ.push_back(itHit->localPosition().z());
827 
828  HitsLdX.push_back(itHit->localDirection().x());
829  HitsLdY.push_back(itHit->localDirection().y());
830  HitsLdZ.push_back(itHit->localDirection().z());
831  HitsLdTheta.push_back(itHit->localDirection().theta());
832  HitsLdPhi.push_back(itHit->localDirection().phi());
833 
834  HitsExPx.push_back(itHit->exitPoint().x());
835  HitsExPy.push_back(itHit->exitPoint().y());
836  HitsExPz.push_back(itHit->exitPoint().z());
837 
838  HitsEnPx.push_back(itHit->entryPoint().x());
839  HitsEnPy.push_back(itHit->entryPoint().y());
840  HitsEnPz.push_back(itHit->entryPoint().z());
841 
842  HitsEloss.push_back(itHit->energyLoss());
843  HitsToF.push_back(itHit->tof());
844 
845  } // end loop through SiTID Hits
846 
847  if (verbosity > 1) {
848  eventout += "\n Number of TID low TOF Hits collected: ";
849  eventout += j;
850  }
851 
852  // extract TID high container
853  edm::Handle<edm::PSimHitContainer> SiTIDHighContainer;
854  iEvent.getByToken( edmPSimHitContainer_siTIDHigh_Token_, SiTIDHighContainer );
855  if (!SiTIDHighContainer.isValid()) {
856  edm::LogError("TrackerHitProducer::fillTrk")
857  << "Unable to find TrackerHitsTIDHighTof in event!";
858  return;
859  }
860 
861  sysID = 60; // TrackerHitsTIDHighTof
862  j = 0;
863  for (itHit = SiTIDHighContainer->begin(); itHit != SiTIDHighContainer->end(); ++itHit) {
864 
865  // gather necessary information
866  ++j;
867  HitsSysID.push_back(sysID);
868  HitsDuID.push_back(itHit->detUnitId());
869  HitsTkID.push_back(itHit->trackId());
870  HitsProT.push_back(itHit->processType());
871  HitsParT.push_back(itHit->particleType());
872  HitsP.push_back(itHit->pabs());
873 
874  HitsLpX.push_back(itHit->localPosition().x());
875  HitsLpY.push_back(itHit->localPosition().y());
876  HitsLpZ.push_back(itHit->localPosition().z());
877 
878  HitsLdX.push_back(itHit->localDirection().x());
879  HitsLdY.push_back(itHit->localDirection().y());
880  HitsLdZ.push_back(itHit->localDirection().z());
881  HitsLdTheta.push_back(itHit->localDirection().theta());
882  HitsLdPhi.push_back(itHit->localDirection().phi());
883 
884  HitsExPx.push_back(itHit->exitPoint().x());
885  HitsExPy.push_back(itHit->exitPoint().y());
886  HitsExPz.push_back(itHit->exitPoint().z());
887 
888  HitsEnPx.push_back(itHit->entryPoint().x());
889  HitsEnPy.push_back(itHit->entryPoint().y());
890  HitsEnPz.push_back(itHit->entryPoint().z());
891 
892  HitsEloss.push_back(itHit->energyLoss());
893  HitsToF.push_back(itHit->tof());
894 
895  } // end loop through SiTID Hits
896 
897  if (verbosity > 1) {
898  eventout += "\n Number of TID high TOF Hits collected: ";
899  eventout += j;
900  }
901 
903  // get Silicon TEC information
905  // extract TEC low container
906  edm::Handle<edm::PSimHitContainer> SiTECLowContainer;
907  iEvent.getByToken( edmPSimHitContainer_siTECLow_Token_, SiTECLowContainer );
908  if (!SiTECLowContainer.isValid()) {
909  edm::LogError("TrackerHitProducer::fillTrk")
910  << "Unable to find TrackerHitsTECLowTof in event!";
911  return;
912  }
913 
914  sysID = 70; // TrackerHitsTECLowTof
915  j = 0;
916  for (itHit = SiTECLowContainer->begin(); itHit != SiTECLowContainer->end(); ++itHit) {
917 
918  // gather necessary information
919  ++j;
920  HitsSysID.push_back(sysID);
921  HitsDuID.push_back(itHit->detUnitId());
922  HitsTkID.push_back(itHit->trackId());
923  HitsProT.push_back(itHit->processType());
924  HitsParT.push_back(itHit->particleType());
925  HitsP.push_back(itHit->pabs());
926 
927  HitsLpX.push_back(itHit->localPosition().x());
928  HitsLpY.push_back(itHit->localPosition().y());
929  HitsLpZ.push_back(itHit->localPosition().z());
930 
931  HitsLdX.push_back(itHit->localDirection().x());
932  HitsLdY.push_back(itHit->localDirection().y());
933  HitsLdZ.push_back(itHit->localDirection().z());
934  HitsLdTheta.push_back(itHit->localDirection().theta());
935  HitsLdPhi.push_back(itHit->localDirection().phi());
936 
937  HitsExPx.push_back(itHit->exitPoint().x());
938  HitsExPy.push_back(itHit->exitPoint().y());
939  HitsExPz.push_back(itHit->exitPoint().z());
940 
941  HitsEnPx.push_back(itHit->entryPoint().x());
942  HitsEnPy.push_back(itHit->entryPoint().y());
943  HitsEnPz.push_back(itHit->entryPoint().z());
944 
945  HitsEloss.push_back(itHit->energyLoss());
946  HitsToF.push_back(itHit->tof());
947 
948  } // end loop through SiTEC Hits
949 
950  if (verbosity > 1) {
951  eventout += "\n Number of TEC low TOF Hits collected: ";
952  eventout += j;
953  }
954 
955 
956  // extract TEC high container
957  edm::Handle<edm::PSimHitContainer> SiTECHighContainer;
958  iEvent.getByToken( edmPSimHitContainer_siTECHigh_Token_, SiTECHighContainer );
959  if (!SiTECHighContainer.isValid()) {
960  edm::LogError("TrackerHitProducer::fillTrk")
961  << "Unable to find TrackerHitsTECHighTof in event!";
962  return;
963  }
964  sysID = 80; // TrackerHitsTECHighTof
965  j = 0;
966  for (itHit = SiTECHighContainer->begin(); itHit != SiTECHighContainer->end(); ++itHit) {
967 
968  // gather necessary information
969  ++j;
970  HitsSysID.push_back(sysID);
971  HitsDuID.push_back(itHit->detUnitId());
972  HitsTkID.push_back(itHit->trackId());
973  HitsProT.push_back(itHit->processType());
974  HitsParT.push_back(itHit->particleType());
975  HitsP.push_back(itHit->pabs());
976 
977  HitsLpX.push_back(itHit->localPosition().x());
978  HitsLpY.push_back(itHit->localPosition().y());
979  HitsLpZ.push_back(itHit->localPosition().z());
980 
981  HitsLdX.push_back(itHit->localDirection().x());
982  HitsLdY.push_back(itHit->localDirection().y());
983  HitsLdZ.push_back(itHit->localDirection().z());
984  HitsLdTheta.push_back(itHit->localDirection().theta());
985  HitsLdPhi.push_back(itHit->localDirection().phi());
986 
987  HitsExPx.push_back(itHit->exitPoint().x());
988  HitsExPy.push_back(itHit->exitPoint().y());
989  HitsExPz.push_back(itHit->exitPoint().z());
990 
991  HitsEnPx.push_back(itHit->entryPoint().x());
992  HitsEnPy.push_back(itHit->entryPoint().y());
993  HitsEnPz.push_back(itHit->entryPoint().z());
994 
995  HitsEloss.push_back(itHit->energyLoss());
996  HitsToF.push_back(itHit->tof());
997 
998  } // end loop through SiTEC Hits
999 
1000  if (verbosity > 1) {
1001  eventout += "\n Number of TEC high TOF Hits collected: ";
1002  eventout += j;
1003  }
1004 
1005  if (verbosity > 0)
1006  edm::LogInfo("TrackerHitProducer::fillTrk") << eventout;
1007 
1008  return;
1009 }
1010 
1012 {
1013 
1014 /*
1015  if (verbosity > 2) {
1016  TString eventout("\nnPxlBrlHits = ");
1017  eventout += PxlBrlToF.size();
1018  for (unsigned int i = 0; i < PxlBrlToF.size(); ++i) {
1019  eventout += "\n (tof,r,phi,eta) = (";
1020  eventout += PxlBrlToF[i];
1021  eventout += ", ";
1022  eventout += PxlBrlR[i];
1023  eventout += ", ";
1024  eventout += PxlBrlPhi[i];
1025  eventout += ", ";
1026  eventout += PxlBrlEta[i];
1027  eventout += ")";
1028  } // end PxlBrl output
1029  eventout += "\n nPxlFwdHits = ";
1030  eventout += PxlFwdToF.size();
1031  for (unsigned int i = 0; i < PxlFwdToF.size(); ++i) {
1032  eventout += "\n (tof,z,phi,eta) = (";
1033  eventout += PxlFwdToF[i];
1034  eventout += ", ";
1035  eventout += PxlFwdZ[i];
1036  eventout += ", ";
1037  eventout += PxlFwdPhi[i];
1038  eventout += ", ";
1039  eventout += PxlFwdEta[i];
1040  eventout += ")";
1041  } // end PxlFwd output
1042  eventout += "\n nSiBrlHits = ";
1043  eventout += SiBrlToF.size();
1044  for (unsigned int i = 0; i < SiBrlToF.size(); ++i) {
1045  eventout += "\n (tof,r,phi,eta) = (";
1046  eventout += SiBrlToF[i];
1047  eventout += ", ";
1048  eventout += SiBrlR[i];
1049  eventout += ", ";
1050  eventout += SiBrlPhi[i];
1051  eventout += ", ";
1052  eventout += SiBrlEta[i];
1053  eventout += ")";
1054  } // end SiBrl output
1055  eventout += "\n nSiFwdHits = ";
1056  eventout += SiFwdToF.size();
1057  for (unsigned int i = 0; i < SiFwdToF.size(); ++i) {
1058  eventout += "\n (tof,z,phi,eta) = (";
1059  eventout += SiFwdToF[i];
1060  eventout += ", ";
1061  eventout += SiFwdZ[i];
1062  eventout += ", ";
1063  eventout += SiFwdPhi[i];
1064  eventout += ", ";
1065  eventout += SiFwdEta[i];
1066  eventout += ")";
1067  } // end SiFwd output
1068  edm::LogInfo("TrackerHitProducer::storeTrk") << eventout;
1069  } // end verbose output
1070 */
1072  HitsLpX, HitsLpY, HitsLpZ,
1076  HitsEloss, HitsToF);
1077 
1078  return;
1079 }
1080 
1082 {
1083  if (verbosity > 0)
1084  edm::LogInfo("GlobalValProducer::clear")
1085  << "Clearing event holders";
1086 
1087  // reset G4MC info
1088  nRawGenPart = 0;
1089  G4VtxX.clear();
1090  G4VtxY.clear();
1091  G4VtxZ.clear();
1092  G4TrkPt.clear();
1093  G4TrkE.clear();
1094  G4TrkEta.clear();
1095  G4TrkPhi.clear();
1096  // reset tracker info
1097  HitsSysID.clear();
1098  HitsDuID.clear();
1099  HitsTkID.clear();
1100  HitsProT.clear();
1101  HitsParT.clear();
1102  HitsP.clear();
1103  HitsLpX.clear();
1104  HitsLpY.clear();
1105  HitsLpZ.clear();
1106  HitsLdX.clear();
1107  HitsLdY.clear();
1108  HitsLdZ.clear();
1109  HitsLdTheta.clear();
1110  HitsLdPhi.clear();
1111  HitsExPx.clear();
1112  HitsExPy.clear();
1113  HitsExPz.clear();
1114  HitsEnPx.clear();
1115  HitsEnPy.clear();
1116  HitsEnPz.clear();
1117  HitsEloss.clear();
1118  HitsToF.clear();
1119 
1120  return;
1121 }
1122 
1123 //define this as a plug-in
RunNumber_t run() const
Definition: EventID.h:39
void fillG4MC(edm::Event &)
void storeTrk(PTrackerSimHit &)
T getParameter(std::string const &) const
EventNumber_t event() const
Definition: EventID.h:41
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
void storeG4MC(PTrackerSimHit &)
static PFTauRenderPlugin instance
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
void putRawGenPart(int n)
Geom::Theta< T > theta() const
unsigned long long EventNumber_t
void beginJob() override
T Min(T a, T b)
Definition: MathUtil.h:39
void putHits(const std::vector< int > &_sysID, const std::vector< float > &_detUnitId, const std::vector< float > &_trackId, const std::vector< float > &_processType, const std::vector< float > &_particleType, const std::vector< float > &_pabs, const std::vector< float > &_lpx, const std::vector< float > &_lpy, const std::vector< float > &_lpz, const std::vector< float > &_ldx, const std::vector< float > &_ldy, const std::vector< float > &_ldz, const std::vector< float > &_ldtheta, const std::vector< float > &_ldphi, const std::vector< float > &_exx, const std::vector< float > &_exy, const std::vector< float > &_exz, const std::vector< float > &_enx, const std::vector< float > &_eny, const std::vector< float > &_enz, const std::vector< float > &_eloss, const std::vector< float > &_tof)
TrackerHitProducer(const edm::ParameterSet &)
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTECHigh_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTOBLow_Token_
int iEvent
Definition: GenABIO.cc:230
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTIBLow_Token_
T sqrt(T t)
Definition: SSEVec.h:18
edm::EDGetTokenT< edm::HepMCProduct > edmHepMCProductToken_
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_pxlBrlHigh_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTIDLow_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_pxlFwdLow_Token_
void putG4Vtx(const std::vector< float > &x, const std::vector< float > &y, const std::vector< float > &z)
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTIBHigh_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTIDHigh_Token_
T Max(T a, T b)
Definition: MathUtil.h:44
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:38
std::vector< SimVertex > SimVertexContainer
edm::EventID id() const
Definition: EventBase.h:60
IntegerVector HitsSysID
HLT enums.
void endJob() override
edm::EDGetTokenT< edm::SimVertexContainer > edmSimVertexContainerToken_
std::vector< PSimHit > PSimHitContainer
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTOBHigh_Token_
unsigned int RunNumber_t
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTECLow_Token_
std::vector< SimTrack > SimTrackContainer
void putG4Trk(const std::vector< float > &pt, const std::vector< float > &e, const std::vector< float > &eta, const std::vector< float > &phi)
void fillTrk(edm::Event &, const edm::EventSetup &)
def move(src, dest)
Definition: eostools.py:510
edm::EDGetTokenT< edm::SimTrackContainer > edmSimTrackContainerToken_
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_pxlFwdHigh_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_pxlBrlLow_Token_
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
Definition: Event.cc:144