PandaRoot
PndEmcSharedDigi.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //--------------------------------------------------------------------------
14 // File and Version Information:
15 // $Id: EmcSharedDigi.hh,v 1.3 2005/11/15 01:20:20 steinke Exp $
16 //
17 // Description:
18 // Class Template for EmcClBump
19 //
20 // Environment:
21 // Software developed for the BaBar Detector at the SLAC B-Factory.
22 //
23 // Adapted for the PANDA experiment at GSI
24 //
25 // Author List:
26 // Stephen J. Gowdy University of Edinburgh
27 //
28 // History (add to end):
29 // S.J. Gowdy 19June96 - Created to inherit from EmcCluster
30 //
31 //------------------------------------------------------------------------
32 //#pragma once
33 #ifndef PNDEMCSHAREDDIGI_H
34 #define PNDEMCSHAREDDIGI_H
35 
36 //-------------------------------
37 // Collaborating Class Headers --
38 //-------------------------------
39 #include "PndEmcDigi.h"
40 
45 class PndEmcSharedDigi : public PndEmcDigi {
46 
47  public:
48  // Constructors
49  PndEmcSharedDigi(const PndEmcDigi &theDigi, const Double_t weight);
50  PndEmcSharedDigi(const PndEmcSharedDigi &theDigi);
52 
53  // Destructor
54 
55  virtual ~PndEmcSharedDigi();
56 
57  // Unowned clone
58  virtual PndEmcDigi *clone() const;
59 
60  // Operators
61  virtual void weight(Double_t newWeight);
62 
63  // Selectors (const)
64  virtual Double_t GetEnergy() const { return fEnergy * fWeight; }
65  virtual Double_t weight() const { return fWeight; }
66 
67  // Dynamic Cast methods
69  virtual const PndEmcSharedDigi *dynamic_cast_PndEmcSharedDigi() const;
70 
71  private:
72  Double_t fWeight;
73 
74  PndEmcSharedDigi &operator=(const PndEmcSharedDigi &);
75 
76  ClassDef(PndEmcSharedDigi, 2);
77 };
78 
79 #endif // PNDEMCSHAREDDIGI_HH
virtual ~PndEmcSharedDigi()
Double_t fEnergy
Definition: PndEmcDigi.h:137
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()