ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Photon.h
Revision: 1.7
Committed: Mon Jul 14 09:41:59 2008 UTC (16 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.6: +2 -3 lines
Log Message:
Unified handling using Clear

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.7 // $Id: Photon.h,v 1.6 2008/07/13 08:37:50 loizides 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 loizides 1.6 Photon() : fConversions(2) { SetClearBit(); }
25     Photon(Double_t px, Double_t py, Double_t pz, Double_t e) :
26     fFourVector(px,py,pz,e) { SetClearBit(); }
27 loizides 1.1 ~Photon() {}
28 loizides 1.2
29 loizides 1.6 void AddConversion(Conversion *c) { fConversions.Add(c); }
30 bendavid 1.3 Int_t Charge() const { return 0; }
31 loizides 1.7 void Clear(Option_t *opt="") { fConversions.Clear(opt); }
32 bendavid 1.3 Bool_t IsConverted() const { return fConversions.GetEntries(); }
33     const Conversion *GetConversion(UInt_t i) const { return fConversions.At(i); }
34     UInt_t GetNConversions() const { return fConversions.GetEntries(); }
35     FourVector Mom() const { return fFourVector; }
36 loizides 1.2 void SetMom(Double_t px, Double_t py, Double_t pz, Double_t e);
37 loizides 1.6 void Trim() { fConversions.Trim(); }
38 loizides 1.1
39     protected:
40 loizides 1.4 FourVector fFourVector; //four momentum vector
41 bendavid 1.3 RefArray<Conversion> fConversions; //references to associated conversion candidates
42 loizides 1.1
43 loizides 1.2 ClassDef(Photon,1) // Photon class
44 loizides 1.1 };
45     }
46 loizides 1.2
47     //--------------------------------------------------------------------------------------------------
48     inline void mithep::Photon::SetMom(Double_t px, Double_t py, Double_t pz, Double_t e)
49     {
50     // Set four vector.
51    
52     fFourVector.SetXYZT(px, py, pz, e);
53     }
54 loizides 1.1 #endif