27 #include <CLHEP/Vector/LorentzVector.h>
28 #include "CLHEP/Units/GlobalSystemOfUnits.h"
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 ) )
43 , edmHepMCProductToken_( consumes<edm::
HepMCProduct>( edm::
InputTag( iPSet.getUntrackedParameter<std::
string>(
"HepMCProductLabel",
"source" )
44 , iPSet.getUntrackedParameter<std::
string>(
"HepMCInputInstance",
"" )
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" ) )
70 produces<PTrackerSimHit>(
label);
75 <<
"\n===============================\n"
76 <<
"Initialized as EDProducer with parameter values:\n"
77 <<
" Name =" <<
fName <<
"\n"
79 <<
" Label =" <<
label <<
"\n"
106 <<
"===============================\n"; }
117 <<
"Starting the job...";
126 <<
"Terminating having processed" <<
count <<
"events.";
146 <<
"Processing run" << nrun <<
"," <<
"event " << nevt;
155 std::vector<const edm::Provenance*> AllProv;
160 <<
"Number of Provenances =" << AllProv.size();
163 TString eventout(
"\nProvenance info:\n");
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();
180 eventout +=
" ******************************\n";
181 edm::LogInfo(
"TrackerHitProducer::produce") << eventout;
193 <<
"Done gathering data from event.";
200 <<
"Saving event contents:";
220 eventout =
"\nGathering info:";
229 <<
"Unable to find HepMCProduct in event!";
236 eventout +=
"\n Number of Raw Particles collected: ";
245 if (!G4VtxContainer.
isValid()) {
247 <<
"Unable to find SimVertex in event!";
251 edm::SimVertexContainer::const_iterator itVtx;
252 for (itVtx = G4VtxContainer->begin(); itVtx != G4VtxContainer->end();
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);
262 G4VtxY.push_back(G4Vtx[1]/micrometer);
263 G4VtxZ.push_back(G4Vtx[2]/millimeter);
267 eventout +=
"\n Number of G4Vertices collected: ";
276 if (!G4TrkContainer.
isValid()) {
278 <<
"Unable to find SimTrack in event!";
282 edm::SimTrackContainer::const_iterator itTrk;
283 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
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]);
296 <<
"TrackerTest::INFO: Primary has p = 0 ";
298 double costheta = G4Trk[2]/pInit;
300 etaInit = -
log(
tan(theta/2));
302 if ( G4Trk[0] != 0 || G4Trk[1] != 0)
303 phiInit = atan2(G4Trk[1],G4Trk[0]);
305 G4TrkPt.push_back(
sqrt(G4Trk[0]*G4Trk[0]+G4Trk[1]*G4Trk[1]));
306 G4TrkE.push_back(G4Trk[3]);
312 eventout +=
"\n Number of G4Tracks collected: ";
317 edm::LogInfo(
"TrackerHitProducer::fillG4MC") << eventout;
326 TString eventout(
"\nnRawGenPart = ");
328 eventout +=
"\n nG4Vtx = ";
329 eventout +=
G4VtxX.size();
330 for (
unsigned int i = 0;
i <
G4VtxX.size(); ++
i) {
331 eventout +=
"\n (x,y,z) = (";
339 eventout +=
"\n nG4Trk = ";
341 for (
unsigned int i = 0;
i <
G4TrkPt.size(); ++
i) {
342 eventout +=
"\n (pt,e,eta,phi) = (";
352 edm::LogInfo(
"TrackerHitProducer::storeG4MC") << eventout;
368 eventout =
"\nGathering info:";
371 edm::PSimHitContainer::const_iterator itHit;
381 if (!PxlBrlLowContainer.
isValid()) {
383 <<
"Unable to find TrackerHitsPixelBarrelLowTof in event!";
393 for (itHit = PxlBrlLowContainer->begin(); itHit != PxlBrlLowContainer->end(); ++itHit) {
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());
405 HitsLpX.push_back(itHit->localPosition().x());
406 HitsLpY.push_back(itHit->localPosition().y());
407 HitsLpZ.push_back(itHit->localPosition().z());
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());
415 HitsExPx.push_back(itHit->exitPoint().x());
416 HitsExPy.push_back(itHit->exitPoint().y());
417 HitsExPz.push_back(itHit->exitPoint().z());
419 HitsEnPx.push_back(itHit->entryPoint().x());
420 HitsEnPy.push_back(itHit->entryPoint().y());
421 HitsEnPz.push_back(itHit->entryPoint().z());
423 HitsEloss.push_back(itHit->energyLoss());
424 HitsToF.push_back(itHit->tof());
429 eventout +=
"\n Number of Pixel Barrel Low TOF Hits collected: ";
438 if (!PxlBrlHighContainer.
isValid()) {
440 <<
"Unable to find TrackerHitsPixelBarrelHighTof in event!";
447 for (itHit = PxlBrlHighContainer->begin(); itHit != PxlBrlHighContainer->end(); ++itHit) {
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());
458 HitsLpX.push_back(itHit->localPosition().x());
459 HitsLpY.push_back(itHit->localPosition().y());
460 HitsLpZ.push_back(itHit->localPosition().z());
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());
468 HitsExPx.push_back(itHit->exitPoint().x());
469 HitsExPy.push_back(itHit->exitPoint().y());
470 HitsExPz.push_back(itHit->exitPoint().z());
472 HitsEnPx.push_back(itHit->entryPoint().x());
473 HitsEnPy.push_back(itHit->entryPoint().y());
474 HitsEnPz.push_back(itHit->entryPoint().z());
476 HitsEloss.push_back(itHit->energyLoss());
477 HitsToF.push_back(itHit->tof());
482 eventout +=
"\n Number of Pixel Barrel High TOF Hits collected: ";
493 if (!PxlFwdLowContainer.
isValid()) {
495 <<
"Unable to find TrackerHitsPixelEndcapLowTof in event!";
501 for (itHit = PxlFwdLowContainer->begin(); itHit != PxlFwdLowContainer->end(); ++itHit) {
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());
512 HitsLpX.push_back(itHit->localPosition().x());
513 HitsLpY.push_back(itHit->localPosition().y());
514 HitsLpZ.push_back(itHit->localPosition().z());
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());
522 HitsExPx.push_back(itHit->exitPoint().x());
523 HitsExPy.push_back(itHit->exitPoint().y());
524 HitsExPz.push_back(itHit->exitPoint().z());
526 HitsEnPx.push_back(itHit->entryPoint().x());
527 HitsEnPy.push_back(itHit->entryPoint().y());
528 HitsEnPz.push_back(itHit->entryPoint().z());
530 HitsEloss.push_back(itHit->energyLoss());
531 HitsToF.push_back(itHit->tof());
536 eventout +=
"\n Number of Pixel Forward Low TOF Hits collected: ";
544 if (!PxlFwdHighContainer.
isValid()) {
546 <<
"Unable to find TrackerHitsPixelEndcapHighTof in event!";
552 for (itHit = PxlFwdHighContainer->begin(); itHit != PxlFwdHighContainer->end(); ++itHit) {
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());
563 HitsLpX.push_back(itHit->localPosition().x());
564 HitsLpY.push_back(itHit->localPosition().y());
565 HitsLpZ.push_back(itHit->localPosition().z());
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());
573 HitsExPx.push_back(itHit->exitPoint().x());
574 HitsExPy.push_back(itHit->exitPoint().y());
575 HitsExPz.push_back(itHit->exitPoint().z());
577 HitsEnPx.push_back(itHit->entryPoint().x());
578 HitsEnPy.push_back(itHit->entryPoint().y());
579 HitsEnPz.push_back(itHit->entryPoint().z());
581 HitsEloss.push_back(itHit->energyLoss());
582 HitsToF.push_back(itHit->tof());
587 eventout +=
"\n Number of Pixel Forward High TOF Hits collected: ";
598 if (!SiTIBLowContainer.
isValid()) {
600 <<
"Unable to find TrackerHitsTIBLowTof in event!";
606 for (itHit = SiTIBLowContainer->begin(); itHit != SiTIBLowContainer->end(); ++itHit) {
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());
617 HitsLpX.push_back(itHit->localPosition().x());
618 HitsLpY.push_back(itHit->localPosition().y());
619 HitsLpZ.push_back(itHit->localPosition().z());
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());
627 HitsExPx.push_back(itHit->exitPoint().x());
628 HitsExPy.push_back(itHit->exitPoint().y());
629 HitsExPz.push_back(itHit->exitPoint().z());
631 HitsEnPx.push_back(itHit->entryPoint().x());
632 HitsEnPy.push_back(itHit->entryPoint().y());
633 HitsEnPz.push_back(itHit->entryPoint().z());
635 HitsEloss.push_back(itHit->energyLoss());
636 HitsToF.push_back(itHit->tof());
641 eventout +=
"\n Number of TIB low TOF Hits collected: ";
649 if (!SiTIBHighContainer.
isValid()) {
651 <<
"Unable to find TrackerHitsTIBHighTof in event!";
657 for (itHit = SiTIBHighContainer->begin(); itHit != SiTIBHighContainer->end(); ++itHit) {
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());
668 HitsLpX.push_back(itHit->localPosition().x());
669 HitsLpY.push_back(itHit->localPosition().y());
670 HitsLpZ.push_back(itHit->localPosition().z());
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());
678 HitsExPx.push_back(itHit->exitPoint().x());
679 HitsExPy.push_back(itHit->exitPoint().y());
680 HitsExPz.push_back(itHit->exitPoint().z());
682 HitsEnPx.push_back(itHit->entryPoint().x());
683 HitsEnPy.push_back(itHit->entryPoint().y());
684 HitsEnPz.push_back(itHit->entryPoint().z());
686 HitsEloss.push_back(itHit->energyLoss());
687 HitsToF.push_back(itHit->tof());
692 eventout +=
"\n Number of TIB high TOF Hits collected: ";
702 if (!SiTOBLowContainer.
isValid()) {
704 <<
"Unable to find TrackerHitsTOBLowTof in event!";
710 for (itHit = SiTOBLowContainer->begin(); itHit != SiTOBLowContainer->end(); ++itHit) {
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());
721 HitsLpX.push_back(itHit->localPosition().x());
722 HitsLpY.push_back(itHit->localPosition().y());
723 HitsLpZ.push_back(itHit->localPosition().z());
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());
731 HitsExPx.push_back(itHit->exitPoint().x());
732 HitsExPy.push_back(itHit->exitPoint().y());
733 HitsExPz.push_back(itHit->exitPoint().z());
735 HitsEnPx.push_back(itHit->entryPoint().x());
736 HitsEnPy.push_back(itHit->entryPoint().y());
737 HitsEnPz.push_back(itHit->entryPoint().z());
739 HitsEloss.push_back(itHit->energyLoss());
740 HitsToF.push_back(itHit->tof());
745 eventout +=
"\n Number of TOB low TOF Hits collected: ";
752 if (!SiTOBHighContainer.
isValid()) {
754 <<
"Unable to find TrackerHitsTOBHighTof in event!";
760 for (itHit = SiTOBHighContainer->begin(); itHit != SiTOBHighContainer->end(); ++itHit) {
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());
771 HitsLpX.push_back(itHit->localPosition().x());
772 HitsLpY.push_back(itHit->localPosition().y());
773 HitsLpZ.push_back(itHit->localPosition().z());
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());
781 HitsExPx.push_back(itHit->exitPoint().x());
782 HitsExPy.push_back(itHit->exitPoint().y());
783 HitsExPz.push_back(itHit->exitPoint().z());
785 HitsEnPx.push_back(itHit->entryPoint().x());
786 HitsEnPy.push_back(itHit->entryPoint().y());
787 HitsEnPz.push_back(itHit->entryPoint().z());
789 HitsEloss.push_back(itHit->energyLoss());
790 HitsToF.push_back(itHit->tof());
795 eventout +=
"\n Number of TOB high TOF Hits collected: ";
805 if (!SiTIDLowContainer.
isValid()) {
807 <<
"Unable to find TrackerHitsTIDLowTof in event!";
813 for (itHit = SiTIDLowContainer->begin(); itHit != SiTIDLowContainer->end(); ++itHit) {
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());
824 HitsLpX.push_back(itHit->localPosition().x());
825 HitsLpY.push_back(itHit->localPosition().y());
826 HitsLpZ.push_back(itHit->localPosition().z());
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());
834 HitsExPx.push_back(itHit->exitPoint().x());
835 HitsExPy.push_back(itHit->exitPoint().y());
836 HitsExPz.push_back(itHit->exitPoint().z());
838 HitsEnPx.push_back(itHit->entryPoint().x());
839 HitsEnPy.push_back(itHit->entryPoint().y());
840 HitsEnPz.push_back(itHit->entryPoint().z());
842 HitsEloss.push_back(itHit->energyLoss());
843 HitsToF.push_back(itHit->tof());
848 eventout +=
"\n Number of TID low TOF Hits collected: ";
855 if (!SiTIDHighContainer.
isValid()) {
857 <<
"Unable to find TrackerHitsTIDHighTof in event!";
863 for (itHit = SiTIDHighContainer->begin(); itHit != SiTIDHighContainer->end(); ++itHit) {
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());
874 HitsLpX.push_back(itHit->localPosition().x());
875 HitsLpY.push_back(itHit->localPosition().y());
876 HitsLpZ.push_back(itHit->localPosition().z());
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());
884 HitsExPx.push_back(itHit->exitPoint().x());
885 HitsExPy.push_back(itHit->exitPoint().y());
886 HitsExPz.push_back(itHit->exitPoint().z());
888 HitsEnPx.push_back(itHit->entryPoint().x());
889 HitsEnPy.push_back(itHit->entryPoint().y());
890 HitsEnPz.push_back(itHit->entryPoint().z());
892 HitsEloss.push_back(itHit->energyLoss());
893 HitsToF.push_back(itHit->tof());
898 eventout +=
"\n Number of TID high TOF Hits collected: ";
908 if (!SiTECLowContainer.
isValid()) {
910 <<
"Unable to find TrackerHitsTECLowTof in event!";
916 for (itHit = SiTECLowContainer->begin(); itHit != SiTECLowContainer->end(); ++itHit) {
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());
927 HitsLpX.push_back(itHit->localPosition().x());
928 HitsLpY.push_back(itHit->localPosition().y());
929 HitsLpZ.push_back(itHit->localPosition().z());
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());
937 HitsExPx.push_back(itHit->exitPoint().x());
938 HitsExPy.push_back(itHit->exitPoint().y());
939 HitsExPz.push_back(itHit->exitPoint().z());
941 HitsEnPx.push_back(itHit->entryPoint().x());
942 HitsEnPy.push_back(itHit->entryPoint().y());
943 HitsEnPz.push_back(itHit->entryPoint().z());
945 HitsEloss.push_back(itHit->energyLoss());
946 HitsToF.push_back(itHit->tof());
951 eventout +=
"\n Number of TEC low TOF Hits collected: ";
959 if (!SiTECHighContainer.
isValid()) {
961 <<
"Unable to find TrackerHitsTECHighTof in event!";
966 for (itHit = SiTECHighContainer->begin(); itHit != SiTECHighContainer->end(); ++itHit) {
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());
977 HitsLpX.push_back(itHit->localPosition().x());
978 HitsLpY.push_back(itHit->localPosition().y());
979 HitsLpZ.push_back(itHit->localPosition().z());
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());
987 HitsExPx.push_back(itHit->exitPoint().x());
988 HitsExPy.push_back(itHit->exitPoint().y());
989 HitsExPz.push_back(itHit->exitPoint().z());
991 HitsEnPx.push_back(itHit->entryPoint().x());
992 HitsEnPy.push_back(itHit->entryPoint().y());
993 HitsEnPz.push_back(itHit->entryPoint().z());
995 HitsEloss.push_back(itHit->energyLoss());
996 HitsToF.push_back(itHit->tof());
1001 eventout +=
"\n Number of TEC high TOF Hits collected: ";
1006 edm::LogInfo(
"TrackerHitProducer::fillTrk") << eventout;
1085 <<
"Clearing event holders";
void fillG4MC(edm::Event &)
void storeTrk(PTrackerSimHit &)
T getParameter(std::string const &) const
EventNumber_t event() const
void getAllProvenance(std::vector< Provenance const * > &provenances) const
void storeG4MC(PTrackerSimHit &)
static PFTauRenderPlugin instance
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void putRawGenPart(int n)
Geom::Theta< T > theta() const
unsigned long long EventNumber_t
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)
virtual void produce(edm::Event &, const edm::EventSetup &)
TrackerHitProducer(const edm::ParameterSet &)
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTECHigh_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTOBLow_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTIBLow_Token_
virtual ~TrackerHitProducer()
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< edm::HepMCProduct > edmHepMCProductToken_
Tan< T >::type tan(const T &t)
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)
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTIBHigh_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTIDHigh_Token_
std::vector< SimVertex > SimVertexContainer
edm::EDGetTokenT< edm::SimVertexContainer > edmSimVertexContainerToken_
std::vector< PSimHit > PSimHitContainer
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTOBHigh_Token_
volatile std::atomic< bool > shutdown_flag false
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 &)
edm::EDGetTokenT< edm::SimTrackContainer > edmSimTrackContainerToken_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_pxlFwdHigh_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_pxlBrlLow_Token_