Skip to content

Commit d537807

Browse files
Merge pull request #188 from sophiemiddleton/Mu2eDisplay
Many improvements
2 parents e644972 + cb84c17 commit d537807

File tree

9 files changed

+161
-202
lines changed

9 files changed

+161
-202
lines changed

examples/nominal_example.fcl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,8 @@ physics.analyzers.Mu2eEventDisplay.filler.addHits : false # adds ComboHits
3232
physics.analyzers.Mu2eEventDisplay.filler.addCrvClusters : true
3333
physics.analyzers.Mu2eEventDisplay.filler.addCrvHits : false
3434
physics.analyzers.Mu2eEventDisplay.filler.addTimeClusters : false
35-
3635
physics.analyzers.Mu2eEventDisplay.addTrkStrawHits : true
37-
3836
physics.analyzers.Mu2eEventDisplay.filler.addCosmicTrackSeeds : false
39-
4037
physics.analyzers.Mu2eEventDisplay.filler.addMCTraj : true
4138

4239
# allows movement through events in sequential order

fcl/prolog.fcl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Mu2eEventDisplay : {
1818
addCrystalHits : false
1919
addCRVBars : false
2020
addKalInter : false
21-
useBTrk : false
2221
specifyTag : false // IMPORTANT: override to make the following selections!!!
2322
filler : {
2423
diagLevel : 0

inc/REveMu2eDataInterface.hh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <ROOT/REveGeoShape.hxx>
88
#include <ROOT/REveBox.hxx>
99
#include <ROOT/REveScene.hxx>
10+
#include <ROOT/REveCompound.hxx>
1011
#include <TGeoBBox.h>
1112
#include <TGeoMatrix.h>
1213
#include <ROOT/REveTrackPropagator.hxx>
@@ -60,10 +61,9 @@ namespace mu2e{
6061
void AddCRVInfo(REX::REveManager *&eveMng, bool firstLoop_, std::tuple<std::vector<std::string>, std::vector<const CrvRecoPulseCollection*>> crvpulse_tuple, REX::REveElement* &scene, bool extracted, bool addCRVBars);
6162
void AddCRVClusters(REX::REveManager *&eveMng, bool firstLoop_, std::tuple<std::vector<std::string>, std::vector<const CrvCoincidenceClusterCollection*>> crvpulse_tuple, REX::REveElement* &scene, bool extracted, bool addCRVBars);
6263
void AddHelixSeedCollection(REX::REveManager *&eveMng,bool firstloop, std::tuple<std::vector<std::string>, std::vector<const HelixSeedCollection*>> helix_tuple, REX::REveElement* &scene);
63-
void AddKalIntersection(KalSeed const& kalseed, REX::REveElement* &scene);
64-
template<class KTRAJc> void AddTrkStrawHit(KalSeed const& kalseed, REX::REveElement* &scene, std::unique_ptr<KTRAJc> &trajectory);
64+
void AddKalIntersection(KalSeed const& kalseed, REX::REveElement* &scene, REX::REveCompound *products);
65+
template<class KTRAJc> void AddTrkStrawHit(KalSeed const& kalseed, REX::REveElement* &scene, std::unique_ptr<KTRAJc> &trajectory, REX::REveCompound *products);
6566
void AddTrkCaloHit(KalSeed const& kalseed, REX::REveElement* &scene);
66-
void AddKalSeedPtrCollection(REX::REveManager *&eveMng,bool firstloop, std::tuple<std::vector<std::string>, std::vector<const KalSeedPtrCollection*>> track_tuple, REX::REveElement* &scene );
6767
template<class KTRAJ> void AddKinKalTrajectory( std::unique_ptr<KTRAJ> &trajectory, REX::REveElement* &scene, unsigned int j, std::string kaltitle, double& t1, double& t2);
6868
void FillKinKalTrajectory(REX::REveManager *&eveMng, bool firstloop, REX::REveElement* &scene, std::tuple<std::vector<std::string>, std::vector<const KalSeedPtrCollection*>> track_tuple, bool kalinter, bool hits, double& t1, double& t2);
6969
void AddCosmicTrackFit(REX::REveManager *&eveMng, bool firstLoop_, const mu2e::CosmicTrackSeedCollection *cosmiccol, REX::REveElement* &scene);

inc/REveMu2eMCInterface.hh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
#include <ROOT/REveManager.hxx>
66
#include <ROOT/REveLine.hxx>
77
#include <ROOT/REveScene.hxx>
8+
#include <ROOT/REveCompound.hxx>
89
#include "Offline/GeometryService/inc/DetectorSystem.hh"
910
#include "Offline/Mu2eInterfaces/inc/Detector.hh"
1011
#include "Offline/DataProducts/inc/GenVector.hh"
1112
#include "Offline/MCDataProducts/inc/MCTrajectoryPoint.hh"
1213
#include "Offline/MCDataProducts/inc/MCTrajectoryCollection.hh"
1314
#include "Offline/MCDataProducts/inc/SurfaceStep.hh"
15+
#include "Offline/MCDataProducts/inc/MCRelationship.hh"
1416
#include <TApplication.h>
1517
#include <TEvePad.h>
1618
#include <TObject.h>

inc/REveMu2eMainWindow.hh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,9 @@ namespace mu2e {
131131
bool addTrkErrBar = true;
132132
bool addCrystalDraw = false;
133133
bool addCRVBars = true;
134-
bool useBTrk = false;
135134
DrawOptions(){};
136-
DrawOptions(bool cosmictracks, bool helices, bool tracks, bool calodigis, bool clusters, bool combohits, bool crv, bool crvclu, bool timeclusters, bool trkhits, bool mctraj, bool surfsteps, bool errbar, bool crys, bool crvbars, bool usebtrk)
137-
: addCosmicTracks(cosmictracks), addHelices(helices), addTracks(tracks), addCaloDigis(calodigis), addClusters(clusters), addComboHits(combohits), addCRVInfo(crv), addCRVClusters(crvclu), addTimeClusters(timeclusters), addTrkHits(trkhits), addMCTrajectories(mctraj), addSurfaceSteps(surfsteps), addTrkErrBar(errbar), addCrystalDraw(crys), addCRVBars(crvbars), useBTrk(usebtrk) {};
135+
DrawOptions(bool cosmictracks, bool helices, bool tracks, bool calodigis, bool clusters, bool combohits, bool crv, bool crvclu, bool timeclusters, bool trkhits, bool mctraj, bool surfsteps, bool errbar, bool crys, bool crvbars)
136+
: addCosmicTracks(cosmictracks), addHelices(helices), addTracks(tracks), addCaloDigis(calodigis), addClusters(clusters), addComboHits(combohits), addCRVInfo(crv), addCRVClusters(crvclu), addTimeClusters(timeclusters), addTrkHits(trkhits), addMCTrajectories(mctraj), addSurfaceSteps(surfsteps), addTrkErrBar(errbar), addCrystalDraw(crys), addCRVBars(crvbars) {};
138137
};
139138

140139
class REveMu2eMainWindow : public REX::REveElement {

src/Mu2eEventDisplay_module.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ namespace mu2e
125125
fhicl::Atom<bool> addKalInter{Name("addKalInter"), Comment("show Kal intersections"),true};
126126
fhicl::Atom<bool> addTrkStrawHits{Name("addTrkStrawHits"), Comment("show Kal trk straw hits"),true};
127127
fhicl::Atom<bool> addTrkCaloHits{Name("addTrkCaloHits"), Comment("show Kal trk cal ohits"),true};
128-
fhicl::Atom<bool> useBTrk{Name("useBTrk"), Comment("to use older kal seed views"),false};
129128
fhicl::Atom<bool> specifyTag{Name("specifyTag"), Comment("to only select events of selected input tag"),false};
130129
fhicl::Table<CollectionFiller::Config> filler{Name("filler"),Comment("fill collections")};
131130
fhicl::Sequence<int>particles{Name("particles"),Comment("PDGcodes to plot")};
@@ -187,7 +186,6 @@ namespace mu2e
187186
bool addKalInter_;
188187
bool addTrkStrawHits_;
189188
bool addTrkCaloHits_;
190-
bool useBTrk_;
191189

192190
bool specifyTag_ = false;
193191
TDirectory* directory_ = nullptr;
@@ -240,7 +238,6 @@ namespace mu2e
240238
addKalInter_(conf().addKalInter()),
241239
addTrkStrawHits_(conf().addTrkStrawHits()),
242240
addTrkCaloHits_(conf().addTrkCaloHits()),
243-
useBTrk_(conf().useBTrk()),
244241
specifyTag_(conf().specifyTag()),
245242
filler_(conf().filler()),
246243
particles_(conf().particles()),
@@ -514,7 +511,7 @@ namespace mu2e
514511
if(diagLevel_ == 1) std::cout<<"[Mu2eEventDisplay : process_single_event] -- calls to data interface "<<std::endl;
515512

516513
// fill draw options
517-
DrawOptions drawOpts(filler_.addCosmicTrackSeeds_, filler_.addHelixSeeds_, filler_.addKalSeeds_, filler_.addCaloDigis_, filler_.addClusters_, filler_.addHits_, filler_.addCrvHits_, filler_.addCrvClusters_, filler_.addTimeClusters_, filler_.addTrkHits_, filler_.addMCTraj_, filler_.addSurfSteps_, addErrBar_, addCrystalHits_, addCRVBars_, useBTrk_);
514+
DrawOptions drawOpts(filler_.addCosmicTrackSeeds_, filler_.addHelixSeeds_, filler_.addKalSeeds_, filler_.addCaloDigis_, filler_.addClusters_, filler_.addHits_, filler_.addCrvHits_, filler_.addCrvClusters_, filler_.addTimeClusters_, filler_.addTrkHits_, filler_.addMCTraj_, filler_.addSurfSteps_, addErrBar_, addCrystalHits_, addCRVBars_);
518515

519516
// fill kinkal options
520517
KinKalOptions KKOpts(addKalInter_, addTrkStrawHits_, addTrkCaloHits_);

0 commit comments

Comments
 (0)