]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - JETAN/AliAnalysisTaskJetCluster.h
diff filter bits
[u/mrichter/AliRoot.git] / JETAN / AliAnalysisTaskJetCluster.h
index 0e2bb20b58a78b874569c3a9a0efc08699f3129a..e1f93dae23b6e8d1e1bc8341a6c55ce2c3349ae5 100644 (file)
@@ -34,6 +34,7 @@ class TProfile;
 class TRandom3;
 class TRefArray;
 class TClonesArray;
+class TF1;
 
 class AliAnalysisTaskJetCluster : public AliAnalysisTaskSE
 {
@@ -51,29 +52,46 @@ class AliAnalysisTaskJetCluster : public AliAnalysisTaskSE
 
     
 
-    virtual void SetUseGlobalSelection(Bool_t b){fUseGlobalSelection = b;}
     virtual void SetAODTrackInput(Bool_t b){fUseAODTrackInput = b;}
     virtual void SetAODMCInput(Bool_t b){fUseAODMCInput = b;}
+    virtual void SetEventSelection(Bool_t b){fEventSelection = b;}
     virtual void SetRecEtaWindow(Float_t f){fRecEtaWindow = f;}
     virtual void SetTrackEtaWindow(Float_t f){fTrackEtaWindow = f;}
     virtual void SetTrackTypeGen(Int_t i){fTrackTypeGen = i;}
     virtual void SetTrackTypeRec(Int_t i){fTrackTypeRec = i;}
     virtual void SetTrackPtCut(Float_t x){fTrackPtCut = x;}
     virtual void SetCentralityCut(Float_t xLo,Float_t xUp){fCentCutLo = xLo; fCentCutUp = xUp;}
-    virtual void SetFilterMask(UInt_t i){fFilterMask = i;}
+    virtual void SetFilterMask(UInt_t i,Int_t iType = 0){fFilterMask = i;
+      fFilterType = iType;}
+    virtual void SetFilterMaskBestPt(UInt_t i){fFilterMaskBestPt = i;}
+
+    virtual void SetJetTypes(UInt_t i){fJetTypes = i;}
     virtual void SetJetTriggerPtCut(Float_t x){fJetTriggerPtCut = x;}    
+    virtual void SetVtxCuts(Float_t z,Float_t r = 1){fVtxZCut = z; fVtxR2Cut = r *r;}    
     virtual void SetBackgroundBranch(const char* c){fBackgroundBranch = c;}
     virtual const char* GetBackgroundBranch(){return fBackgroundBranch.Data();}    
     virtual void SetNSkipLeadingRan(Int_t x){fNSkipLeadingRan = x;}
+    virtual void SetNSkipLeadingCone(Int_t x){fNSkipLeadingCone = x;}
     virtual void SetNRandomCones(Int_t x){fNRandomCones = x;}
 
     virtual void SetJetOutputBranch(const char *c){fNonStdBranch = c;}
     virtual const char* GetJetOutputBranch(){return fNonStdBranch.Data();}
     virtual void SetJetOutputFile(const char *c){fNonStdFile = c;}
     virtual const char* GetJetOutputFile(){return fNonStdFile.Data();}
+    virtual void SetMaxTrackPtInJet(Float_t x){fMaxTrackPtInJet = x;}
     virtual void SetJetOutputMinPt(Float_t x){fJetOutputMinPt = x;}
     virtual void SetBackgroundCalc(Bool_t b){fUseBackgroundCalc = b;} 
 
+    //Setters for detector level effects
+    virtual void SetSmearResolution(Bool_t b){fUseTrMomentumSmearing = b;} 
+    virtual void SetDiceEfficiency(Bool_t b){fUseDiceEfficiency = b;} 
+    virtual void SetMomentumResolutionHybrid(TProfile *p1, TProfile *p2, TProfile *p3);
+    virtual void SetEfficiencyHybrid(TH1 *h1, TH1 *h2, TH1 *h3);
+
+    Double_t GetMomentumSmearing(Int_t cat, Double_t pt);
+    void FitMomentumResolution();
+
+
     // for Fast Jet
     fastjet::JetAlgorithm        GetAlgorithm()         const {return fAlgorithm;}
     fastjet::Strategy            GetStrategy()          const {return fStrategy;}
@@ -103,6 +121,11 @@ class AliAnalysisTaskJetCluster : public AliAnalysisTaskSE
     enum {kMaxCorrelation =  3};
     enum {kMaxRadius =       5};
     enum {kMaxCent =         4};
+    enum {kJet = 1<<0,
+         kJetRan = 1<<1,         
+         kRC = 1<<2,
+         kRCRan = 1<<3
+    };
     
 
  private:
@@ -117,41 +140,62 @@ class AliAnalysisTaskJetCluster : public AliAnalysisTaskSE
     TRefArray       *fRef;               // ! trefarray for track references within the jet
     Bool_t        fUseAODTrackInput;      // take track from input AOD not from ouptu AOD
     Bool_t        fUseAODMCInput;         // take MC from input AOD not from ouptu AOD
-    Bool_t        fUseGlobalSelection;    // Limit the eta of the generated jets
     Bool_t        fUseBackgroundCalc;     // switches on background calculations
+    Bool_t        fEventSelection;        // use the event selection of this task, otherwise analyse all
     UInt_t        fFilterMask;            // filter bit for slecected tracks
+    UInt_t        fFilterMaskBestPt;      // filter bit to mark jets with high quality leading tracks
+
+    UInt_t        fFilterType;            // filter type 0 = all, 1 = ITSTPC, 2 = TPC
+    UInt_t        fJetTypes;              // 1<<0 regular jets, 1<<1 << randomized event 1<<2 random cones 1<<3 random cones randomiuzed event
     Int_t         fTrackTypeRec;          // type of tracks used for FF 
     Int_t         fTrackTypeGen;          // type of tracks used for FF 
-    Int_t         fNSkipLeadingRan;        // number of leading tracks to be skipped in the randomized event
+    Int_t         fNSkipLeadingRan;       // number of leading tracks to be skipped in the randomized event
+    Int_t         fNSkipLeadingCone;      // number of leading jets to be for the random cones
     Int_t         fNRandomCones;          // number of generated random cones
     Float_t       fAvgTrials;             // Average nimber of trials
     Float_t       fExternalWeight;        // external weight
-    Float_t       fTrackEtaWindow;          // eta window used for corraltion plots between rec and gen 
+    Float_t       fTrackEtaWindow;        // eta window used for corraltion plots between rec and gen 
     Float_t       fRecEtaWindow;          // eta window used for corraltion plots between rec and gen 
     Float_t       fTrackPtCut;            // minimum track pt to be accepted
     Float_t       fJetOutputMinPt;        // minimum p_t for jets to be written out
+    Float_t       fMaxTrackPtInJet;       // maximum track pt within a jet for flagging...
     Float_t       fJetTriggerPtCut;       // minimum jwt pT for AOD to be written
+    Float_t       fVtxZCut;               // zvtx cut
+    Float_t       fVtxR2Cut;              // R vtx cut (squared) 
     Float_t       fCentCutUp;             // upper limit on centrality
     Float_t       fCentCutLo;             // lower limit on centrality
     // output configurartion
     TString       fNonStdBranch;      // the name of the non-std branch name, if empty no branch is filled
     TString       fBackgroundBranch;  // name of the branch used for background subtraction
-    TString       fNonStdFile;        // The optional name of the output file the non-std brnach is written to
-    
+    TString       fNonStdFile;        // The optional name of the output file the non-std branch is written to
+
+    //Detector level effects
+    TProfile *fMomResH1; // Momentum resolution from TrackQA Hybrid Category 1
+    TProfile *fMomResH2; // Momentum resolution from TrackQA Hybrid Category 2
+    TProfile *fMomResH3; // Momentum resolution from TrackQA Hybrid Category 3
+    TF1 *fMomResH1Fit; //fit
+    TF1 *fMomResH2Fit; //fit
+    TF1 *fMomResH3Fit; //fit
+
+    TH1      *fhEffH1;        // Efficiency for Spectra Hybrid Category 1
+    TH1      *fhEffH2;        // Efficiency for Spectra Hybrid Category 2
+    TH1      *fhEffH3;        // Efficiency for Spectra Hybrid Category 3
+    Bool_t    fUseTrMomentumSmearing;     // Apply momentum smearing on track level
+    Bool_t    fUseDiceEfficiency;         // Apply efficiency on track level by dicing
 
     // Fast jet
-    Double_t fRparam;
+    Double_t fRparam;                  // fastjet distance parameter
     fastjet::JetAlgorithm fAlgorithm; //fastjet::kt_algorithm
     fastjet::Strategy fStrategy;  //= fastjet::Best;
     fastjet::RecombinationScheme fRecombScheme; // = fastjet::BIpt_scheme;
-    fastjet::AreaType fAreaType; 
-    Double_t fGhostArea;
-    Int_t fActiveAreaRepeats;
-    Double_t fGhostEtamax;
-
-    TClonesArray  *fTCAJetsOut; //! TCA of output jets
-    TClonesArray  *fTCAJetsOutRan; //! TCA of output jets in randomized event
-    TClonesArray  *fTCARandomConesOut; //! TCA of output jets in randomized event
+    fastjet::AreaType fAreaType;  // fastjet area type
+    Double_t fGhostArea;          // fasjet ghost area
+    Int_t fActiveAreaRepeats;     // fast jet active area repeats
+    Double_t fGhostEtamax;        // fast jet ghost area
+
+    TClonesArray  *fTCAJetsOut;           //! TCA of output jets
+    TClonesArray  *fTCAJetsOutRan;        //! TCA of output jets in randomized event
+    TClonesArray  *fTCARandomConesOut;    //! TCA of output jets in randomized event
     TClonesArray  *fTCARandomConesOutRan; //! TCA of output jets in randomized event
     AliAODJetEventBackground *fAODJetBackgroundOut; //! jet background to be written out
 
@@ -225,10 +269,15 @@ class AliAnalysisTaskJetCluster : public AliAnalysisTaskSE
     TH2F*         fh2TracksLeadingJetPhiPtC[kMaxCent]; //! track correlation with leading Jet
     TH2F*         fh2TracksLeadingJetPhiPtWC[kMaxCent]; //! track correlation with leading Jet
 
+    //Histos for detector level effects from toy model
+    TH2F *fh2PtGenPtSmeared;     //! Control histo smeared momentum
+    TProfile *fp1Efficiency;     //! Control profile efficiency
+    TProfile *fp1PtResolution;   //! Control profile for pT resolution
+
     TList *fHistList; //!leading tracks to be skipped in the randomized event Output list
    
 
-    ClassDef(AliAnalysisTaskJetCluster, 14
+    ClassDef(AliAnalysisTaskJetCluster, 20
 };
  
 #endif