ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Photon.h
Revision: 1.15
Committed: Fri Oct 31 18:56:42 2008 UTC (16 years, 6 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.14: +2 -2 lines
Log Message:
Switched to new optimized RefArray now supporting multiple PIDs

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 bendavid 1.15 // $Id: Photon.h,v 1.14 2008/09/14 03:23:27 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 loizides 1.12 #ifndef MITANA_DATATREE_PHOTON_H
12     #define MITANA_DATATREE_PHOTON_H
13 loizides 1.1
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/Conversion.h"
17 loizides 1.11 #include "MitAna/DataCont/interface/RefArray.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.10 Photon() {}
25 loizides 1.6 Photon(Double_t px, Double_t py, Double_t pz, Double_t e) :
26 loizides 1.10 fFourVector(px,py,pz,e) {}
27 loizides 1.1 ~Photon() {}
28 loizides 1.2
29 loizides 1.6 void AddConversion(Conversion *c) { fConversions.Add(c); }
30 bendavid 1.9 Double_t Charge() const { return 0; }
31 loizides 1.7 void Clear(Option_t *opt="") { fConversions.Clear(opt); }
32 bendavid 1.13 Bool_t IsConverted() const { return fIsConverted; }
33 loizides 1.8 const Conversion *ConvCand(UInt_t i) const { return fConversions.At(i); }
34     UInt_t NConversions() const { return fConversions.GetEntries(); }
35 bendavid 1.14 const SuperCluster *SCluster() const;
36 bendavid 1.13 FourVector Mom() const { return fFourVector; }
37     void SetIsConverted(Bool_t isConv) { fIsConverted = isConv; }
38 loizides 1.2 void SetMom(Double_t px, Double_t py, Double_t pz, Double_t e);
39 bendavid 1.14 void SetSuperCluster(SuperCluster* sc) { fSuperClusterRef = sc; }
40 loizides 1.1
41     protected:
42 loizides 1.4 FourVector fFourVector; //four momentum vector
43 bendavid 1.15 RefArray<Conversion,128> fConversions; //references to associated conversion candidates
44 bendavid 1.13 Bool_t fIsConverted; //conversion flag
45 bendavid 1.14 TRef fSuperClusterRef; //superCluster
46 loizides 1.1
47 loizides 1.2 ClassDef(Photon,1) // Photon class
48 loizides 1.1 };
49     }
50 loizides 1.2
51     //--------------------------------------------------------------------------------------------------
52     inline void mithep::Photon::SetMom(Double_t px, Double_t py, Double_t pz, Double_t e)
53     {
54     // Set four vector.
55    
56     fFourVector.SetXYZT(px, py, pz, e);
57     }
58 bendavid 1.14
59     //--------------------------------------------------------------------------------------------------
60     inline const mithep::SuperCluster *mithep::Photon::SCluster() const
61     {
62     // Return Super cluster
63    
64     return static_cast<const SuperCluster*>(fSuperClusterRef.GetObject());
65     }
66 loizides 1.1 #endif