ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FastOpenGlDisplayer/src/Frog_Analyzer.cc
(Generate patch)

Comparing UserCode/FastOpenGlDisplayer/src/Frog_Analyzer.cc (file contents):
Revision 1.13 by roberfro, Tue Jun 24 09:20:38 2008 UTC vs.
Revision 1.19 by querten, Tue Jul 1 12:51:37 2008 UTC

# Line 124 | Line 124
124   #include "Visualisation/Frog/soft/Includes/FROG/FROG_Geometry.cpp"
125  
126   #include "Visualisation/Frog/soft/Includes/FROG/FROG_DetId.h"
127 + #include "Visualisation/Frog/soft/Includes/FROG/FROG_ReadCards.cpp"
128  
129  
130   using namespace edm;
# Line 144 | Line 145 | class Frog_Analyzer : public edm::EDAnal
145        virtual void analyze (const edm::Event&, const edm::EventSetup&);
146        virtual void endJob  ();
147  
148 <      FROG_Events*          events;
148 <      FROG_Element_Base*    event_prim;
148 >      FROG_Element_Base*    events_prim;
149  
150        std::string           OutputFile;
151  
# Line 684 | Line 684 | Frog_Analyzer::beginJob(const edm::Event
684  
685     // ### Save .geom ###
686  
687 <   Geometry* CMS_Geom = new Geometry(prim);
687 >   FROG_Geometry* CMS_Geom = new FROG_Geometry(prim);
688     CMS_Geom->Save("CMS.geom");  
689  
690 <   event_prim = new FROG_Element_Base(C_PRIMARY);  
691 <   events     = new FROG_Events(event_prim);
692 <
690 >   events_prim = new FROG_Element_Base(C_PRIMARY);  
691   }
692  
693   // ------------ method called once each job just after ending the event loop  ------------
694   void
695   Frog_Analyzer::endJob()
696   {
697 <     events->Save((char*) OutputFile.c_str());
697 >   FROG_Events* events = new FROG_Events(events_prim);
698 >   events->Save((char*) OutputFile.c_str());
699   }
700  
701  
# Line 709 | Line 708 | Frog_Analyzer::endJob()
708   void
709   Frog_Analyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
710   {
711 <        FROG_Event* event =  new FROG_Event();
711 >        FROG_Element_Event* event =  new FROG_Element_Event();
712 >        events_prim->addDaughter(event);
713  
714          // access the tracker
715          edm::ESHandle<TrackerGeometry> tkGeom;
# Line 725 | Line 725 | Frog_Analyzer::analyze(const edm::Event&
725          iSetup.get<MuonGeometryRecord>().get( RpcGeom );
726  
727  
728 +
729 +           edm::Handle<std::vector< SimVertex > > h_Vertex2;
730 +           iEvent.getByLabel(SimVertexProducers[0], h_Vertex2);
731 +           std::vector< SimVertex > VertexColl2 = *h_Vertex2.product();
732 +
733 +
734          // Save Data
735          // ### SIMTRACK ###
736          for(unsigned int i=0;i<SimTrackProducers.size();i++){
# Line 732 | Line 738 | Frog_Analyzer::analyze(const edm::Event&
738             iEvent.getByLabel(SimTrackProducers[i], h_SimTracks);
739             std::vector< SimTrack > SimTrackColl = *h_SimTracks.product();
740  
741 +           FROG_Element_Base_With_DetId* frogSimTrkColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_SIMTRK + i);
742 +           event->addDaughter(frogSimTrkColl);
743 +
744             for ( unsigned int a = 0; a < SimTrackColl.size(); ++a ) {
745                  SimTrack    simTrack    =SimTrackColl[a];
746  
# Line 739 | Line 748 | Frog_Analyzer::analyze(const edm::Event&
748                          simTrack.momentum().x(),     simTrack.momentum().y(),     simTrack.momentum().z(),
749                          simTrack.momentum().e(),     simTrack.type(),             simTrack.vertIndex(),
750                          simTrack.charge() );
751 +                frogSimTrkColl->addDaughter(frogSimTrk);
752 +
753 +                printf("Track %+05i --> Pt=%6.2f\n",simTrack.trackId(),simTrack.momentum().perp());
754 +                printf("Track %+05i --> Vertex1 = %6.2f %6.2f %6.2f\n",simTrack.trackId(),VertexColl2[simTrack.vertIndex()].position().x(),VertexColl2[simTrack.vertIndex()].position().y(),VertexColl2[simTrack.vertIndex()].position().z());
755 + //                for(unsigned int v=0;v<VertexColl2.size();v++){
756 + //                 if()
757 + //                }
758 +
759  
743                event->addSimTrack( frogSimTrk );
744 //              MyEvent->MySimTrackCollection.push_back(MysimTrack);
760             }      
761          }
762  
# Line 751 | Line 766 | Frog_Analyzer::analyze(const edm::Event&
766             iEvent.getByLabel(SimVertexProducers[i], h_Vertex);
767             std::vector< SimVertex > VertexColl = *h_Vertex.product();
768  
769 +           FROG_Element_Base_With_DetId* frogSimVtxColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_SIMVTX + i);
770 +           event->addDaughter(frogSimVtxColl);
771 +
772             for (unsigned int b = 0; b < VertexColl.size(); ++b ) {
773                  SimVertex       Vertex  =  VertexColl[b];
774  
# Line 758 | Line 776 | Frog_Analyzer::analyze(const edm::Event&
776                          Vertex.position().x(),  Vertex.position().y(),  Vertex.position().z(),
777                          Vertex.parentIndex());
778  
779 <                event->addSimVertex(frogSimVtx);
779 >                frogSimVtxColl->addDaughter(frogSimVtx);
780             }
781          }
782  
783  
784          // ### SIMHIT ###
785 < /*
785 >
786          for(unsigned int i=0;i<SimHitProducers.size();i++){
787             edm::Handle<std::vector< PSimHit > > h_Hits;
788             iEvent.getByLabel(SimHitProducers[i], h_Hits);
789             std::vector< PSimHit > Hits = *h_Hits.product();
790  
791 +           FROG_Element_Base_With_DetId* frogSimHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_SIMHIT + i);
792 +           event->addDaughter(frogSimHitColl);
793 +
794             for(unsigned int h=0; h<Hits.size(); h++)
795             {
796                  DetId theDetUnitId(Hits[h].detUnitId());
797                  const GeomDet* theDet = tkGeom->idToDet(theDetUnitId);
798  
799 <                MyPSimHit* Hit   = new MyPSimHit;
800 <                Hit->x           = theDet->surface().toGlobal(Hits[h].localPosition()).x();
801 <                Hit->y           = theDet->surface().toGlobal(Hits[h].localPosition()).y();
802 <                Hit->z           = theDet->surface().toGlobal(Hits[h].localPosition()).z();
803 <                Hit->ProcessType = Hits[h].processType();
783 <                Hit->dEdX        = Hits[h].energyLoss();
784 <
785 <                MyEvent->MyPSimHitCollection.push_back(Hit);
799 >                
800 >                FROG_Element_Event_Sim_Hit* frogSimHit = new FROG_Element_Event_Sim_Hit(
801 >                        theDet->surface().toGlobal(Hits[h].localPosition()).x(),theDet->surface().toGlobal(Hits[h].localPosition()).y(),theDet->surface().toGlobal(Hits[h].localPosition()).z(),
802 >                        Hits[h].energyLoss(), Hits[h].processType() );
803 >                frogSimHitColl->addDaughter(frogSimHit);
804             }
805          }
806 < */
806 >
807  
808  
809          // ### TRAJECTORY ###
# Line 794 | Line 812 | Frog_Analyzer::analyze(const edm::Event&
812               iEvent.getByLabel(TrajectoryProducers[i], trajTrackAssociationHandle);
813               const TrajTrackAssociationCollection TrajToTrackMap = *trajTrackAssociationHandle.product();
814  
815 +             FROG_Element_Base_With_DetId* frogTrkColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_TRK + i);
816 +             event->addDaughter(frogTrkColl);
817 +
818               for(TrajTrackAssociationCollection::const_iterator it = TrajToTrackMap.begin(); it!=TrajToTrackMap.end(); ++it) {
819                  Trajectory  recoTraj     = *it->key;
820 <                FROG_Element_Event_Track* frogRecoTk = new FROG_Element_Event_Track(i,it->val->p(),it->val->pt(),it->key->chiSquared());
820 >                FROG_Element_Event_Track* frogTrk = new FROG_Element_Event_Track(i,it->val->p(),it->val->pt(),it->key->chiSquared());
821 >                frogTrkColl->addDaughter(frogTrk);
822  
823                  std::vector<TrajectoryMeasurement> measurements = recoTraj.measurements();
824                  for(unsigned int h=0;h<measurements.size();h++){
# Line 806 | Line 828 | Frog_Analyzer::analyze(const edm::Event&
828                        DetId detId                = h_it->geographicalId();
829                        GlobalPoint globalPos      = measurements[h].updatedState().globalPosition();
830  
831 <                      FROG_Element_Event_Hit* frogHit =
832 <                        new FROG_Element_Event_Hit(detId.rawId(), globalPos.x(),globalPos.y(),  globalPos.z(), -1);
811 <                      frogRecoTk->addHit(frogHit);
831 >                      FROG_Element_Event_Hit* frogHit = new FROG_Element_Event_Hit(detId.rawId(), globalPos.x(),globalPos.y(),  globalPos.z(), -1);
832 >                      frogTrk->addDaughter(frogHit);
833                  }
813 //                MyEvent->MyRecoTrackCollection.push_back(MyrecoTrack);
814                event->addRecoTrack(frogRecoTk);
834             }
835          }
836  
# Line 822 | Line 841 | Frog_Analyzer::analyze(const edm::Event&
841             iEvent.getByLabel(TrackProducers[i], h_Tracks);
842             std::vector< reco::Track > TrackColl = *h_Tracks.product();
843  
844 +           FROG_Element_Base_With_DetId* frogTrkColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_TRK + TrajectoryProducers.size()+i);
845 +           event->addDaughter(frogTrkColl);
846 +
847             //printf("Size of the TrackCOllection : %i = %i\n",i,TrackColl.size());
848             for ( unsigned int t = 0; t < TrackColl.size(); ++t ) {
849 <                reco::Track  recoTrack  =TrackColl[t];
849 >              reco::Track  recoTrack  =TrackColl[t];
850  
851 <                FROG_Element_Event_Track* frogRecoTk = new FROG_Element_Event_Track(TrajectoryProducers.size()+i,recoTrack.p(),recoTrack.pt(), recoTrack.chi2());
852 <
831 <
832 <                for(unsigned int h=0;h<recoTrack.recHitsSize();h++){
833 <                      TrackingRecHitRef h_it     = recoTrack.recHit(h);
834 <                      if(!h_it->isValid() )continue;
835 <                      DetId detId                = h_it->geographicalId();
836 <                      const GeomDet * theDet = NULL;
851 >              FROG_Element_Event_Track* frogTrk = new FROG_Element_Event_Track(TrajectoryProducers.size()+i,recoTrack.p(),recoTrack.pt(), recoTrack.chi2());
852 >              frogTrkColl->addDaughter(frogTrk);
853  
854 <                      if(detId.det()==DetId::Tracker)                        theDet = tkGeom->idToDet(detId);
855 <                      if(detId.det()==DetId::Muon && detId.subdetId() == 1)  theDet = DtGeom->idToDet(detId);
856 <                      if(detId.det()==DetId::Muon && detId.subdetId() == 2)  theDet = CscGeom->idToDet(detId);
857 <                      if(detId.det()==DetId::Muon && detId.subdetId() == 3)  theDet = RpcGeom->idToDet(detId);
858 <
859 <                      
860 <                      LocalPoint localPos        = h_it->localPosition();
861 <
862 <                      FROG_Element_Event_Hit* frogHit = new FROG_Element_Event_Hit(
863 <                                                detId.rawId(),
864 <                                                theDet->surface().toGlobal(localPos).x(),
865 <                                                theDet->surface().toGlobal(localPos).y(),
866 <                                                theDet->surface().toGlobal(localPos).z(),
867 <                                                -1);
868 <                      frogRecoTk->addHit(frogHit);
869 <                }
870 <                event->addRecoTrack(frogRecoTk);
854 >              for(unsigned int h=0;h<recoTrack.recHitsSize();h++){
855 >                 TrackingRecHitRef h_it     = recoTrack.recHit(h);
856 >                 if(!h_it->isValid() )continue;
857 >                 DetId detId                = h_it->geographicalId();
858 >                 const GeomDet * theDet = NULL;
859 >
860 >                 if(detId.det()==DetId::Tracker)                        theDet = tkGeom->idToDet(detId);
861 >                 if(detId.det()==DetId::Muon && detId.subdetId() == 1)  theDet = DtGeom->idToDet(detId);
862 >                 if(detId.det()==DetId::Muon && detId.subdetId() == 2)  theDet = CscGeom->idToDet(detId);
863 >                 if(detId.det()==DetId::Muon && detId.subdetId() == 3)  theDet = RpcGeom->idToDet(detId);
864 >
865 >                 LocalPoint localPos        = h_it->localPosition();
866 >
867 >                 FROG_Element_Event_Hit* frogHit = new FROG_Element_Event_Hit(
868 >                        detId.rawId(),
869 >                        theDet->surface().toGlobal(localPos).x(),
870 >                        theDet->surface().toGlobal(localPos).y(),
871 >                        theDet->surface().toGlobal(localPos).z(),
872 >                        -1);
873 >                 frogTrk->addDaughter(frogHit);
874 >              }
875             }
876          }
877  
878  
879  
860 /*
880          // ### ECALRecHits ###
881          for(unsigned int i=0;i<EcalRecHitProducers.size();i++){
882             edm::Handle<EcalRecHitCollection > h_Ecal_RecHits;
883             iEvent.getByLabel(EcalRecHitProducers[i], h_Ecal_RecHits);
884             EcalRecHitCollection Ecal_RecHits = *h_Ecal_RecHits.product();
885  
886 +           FROG_Element_Base_With_DetId* frogHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_ECALHIT + i);
887 +           event->addDaughter(frogHitColl);
888 +
889             for(unsigned int eh=0;eh<Ecal_RecHits.size();eh++){
890 <                MyCaloHit* temp_EcalHit = new MyCaloHit;
891 <                temp_EcalHit->E     = Ecal_RecHits[eh].energy();
892 <                temp_EcalHit->t     = Ecal_RecHits[eh].time();
871 <                temp_EcalHit->DetId = (Ecal_RecHits[eh].detid()).rawId();
872 <        
873 <                MyEvent->MyEcalCaloHitCollection.push_back(temp_EcalHit);
890 >                FROG_Element_Event_CaloHit* frogCaloHit = new FROG_Element_Event_CaloHit((Ecal_RecHits[eh].detid()).rawId(),
891 >                        Ecal_RecHits[eh].energy(), Ecal_RecHits[eh].time());  
892 >                frogHitColl->addDaughter(frogCaloHit);
893             }
894          }
895  
# Line 881 | Line 900 | Frog_Analyzer::analyze(const edm::Event&
900             iEvent.getByLabel(HcalHBHERecHitProducers[i], h_HcalHBHE_RecHits);
901             HBHERecHitCollection HcalHBHE_RecHits = *h_HcalHBHE_RecHits.product();
902  
903 <           for(unsigned int hh=0;hh<HcalHBHE_RecHits.size();hh++){
904 <                MyCaloHit* temp_HcalHBHEHit = new MyCaloHit;
886 <                temp_HcalHBHEHit->E      = HcalHBHE_RecHits[hh].energy();
887 <                temp_HcalHBHEHit->t      = HcalHBHE_RecHits[hh].time();
888 <                temp_HcalHBHEHit->DetId = (HcalHBHE_RecHits[hh].detid()).rawId();
903 >           FROG_Element_Base_With_DetId* frogHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_HCALHIT + i);
904 >           event->addDaughter(frogHitColl);
905  
906 <                MyEvent->MyHcalCaloHitCollection.push_back(temp_HcalHBHEHit);
906 >           for(unsigned int hh=0;hh<HcalHBHE_RecHits.size();hh++){
907 >                FROG_Element_Event_CaloHit* frogCaloHit = new FROG_Element_Event_CaloHit((HcalHBHE_RecHits[hh].detid()).rawId(),
908 >                        HcalHBHE_RecHits[hh].energy(), HcalHBHE_RecHits[hh].time());
909 >                frogHitColl->addDaughter(frogCaloHit);
910             }
911          }
912  
894
913          for(unsigned int i=0;i<HcalHORecHitProducers.size();i++){
914             edm::Handle<HORecHitCollection > h_HcalHO_RecHits;
915             iEvent.getByLabel(HcalHORecHitProducers[i], h_HcalHO_RecHits);
916             HORecHitCollection HcalHO_RecHits = *h_HcalHO_RecHits.product();
917  
918 <           for(unsigned int hh=0;hh<HcalHO_RecHits.size();hh++){
919 <                MyCaloHit* temp_HcalHOHit = new MyCaloHit;
902 <                temp_HcalHOHit->E      = HcalHO_RecHits[hh].energy();
903 <                temp_HcalHOHit->t      = HcalHO_RecHits[hh].time();
904 <                temp_HcalHOHit->DetId = (HcalHO_RecHits[hh].detid()).rawId();
918 >           FROG_Element_Base_With_DetId* frogHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_HCALHIT + HcalHBHERecHitProducers.size() + i);
919 >           event->addDaughter(frogHitColl);
920  
921 <                MyEvent->MyHcalCaloHitCollection.push_back(temp_HcalHOHit);
921 >           for(unsigned int hh=0;hh<HcalHO_RecHits.size();hh++){
922 >                FROG_Element_Event_CaloHit* frogCaloHit = new FROG_Element_Event_CaloHit((HcalHO_RecHits[hh].detid()).rawId(),
923 >                        HcalHO_RecHits[hh].energy(), HcalHO_RecHits[hh].time());
924 >                frogHitColl->addDaughter(frogCaloHit);
925             }
926          }
927  
910
928          for(unsigned int i=0;i<HcalHFRecHitProducers.size();i++){
929             edm::Handle<HFRecHitCollection > h_HcalHF_RecHits;
930             iEvent.getByLabel(HcalHFRecHitProducers[i], h_HcalHF_RecHits);
931             HFRecHitCollection HcalHF_RecHits = *h_HcalHF_RecHits.product();
932  
933 <           for(unsigned int hh=0;hh<HcalHF_RecHits.size();hh++){
934 <                MyCaloHit* temp_HcalHFHit = new MyCaloHit;
918 <                temp_HcalHFHit->E      = HcalHF_RecHits[hh].energy();
919 <                temp_HcalHFHit->t      = HcalHF_RecHits[hh].time();
920 <                temp_HcalHFHit->DetId = (HcalHF_RecHits[hh].detid()).rawId();
933 >           FROG_Element_Base_With_DetId* frogHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_HCALHIT + HcalHBHERecHitProducers.size() + HcalHORecHitProducers.size() + i);
934 >           event->addDaughter(frogHitColl);
935  
936 <                MyEvent->MyHcalCaloHitCollection.push_back(temp_HcalHFHit);
936 >           for(unsigned int hh=0;hh<HcalHF_RecHits.size();hh++){
937 >                FROG_Element_Event_CaloHit* frogCaloHit = new FROG_Element_Event_CaloHit((HcalHF_RecHits[hh].detid()).rawId(),
938 >                        HcalHF_RecHits[hh].energy(), HcalHF_RecHits[hh].time());
939 >                frogHitColl->addDaughter(frogCaloHit);
940             }
941          }
942  
# Line 929 | Line 946 | Frog_Analyzer::analyze(const edm::Event&
946             iEvent.getByLabel(CSCSegmentProducers[i], h_CSC_Segments);
947             CSCSegmentCollection CSC_Segments = *h_CSC_Segments.product();
948  
949 +           FROG_Element_Base_With_DetId* frogSegColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_MUONSEG + i);
950 +           event->addDaughter(frogSegColl);
951 +
952             for(unsigned int s=0;s<CSC_Segments.size();s++){
953                  DetId theDetUnitId = CSC_Segments[s].geographicalId();
954                  const GeomDet* theDet = CscGeom->idToDet(theDetUnitId);
955  
956 <                MyMuonSegment* temp_CscSeg = new MyMuonSegment;
957 <                temp_CscSeg->DetId = theDetUnitId.rawId();
958 <                temp_CscSeg->PosX  = theDet->surface().toGlobal(CSC_Segments[s].localPosition()).x();
959 <                temp_CscSeg->PosY  = theDet->surface().toGlobal(CSC_Segments[s].localPosition()).y();
940 <                temp_CscSeg->PosZ  = theDet->surface().toGlobal(CSC_Segments[s].localPosition()).z();
941 <                temp_CscSeg->DirX  = theDet->surface().toGlobal(CSC_Segments[s].localDirection()).x();
942 <                temp_CscSeg->DirY  = theDet->surface().toGlobal(CSC_Segments[s].localDirection()).y();
943 <                temp_CscSeg->DirZ  = theDet->surface().toGlobal(CSC_Segments[s].localDirection()).z();
944 <
945 <                MyEvent->MyMuonSegmentCollection.push_back(temp_CscSeg);
956 >                FROG_Element_Event_Segment* frogSeg = new FROG_Element_Event_Segment(theDetUnitId.rawId(),
957 >                theDet->surface().toGlobal(CSC_Segments[s].localPosition()).x() , theDet->surface().toGlobal(CSC_Segments[s].localPosition()).y() , theDet->surface().toGlobal(CSC_Segments[s].localPosition()).z()  ,
958 >                theDet->surface().toGlobal(CSC_Segments[s].localDirection()).x(), theDet->surface().toGlobal(CSC_Segments[s].localDirection()).y(), theDet->surface().toGlobal(CSC_Segments[s].localDirection()).z() );
959 >                frogSegColl->addDaughter(frogSeg);
960             }
961          }
962  
# Line 951 | Line 965 | Frog_Analyzer::analyze(const edm::Event&
965             iEvent.getByLabel(DTSegmentProducers[i], h_DT_Segments);
966             DTRecSegment4DCollection DT_Segments = *h_DT_Segments.product();
967  
968 +           FROG_Element_Base_With_DetId* frogSegColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_MUONSEG + CSCSegmentProducers.size() + i);
969 +           event->addDaughter(frogSegColl);
970 +
971             for(unsigned int s=0;s<DT_Segments.size();s++){
972                  DetId theDetUnitId = DT_Segments[s].geographicalId();
973                  const GeomDet* theDet = DtGeom->idToDet(theDetUnitId);
974  
975 <                MyMuonSegment* temp_DtSeg = new MyMuonSegment;
976 <                temp_DtSeg->DetId = theDetUnitId.rawId();
977 <                temp_DtSeg->PosX  = theDet->surface().toGlobal(DT_Segments[s].localPosition()).x();
978 <                temp_DtSeg->PosY  = theDet->surface().toGlobal(DT_Segments[s].localPosition()).y();
962 <                temp_DtSeg->PosZ  = theDet->surface().toGlobal(DT_Segments[s].localPosition()).z();
963 <                temp_DtSeg->DirX  = theDet->surface().toGlobal(DT_Segments[s].localDirection()).x();
964 <                temp_DtSeg->DirY  = theDet->surface().toGlobal(DT_Segments[s].localDirection()).y();
965 <                temp_DtSeg->DirZ  = theDet->surface().toGlobal(DT_Segments[s].localDirection()).z();
966 <
967 <                MyEvent->MyMuonSegmentCollection.push_back(temp_DtSeg);
975 >                FROG_Element_Event_Segment* frogSeg = new FROG_Element_Event_Segment(theDetUnitId.rawId(),
976 >                theDet->surface().toGlobal(DT_Segments[s].localPosition()).x() , theDet->surface().toGlobal(DT_Segments[s].localPosition()).y() , theDet->surface().toGlobal(DT_Segments[s].localPosition()).z()  ,
977 >                theDet->surface().toGlobal(DT_Segments[s].localDirection()).x(), theDet->surface().toGlobal(DT_Segments[s].localDirection()).y(), theDet->surface().toGlobal(DT_Segments[s].localDirection()).z() );
978 >                frogSegColl->addDaughter(frogSeg);
979             }
980          }
981  
# Line 974 | Line 985 | Frog_Analyzer::analyze(const edm::Event&
985             iEvent.getByLabel(RPCHitsProducers[i], h_RPC_Hits);
986             RPCRecHitCollection RPC_Hits = *h_RPC_Hits.product();
987  
988 +           FROG_Element_Base_With_DetId* frogHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_MUONHIT + i);
989 +           event->addDaughter(frogHitColl);
990 +
991             for(unsigned int h=0;h<RPC_Hits.size();h++){
992                  DetId theDetUnitId = RPC_Hits[h].geographicalId();
993                  const GeomDet* theDet = RpcGeom->idToDet(theDetUnitId);
994  
995 <                MyMuonHit* temp_RpcHit = new MyMuonHit;
996 <                temp_RpcHit->DetId = theDetUnitId.rawId();
997 <                temp_RpcHit->x     = theDet->surface().toGlobal(RPC_Hits[h].localPosition()).x();
984 <                temp_RpcHit->y     = theDet->surface().toGlobal(RPC_Hits[h].localPosition()).y();
985 <                temp_RpcHit->z     = theDet->surface().toGlobal(RPC_Hits[h].localPosition()).z();
986 <
987 <                MyEvent->MyMuonHitCollection.push_back(temp_RpcHit);
995 >                FROG_Element_Event_Hit* frogHit = new FROG_Element_Event_Hit(theDetUnitId.rawId(),
996 >                theDet->surface().toGlobal(RPC_Hits[h].localPosition()).x() , theDet->surface().toGlobal(RPC_Hits[h].localPosition()).y() , theDet->surface().toGlobal(RPC_Hits[h].localPosition()).z(), -1 );
997 >                frogHitColl->addDaughter(frogHit);
998             }
999          }
1000  
991        MyEvents->Events.push_back(MyEvent);  
992 */
1001  
1002 < //        event_prim->addDaughter(event);
995 <        events->addEvent(event);
1002 >
1003   }
1004  
1005  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines