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

Comparing UserCode/FastOpenGlDisplayer/src/OpenGLDisplayer.cc (file contents):
Revision 1.11 by querten, Sun Mar 23 09:45:19 2008 UTC vs.
Revision 1.14 by roberfro, Thu Apr 3 12:18:29 2008 UTC

# Line 54 | Line 54
54   #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
55   #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
56  
57 <
57 > #include "DataFormats/CaloRecHit/interface/CaloRecHit.h"
58 > #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
59 > #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
60  
61   #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
62   #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
# Line 106 | Line 108 | class OpenGLDisplayer : public edm::EDAn
108        std::vector<std::string> SimHitSubdetectors;
109  
110        std::string              OutputFile;
111 +      std::string              trackProducer;
112  
113  
114        // ----------member data ---------------------------
# Line 119 | Line 122 | OpenGLDisplayer::OpenGLDisplayer(const e
122      SimHitSubdetectors  = iConfig.getParameter<std::vector<std::string> >("SimHitSubdetectors");
123  
124      OutputFile          = iConfig.getParameter<std::string >("OutputFile");
125 +
126 +    trackProducer = iConfig.getParameter<std::string >("TrackProducer");
127   }
128  
129  
# Line 247 | Line 252 | void
252   OpenGLDisplayer::endJob() {
253    
254     MyEvents->Save((char*) OutputFile.c_str());
255 <   MyEvents->Load((char*) OutputFile.c_str());
255 > //   MyEvents->Load((char*) OutputFile.c_str());
256   }
257  
258  
# Line 338 | Line 343 | OpenGLDisplayer::analyze(const edm::Even
343             }
344          }
345  
346 +        // access primary tracks
347          edm::Handle<std::vector< reco::Track > > h_Tracks;
348 <        iEvent.getByLabel("ctfWithMaterialTracks", h_Tracks);
348 >        iEvent.getByLabel(trackProducer, h_Tracks);
349          std::vector< reco::Track > TrackColl = *h_Tracks.product();
350  
351          for ( unsigned int t = 0; t < TrackColl.size(); ++t ) {
# Line 369 | Line 375 | OpenGLDisplayer::analyze(const edm::Even
375                  MyEvent->MyRecoTrackCollection.push_back(MyrecoTrack);
376          }
377  
378 +
379 +
380 +        edm::Handle<EcalRecHitCollection > h_EcalEB_RecHits;
381 +        iEvent.getByLabel("ecalRecHit","EcalRecHitsEB", h_EcalEB_RecHits);
382 +        EcalRecHitCollection EcalEB_RecHits = *h_EcalEB_RecHits.product();
383 +
384 +        for(unsigned int eh=0;eh<EcalEB_RecHits.size();eh++){
385 +                MyCaloHit temp_EcalEBHit;
386 +                temp_EcalEBHit.E     = EcalEB_RecHits[eh].energy();
387 +                temp_EcalEBHit.t     = EcalEB_RecHits[eh].time();
388 +                temp_EcalEBHit.DetId = (EcalEB_RecHits[eh].detid()).rawId();
389 +        
390 +                MyEvent->MyEcalCaloHitCollection.push_back(temp_EcalEBHit);
391 +        }
392 +
393 +
394 +        edm::Handle<EcalRecHitCollection > h_EcalEE_RecHits;
395 +        iEvent.getByLabel("ecalRecHit","EcalRecHitsEE", h_EcalEE_RecHits);
396 +        EcalRecHitCollection EcalEE_RecHits = *h_EcalEE_RecHits.product();
397 +
398 +        for(unsigned int eh=0;eh<EcalEE_RecHits.size();eh++){
399 +                MyCaloHit temp_EcalEEHit;
400 +                temp_EcalEEHit.E     = EcalEE_RecHits[eh].energy();
401 +                temp_EcalEEHit.t     = EcalEE_RecHits[eh].time();
402 +                temp_EcalEEHit.DetId = (EcalEE_RecHits[eh].detid()).rawId();
403 +
404 +                MyEvent->MyEcalCaloHitCollection.push_back(temp_EcalEEHit);
405 +        }
406 +
407 +
408 +        edm::Handle<EcalRecHitCollection > h_EcalES_RecHits;
409 +        iEvent.getByLabel("ecalPreshowerRecHit","EcalRecHitsES", h_EcalES_RecHits);
410 +        EcalRecHitCollection EcalES_RecHits = *h_EcalES_RecHits.product();
411 +
412 +        for(unsigned int eh=0;eh<EcalES_RecHits.size();eh++){
413 +                MyCaloHit temp_EcalESHit;
414 +                temp_EcalESHit.E     = EcalES_RecHits[eh].energy();
415 +                temp_EcalESHit.t     = EcalES_RecHits[eh].time();
416 +                temp_EcalESHit.DetId = (EcalES_RecHits[eh].detid()).rawId();
417 +
418 +                MyEvent->MyEcalCaloHitCollection.push_back(temp_EcalESHit);
419 +        }
420 +
421 +
422 +
423 +        edm::Handle<HBHERecHitCollection > h_HcalHBHE_RecHits;
424 +        iEvent.getByLabel("hbhereco", h_HcalHBHE_RecHits);
425 +        HBHERecHitCollection HcalHBHE_RecHits = *h_HcalHBHE_RecHits.product();
426 +
427 +        for(unsigned int hh=0;hh<HcalHBHE_RecHits.size();hh++){
428 +                MyCaloHit temp_HcalHBHEHit;
429 +                temp_HcalHBHEHit.E      = HcalHBHE_RecHits[hh].energy();
430 +                temp_HcalHBHEHit.t      = HcalHBHE_RecHits[hh].time();
431 +                temp_HcalHBHEHit.DetId = (HcalHBHE_RecHits[hh].detid()).rawId();
432 +
433 +                MyEvent->MyHcalCaloHitCollection.push_back(temp_HcalHBHEHit);
434 +        }
435 +
436 +
437 +        edm::Handle<HORecHitCollection > h_HcalHO_RecHits;
438 +        iEvent.getByLabel("horeco", h_HcalHO_RecHits);
439 +        HORecHitCollection HcalHO_RecHits = *h_HcalHO_RecHits.product();
440 +
441 +        for(unsigned int hh=0;hh<HcalHO_RecHits.size();hh++){
442 +                MyCaloHit temp_HcalHOHit;
443 +                temp_HcalHOHit.E      = HcalHO_RecHits[hh].energy();
444 +                temp_HcalHOHit.t      = HcalHO_RecHits[hh].time();
445 +                temp_HcalHOHit.DetId = (HcalHO_RecHits[hh].detid()).rawId();
446 +
447 +                MyEvent->MyHcalCaloHitCollection.push_back(temp_HcalHOHit);
448 +        }
449 +
450 +        edm::Handle<HFRecHitCollection > h_HcalHF_RecHits;
451 +        iEvent.getByLabel("hfreco", h_HcalHF_RecHits);
452 +        HFRecHitCollection HcalHF_RecHits = *h_HcalHF_RecHits.product();
453 +
454 +        for(unsigned int hh=0;hh<HcalHF_RecHits.size();hh++){
455 +                MyCaloHit temp_HcalHFHit;
456 +                temp_HcalHFHit.E      = HcalHF_RecHits[hh].energy();
457 +                temp_HcalHFHit.t      = HcalHF_RecHits[hh].time();
458 +                temp_HcalHFHit.DetId = (HcalHF_RecHits[hh].detid()).rawId();
459 +
460 +                MyEvent->MyHcalCaloHitCollection.push_back(temp_HcalHFHit);
461 +        }
462 +
463 +
464 +
465 +
466 +
467 +
468 +
469 +
470 +
471 +
472 +
473          MyEvents->Events.push_back(MyEvent);  
474  
475   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines