]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGJE/EMCALJetTasks/AliEmcalJet.h
Copy MC info in PicoTrack
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / AliEmcalJet.h
index 5b7e4f787c4ae303a07c1185e6b33df98f4ed4eb..25f37daa4fbafb6031146c3aa4e3b05e78e5bccd 100644 (file)
@@ -1,12 +1,14 @@
 #ifndef AliEmcalJet_H
 #define AliEmcalJet_H
 
-// $Id$
-
+#include <vector>
+#include <algorithm>
+#include <utility>
 #include <TArrayS.h>
 #include <TLorentzVector.h>
 #include <TMath.h>
 #include <TClonesArray.h>
+#include <TVector2.h>
 
 #include "AliVParticle.h"
 #include "AliVCluster.h"
@@ -45,7 +47,7 @@ class AliEmcalJet : public AliVParticle
   Double_t          Eta()                        const { return fEta;    }
   Double_t          Y()                          const { return 0.5*TMath::Log((E()+Pz())/(E()-Pz()));    }
   Short_t           Charge()                     const { return 0;       }
-  Int_t             GetLabel()                   const { return -1;      }
+  Int_t             GetLabel()                   const { return fLabel;  }
   Int_t             PdgCode()                    const { return 0;       }
   const Double_t   *PID()                        const { return 0;       }
   void              GetMom(TLorentzVector &vec)  const;
@@ -94,6 +96,9 @@ class AliEmcalJet : public AliVParticle
   void              AddTrackAt(Int_t track, Int_t idx) { fTrackIDs.AddAt(track, idx);      }
   void              Clear(Option_t */*option*/="")     { fClusterIDs.Set(0); fTrackIDs.Set(0); fClosestJets[0] = 0; fClosestJets[1] = 0; 
                                                          fClosestJetsDist[0] = 0; fClosestJetsDist[1] = 0; fMatched = 0; fPtSub = 0; }
+  Double_t          DeltaR(const AliVParticle* part) const;
+
+  void              SetLabel(Int_t l)                  { fLabel = l;                       }
   void              SetArea(Double_t a)                { fArea    = a;                     }
   void              SetAreaEta(Double_t a)             { fAreaEta = a;                     }
   void              SetAreaPhi(Double_t a)             { fAreaPhi = a;                     }
@@ -109,6 +114,7 @@ class AliEmcalJet : public AliVParticle
   void              SetNumberOfNeutrals(Int_t n)       { fNn = n;                          }
   void              SetMCPt(Double_t p)                { fMCPt = p;                        }
   void              SortConstituents();
+  std::vector<int>  SortConstituentsPt(TClonesArray *tracks) const;
   void              SetNEmc(Int_t n)                   { fNEmc           = n;              }
   void              SetPtEmc(Double_t pt)              { fPtEmc          = pt;             }
   void              SetPtSub(Double_t ps)              { fPtSub          = ps;             } 
@@ -138,6 +144,16 @@ class AliEmcalJet : public AliVParticle
   AliEmcalJet*      GetTaggedJet()                            const { return fTaggedJet                               ; }
   Int_t             GetTagStatus()                            const { return fTagStatus                               ; }
 
+  //jet shape derivatives
+  void              SetFirstDerivative(Double_t d)                  { fJetShapeMassFirstDer = d                       ; }
+  void              SetSecondDerivative(Double_t d)                 { fJetShapeMassSecondDer = d                      ; }
+  void              SetFirstOrderSubtracted(Double_t d)             { fJetShapeMassFirstSub = d                       ; }
+  void              SetSecondOrderSubtracted(Double_t d)            { fJetShapeMassSecondSub = d                      ; }
+  Double_t          GetFirstDerivative()                      const { return fJetShapeMassFirstDer                    ; }
+  Double_t          GetSecondDerivative()                     const { return fJetShapeMassSecondDer                   ; }
+  Double_t          GetFirstOrderSubtracted()                 const { return fJetShapeMassFirstSub                    ; }
+  Double_t          GetSecondOrderSubtracted()                const { return fJetShapeMassSecondSub                   ; }
+
  protected:
   Double32_t        fPt;                  //[0,0,12]   pt 
   Double32_t        fEta;                 //[-1,1,12]  eta
@@ -168,7 +184,19 @@ class AliEmcalJet : public AliVParticle
   Double_t          fPtSub;               //!          background subtracted pt (not stored set from outside) 
   Double_t          fPtVectSub;           //!          background vector subtracted pt (not stored set from outside) 
   UInt_t            fTriggers;            //!          triggers that the jet might have fired (AliVEvent::EOfflineTriggerTypes)
+  Double_t          fJetShapeMassFirstDer;  //!        result from shape derivatives for jet mass: 1st derivative
+  Double_t          fJetShapeMassSecondDer; //!        result from shape derivatives for jet mass: 2nd derivative
+  Double_t          fJetShapeMassFirstSub;  //!        result from shape derivatives for jet mass: 1st order subtracted
+  Double_t          fJetShapeMassSecondSub; //!        result from shape derivatives for jet mass: 2nd order subtracted
+  Int_t             fLabel;               //           label to inclusive jet for constituent subtracted jet    
+
+  private:
+    struct sort_descend
+        { // sort in decreasing order
+          // first value of the pair is Pt and the second is entry index
+        bool operator () (const std::pair<Double_t, Int_t>& p1, const std::pair<Double_t, Int_t>& p2)  { return p1.first > p2.first ; }
+        };
 
-  ClassDef(AliEmcalJet,12) // Emcal jet class in cylindrical coordinates
+  ClassDef(AliEmcalJet,14) // Emcal jet class in cylindrical coordinates
 };
 #endif