Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:35:22

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_PARTICLEACTORS_H
0014 #define DDEVE_PARTICLEACTORS_H
0015 
0016 // Framework include files
0017 #include "DDEve/EventHandler.h"
0018 #include "DDEve/DisplayConfiguration.h"
0019 
0020 // C/C++ include files
0021 #include <map>
0022 
0023 // Forward declarations
0024 class TEveTrackPropagator;
0025 class TEvePointSet;
0026 class TEveCompound;
0027 class TEveElement;
0028 class TEveLine;
0029 
0030 /// Namespace for the AIDA detector description toolkit
0031 namespace dd4hep {
0032 
0033   /// Fill eve particles from a MC particle collection
0034   /*
0035    *  \author  M.Frank
0036    *  \version 1.0
0037    *  \ingroup DD4HEP_EVE
0038    */
0039   struct MCParticleCreator : public DDEveParticleActor  {
0040     typedef std::map<std::string,TEveCompound*> Compounds;
0041     TEveTrackPropagator* propagator {0};
0042     TEveCompound* particles {0};
0043     Compounds types;
0044     double threshold {10e0}; // 10 MeV
0045     int count {0};
0046     int lineWidth {4};
0047     
0048     /// Standard initializing constructor
0049     MCParticleCreator(TEveTrackPropagator* p, TEveCompound* ps, const DisplayConfiguration::Config* cfg);
0050     /// Access sub-compound by name
0051     void addCompound(const std::string& name, TEveLine* e);
0052     /// Access sub-compound by name
0053     void addCompoundLight(const std::string& name, TEveLine* e);
0054     /// Action callback of this functor: 
0055     virtual void operator()(const DDEveParticle& particle);
0056     /// Close compounds
0057     void close();
0058   };
0059 
0060   /// Fill a 3D pointset with particle start vertices
0061   /*
0062    *  \author  M.Frank
0063    *  \version 1.0
0064    *  \ingroup DD4HEP_EVE
0065    */
0066   struct StartVertexCreator : public  DDEveParticleActor {
0067     TEvePointSet* pointset;
0068     float deposit;
0069     int count;
0070     /// Standard initializing constructor
0071     StartVertexCreator(const std::string& collection, size_t length);
0072     /// Standard initializing constructor
0073     StartVertexCreator(const std::string& collection, size_t length, const DisplayConfiguration::Config& cfg);
0074     /// Standard destructor
0075     virtual ~StartVertexCreator();
0076     /// Return eve element
0077     TEveElement* element() const;
0078     /// Action callback of this functor: 
0079     virtual void operator()(const DDEveParticle& particle);
0080   };
0081 
0082 } /* End namespace dd4hep   */
0083 
0084 
0085 #endif // DDEVE_PARTICLEACTORS_H
0086