ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Photon.h
Revision: 1.4
Committed: Thu Jul 3 08:22:18 2008 UTC (16 years, 10 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.3: +13 -4 lines
Log Message:
Coding conventions.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.4 // $Id: Photon.h,v 1.3 2008/07/02 19:28:43 bendavid Exp $
3 loizides 1.1 //
4     // Photon
5     //
6     // Details to be worked out...
7     //
8 loizides 1.2 // Authors: J.Bendavid, C.Loizides
9 loizides 1.1 //--------------------------------------------------------------------------------------------------
10    
11     #ifndef DATATREE_PHOTON_H
12     #define DATATREE_PHOTON_H
13    
14 loizides 1.4 #include "MitAna/DataTree/interface/Types.h"
15 bendavid 1.3 #include "MitAna/DataTree/interface/Particle.h"
16     #include "MitAna/DataTree/interface/RefArray.h"
17     #include "MitAna/DataTree/interface/Conversion.h"
18 loizides 1.1
19     namespace mithep
20     {
21 bendavid 1.3 class Photon : public Particle
22 loizides 1.1 {
23     public:
24     Photon() {}
25     Photon(Double_t px, Double_t py, Double_t pz, Double_t e) : fFourVector(px,py,pz,e) {}
26     ~Photon() {}
27 loizides 1.2
28 loizides 1.4 void AddConversion(Conversion *c);
29 bendavid 1.3 Int_t Charge() const { return 0; }
30     Bool_t IsConverted() const { return fConversions.GetEntries(); }
31     const Conversion *GetConversion(UInt_t i) const { return fConversions.At(i); }
32     UInt_t GetNConversions() const { return fConversions.GetEntries(); }
33     FourVector Mom() const { return fFourVector; }
34 loizides 1.2 void SetMom(Double_t px, Double_t py, Double_t pz, Double_t e);
35 loizides 1.1
36     protected:
37 loizides 1.4 FourVector fFourVector; //four momentum vector
38 bendavid 1.3 RefArray<Conversion> fConversions; //references to associated conversion candidates
39 loizides 1.1
40 loizides 1.2 ClassDef(Photon,1) // Photon class
41 loizides 1.1 };
42     }
43 loizides 1.2
44     //--------------------------------------------------------------------------------------------------
45 loizides 1.4 inline void mithep::Photon::AddConversion(Conversion *c)
46     {
47     // Add a conversion object.
48    
49     fConversions.Add(c);
50     fConversions.Trim();
51     }
52    
53     //--------------------------------------------------------------------------------------------------
54 loizides 1.2 inline void mithep::Photon::SetMom(Double_t px, Double_t py, Double_t pz, Double_t e)
55     {
56     // Set four vector.
57    
58     fFourVector.SetXYZT(px, py, pz, e);
59     }
60 loizides 1.1 #endif