Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/DDEve/HitActors.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 //==========================================================================
0002 //  AIDA Detector description implementation 
0003 //--------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 // Author     : M.Frank
0011 //
0012 //==========================================================================
0013 #ifndef DDEVE_HITACTORS_H
0014 #define DDEVE_HITACTORS_H
0015 
0016 // Framework include files
0017 #include "DDEve/EventHandler.h"
0018 #include "DDEve/DisplayConfiguration.h"
0019 
0020 // Forward declarations
0021 class THF2;
0022 class TEveElement;
0023 class TEvePointSet;
0024 class TEveBoxSet;
0025 
0026 /// Namespace for the AIDA detector description toolkit
0027 namespace dd4hep {
0028 
0029   /// Fill EtaPhi histograms from a hit collection
0030   /*
0031    *  \author  M.Frank
0032    *  \version 1.0
0033    *  \ingroup DD4HEP_EVE
0034    */
0035   struct EtaPhiHistogramActor : public DDEveHitActor  {
0036     TH2F* histogram;
0037     /// Standard initializing constructor
0038     EtaPhiHistogramActor(TH2F* h) : DDEveHitActor(), histogram(h) {}
0039     /// Action callback of this functor: 
0040     virtual void operator()(const DDEveHit& hit);
0041   };
0042 
0043   /// Fill a 3D pointset from a hit collection.
0044   /*
0045    *  \author  M.Frank
0046    *  \version 1.0
0047    *  \ingroup DD4HEP_EVE
0048    */
0049   struct PointsetCreator : public DDEveHitActor  {
0050     TEvePointSet* pointset {nullptr};
0051     float threshold  {0};
0052     float deposit {0};
0053     int count {0};
0054     /// Standard initializing constructor
0055     PointsetCreator(const std::string& collection, size_t length);
0056     /// Standard initializing constructor
0057     PointsetCreator(const std::string& collection, size_t length, const DisplayConfiguration::Config& cfg);
0058     /// Standard destructor
0059     virtual ~PointsetCreator();
0060     /// Return eve element
0061     TEveElement* element() const;
0062     /// Action callback of this functor: 
0063     virtual void operator()(const DDEveHit& hit);
0064   };
0065 
0066   /// Fill a 3D box set from a hit collection.
0067   /*
0068    *  \author  M.Frank
0069    *  \version 1.0
0070    *  \ingroup DD4HEP_EVE
0071    */
0072   struct BoxsetCreator : public DDEveHitActor  {
0073     TEveBoxSet* boxset {0};
0074     float emax = 1e12, towerH = 1e12, deposit = 0e0;
0075     int count {0};
0076     /// Standard initializing constructor
0077     BoxsetCreator(const std::string& collection, size_t length);
0078     /// Standard initializing constructor
0079     BoxsetCreator(const std::string& collection, size_t length, const DisplayConfiguration::Config& cfg);
0080     /// Standard destructor
0081     virtual ~BoxsetCreator();
0082     /// Return eve element
0083     TEveElement* element() const;
0084     /// Action callback of this functor: 
0085     virtual void operator()(const DDEveHit& hit);
0086   };
0087 
0088   /// Fill a 3D tower set from a hit collection.
0089   /*
0090    *  \author  M.Frank
0091    *  \version 1.0
0092    *  \ingroup DD4HEP_EVE
0093    */
0094   struct TowersetCreator : public BoxsetCreator  {
0095     /// Standard initializing constructor
0096     TowersetCreator(const std::string& collection, size_t length) 
0097       : BoxsetCreator(collection,length) {}
0098     /// Standard initializing constructor
0099     TowersetCreator(const std::string& collection, size_t length, const DisplayConfiguration::Config& cfg)
0100       : BoxsetCreator(collection, length, cfg) {}
0101     /// Standard destructor
0102     virtual ~TowersetCreator() {}
0103     /// Action callback of this functor: 
0104     virtual void operator()(const DDEveHit& hit);
0105   };
0106 
0107 } /* End namespace dd4hep   */
0108 
0109 
0110 #endif // DDEVE_HITACTORS_H
0111