Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:10:40

0001 // @(#)root/eve7:$Id$
0002 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT7_REveTrackProjected
0013 #define ROOT7_REveTrackProjected
0014 
0015 #include <ROOT/REveTrack.hxx>
0016 #include <ROOT/REveProjectionBases.hxx>
0017 
0018 namespace ROOT {
0019 namespace Experimental {
0020 
0021 ////////////////////////////////////////////////////////////////////////////////
0022 /// REveTrackProjected
0023 /// Projected copy of a REveTrack.
0024 ////////////////////////////////////////////////////////////////////////////////
0025 
0026 class REveTrackProjected : public REveTrack,
0027                            public REveProjected
0028 {
0029 private:
0030    REveTrackProjected(const REveTrackProjected &) = delete;
0031    REveTrackProjected &operator=(const REveTrackProjected &) = delete;
0032 
0033    Int_t GetBreakPointIdx(Int_t start);
0034 
0035    REveVector *fOrigPnts{nullptr}; // original track points
0036 
0037 protected:
0038    std::vector<UInt_t> fBreakPoints; // indices of track break-points
0039 
0040    void SetDepthLocal(Float_t d) override;
0041 
0042 public:
0043    REveTrackProjected() = default;
0044    ~REveTrackProjected() override;
0045 
0046    void SetProjection(REveProjectionManager *mng, REveProjectable *model) override;
0047 
0048    void UpdateProjection() override;
0049    REveElement *GetProjectedAsElement() override { return this; }
0050    void MakeTrack(Bool_t recurse = kTRUE) override;
0051 
0052    void PrintLineSegments();
0053 
0054    void SecSelected(REveTrack *) override; // marked as signal in REveTrack
0055 
0056    Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset) override;
0057    void BuildRenderData() override;
0058 };
0059 
0060 ////////////////////////////////////////////////////////////////////////////////
0061 /// REveTrackListProjected
0062 /// Specialization of REveTrackList for holding REveTrackProjected objects.
0063 ////////////////////////////////////////////////////////////////////////////////
0064 
0065 class REveTrackListProjected : public REveTrackList, public REveProjected {
0066 private:
0067    REveTrackListProjected(const REveTrackListProjected &) = delete;
0068    REveTrackListProjected &operator=(const REveTrackListProjected &) = delete;
0069 
0070 protected:
0071    void SetDepthLocal(Float_t d) override;
0072 
0073 public:
0074    REveTrackListProjected();
0075    ~REveTrackListProjected() override {}
0076 
0077    void SetProjection(REveProjectionManager *proj, REveProjectable *model) override;
0078    void UpdateProjection() override {}
0079    REveElement *GetProjectedAsElement() override { return this; }
0080 
0081    void SetDepth(Float_t d) override;
0082    virtual void SetDepth(Float_t d, REveElement *el);
0083 };
0084 
0085 } // namespace Experimental
0086 } // namespace ROOT
0087 
0088 #endif