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" 55 TEveGeoTopNode*
make_node(
const TString&
path, Int_t vis_level, Bool_t global_cs);
94 m_trackTags(iConfig.getUntrackedParameter<
edm::
InputTag>(
"tracks")),
109 if (!gGeoManager->cd(
path)) {
110 Warning(
"make_node",
"Path '%s' not found.",
path.Data());
114 TEveGeoTopNode* tn =
new TEveGeoTopNode(gGeoManager, gGeoManager->GetCurrentNode());
115 tn->SetVisLevel(vis_level);
117 tn->RefMainTrans().SetFrom(*gGeoManager->GetCurrentMatrix());
129 printf(
"DummyEvelyser::beginJob\n");
142 TEveTrackPropagator* prop =
m_trackList->GetPropagator();
143 prop->SetStepper(TEveTrackPropagator::kRungeKutta);
150 printf(
"DummyEvelyser::endJob\n");
161 printf(
"DummyEvelyser::beginRun\n");
164 m_geomList =
new TEveElementList(
"DummyEvelyzer Geom");
166 m_eve->
getManager()->GetGlobalScene()->GetGLScene()->SetStyle(TGLRnrCtx::kWireFrame);
177 TEveGeoManagerHolder _tgeo(const_cast<TGeoManager*>(&dgRec.
get(
geomToken_)));
182 make_node(
"/cms:World_1/cms:CMSE_1/tracker:Tracker_1", 1, kTRUE);
183 make_node(
"/cms:World_1/cms:CMSE_1/caloBase:CALO_1", 1, kTRUE);
184 make_node(
"/cms:World_1/cms:CMSE_1/muonBase:MUON_1", 1, kTRUE);
188 printf(
"DummyEvelyser::analyze\n");
194 edm::LogError(
"DummyEvelyser") <<
"Error! Can't get Track collection " << std::endl;
216 trk->SetElementName(TString::Format(
"Track %d", cnt));
217 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 >())
T const * product() const
std::vector< Track > TrackCollection
collection of Tracks
DummyEvelyser(const edm::ParameterSet &)
Log< level::Error, false > LogError
edm::ESWatcher< DisplayGeomRecord > m_geomWatcher
const edm::ESGetToken< TGeoManager, DisplayGeomRecord > geomToken_
#define DEFINE_FWK_MODULE(type)
void beginRun(const edm::Run &, const edm::EventSetup &) override
void display(const std::string &info="")
edm::EDGetTokenT< reco::TrackCollection > trackCollectionToken_
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
TEveManager * getManager()
void setupFieldForPropagator(TEveTrackPropagator *prop)
bool check(const edm::EventSetup &iSetup)
edm::InputTag m_trackTags
void AddElement(TEveElement *el)
TEveTrackList * m_trackList
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
void remakeGeometry(const DisplayGeomRecord &dgRec)
void AddGlobalElement(TEveElement *el)