49 |
|
#include "Geometry/Records/interface/IdealGeometryRecord.h" |
50 |
|
#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" |
51 |
|
#include "Geometry/CaloGeometry/interface/CaloGeometry.h" |
52 |
< |
#include "Geometry/EcalBarrelAlgo/interface/EcalBarrelGeometry.h" |
53 |
< |
#include "Geometry/EcalEndcapAlgo/interface/EcalEndcapGeometry.h" |
52 |
> |
//#include "Geometry/EcalBarrelAlgo/interface/EcalBarrelGeometry.h" |
53 |
> |
//#include "Geometry/EcalEndcapAlgo/interface/EcalEndcapGeometry.h" |
54 |
> |
#include "Geometry/Records/interface/CaloGeometryRecord.h" |
55 |
> |
#include "Geometry/EcalAlgo/interface/EcalBarrelGeometry.h" |
56 |
> |
#include "Geometry/EcalAlgo/interface/EcalEndcapGeometry.h" |
57 |
|
#include "Geometry/CaloGeometry/interface/CaloCellGeometry.h" |
58 |
|
#include "DataFormats/EcalDetId/interface/EcalSubdetector.h" |
59 |
|
|
115 |
|
#include "DataFormats/EcalDetId/interface/ESDetId.h" |
116 |
|
#include "DataFormats/HcalDetId/interface/HcalDetId.h" |
117 |
|
|
118 |
+ |
#include "DataFormats/VertexReco/interface/NuclearInteraction.h" |
119 |
+ |
|
120 |
+ |
#include "DataFormats/JetReco/interface/Jet.h" |
121 |
+ |
#include "DataFormats/JetReco/interface/BasicJetCollection.h" |
122 |
+ |
#include "DataFormats/JetReco/interface/GenJetCollection.h" |
123 |
+ |
#include "DataFormats/JetReco/interface/CaloJetCollection.h" |
124 |
+ |
#include "DataFormats/JetReco/interface/PFJetCollection.h" |
125 |
+ |
|
126 |
|
#include "Visualisation/Frog/soft/Includes/FROG/FROG_Element_Base_With_DetId.h" |
127 |
|
#include "Visualisation/Frog/soft/Includes/FROG/FROG_Element_Tools.h" |
128 |
|
#include "Visualisation/Frog/soft/Includes/FROG/FROG_Element_Tools.cpp" |
136 |
|
|
137 |
|
#include "Visualisation/Frog/soft/Includes/FROG/FROG_DetId.h" |
138 |
|
#include "Visualisation/Frog/soft/Includes/FROG/FROG_ReadCards.cpp" |
139 |
+ |
#include "Visualisation/Frog/soft/Includes/FROG/FROG_Element_Event_NuclInt.h" |
140 |
+ |
|
141 |
|
|
142 |
|
|
143 |
|
using namespace edm; |
144 |
|
using namespace std; |
145 |
+ |
using namespace reco; |
146 |
|
|
147 |
|
// |
148 |
|
// class decleration |
166 |
|
std::vector<InputTag> SimTrackProducers; |
167 |
|
std::vector<InputTag> SimVertexProducers; |
168 |
|
std::vector<InputTag> SimHitProducers; |
169 |
+ |
std::vector<InputTag> SimCaloHitProducers; |
170 |
+ |
|
171 |
+ |
std::vector<InputTag> NIProducers; |
172 |
|
|
173 |
|
std::vector<InputTag> TrackProducers; |
174 |
|
std::vector<InputTag> TrajectoryProducers; |
181 |
|
|
182 |
|
std::vector<InputTag> RPCHitsProducers; |
183 |
|
|
184 |
+ |
std::vector<InputTag> CaloJetsProducers; |
185 |
+ |
|
186 |
|
// ----------member data --------------------------- |
187 |
|
|
188 |
|
bool ProduceGeom; |
203 |
|
SimTrackProducers = iConfig.getParameter<std::vector<InputTag> >("SimTrackProducers"); |
204 |
|
SimVertexProducers = iConfig.getParameter<std::vector<InputTag> >("SimVertexProducers"); |
205 |
|
SimHitProducers = iConfig.getParameter<std::vector<InputTag> >("SimHitProducers"); |
206 |
+ |
SimCaloHitProducers = iConfig.getParameter<std::vector<InputTag> >("SimCaloHitProducers"); |
207 |
+ |
|
208 |
|
|
209 |
|
TrackProducers = iConfig.getParameter<std::vector<InputTag> >("TrackProducers"); |
210 |
|
TrajectoryProducers = iConfig.getParameter<std::vector<InputTag> >("TrajectoryProducers"); |
213 |
|
HcalHORecHitProducers = iConfig.getParameter<std::vector<InputTag> >("HcalHORecHitProducers"); |
214 |
|
HcalHFRecHitProducers = iConfig.getParameter<std::vector<InputTag> >("HcalHFRecHitProducers"); |
215 |
|
|
216 |
+ |
NIProducers = iConfig.getParameter<std::vector<InputTag> >("NIProducers"); |
217 |
+ |
|
218 |
|
DTSegmentProducers = iConfig.getParameter<std::vector<InputTag> >("DTSegmentProducers"); |
219 |
|
CSCSegmentProducers = iConfig.getParameter<std::vector<InputTag> >("CSCSegmentProducers"); |
220 |
|
|
221 |
|
RPCHitsProducers = iConfig.getParameter<std::vector<InputTag> >("RPCHitsProducers"); |
222 |
|
|
223 |
+ |
CaloJetsProducers = iConfig.getParameter<std::vector<InputTag> >("CaloJetsProducers"); |
224 |
+ |
|
225 |
|
ProduceGeom = iConfig.getParameter<bool >("ProduceGeom" ); |
226 |
|
NEventsInVisFile = iConfig.getParameter<int >("NEventsInVisFile" ); |
227 |
|
|
566 |
|
// ### CALO GEOMETRY ### |
567 |
|
|
568 |
|
edm::ESHandle<CaloGeometry> CaloGeom; |
569 |
< |
iSetup.get<IdealGeometryRecord>().get( CaloGeom ); |
569 |
> |
iSetup.get<CaloGeometryRecord>().get( CaloGeom ); |
570 |
|
const vector<DetId> CaloDets = CaloGeom->getValidDetIds(); |
571 |
|
|
572 |
|
for(unsigned int i=0;i<CaloDets.size();i++) |
758 |
|
} |
759 |
|
|
760 |
|
|
761 |
< |
FROG_Element_Event* event = new FROG_Element_Event(); |
761 |
> |
FROG_Element_Event* event = new FROG_Element_Event(iEvent.id().run(), iEvent.id().event(), iEvent.time().value() ); |
762 |
|
events_prim->addDaughter(event); |
763 |
|
|
764 |
|
// access the tracker |
774 |
|
edm::ESHandle<RPCGeometry> RpcGeom; |
775 |
|
iSetup.get<MuonGeometryRecord>().get( RpcGeom ); |
776 |
|
|
777 |
+ |
edm::ESHandle<CaloGeometry> CaloGeom; |
778 |
+ |
iSetup.get<CaloGeometryRecord>().get( CaloGeom ); |
779 |
+ |
|
780 |
|
// ### SIMTRACK ### |
781 |
+ |
FROG_Element_Base_With_DetId* frogSimTrkColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_SIMTRK); |
782 |
+ |
event->addDaughter(frogSimTrkColl); |
783 |
+ |
|
784 |
|
for(unsigned int i=0;i<SimTrackProducers.size();i++){ |
785 |
|
edm::Handle<std::vector< SimTrack > > h_SimTracks; |
786 |
|
iEvent.getByLabel(SimTrackProducers[i], h_SimTracks); |
787 |
|
std::vector< SimTrack > SimTrackColl = *h_SimTracks.product(); |
788 |
|
|
758 |
– |
FROG_Element_Base_With_DetId* frogSimTrkColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_SIMTRK + i); |
759 |
– |
event->addDaughter(frogSimTrkColl); |
760 |
– |
|
789 |
|
for ( unsigned int a = 0; a < SimTrackColl.size(); ++a ) { |
790 |
|
SimTrack simTrack =SimTrackColl[a]; |
791 |
|
|
798 |
|
} |
799 |
|
|
800 |
|
// ### SIMVERTEX ### |
801 |
+ |
FROG_Element_Base_With_DetId* frogSimVtx = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_SIMVTX); |
802 |
+ |
event->addDaughter(frogSimVtx); |
803 |
+ |
|
804 |
|
for(unsigned int i=0;i<SimVertexProducers.size();i++){ |
805 |
|
edm::Handle<std::vector< SimVertex > > h_Vertex; |
806 |
|
iEvent.getByLabel(SimVertexProducers[i], h_Vertex); |
807 |
|
std::vector< SimVertex > VertexColl = *h_Vertex.product(); |
808 |
|
|
778 |
– |
FROG_Element_Base_With_DetId* frogSimVtxColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_SIMVTX + i); |
779 |
– |
event->addDaughter(frogSimVtxColl); |
780 |
– |
|
809 |
|
for (unsigned int b = 0; b < VertexColl.size(); ++b ) { |
810 |
|
SimVertex Vertex = VertexColl[b]; |
811 |
|
|
812 |
< |
FROG_Element_Event_Sim_Vertex* frogSimVtx = new FROG_Element_Event_Sim_Vertex( |
812 |
> |
FROG_Element_Event_Sim_Vertex* frogSimVertex = new FROG_Element_Event_Sim_Vertex( |
813 |
|
Vertex.position().x(), Vertex.position().y(), Vertex.position().z(), |
814 |
|
Vertex.parentIndex()); |
815 |
|
|
816 |
< |
frogSimVtxColl->addDaughter(frogSimVtx); |
816 |
> |
frogSimVtx->addDaughter(frogSimVertex); |
817 |
|
} |
818 |
|
} |
819 |
|
|
820 |
|
|
821 |
|
// ### SIMHIT ### |
822 |
|
|
823 |
+ |
FROG_Element_Base_With_DetId* frogSimHit = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_SIMHIT); |
824 |
+ |
event->addDaughter(frogSimHit); |
825 |
|
for(unsigned int i=0;i<SimHitProducers.size();i++){ |
826 |
|
edm::Handle<std::vector< PSimHit > > h_Hits; |
827 |
|
iEvent.getByLabel(SimHitProducers[i], h_Hits); |
828 |
|
std::vector< PSimHit > Hits = *h_Hits.product(); |
829 |
|
|
830 |
< |
FROG_Element_Base_With_DetId* frogSimHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_SIMHIT + i); |
831 |
< |
event->addDaughter(frogSimHitColl); |
830 |
> |
FROG_Element_Base_With_DetId* frogSimHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_SIMHIT + i + 1); |
831 |
> |
frogSimHit->addDaughter(frogSimHitColl); |
832 |
|
|
833 |
|
for(unsigned int h=0; h<Hits.size(); h++) |
834 |
|
{ |
835 |
|
DetId theDetUnitId(Hits[h].detUnitId()); |
836 |
< |
const GeomDet* theDet = tkGeom->idToDet(theDetUnitId); |
836 |
> |
const GeomDet* theDet = NULL; |
837 |
> |
if(theDetUnitId.det() == DetId::Tracker)theDet = tkGeom->idToDet(theDetUnitId); |
838 |
> |
if(theDetUnitId.det() == DetId::Muon && theDetUnitId.subdetId() == MuonSubdetId::DT) theDet = DtGeom->idToDet(theDetUnitId); |
839 |
> |
if(theDetUnitId.det() == DetId::Muon && theDetUnitId.subdetId() == MuonSubdetId::CSC)theDet = CscGeom->idToDet(theDetUnitId); |
840 |
> |
if(theDetUnitId.det() == DetId::Muon && theDetUnitId.subdetId() == MuonSubdetId::RPC)theDet = RpcGeom->idToDet(theDetUnitId); |
841 |
|
|
842 |
|
|
843 |
|
FROG_Element_Event_Sim_Hit* frogSimHit = new FROG_Element_Event_Sim_Hit( |
847 |
|
} |
848 |
|
} |
849 |
|
|
850 |
+ |
// ### SIMCALOHIT ### |
851 |
+ |
|
852 |
+ |
for(unsigned int i=0;i<SimCaloHitProducers.size();i++){ |
853 |
+ |
edm::Handle<std::vector< PCaloHit > > h_CaloHits; |
854 |
+ |
iEvent.getByLabel(SimCaloHitProducers[i], h_CaloHits); |
855 |
+ |
std::vector< PCaloHit > CaloHits = *h_CaloHits.product(); |
856 |
+ |
|
857 |
+ |
FROG_Element_Base_With_DetId* frogSimHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_SIMHIT + SimHitProducers.size() + i + 1); |
858 |
+ |
frogSimHit->addDaughter(frogSimHitColl); |
859 |
+ |
|
860 |
+ |
for(unsigned int h=0; h<CaloHits.size(); h++) |
861 |
+ |
{ |
862 |
+ |
DetId theDetUnitId(CaloHits[h].id()); |
863 |
+ |
const CaloCellGeometry* CellGeom = NULL; |
864 |
+ |
if(theDetUnitId.det() == DetId::Ecal || theDetUnitId.det() == DetId::Hcal)CellGeom = CaloGeom->getGeometry(theDetUnitId); |
865 |
+ |
if(CellGeom==NULL)continue; |
866 |
+ |
|
867 |
+ |
|
868 |
+ |
FROG_Element_Event_Sim_Hit* frogSimCaloHit = new FROG_Element_Event_Sim_Hit( |
869 |
+ |
CellGeom->getPosition().x(),CellGeom->getPosition().y(),CellGeom->getPosition().z(), |
870 |
+ |
CaloHits[h].energy(), CaloHits[h].depth() ); |
871 |
+ |
frogSimHitColl->addDaughter(frogSimCaloHit); |
872 |
+ |
} |
873 |
+ |
} |
874 |
+ |
|
875 |
+ |
// NUCLEAR INTERACTIONS |
876 |
+ |
for(unsigned int i=0;i<NIProducers.size();i++) { |
877 |
+ |
edm::Handle<std::vector<reco::NuclearInteraction> > h_NIs; |
878 |
+ |
iEvent.getByLabel(NIProducers[i], h_NIs); |
879 |
+ |
std::vector<reco::NuclearInteraction> NIs = *h_NIs.product(); |
880 |
+ |
FROG_Element_Base_With_DetId* frogNIColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_NUCLINT + i); |
881 |
+ |
event->addDaughter(frogNIColl); |
882 |
+ |
|
883 |
+ |
for(unsigned int h=0; h<NIs.size();h++){ |
884 |
+ |
reco::NuclearInteraction ni = NIs[i]; |
885 |
+ |
float vtx_x = ni.vertex().x(); |
886 |
+ |
float vtx_y = ni.vertex().y(); |
887 |
+ |
float vtx_z = ni.vertex().z(); |
888 |
+ |
float like = ni.likelihood(); |
889 |
+ |
FROG_Element_Event_NuclInt* frogNI = new FROG_Element_Event_NuclInt(vtx_x, vtx_y, vtx_z, like ); |
890 |
+ |
frogNIColl->addDaughter(frogNI); |
891 |
+ |
} |
892 |
+ |
} |
893 |
+ |
|
894 |
|
|
895 |
|
|
896 |
|
// ### TRAJECTORY ### |
897 |
+ |
FROG_Element_Base_With_DetId* frogTrk = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_TRK); |
898 |
+ |
event->addDaughter(frogTrk); |
899 |
+ |
|
900 |
|
for(unsigned int i=0;i<TrajectoryProducers.size();i++){ |
901 |
|
Handle<TrajTrackAssociationCollection> trajTrackAssociationHandle; |
902 |
|
iEvent.getByLabel(TrajectoryProducers[i], trajTrackAssociationHandle); |
903 |
|
const TrajTrackAssociationCollection TrajToTrackMap = *trajTrackAssociationHandle.product(); |
904 |
|
|
905 |
< |
FROG_Element_Base_With_DetId* frogTrkColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_TRK + i); |
906 |
< |
event->addDaughter(frogTrkColl); |
905 |
> |
FROG_Element_Base_With_DetId* frogTrkColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_TRK + i + 1); |
906 |
> |
frogTrk->addDaughter(frogTrkColl); |
907 |
|
|
908 |
|
for(TrajTrackAssociationCollection::const_iterator it = TrajToTrackMap.begin(); it!=TrajToTrackMap.end(); ++it) { |
909 |
|
Trajectory recoTraj = *it->key; |
931 |
|
iEvent.getByLabel(TrackProducers[i], h_Tracks); |
932 |
|
std::vector< reco::Track > TrackColl = *h_Tracks.product(); |
933 |
|
|
934 |
< |
FROG_Element_Base_With_DetId* frogTrkColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_TRK + TrajectoryProducers.size()+i); |
935 |
< |
event->addDaughter(frogTrkColl); |
934 |
> |
FROG_Element_Base_With_DetId* frogTrkColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_TRK + TrajectoryProducers.size() + i + 1); |
935 |
> |
frogTrk->addDaughter(frogTrkColl); |
936 |
|
|
937 |
|
//printf("Size of the TrackCOllection : %i = %i\n",i,TrackColl.size()); |
938 |
|
for ( unsigned int t = 0; t < TrackColl.size(); ++t ) { |
966 |
|
} |
967 |
|
|
968 |
|
|
888 |
– |
|
969 |
|
// ### ECALRecHits ### |
970 |
+ |
FROG_Element_Base_With_DetId* frogEcalHit = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_ECALHIT); |
971 |
+ |
event->addDaughter(frogEcalHit); |
972 |
|
for(unsigned int i=0;i<EcalRecHitProducers.size();i++){ |
973 |
|
edm::Handle<EcalRecHitCollection > h_Ecal_RecHits; |
974 |
|
iEvent.getByLabel(EcalRecHitProducers[i], h_Ecal_RecHits); |
975 |
|
EcalRecHitCollection Ecal_RecHits = *h_Ecal_RecHits.product(); |
976 |
|
|
977 |
< |
FROG_Element_Base_With_DetId* frogHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_ECALHIT + i); |
978 |
< |
event->addDaughter(frogHitColl); |
977 |
> |
FROG_Element_Base_With_DetId* frogHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_ECALHIT + i + 1); |
978 |
> |
frogEcalHit->addDaughter(frogHitColl); |
979 |
|
|
980 |
|
for(unsigned int eh=0;eh<Ecal_RecHits.size();eh++){ |
981 |
|
FROG_Element_Event_CaloHit* frogCaloHit = new FROG_Element_Event_CaloHit((Ecal_RecHits[eh].detid()).rawId(), |
986 |
|
|
987 |
|
|
988 |
|
// ### HCALRecHits ### |
989 |
+ |
FROG_Element_Base_With_DetId* frogHcalHit = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_HCALHIT); |
990 |
+ |
event->addDaughter(frogHcalHit); |
991 |
|
for(unsigned int i=0;i<HcalHBHERecHitProducers.size();i++){ |
992 |
|
edm::Handle<HBHERecHitCollection > h_HcalHBHE_RecHits; |
993 |
|
iEvent.getByLabel(HcalHBHERecHitProducers[i], h_HcalHBHE_RecHits); |
994 |
|
HBHERecHitCollection HcalHBHE_RecHits = *h_HcalHBHE_RecHits.product(); |
995 |
|
|
996 |
< |
FROG_Element_Base_With_DetId* frogHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_HCALHIT + i); |
997 |
< |
event->addDaughter(frogHitColl); |
996 |
> |
FROG_Element_Base_With_DetId* frogHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_HCALHIT + i + 1); |
997 |
> |
frogHcalHit->addDaughter(frogHitColl); |
998 |
|
|
999 |
|
for(unsigned int hh=0;hh<HcalHBHE_RecHits.size();hh++){ |
1000 |
|
FROG_Element_Event_CaloHit* frogCaloHit = new FROG_Element_Event_CaloHit((HcalHBHE_RecHits[hh].detid()).rawId(), |
1008 |
|
iEvent.getByLabel(HcalHORecHitProducers[i], h_HcalHO_RecHits); |
1009 |
|
HORecHitCollection HcalHO_RecHits = *h_HcalHO_RecHits.product(); |
1010 |
|
|
1011 |
< |
FROG_Element_Base_With_DetId* frogHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_HCALHIT + HcalHBHERecHitProducers.size() + i); |
1012 |
< |
event->addDaughter(frogHitColl); |
1011 |
> |
FROG_Element_Base_With_DetId* frogHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_HCALHIT + HcalHBHERecHitProducers.size() + i + 1); |
1012 |
> |
frogHcalHit->addDaughter(frogHitColl); |
1013 |
|
|
1014 |
|
for(unsigned int hh=0;hh<HcalHO_RecHits.size();hh++){ |
1015 |
|
FROG_Element_Event_CaloHit* frogCaloHit = new FROG_Element_Event_CaloHit((HcalHO_RecHits[hh].detid()).rawId(), |
1023 |
|
iEvent.getByLabel(HcalHFRecHitProducers[i], h_HcalHF_RecHits); |
1024 |
|
HFRecHitCollection HcalHF_RecHits = *h_HcalHF_RecHits.product(); |
1025 |
|
|
1026 |
< |
FROG_Element_Base_With_DetId* frogHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_HCALHIT + HcalHBHERecHitProducers.size() + HcalHORecHitProducers.size() + i); |
1027 |
< |
event->addDaughter(frogHitColl); |
1026 |
> |
FROG_Element_Base_With_DetId* frogHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_HCALHIT + HcalHBHERecHitProducers.size() + HcalHORecHitProducers.size() + i + 1); |
1027 |
> |
frogHcalHit->addDaughter(frogHitColl); |
1028 |
|
|
1029 |
|
for(unsigned int hh=0;hh<HcalHF_RecHits.size();hh++){ |
1030 |
|
FROG_Element_Event_CaloHit* frogCaloHit = new FROG_Element_Event_CaloHit((HcalHF_RecHits[hh].detid()).rawId(), |
1033 |
|
} |
1034 |
|
} |
1035 |
|
|
1036 |
+ |
|
1037 |
|
// ### Muon Segments ### |
1038 |
+ |
FROG_Element_Base_With_DetId* frogMuonSeg = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_MUONSEG); |
1039 |
+ |
event->addDaughter(frogMuonSeg); |
1040 |
+ |
|
1041 |
|
for(unsigned int i=0;i<CSCSegmentProducers.size();i++){ |
1042 |
|
edm::Handle<CSCSegmentCollection > h_CSC_Segments; |
1043 |
|
iEvent.getByLabel(CSCSegmentProducers[i], h_CSC_Segments); |
1044 |
|
CSCSegmentCollection CSC_Segments = *h_CSC_Segments.product(); |
1045 |
|
|
1046 |
< |
FROG_Element_Base_With_DetId* frogSegColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_MUONSEG + i); |
1047 |
< |
event->addDaughter(frogSegColl); |
1046 |
> |
FROG_Element_Base_With_DetId* frogSegColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_MUONSEG + i + 1); |
1047 |
> |
frogMuonSeg->addDaughter(frogSegColl); |
1048 |
|
|
1049 |
|
for(unsigned int s=0;s<CSC_Segments.size();s++){ |
1050 |
|
DetId theDetUnitId = CSC_Segments[s].geographicalId(); |
1062 |
|
iEvent.getByLabel(DTSegmentProducers[i], h_DT_Segments); |
1063 |
|
DTRecSegment4DCollection DT_Segments = *h_DT_Segments.product(); |
1064 |
|
|
1065 |
< |
FROG_Element_Base_With_DetId* frogSegColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_MUONSEG + CSCSegmentProducers.size() + i); |
1066 |
< |
event->addDaughter(frogSegColl); |
1065 |
> |
FROG_Element_Base_With_DetId* frogSegColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_MUONSEG + CSCSegmentProducers.size() + i + 1); |
1066 |
> |
frogMuonSeg->addDaughter(frogSegColl); |
1067 |
|
|
1068 |
|
for(unsigned int s=0;s<DT_Segments.size();s++){ |
1069 |
|
DetId theDetUnitId = DT_Segments[s].geographicalId(); |
1077 |
|
} |
1078 |
|
|
1079 |
|
// ### Muon Hits ### |
1080 |
+ |
FROG_Element_Base_With_DetId* frogMuonHit = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_MUONHIT); |
1081 |
+ |
event->addDaughter(frogMuonHit); |
1082 |
|
for(unsigned int i=0;i<RPCHitsProducers.size();i++){ |
1083 |
|
edm::Handle<RPCRecHitCollection > h_RPC_Hits; |
1084 |
|
iEvent.getByLabel(RPCHitsProducers[i], h_RPC_Hits); |
1085 |
|
RPCRecHitCollection RPC_Hits = *h_RPC_Hits.product(); |
1086 |
|
|
1087 |
< |
FROG_Element_Base_With_DetId* frogHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_MUONHIT + i); |
1088 |
< |
event->addDaughter(frogHitColl); |
1087 |
> |
FROG_Element_Base_With_DetId* frogHitColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_MUONHIT + i + 1); |
1088 |
> |
frogMuonHit->addDaughter(frogHitColl); |
1089 |
|
|
1090 |
|
for(unsigned int h=0;h<RPC_Hits.size();h++){ |
1091 |
|
DetId theDetUnitId = RPC_Hits[h].geographicalId(); |
1097 |
|
} |
1098 |
|
} |
1099 |
|
|
1100 |
+ |
|
1101 |
+ |
|
1102 |
+ |
// ### Calo Jets ### |
1103 |
+ |
FROG_Element_Base_With_DetId* frogCaloJet = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_JET_CALO); |
1104 |
+ |
event->addDaughter(frogCaloJet); |
1105 |
+ |
for(unsigned int i=0;i<CaloJetsProducers.size();i++){ |
1106 |
+ |
edm::Handle<CaloJetCollection> h_Calo_Jets; |
1107 |
+ |
iEvent.getByLabel(CaloJetsProducers[i], h_Calo_Jets); |
1108 |
+ |
CaloJetCollection Calo_Jets = *h_Calo_Jets.product(); |
1109 |
+ |
|
1110 |
+ |
FROG_Element_Base_With_DetId* frogCaloJetColl = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_JET_CALO + i + 1); |
1111 |
+ |
frogCaloJet->addDaughter(frogCaloJetColl); |
1112 |
+ |
|
1113 |
+ |
for(unsigned int h=0;h<Calo_Jets.size();h++){ |
1114 |
+ |
// DetId theDetUnitId = RPC_Hits[h].geographicalId(); |
1115 |
+ |
// const GeomDet* theDet = RpcGeom->idToDet(theDetUnitId); |
1116 |
+ |
|
1117 |
+ |
FROG_Element_Event_Jet* frogJet = new FROG_Element_Event_Jet(Calo_Jets[h].eta(),Calo_Jets[h].phi(),Calo_Jets[h].energy()); |
1118 |
+ |
frogCaloJet->addDaughter(frogJet); |
1119 |
+ |
printf("AddJet\n"); |
1120 |
+ |
} |
1121 |
+ |
} |
1122 |
+ |
|
1123 |
+ |
// ### Calo Jets in cartesian coord ### |
1124 |
+ |
FROG_Element_Base_With_DetId* frogCaloJetCand = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_RECOCAND); |
1125 |
+ |
event->addDaughter(frogCaloJetCand); |
1126 |
+ |
for(unsigned int i=0;i<CaloJetsProducers.size();i++){ |
1127 |
+ |
edm::Handle<CaloJetCollection> h_Calo_Jets; |
1128 |
+ |
iEvent.getByLabel(CaloJetsProducers[i], h_Calo_Jets); |
1129 |
+ |
CaloJetCollection Calo_Jets = *h_Calo_Jets.product(); |
1130 |
+ |
|
1131 |
+ |
FROG_Element_Base_With_DetId* frogCaloJetCollCand = new FROG_Element_Base_With_DetId(C_FEB_DETID, EVTID_RECOCAND + i + 1); |
1132 |
+ |
frogCaloJetCand->addDaughter(frogCaloJetCollCand); |
1133 |
+ |
|
1134 |
+ |
for(unsigned int h=0;h<Calo_Jets.size();h++){ |
1135 |
+ |
// DetId theDetUnitId = RPC_Hits[h].geographicalId(); |
1136 |
+ |
// const GeomDet* theDet = RpcGeom->idToDet(theDetUnitId); |
1137 |
+ |
|
1138 |
+ |
FROG_Element_Event_Candidate* frogCandidate = new FROG_Element_Event_Candidate(Calo_Jets[h].px(),Calo_Jets[h].py(),Calo_Jets[h].pz()); |
1139 |
+ |
frogCaloJetCand->addDaughter(frogCandidate); |
1140 |
+ |
printf("AddJetCand\n"); |
1141 |
+ |
} |
1142 |
+ |
} |
1143 |
+ |
|
1144 |
+ |
|
1145 |
+ |
|
1146 |
|
NEvents++; |
1147 |
|
if(NEvents == NEventsInVisFile){ |
1148 |
|
char OutputFileName[1024]; |