]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliAODMCParticle.h
AliESDHeader: AliTriggerConfiguration and more trigger scalers added
[u/mrichter/AliRoot.git] / STEER / AliAODMCParticle.h
index c06c3057207b7f14bf15ff9dcefb1aedb59565f6..3e75742fb4275a6b4a6146c8e2e56d4b6715d192 100644 (file)
@@ -27,7 +27,7 @@ class TClonesArray;
 class AliAODMCParticle: public AliVParticle {
  public:
   AliAODMCParticle();
-  AliAODMCParticle(AliMCParticle* part, Int_t label=0,Int_t flag = 0);
+  AliAODMCParticle(const AliMCParticle* part, Int_t label=0,Int_t flag = 0);
   virtual ~AliAODMCParticle(){};
   AliAODMCParticle(const AliAODMCParticle& mcPart); 
   AliAODMCParticle& operator=(const AliAODMCParticle& mcPart);
@@ -73,10 +73,26 @@ class AliAODMCParticle: public AliVParticle {
     virtual Int_t GetMother() const {return fMother;}
     virtual void Print(const Option_t *opt = "") const;
     virtual Int_t GetPdgCode() const { return fPdgCode;}
-
+    virtual Int_t PdgCode()    const { return GetPdgCode();}
+    
     enum { kPrimary = 1<<0, kPhysicalPrim = 1<<1 };
-    void SetFlag(Int_t flag){fFlag = flag;}
-    Int_t GetFlag() const {return fFlag;}
+    void SetFlag(UInt_t flag){fFlag = flag;}
+    UInt_t GetFlag() const {return fFlag;}
+
+
+    // for the status we use the upper 16 bits/2 bytes of the flag word
+    void SetStatus(Int_t status){
+      // a TParticle can have a negative stuts, catch this here and do nothing
+      if(status<0)return;
+      // reset the upper bins keep the lower bins
+      fFlag &= 0xffff;
+      // bit shift by 16
+      fFlag |= (((UInt_t)status)<<16);
+    }
+    UInt_t GetStatus() const {
+      // bit shift by 16
+      return fFlag>>16;
+    }
 
     // Bitwise operations
     void SetPrimary(Bool_t b = kTRUE){
@@ -98,14 +114,14 @@ class AliAODMCParticle: public AliVParticle {
 
 
   Int_t            fPdgCode;              // PDG code of the particle
-  Int_t            fFlag;                 // Flag for indication of primary etc
+  UInt_t           fFlag;                 // Flag for indication of primary etc
   Int_t            fLabel;                // Label of the original MCParticle 
   Int_t            fMother;               // Index of the mother particles
   Int_t            fDaughter[2];          // Indices of the daughter particles
   Double32_t       fPx;                   // x component of momentum
   Double32_t       fPy;                   // y component of momentum
   Double32_t       fPz;                   // z component of momentum
-  Double32_t       fE;                    // [0.,0.,12]
+  Double32_t       fE;                    // Energy
 
   Double32_t       fVx;                   // [0.,0.,12] x of production vertex
   Double32_t       fVy;                   // [0.,0.,12] y of production vertex
@@ -114,7 +130,7 @@ class AliAODMCParticle: public AliVParticle {
 
   // Copy the uniquID to another data member? unique ID is correctly handled 
   // via TOBject Copy construct but not by AliVParticle ctor (no passing of 
-  // TParicles
+  // TParticles
   // Need a flag for primaries?
 
   /*
@@ -129,10 +145,7 @@ class AliAODMCParticle: public AliVParticle {
     };
   */
 
-
-
-  ClassDef(AliAODMCParticle,3)  // AliVParticle realisation for AODMCParticles
+  ClassDef(AliAODMCParticle,5)  // AliVParticle realisation for AODMCParticles
 
 };