added new class for analysis
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 Jun 2007 17:10:25 +0000 (17:10 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 Jun 2007 17:10:25 +0000 (17:10 +0000)
STEER/AODLinkDef.h
STEER/AliAODPhoton.cxx [new file with mode: 0644]
STEER/AliAODPhoton.h [new file with mode: 0644]
STEER/libAOD.pkg

index 5a7e72a..2f361e8 100644 (file)
@@ -21,6 +21,7 @@
 #pragma link C++ class AliAODVertex+;
 #pragma link C++ class AliAODCluster+;
 #pragma link C++ class AliAODJet+;
+#pragma link C++ class AliAODPhoton+;
 #pragma link C++ class AliAODRedCov<3>+;
 #pragma link C++ class AliAODRedCov<4>+;
 #pragma link C++ class AliAODRedCov<6>+;
diff --git a/STEER/AliAODPhoton.cxx b/STEER/AliAODPhoton.cxx
new file mode 100644 (file)
index 0000000..d1c6235
--- /dev/null
@@ -0,0 +1,89 @@
+/**************************************************************************
+ * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
+//-------------------------------------------------------------------------
+//     AOD class for photons
+//     Author: Yves Schutz, CERN
+//-------------------------------------------------------------------------
+
+#include <TLorentzVector.h>
+#include "AliAODPhoton.h"
+
+ClassImp(AliAODPhoton)
+
+
+//______________________________________________________________________________
+AliAODPhoton::AliAODPhoton() :
+    AliVirtualParticle(),
+    fMomentum(0)
+{
+  // constructor
+}
+
+AliAODPhoton::AliAODPhoton(Double_t px, Double_t py, Double_t pz, Double_t e):
+    AliVirtualParticle(),
+    fMomentum(0)
+{
+  // constructor
+    fMomentum = new TLorentzVector(px, py, pz, e);
+}
+
+AliAODPhoton::AliAODPhoton(TLorentzVector & p):
+    AliVirtualParticle(),
+    fMomentum(0)
+{
+  // constructor
+    fMomentum = new TLorentzVector(p);
+}
+
+
+//______________________________________________________________________________
+AliAODPhoton::~AliAODPhoton() 
+{
+  // destructor
+    delete fMomentum;
+}
+
+//______________________________________________________________________________
+AliAODPhoton::AliAODPhoton(const AliAODPhoton& photon) :
+    AliVirtualParticle(photon),
+    fMomentum(0)
+{
+  // Copy constructor
+    fMomentum = new TLorentzVector(*photon.fMomentum);
+    
+}
+
+//______________________________________________________________________________
+AliAODPhoton& AliAODPhoton::operator=(const AliAODPhoton& photon)
+{
+  // Assignment operator
+  if(this!=&photon) {
+  }
+
+  return *this;
+}
+
+void AliAODPhoton::Print(Option_t* /*option*/) const 
+{
+  // Print information of all data members
+  printf("Photon 4-vector:\n");
+  printf("     E  = %13.3f\n", E() );
+  printf("     Px = %13.3f\n", Px());
+  printf("     Py = %13.3f\n", Py());
+  printf("     Pz = %13.3f\n", Pz());
+}
diff --git a/STEER/AliAODPhoton.h b/STEER/AliAODPhoton.h
new file mode 100644 (file)
index 0000000..eff8649
--- /dev/null
@@ -0,0 +1,55 @@
+#ifndef AliAODPhoton_H
+#define AliAODPhoton_H
+/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+//-------------------------------------------------------------------------
+//     AOD photon class
+//     Author: Yves Schutz, CERN
+//-------------------------------------------------------------------------
+
+#include <TLorentzVector.h>
+#include "AliVirtualParticle.h"
+#include "AliAODVertex.h"
+
+
+class AliAODPhoton : public AliVirtualParticle {
+
+ public:
+    AliAODPhoton();
+    AliAODPhoton(Double_t px, Double_t py, Double_t pz, Double_t e);
+    AliAODPhoton(TLorentzVector & p);  
+    virtual ~AliAODPhoton();
+    AliAODPhoton(const AliAODPhoton& photon); 
+    AliAODPhoton& operator=(const AliAODPhoton& photon);
+// AliVirtualParticle methods
+    virtual Double_t Px()         const { return fMomentum->Px();      }
+    virtual Double_t Py()         const { return fMomentum->Py();      }
+    virtual Double_t Pz()         const { return fMomentum->Pz();      }
+    virtual Double_t Pt()         const { return fMomentum->Pt();      }
+    virtual Double_t P()          const { return fMomentum->P();       }
+    virtual Double_t OneOverPt()  const { return 1. / fMomentum->Pt(); }
+    virtual Double_t Phi()        const { return fMomentum->Phi();     }
+    virtual Double_t Theta()      const { return fMomentum->Theta();   }
+    virtual Double_t E()          const { return fMomentum->E();       }
+    virtual Double_t M()          const { return fMomentum->M();       }
+    virtual Double_t Eta()        const { return fMomentum->Eta();     }
+    virtual Double_t Y()          const { return fMomentum->Rapidity();}
+//
+
+    virtual void     Print(Option_t* /*option*/) const;
+    
+// Dummy  
+    virtual Short_t Charge()      const { return 0;}
+    virtual const Double_t* PID() const { return NULL;}
+//
+    
+    
+ private:
+    TLorentzVector* fMomentum;           // Photon 4-momentum vector
+    ClassDef(AliAODPhoton,1);
+};
+
+#endif
index d8dd17f..b054b76 100644 (file)
@@ -1,6 +1,6 @@
 SRCS = AliAODEvent.cxx AliVirtualParticle.cxx AliAODHeader.cxx \
        AliAODTrack.cxx AliAODVertex.cxx AliAODCluster.cxx \
-       AliAODJet.cxx AliAODRedCov.cxx AliAODRecoDecay.cxx \
+       AliAODJet.cxx AliAODPhoton.cxx AliAODRedCov.cxx AliAODRecoDecay.cxx \
        AliVirtualEventHandler.cxx AliAODHandler.cxx
 
 HDRS:= $(SRCS:.cxx=.h)