virtual Double_t GetCalcMass() const;
virtual void SetDaughter(Int_t i,Int_t id){if(i<2)fDaughter[i] = id;}
virtual Int_t GetDaughter(Int_t i) const {return fDaughter[i];}
+ virtual Int_t GetNDaughters () const { return fDaughter[1]>0 ? fDaughter[1]-fDaughter[0]+1 : 0;}
virtual void SetMother(Int_t im){fMother = im;}
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){
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
// 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?
/*
};
*/
-
-
-
- ClassDef(AliAODMCParticle,2) // AliVParticle realisation for AODMCParticles
+ ClassDef(AliAODMCParticle,5) // AliVParticle realisation for AODMCParticles
};
Double_t e = E();
Double_t pz = Pz();
- if (e != TMath::Abs(pz)) {
+ if (e > TMath::Abs(pz)) {
return 0.5*TMath::Log((e+pz)/(e-pz));
} else {
return -999.;