]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding default constructor and a method to get the pool bin number (Sandro)
authorarossi <arossi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 15 Aug 2013 07:48:12 +0000 (07:48 +0000)
committerarossi <arossi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 15 Aug 2013 07:48:12 +0000 (07:48 +0000)
PWGHF/correlationHF/AliHFAssociatedTrackCuts.cxx
PWGHF/correlationHF/AliHFAssociatedTrackCuts.h
PWGHF/correlationHF/AliReducedParticle.cxx
PWGHF/correlationHF/AliReducedParticle.h

index 6e18f0580d734c6ca059ad56310dff48d0fbbb74..5ea146d935a8a1a1dc2140e7bc29cd489cb59827 100644 (file)
@@ -524,6 +524,37 @@ void AliHFAssociatedTrackCuts::Print(Option_t *option) const
   PrintAll();\r
 }\r
 \r
+//--------------------------------------------------------------------------\r
+Int_t AliHFAssociatedTrackCuts::GetPoolBin(Double_t multorcent, Double_t zVtx) const\r
+{\r
\r
+    Int_t poolbin = -1;\r
+    Int_t centbin = -1;\r
+    Int_t zvtxbin = -1;\r
+    \r
+    \r
+    if(multorcent <fCentBins[0]) return poolbin;\r
+    if(zVtx <fZvtxBins[0]) return poolbin;\r
+    \r
+    \r
+    for (Int_t i=0;i<fNCentBins;i++){\r
+        if(multorcent<fCentBins[i+1]) {\r
+            centbin=i;\r
+            break;\r
+        }\r
+    }\r
+    \r
+    for (Int_t i=0;i<fNzVtxBins;i++){\r
+        if(zVtx<fZvtxBins[i+1]) {\r
+            zvtxbin=i;\r
+            break;\r
+        }\r
+    }\r
+\r
+    poolbin = centbin  + zvtxbin*fNzVtxBins;\r
+    \r
+    return poolbin;\r
+}\r
 //--------------------------------------------------------------------------\r
 void AliHFAssociatedTrackCuts::PrintAll() const\r
 {\r
index 27614e94e9001a63616b0d6fefa4d4b879479247..0669a8e6c20f5c7fb5555a4ce896a1240c63fa81 100644 (file)
@@ -78,6 +78,7 @@ class AliHFAssociatedTrackCuts : public AliAnalysisCuts
        \r
        Int_t GetNofMCEventType() const {return fNofMCEventType;}\r
        Int_t *GetMCEventType() const {return fMCEventType;}\r
+    Int_t GetPoolBin(Double_t multorcent, Double_t zVtx) const;\r
        \r
        Int_t GetNTrackCuts() const {return fNTrackCuts;}\r
        Float_t* GetAODTrackCuts() const {return fAODTrackCuts;}\r
index c1a99b27156cb06abacafe8ee3fd6266f5158331..15afdb0b27b0307c99396ff96c544e970cde2f1d 100644 (file)
 #include "AliVParticle.h"
 #include "AliReducedParticle.h"
 
+AliReducedParticle::AliReducedParticle() :
+fEta(0),
+fPhi(0),
+fpT(0),
+fMcLabel(0),
+fid(0),
+fImpPar(0),
+fCheckSoftPi(0),
+fCharge(0),
+fInvMass(0),
+fWeight(1.),
+fPtBin(-1),
+fOriginMother(-1)
+{
+       //
+       // default constructor
+       //
+}
+
+
 AliReducedParticle::AliReducedParticle(Double_t eta, Double_t phi, Double_t pt, Int_t mcLabel, Int_t trackid, Double_t impPar, Bool_t checkSoftPi) : 
 fEta(eta), 
 fPhi(phi), 
index ce1c1960c48918550d3ed23ad4f2e7939027820d..98340e285cf17fe5ebd3acec1abce609c9402f3a 100644 (file)
 // class to get the reduced hadron candidate
 class AliReducedParticle : public AliVParticle
 {
-public:
-    AliReducedParticle(Double_t eta, Double_t phi, Double_t pt, Int_t mcLabel, Int_t trackid, Double_t impPar, Bool_t checkSoftPi);
-    AliReducedParticle(Double_t eta, Double_t phi, Double_t pt, Int_t mcLabel, Int_t trackid, Double_t impPar, Bool_t checkSoftPi, Short_t charge);
-    AliReducedParticle(Double_t eta, Double_t phi, Double_t pt, Int_t mcLabel, Int_t trackid, Double_t impPar, Bool_t checkSoftPi, Short_t charge,Double_t weight);
-    AliReducedParticle(Double_t eta, Double_t phi, Double_t pt, Int_t mcLabel);
-    AliReducedParticle(Double_t eta, Double_t phi, Double_t pt, int charge, int orginmother); 
-    AliReducedParticle(Double_t eta, Double_t phi, Double_t pt, Double_t invmass, int ptbin, int orginmother=0);
-
-    ~AliReducedParticle();
-    
-    // kinematics
-       
-    virtual Double_t Pt()         const { return fpT; }
-    virtual Double_t Phi()        const { return fPhi; }
-    virtual Double_t Eta()        const { return fEta; }
-    virtual Int_t   GetLabel()    const { return fMcLabel; }
-    virtual Int_t  GetID()             const{return fid;}
-    virtual Double_t GetImpPar() const{return fImpPar;}
-    virtual Bool_t CheckSoftPi() const{return fCheckSoftPi;}
-    virtual Double_t GetInvMass() const {return fInvMass;}
-    virtual int GetPtBin() const  {return fPtBin;}
-    virtual int GetOriginMother() const {return fOriginMother;}
-    void SetWeight(Double_t weight){fWeight=weight;}
-    Double_t GetWeight(){return fWeight;}
-    
-       // kinematics
-    virtual Double_t Px() const { AliFatal("Not implemented"); return 0; }
-    virtual Double_t Py() const { AliFatal("Not implemented"); return 0; }
-    virtual Double_t Pz() const { AliFatal("Not implemented"); return 0; }
-    virtual Double_t P() const { AliFatal("Not implemented"); return 0; }
-    virtual Bool_t   PxPyPz(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
-       
-    virtual Double_t Xv() const { AliFatal("Not implemented"); return 0; }
-    virtual Double_t Yv() const { AliFatal("Not implemented"); return 0; }
-    virtual Double_t Zv() const { AliFatal("Not implemented"); return 0; }
-    virtual Bool_t   XvYvZv(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
-       
-    virtual Double_t OneOverPt()  const { AliFatal("Not implemented"); return 0; }
-
-    virtual Double_t Theta()      const { AliFatal("Not implemented"); return 0; }
-       
-       
-    virtual Double_t E()          const { AliFatal("Not implemented"); return 0; }
-    virtual Double_t M()          const { AliFatal("Not implemented"); return 0; }
-    
-
-    virtual Double_t Y()          const { AliFatal("Not implemented"); return 0; }
-    
-    virtual Short_t Charge()      const { return fCharge;}
-   
-    // PID
-    virtual Int_t   PdgCode()     const { AliFatal("Not implemented"); return 0; }      
-    virtual const Double_t *PID() const { AliFatal("Not implemented"); return 0; }
-       
-       
-       
-    
-private:
-    Double_t fEta;       // eta
-    Double_t fPhi;       // phi
-    Double_t fpT;        // pT
-    Int_t fMcLabel;      //mclabel
-    Int_t fid;           // track ID
-    Double_t fImpPar;    // impact parameter
-    Bool_t fCheckSoftPi; // check if the track is compatible with a softpion from D*
-    Short_t fCharge;     // charge of the associated track
-    Double_t fInvMass;   // Invariant mass of Dmeson
-    Double_t fWeight;   // track weight (e.g. 1/efficiency)
-    int fPtBin;          // Ptbin of Dmesons
-    int fOriginMother;   //  Holds the origin motherquark (process)
-
+ public:
+  AliReducedParticle();
+  AliReducedParticle(Double_t eta, Double_t phi, Double_t pt, Int_t mcLabel, Int_t trackid, Double_t impPar, Bool_t checkSoftPi);
+  AliReducedParticle(Double_t eta, Double_t phi, Double_t pt, Int_t mcLabel, Int_t trackid, Double_t impPar, Bool_t checkSoftPi, Short_t charge);
+  AliReducedParticle(Double_t eta, Double_t phi, Double_t pt, Int_t mcLabel, Int_t trackid, Double_t impPar, Bool_t checkSoftPi, Short_t charge,Double_t weight);
+  AliReducedParticle(Double_t eta, Double_t phi, Double_t pt, Int_t mcLabel);
+  AliReducedParticle(Double_t eta, Double_t phi, Double_t pt, int charge, int orginmother); 
+  AliReducedParticle(Double_t eta, Double_t phi, Double_t pt, Double_t invmass, int ptbin, int orginmother=0);
+  
+  ~AliReducedParticle();
+  
+  // kinematics
+  
+  virtual Double_t Pt()         const { return fpT; }
+  virtual Double_t Phi()        const { return fPhi; }
+  virtual Double_t Eta()        const { return fEta; }
+  virtual Int_t   GetLabel()    const { return fMcLabel; }
+  virtual Int_t  GetID()               const{return fid;}
+  virtual Double_t GetImpPar() const{return fImpPar;}
+  virtual Bool_t CheckSoftPi() const{return fCheckSoftPi;}
+  virtual Double_t GetInvMass() const {return fInvMass;}
+  virtual int GetPtBin() const  {return fPtBin;}
+  virtual int GetOriginMother() const {return fOriginMother;}
+  void SetWeight(Double_t weight){fWeight=weight;}
+  Double_t GetWeight(){return fWeight;}
+  
+  // kinematics
+  virtual Double_t Px() const { AliFatal("Not implemented"); return 0; }
+  virtual Double_t Py() const { AliFatal("Not implemented"); return 0; }
+  virtual Double_t Pz() const { AliFatal("Not implemented"); return 0; }
+  virtual Double_t P() const { AliFatal("Not implemented"); return 0; }
+  virtual Bool_t   PxPyPz(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
+  
+  virtual Double_t Xv() const { AliFatal("Not implemented"); return 0; }
+  virtual Double_t Yv() const { AliFatal("Not implemented"); return 0; }
+  virtual Double_t Zv() const { AliFatal("Not implemented"); return 0; }
+  virtual Bool_t   XvYvZv(Double_t[3]) const { AliFatal("Not implemented"); return 0; }
+  
+  virtual Double_t OneOverPt()  const { AliFatal("Not implemented"); return 0; }
+  
+  virtual Double_t Theta()      const { AliFatal("Not implemented"); return 0; }
+  
+  
+  virtual Double_t E()          const { AliFatal("Not implemented"); return 0; }
+  virtual Double_t M()          const { AliFatal("Not implemented"); return 0; }
+  
+  
+  virtual Double_t Y()          const { AliFatal("Not implemented"); return 0; }
+  
+  virtual Short_t Charge()      const { return fCharge;}
+  
+  // PID
+  virtual Int_t   PdgCode()     const { AliFatal("Not implemented"); return 0; }      
+  virtual const Double_t *PID() const { AliFatal("Not implemented"); return 0; }
+  
+  
+  
     
-    ClassDef(AliReducedParticle, 4); // class which contains only quantities requires for this analysis to reduce memory consumption for event mixing
+ private:
+  Double_t fEta;       // eta
+  Double_t fPhi;       // phi
+  Double_t fpT;        // pT
+  Int_t fMcLabel;      //mclabel
+  Int_t fid;           // track ID
+  Double_t fImpPar;    // impact parameter
+  Bool_t fCheckSoftPi; // check if the track is compatible with a softpion from D*
+  Short_t fCharge;     // charge of the associated track
+  Double_t fInvMass;   // Invariant mass of Dmeson
+  Double_t fWeight;   // track weight (e.g. 1/efficiency)
+  int fPtBin;          // Ptbin of Dmesons
+  int fOriginMother;   //  Holds the origin motherquark (process)
+  
+  
+  ClassDef(AliReducedParticle, 4); // class which contains only quantities requires for this analysis to reduce memory consumption for event mixing
 };
 #endif