PandaRoot
PndEmcSharedDigi.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------
2 // File and Version Information:
3 // $Id: EmcSharedDigi.hh,v 1.3 2005/11/15 01:20:20 steinke Exp $
4 //
5 // Description:
6 // Class Template for EmcClBump
7 //
8 // Environment:
9 // Software developed for the BaBar Detector at the SLAC B-Factory.
10 //
11 // Adapted for the PANDA experiment at GSI
12 //
13 // Author List:
14 // Stephen J. Gowdy University of Edinburgh
15 //
16 // History (add to end):
17 // S.J. Gowdy 19June96 - Created to inherit from EmcCluster
18 //
19 //------------------------------------------------------------------------
20 //#pragma once
21 #ifndef PNDEMCSHAREDDIGI_H
22 #define PNDEMCSHAREDDIGI_H
23 
24 //-------------------------------
25 // Collaborating Class Headers --
26 //-------------------------------
27 #include "PndEmcDigi.h"
28 
33 class PndEmcSharedDigi : public PndEmcDigi {
34 
35  public:
36  // Constructors
37  PndEmcSharedDigi(const PndEmcDigi &theDigi, const Double_t weight);
38  PndEmcSharedDigi(const PndEmcSharedDigi &theDigi);
40 
41  // Destructor
42 
43  virtual ~PndEmcSharedDigi();
44 
45  // Unowned clone
46  virtual PndEmcDigi *clone() const;
47 
48  // Operators
49  virtual void weight(Double_t newWeight);
50 
51  // Selectors (const)
52  virtual Double_t GetEnergy() const { return fEnergy * fWeight; }
53  virtual Double_t weight() const { return fWeight; }
54 
55  // Dynamic Cast methods
57  virtual const PndEmcSharedDigi *dynamic_cast_PndEmcSharedDigi() const;
58 
59  private:
60  Double_t fWeight;
61 
62  PndEmcSharedDigi &operator=(const PndEmcSharedDigi &);
63 
64  ClassDef(PndEmcSharedDigi, 2);
65 };
66 
67 #endif // PNDEMCSHAREDDIGI_HH
virtual ~PndEmcSharedDigi()
Double_t fEnergy
Definition: PndEmcDigi.h:125
virtual PndEmcDigi * clone() const
virtual Double_t GetEnergy() const
used to share PndEmcDigis between bumps
virtual Double_t weight() const
virtual PndEmcSharedDigi * dynamic_cast_PndEmcSharedDigi()