45 |
|
#include "DataFormats/GeometrySurface/interface/BoundSurface.h" |
46 |
|
#include "DataFormats/DetId/interface/DetId.h" |
47 |
|
|
48 |
+ |
#include "Geometry/CaloEventSetup/interface/CaloTopologyRecord.h" |
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" |
54 |
+ |
#include "Geometry/CaloGeometry/interface/CaloCellGeometry.h" |
55 |
+ |
#include "DataFormats/EcalDetId/interface/EcalSubdetector.h" |
56 |
+ |
|
57 |
+ |
#include "Geometry/CommonDetUnit/interface/TrackingGeometry.h" |
58 |
+ |
#include "Geometry/Records/interface/MuonGeometryRecord.h" |
59 |
+ |
#include "Geometry/DTGeometry/interface/DTGeometry.h" |
60 |
+ |
#include "Geometry/CSCGeometry/interface/CSCGeometry.h" |
61 |
+ |
#include "Geometry/RPCGeometry/interface/RPCGeometry.h" |
62 |
+ |
|
63 |
+ |
|
64 |
+ |
|
65 |
+ |
#include "DataFormats/CaloRecHit/interface/CaloRecHit.h" |
66 |
+ |
#include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h" |
67 |
+ |
#include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h" |
68 |
+ |
|
69 |
|
#include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h" |
70 |
|
#include "SimDataFormats/TrackingHit/interface/PSimHit.h" |
71 |
|
#include "SimDataFormats/CrossingFrame/interface/CrossingFrame.h" |
108 |
|
|
109 |
|
|
110 |
|
MySimEvents* MyEvents; |
111 |
< |
Geometry* Geom; |
112 |
< |
|
111 |
> |
Geometry* Geom_Tracker; |
112 |
> |
Geometry* Geom_ECAL; |
113 |
> |
Geometry* Geom_HCAL; |
114 |
> |
Geometry* Geom_Muon; |
115 |
|
|
93 |
– |
std::vector<std::string> SimHitSubdetectors; |
116 |
|
|
117 |
|
std::string OutputFile; |
118 |
|
|
119 |
+ |
std::vector<InputTag> SimTrackProducers; |
120 |
+ |
std::vector<InputTag> SimVertexProducers; |
121 |
+ |
std::vector<InputTag> SimHitProducers; |
122 |
+ |
|
123 |
+ |
std::vector<InputTag> TrackProducers; |
124 |
+ |
std::vector<InputTag> EcalRecHitProducers; |
125 |
+ |
std::vector<InputTag> HcalHBHERecHitProducers; |
126 |
+ |
std::vector<InputTag> HcalHORecHitProducers; |
127 |
+ |
std::vector<InputTag> HcalHFRecHitProducers; |
128 |
+ |
|
129 |
+ |
|
130 |
+ |
|
131 |
|
|
132 |
|
// ----------member data --------------------------- |
133 |
|
}; |
137 |
|
// |
138 |
|
OpenGLDisplayer::OpenGLDisplayer(const edm::ParameterSet& iConfig) |
139 |
|
{ |
140 |
< |
SimHitSubdetectors = iConfig.getParameter<std::vector<std::string> >("SimHitSubdetectors"); |
140 |
> |
OutputFile = iConfig.getParameter<std::string >("OutputFile"); |
141 |
> |
|
142 |
> |
SimTrackProducers = iConfig.getParameter<std::vector<InputTag> >("SimTrackProducers"); |
143 |
> |
SimVertexProducers = iConfig.getParameter<std::vector<InputTag> >("SimVertexProducers"); |
144 |
> |
SimHitProducers = iConfig.getParameter<std::vector<InputTag> >("SimHitProducers"); |
145 |
> |
|
146 |
> |
TrackProducers = iConfig.getParameter<std::vector<InputTag> >("TrackProducers"); |
147 |
> |
EcalRecHitProducers = iConfig.getParameter<std::vector<InputTag> >("EcalRecHitProducers"); |
148 |
> |
HcalHBHERecHitProducers = iConfig.getParameter<std::vector<InputTag> >("HcalHBHERecHitProducers"); |
149 |
> |
HcalHORecHitProducers = iConfig.getParameter<std::vector<InputTag> >("HcalHORecHitProducers"); |
150 |
> |
HcalHFRecHitProducers = iConfig.getParameter<std::vector<InputTag> >("HcalHFRecHitProducers"); |
151 |
|
|
108 |
– |
OutputFile = iConfig.getParameter<std::string >("OutputFile"); |
152 |
|
} |
153 |
|
|
154 |
|
|
160 |
|
void |
161 |
|
OpenGLDisplayer::beginJob(const edm::EventSetup& iSetup) |
162 |
|
{ |
163 |
+ |
DetId Detid; |
164 |
+ |
int SubDet; |
165 |
|
|
166 |
< |
MyEvents = new MySimEvents(); |
167 |
< |
Geom = new Geometry(); |
166 |
> |
MyEvents = new MySimEvents(); |
167 |
> |
Geom_Tracker = new Geometry(); |
168 |
> |
Geom_ECAL = new Geometry(); |
169 |
> |
Geom_HCAL = new Geometry(); |
170 |
> |
Geom_Muon = new Geometry(); |
171 |
> |
|
172 |
> |
|
173 |
> |
// ### TRACKER GEOMETRY ### |
174 |
|
|
175 |
|
edm::ESHandle<TrackerGeometry> tkGeom; |
176 |
|
iSetup.get<TrackerDigiGeometryRecord>().get( tkGeom ); |
177 |
< |
vector<GeomDet*> Det = tkGeom->dets(); |
177 |
> |
vector<GeomDet*> TrackerDets = tkGeom->dets(); |
178 |
|
|
179 |
< |
for(unsigned int i=0;i<Det.size();i++){ |
180 |
< |
DetId Detid = Det[i]->geographicalId(); |
181 |
< |
// int SubDet = Detid.subdetId(); |
179 |
> |
for(unsigned int i=0;i<TrackerDets.size();i++){ |
180 |
> |
Detid = TrackerDets[i]->geographicalId(); |
181 |
> |
// SubDet = Detid.subdetId(); |
182 |
|
|
183 |
< |
GeomDet* DetUnit = Det[i]; |
183 |
> |
GeomDet* DetUnit = TrackerDets[i]; |
184 |
|
if(!DetUnit)continue; |
185 |
|
const BoundPlane plane = DetUnit->surface(); |
186 |
|
const TrapezoidalPlaneBounds* trapezoidalBounds( dynamic_cast<const TrapezoidalPlaneBounds*>(&(plane.bounds()))); |
187 |
|
const RectangularPlaneBounds* rectangularBounds( dynamic_cast<const RectangularPlaneBounds*>(&(plane.bounds()))); |
188 |
|
|
189 |
< |
float width; |
190 |
< |
float length; |
191 |
< |
float thickness; |
192 |
< |
float TrapezoidalParam; |
189 |
> |
float width = 0; |
190 |
> |
float length = 0; |
191 |
> |
float thickness = 0; |
192 |
> |
float TrapezoidalParam = 0; |
193 |
|
|
194 |
|
if(trapezoidalBounds) |
195 |
|
{ |
196 |
|
std::vector<float> const & parameters = (*trapezoidalBounds).parameters(); |
197 |
< |
width = parameters[0]; |
198 |
< |
length = parameters[3]; |
197 |
> |
width = parameters[0]*2; |
198 |
> |
length = parameters[3]*2; |
199 |
|
thickness = (*trapezoidalBounds).thickness(); |
200 |
|
TrapezoidalParam = parameters[1]/parameters[0]; |
150 |
– |
|
201 |
|
}else if(rectangularBounds){ |
202 |
|
width = DetUnit->surface().bounds().width(); |
203 |
|
length = DetUnit->surface().bounds().length(); |
211 |
|
|
212 |
|
GlobalVector Pos = GlobalVector(DetUnit->position().basicVector()); |
213 |
|
|
214 |
< |
Geom->Add_TrackerDet(Detid.rawId(), TrapezoidalParam, |
214 |
> |
Geom_Tracker->Add_TrackerDet(Detid.rawId(), TrapezoidalParam, |
215 |
|
Pos.x(), Pos.y(), Pos.z(), |
216 |
|
WidthVector.x() -Pos.x(), WidthVector.y() -Pos.y(), WidthVector.z() -Pos.z(), |
217 |
|
LengthVector.x()-Pos.x(), LengthVector.y()-Pos.y(), LengthVector.z()-Pos.z(), |
219 |
|
|
220 |
|
|
221 |
|
} |
172 |
– |
Geom->Save("Tracker.geom"); |
222 |
|
|
223 |
+ |
|
224 |
+ |
// ### CALO GEOMETRY ### |
225 |
+ |
|
226 |
+ |
edm::ESHandle<CaloGeometry> CaloGeom; |
227 |
+ |
iSetup.get<IdealGeometryRecord>().get( CaloGeom ); |
228 |
+ |
const vector<DetId> CaloDets = CaloGeom->getValidDetIds(); |
229 |
+ |
|
230 |
+ |
for(unsigned int i=0;i<CaloDets.size();i++) |
231 |
+ |
{ |
232 |
+ |
Detid = CaloDets[i]; |
233 |
+ |
SubDet = Detid.subdetId(); |
234 |
+ |
|
235 |
+ |
Geometry* Geom_temp = NULL; |
236 |
+ |
if(Detid.det()==DetId::Ecal){ |
237 |
+ |
Geom_temp = Geom_ECAL; |
238 |
+ |
|
239 |
+ |
if(SubDet<1 || SubDet>3){ |
240 |
+ |
printf("Don't Save EcalTriggerTower or EcalLaserPnDiode\n"); |
241 |
+ |
continue; |
242 |
+ |
} |
243 |
+ |
}else if(Detid.det()==DetId::Hcal){ |
244 |
+ |
Geom_temp = Geom_HCAL; |
245 |
+ |
|
246 |
+ |
if(SubDet<1 || SubDet>4){ |
247 |
+ |
printf("Don't Save HcalEmpty, HcalTriggerTower, HcalOther\n"); |
248 |
+ |
continue; |
249 |
+ |
} |
250 |
+ |
}else{ |
251 |
+ |
continue; |
252 |
+ |
} |
253 |
+ |
|
254 |
+ |
const CaloCellGeometry* CellGeom = CaloGeom->getGeometry(Detid); |
255 |
+ |
GlobalPoint CellPos = CellGeom->getPosition(); |
256 |
+ |
const CaloCellGeometry::CornersVec CellCorners = CellGeom->getCorners(); |
257 |
+ |
|
258 |
+ |
Geom_temp->Add_CaloDet(Detid.rawId(), |
259 |
+ |
CellPos.x() , CellPos.y() , CellPos.z(), |
260 |
+ |
CellCorners[0].x() , CellCorners[0].y() , CellCorners[0].z() , |
261 |
+ |
CellCorners[1].x() , CellCorners[1].y() , CellCorners[1].z() , |
262 |
+ |
CellCorners[2].x() , CellCorners[2].y() , CellCorners[2].z() , |
263 |
+ |
CellCorners[3].x() , CellCorners[3].y() , CellCorners[3].z() , |
264 |
+ |
CellCorners[4].x() , CellCorners[4].y() , CellCorners[4].z() , |
265 |
+ |
CellCorners[5].x() , CellCorners[5].y() , CellCorners[5].z() , |
266 |
+ |
CellCorners[6].x() , CellCorners[6].y() , CellCorners[6].z() , |
267 |
+ |
CellCorners[7].x() , CellCorners[7].y() , CellCorners[7].z() ); |
268 |
+ |
} |
269 |
+ |
|
270 |
+ |
// ### MUON GEOMETRY ### |
271 |
+ |
|
272 |
+ |
edm::ESHandle<DTGeometry> DtGeom; |
273 |
+ |
iSetup.get<MuonGeometryRecord>().get( DtGeom ); |
274 |
+ |
const vector<GeomDet*> DtDets = DtGeom->dets(); |
275 |
+ |
|
276 |
+ |
edm::ESHandle<CSCGeometry> CscGeom; |
277 |
+ |
iSetup.get<MuonGeometryRecord>().get( CscGeom ); |
278 |
+ |
const vector<GeomDet*> CscDets = CscGeom->dets(); |
279 |
+ |
|
280 |
+ |
edm::ESHandle<RPCGeometry> RpcGeom; |
281 |
+ |
iSetup.get<MuonGeometryRecord>().get( RpcGeom ); |
282 |
+ |
const vector<GeomDet*> RpcDets = RpcGeom->dets(); |
283 |
+ |
|
284 |
+ |
vector<GeomDet*> MuonDets; |
285 |
+ |
for(unsigned int i=0;i<DtDets.size() ;i++){MuonDets.push_back(DtDets [i]);} |
286 |
+ |
for(unsigned int i=0;i<CscDets.size();i++){MuonDets.push_back(CscDets[i]);} |
287 |
+ |
for(unsigned int i=0;i<RpcDets.size();i++){MuonDets.push_back(RpcDets[i]);} |
288 |
+ |
|
289 |
+ |
|
290 |
+ |
for(unsigned int i=0;i<MuonDets.size();i++) |
291 |
+ |
{ |
292 |
+ |
Detid = DetId(MuonDets[i]->geographicalId()); |
293 |
+ |
SubDet = Detid.subdetId(); |
294 |
+ |
|
295 |
+ |
GeomDet* DetUnit = MuonDets[i]; |
296 |
+ |
if(!DetUnit)continue; |
297 |
+ |
const BoundPlane plane = DetUnit->surface(); |
298 |
+ |
const TrapezoidalPlaneBounds* trapezoidalBounds( dynamic_cast<const TrapezoidalPlaneBounds*>(&(plane.bounds()))); |
299 |
+ |
const RectangularPlaneBounds* rectangularBounds( dynamic_cast<const RectangularPlaneBounds*>(&(plane.bounds()))); |
300 |
+ |
|
301 |
+ |
float width = 0; |
302 |
+ |
float length = 0; |
303 |
+ |
float thickness = 0; |
304 |
+ |
float TrapezoidalParam = 0; |
305 |
+ |
|
306 |
+ |
if(trapezoidalBounds) |
307 |
+ |
{ |
308 |
+ |
std::vector<float> const & parameters = (*trapezoidalBounds).parameters(); |
309 |
+ |
width = parameters[0]*2; |
310 |
+ |
length = parameters[3]*2; |
311 |
+ |
thickness = (*trapezoidalBounds).thickness(); |
312 |
+ |
TrapezoidalParam = parameters[1]/parameters[0]; |
313 |
+ |
}else if(rectangularBounds){ |
314 |
+ |
width = DetUnit->surface().bounds().width(); |
315 |
+ |
length = DetUnit->surface().bounds().length(); |
316 |
+ |
thickness = DetUnit->surface().bounds().thickness(); |
317 |
+ |
TrapezoidalParam = 1; |
318 |
+ |
} |
319 |
+ |
|
320 |
+ |
Surface::GlobalPoint WidthVector = plane.toGlobal( LocalPoint(width/2, 0, 0) ); |
321 |
+ |
Surface::GlobalPoint LengthVector = plane.toGlobal( LocalPoint(0, length/2, 0) ); |
322 |
+ |
Surface::GlobalPoint ThickVector = plane.toGlobal( LocalPoint(0, 0, thickness/2) ); |
323 |
+ |
|
324 |
+ |
GlobalVector Pos = GlobalVector(DetUnit->position().basicVector()); |
325 |
+ |
|
326 |
+ |
Geom_Muon->Add_TrackerDet(Detid.rawId(), TrapezoidalParam, |
327 |
+ |
Pos.x(), Pos.y(), Pos.z(), |
328 |
+ |
WidthVector.x() -Pos.x(), WidthVector.y() -Pos.y(), WidthVector.z() -Pos.z(), |
329 |
+ |
LengthVector.x()-Pos.x(), LengthVector.y()-Pos.y(), LengthVector.z()-Pos.z(), |
330 |
+ |
ThickVector.x() -Pos.x(), ThickVector.y() -Pos.y(), ThickVector.z() -Pos.z()); |
331 |
+ |
} |
332 |
+ |
|
333 |
+ |
|
334 |
+ |
// ### Save .geom ### |
335 |
+ |
|
336 |
+ |
Geom_Tracker->Save("Tracker.geom"); |
337 |
+ |
Geom_ECAL ->Save("Ecal.geom"); |
338 |
+ |
Geom_HCAL ->Save("Hcal.geom"); |
339 |
+ |
|
340 |
+ |
printf("RPC = %i\n",Geom_Muon ->Det_Muon_RPC.size()); |
341 |
+ |
|
342 |
+ |
Geom_Muon ->Save("Muon.geom"); |
343 |
|
|
344 |
|
} |
345 |
|
|
348 |
|
OpenGLDisplayer::endJob() { |
349 |
|
|
350 |
|
MyEvents->Save((char*) OutputFile.c_str()); |
351 |
< |
MyEvents->Load((char*) OutputFile.c_str()); |
351 |
> |
// MyEvents->Load((char*) OutputFile.c_str()); |
352 |
|
} |
353 |
|
|
354 |
|
|
361 |
|
void |
362 |
|
OpenGLDisplayer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) |
363 |
|
{ |
364 |
< |
|
196 |
< |
edm::Handle<std::vector< SimTrack > > h_SimTracks; |
197 |
< |
iEvent.getByLabel("g4SimHits", h_SimTracks); |
198 |
< |
std::vector< SimTrack > SimTrackColl = *h_SimTracks.product(); |
199 |
< |
|
200 |
< |
edm::Handle<std::vector< SimVertex > > h_Vertex; |
201 |
< |
iEvent.getByLabel("g4SimHits", h_Vertex); |
202 |
< |
std::vector< SimVertex > VertexColl = *h_Vertex.product(); |
364 |
> |
MySimEvent* MyEvent = new MySimEvent; |
365 |
|
|
366 |
|
|
367 |
|
|
374 |
|
TrackingGeometry::DetContainer theDetUnits = theTracker.dets(); |
375 |
|
|
376 |
|
|
377 |
+ |
// Save Data |
378 |
+ |
for(unsigned int i=0;i<SimTrackProducers.size();i++){ |
379 |
+ |
edm::Handle<std::vector< SimTrack > > h_SimTracks; |
380 |
+ |
iEvent.getByLabel(SimTrackProducers[i], h_SimTracks); |
381 |
+ |
std::vector< SimTrack > SimTrackColl = *h_SimTracks.product(); |
382 |
|
|
383 |
< |
|
217 |
< |
// Save the data |
218 |
< |
|
219 |
< |
MySimEvent* MyEvent = new MySimEvent; |
220 |
< |
|
221 |
< |
for ( unsigned int a = 0; a < SimTrackColl.size(); ++a ) { |
383 |
> |
for ( unsigned int a = 0; a < SimTrackColl.size(); ++a ) { |
384 |
|
MySimTrack MysimTrack; |
385 |
|
SimTrack simTrack =SimTrackColl[a]; |
386 |
|
|
394 |
|
MysimTrack.charge =simTrack.charge(); |
395 |
|
|
396 |
|
MyEvent->MySimTrackCollection.push_back(MysimTrack); |
397 |
< |
} |
397 |
> |
} |
398 |
> |
} |
399 |
> |
|
400 |
|
|
401 |
+ |
for(unsigned int i=0;i<SimVertexProducers.size();i++){ |
402 |
+ |
edm::Handle<std::vector< SimVertex > > h_Vertex; |
403 |
+ |
iEvent.getByLabel(SimVertexProducers[i], h_Vertex); |
404 |
+ |
std::vector< SimVertex > VertexColl = *h_Vertex.product(); |
405 |
|
|
406 |
< |
for (unsigned int b = 0; b < VertexColl.size(); ++b ) { |
406 |
> |
for (unsigned int b = 0; b < VertexColl.size(); ++b ) { |
407 |
|
MySimVertex MyVertex; |
408 |
|
SimVertex Vertex = VertexColl[b]; |
409 |
|
|
413 |
|
MyVertex.z =Vertex.position().z(); |
414 |
|
|
415 |
|
MyEvent->MySimVertexCollection.push_back(MyVertex); |
416 |
< |
} |
416 |
> |
} |
417 |
> |
} |
418 |
|
|
419 |
< |
for(unsigned int i=0; i<SimHitSubdetectors.size(); i++) |
251 |
< |
{ |
419 |
> |
for(unsigned int i=0;i<SimHitProducers.size();i++){ |
420 |
|
edm::Handle<std::vector< PSimHit > > h_Hits; |
421 |
< |
iEvent.getByLabel("g4SimHits",SimHitSubdetectors[i].c_str(), h_Hits); |
421 |
> |
iEvent.getByLabel(SimHitProducers[i], h_Hits); |
422 |
|
std::vector< PSimHit > Hits = *h_Hits.product(); |
423 |
|
|
424 |
|
for(unsigned int h=0; h<Hits.size(); h++) |
434 |
|
Hit.dEdX = Hits[h].energyLoss(); |
435 |
|
|
436 |
|
MyEvent->MyPSimHitCollection.push_back(Hit); |
269 |
– |
|
437 |
|
} |
438 |
|
} |
439 |
|
|
273 |
– |
edm::Handle<std::vector< reco::Track > > h_Tracks; |
274 |
– |
iEvent.getByLabel("ctfWithMaterialTracks", h_Tracks); |
275 |
– |
std::vector< reco::Track > TrackColl = *h_Tracks.product(); |
440 |
|
|
441 |
< |
for ( unsigned int t = 0; t < TrackColl.size(); ++t ) { |
441 |
> |
for(unsigned int i=0;i<TrackProducers.size();i++){ |
442 |
> |
edm::Handle<std::vector< reco::Track > > h_Tracks; |
443 |
> |
iEvent.getByLabel(TrackProducers[i], h_Tracks); |
444 |
> |
std::vector< reco::Track > TrackColl = *h_Tracks.product(); |
445 |
> |
|
446 |
> |
for ( unsigned int t = 0; t < TrackColl.size(); ++t ) { |
447 |
|
MyRecoTrack MyrecoTrack; |
448 |
|
reco::Track recoTrack =TrackColl[t]; |
449 |
|
|
281 |
– |
// MyrecoTrack.Hits = new MyRecoHit[MyrecoTrack.N]; |
282 |
– |
|
450 |
|
for(unsigned int h=0;h<recoTrack.recHitsSize();h++){ |
451 |
|
TrackingRecHitRef h_it = recoTrack.recHit(h); |
452 |
|
if(!h_it->isValid() )continue; |
461 |
|
hit.DetId = detId.rawId(); |
462 |
|
hit.Charge = -1; |
463 |
|
MyrecoTrack.Hits.push_back(hit); |
297 |
– |
|
298 |
– |
|
299 |
– |
// printf("%8.2f %8.2f %8.2f\n",theDet->surface().toGlobal(localPos).x(),theDet->surface().toGlobal(localPos).y(),theDet->surface().toGlobal(localPos).z()); |
464 |
|
} |
465 |
|
MyEvent->MyRecoTrackCollection.push_back(MyrecoTrack); |
466 |
+ |
} |
467 |
|
} |
468 |
|
|
304 |
– |
MyEvents->Events.push_back(MyEvent); |
469 |
|
|
470 |
+ |
for(unsigned int i=0;i<EcalRecHitProducers.size();i++){ |
471 |
+ |
edm::Handle<EcalRecHitCollection > h_Ecal_RecHits; |
472 |
+ |
iEvent.getByLabel(EcalRecHitProducers[i], h_Ecal_RecHits); |
473 |
+ |
EcalRecHitCollection Ecal_RecHits = *h_Ecal_RecHits.product(); |
474 |
+ |
|
475 |
+ |
for(unsigned int eh=0;eh<Ecal_RecHits.size();eh++){ |
476 |
+ |
MyCaloHit temp_EcalHit; |
477 |
+ |
temp_EcalHit.E = Ecal_RecHits[eh].energy(); |
478 |
+ |
temp_EcalHit.t = Ecal_RecHits[eh].time(); |
479 |
+ |
temp_EcalHit.DetId = (Ecal_RecHits[eh].detid()).rawId(); |
480 |
+ |
|
481 |
+ |
MyEvent->MyEcalCaloHitCollection.push_back(temp_EcalHit); |
482 |
+ |
} |
483 |
+ |
} |
484 |
+ |
|
485 |
+ |
|
486 |
+ |
for(unsigned int i=0;i<HcalHBHERecHitProducers.size();i++){ |
487 |
+ |
edm::Handle<HBHERecHitCollection > h_HcalHBHE_RecHits; |
488 |
+ |
iEvent.getByLabel(HcalHBHERecHitProducers[i], h_HcalHBHE_RecHits); |
489 |
+ |
HBHERecHitCollection HcalHBHE_RecHits = *h_HcalHBHE_RecHits.product(); |
490 |
+ |
|
491 |
+ |
for(unsigned int hh=0;hh<HcalHBHE_RecHits.size();hh++){ |
492 |
+ |
MyCaloHit temp_HcalHBHEHit; |
493 |
+ |
temp_HcalHBHEHit.E = HcalHBHE_RecHits[hh].energy(); |
494 |
+ |
temp_HcalHBHEHit.t = HcalHBHE_RecHits[hh].time(); |
495 |
+ |
temp_HcalHBHEHit.DetId = (HcalHBHE_RecHits[hh].detid()).rawId(); |
496 |
+ |
|
497 |
+ |
MyEvent->MyHcalCaloHitCollection.push_back(temp_HcalHBHEHit); |
498 |
+ |
} |
499 |
+ |
} |
500 |
+ |
|
501 |
+ |
|
502 |
+ |
for(unsigned int i=0;i<HcalHORecHitProducers.size();i++){ |
503 |
+ |
edm::Handle<HORecHitCollection > h_HcalHO_RecHits; |
504 |
+ |
iEvent.getByLabel(HcalHORecHitProducers[i], h_HcalHO_RecHits); |
505 |
+ |
HORecHitCollection HcalHO_RecHits = *h_HcalHO_RecHits.product(); |
506 |
+ |
|
507 |
+ |
for(unsigned int hh=0;hh<HcalHO_RecHits.size();hh++){ |
508 |
+ |
MyCaloHit temp_HcalHOHit; |
509 |
+ |
temp_HcalHOHit.E = HcalHO_RecHits[hh].energy(); |
510 |
+ |
temp_HcalHOHit.t = HcalHO_RecHits[hh].time(); |
511 |
+ |
temp_HcalHOHit.DetId = (HcalHO_RecHits[hh].detid()).rawId(); |
512 |
+ |
|
513 |
+ |
MyEvent->MyHcalCaloHitCollection.push_back(temp_HcalHOHit); |
514 |
+ |
} |
515 |
+ |
} |
516 |
+ |
|
517 |
+ |
|
518 |
+ |
for(unsigned int i=0;i<HcalHFRecHitProducers.size();i++){ |
519 |
+ |
edm::Handle<HFRecHitCollection > h_HcalHF_RecHits; |
520 |
+ |
iEvent.getByLabel(HcalHFRecHitProducers[i], h_HcalHF_RecHits); |
521 |
+ |
HFRecHitCollection HcalHF_RecHits = *h_HcalHF_RecHits.product(); |
522 |
+ |
|
523 |
+ |
for(unsigned int hh=0;hh<HcalHF_RecHits.size();hh++){ |
524 |
+ |
MyCaloHit temp_HcalHFHit; |
525 |
+ |
temp_HcalHFHit.E = HcalHF_RecHits[hh].energy(); |
526 |
+ |
temp_HcalHFHit.t = HcalHF_RecHits[hh].time(); |
527 |
+ |
temp_HcalHFHit.DetId = (HcalHF_RecHits[hh].detid()).rawId(); |
528 |
+ |
|
529 |
+ |
MyEvent->MyHcalCaloHitCollection.push_back(temp_HcalHFHit); |
530 |
+ |
} |
531 |
+ |
} |
532 |
+ |
|
533 |
+ |
MyEvents->Events.push_back(MyEvent); |
534 |
|
} |
535 |
|
|
536 |
|
|