37 #include "TEveManager.h" 38 #include "TEveTrack.h" 39 #include "TEveTrackPropagator.h" 41 #include "TGeoManager.h" 42 #include "TGeoMatrix.h" 43 #include "TEveGeoNode.h" 44 #include "TEveTrans.h" 45 #include "TEveScene.h" 46 #include "TGLScenePad.h" 47 #include "TGLRnrCtx.h" 56 TEveGeoTopNode*
make_node(
const TString&
path, Int_t vis_level, Bool_t global_cs);
96 m_trackTags(iConfig.getUntrackedParameter<
edm::InputTag>(
"tracks")),
114 if (! gGeoManager->cd(path))
116 Warning(
"make_node",
"Path '%s' not found.", path.Data());
120 TEveGeoTopNode* tn =
new TEveGeoTopNode(gGeoManager, gGeoManager->GetCurrentNode());
121 tn->SetVisLevel(vis_level);
124 tn->RefMainTrans().SetFrom(*gGeoManager->GetCurrentMatrix());
138 printf(
"DummyEvelyser::beginJob\n");
152 TEveTrackPropagator *prop =
m_trackList->GetPropagator();
153 prop->SetStepper(TEveTrackPropagator::kRungeKutta);
161 printf(
"DummyEvelyser::endJob\n");
174 printf(
"DummyEvelyser::beginRun\n");
178 m_geomList =
new TEveElementList(
"DummyEvelyzer Geom");
180 m_eve->
getManager()->GetGlobalScene()->GetGLScene()->SetStyle(TGLRnrCtx::kWireFrame);
186 printf(
"DummyEvelyser::endRun\n");
197 TEveGeoManagerHolder _tgeo(const_cast<TGeoManager*>(geom.
product()));
202 make_node(
"/cms:World_1/cms:CMSE_1/tracker:Tracker_1", 1, kTRUE);
203 make_node(
"/cms:World_1/cms:CMSE_1/caloBase:CALO_1", 1, kTRUE);
204 make_node(
"/cms:World_1/cms:CMSE_1/muonBase:MUON_1", 1, kTRUE);
209 printf(
"DummyEvelyser::analyze\n");
216 <<
"Error! Can't get Track collection " 238 for (
auto itTrack = trackCollection.begin();
239 itTrack != trackCollection.end(); ++itTrack, ++cnt)
242 trk->SetElementName (TString::Format(
"Track %d", cnt));
243 trk->SetElementTitle(TString::Format(
"Track %d, pt=%.3f", cnt, itTrack->pt()));
edm::Service< EveService > m_eve
void endRun(const edm::Run &, const edm::EventSetup &) override
TEveTrack * prepareTrack(const reco::Track &track, TEveTrackPropagator *propagator, const std::vector< TEveVector > &extraRefPoints=std::vector< TEveVector >())
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< Track > TrackCollection
collection of Tracks
DummyEvelyser(const edm::ParameterSet &)
edm::ESWatcher< DisplayGeomRecord > m_geomWatcher
edm::EDGetTokenT< reco::TrackCollection > trackCollectionToken_
void get(HolderT &iHolder) const
void beginRun(const edm::Run &, const edm::EventSetup &) override
void display(const std::string &info="")
TEveGeoTopNode * make_node(const TString &path, Int_t vis_level, Bool_t global_cs)
~DummyEvelyser() override
void analyze(const edm::Event &, const edm::EventSetup &) override
T const * product() const
TEveManager * getManager()
void setupFieldForPropagator(TEveTrackPropagator *prop)
bool check(const edm::EventSetup &iSetup)
edm::InputTag m_trackTags
void AddElement(TEveElement *el)
TEveTrackList * m_trackList
T const * product() const
void remakeGeometry(const DisplayGeomRecord &dgRec)
void AddGlobalElement(TEveElement *el)