adding input file for HBOM, multiple application of detector effects
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Jun 2012 08:11:16 +0000 (08:11 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Jun 2012 08:11:16 +0000 (08:11 +0000)
OADB/PWGJE/HBOM/fastMCInput_LHC10h_110719a.root [new file with mode: 0644]
PWGJE/macros/AddTaskJetHBOM.C

diff --git a/OADB/PWGJE/HBOM/fastMCInput_LHC10h_110719a.root b/OADB/PWGJE/HBOM/fastMCInput_LHC10h_110719a.root
new file mode 100644 (file)
index 0000000..0758c13
Binary files /dev/null and b/OADB/PWGJE/HBOM/fastMCInput_LHC10h_110719a.root differ
index de36e40..f49043b 100644 (file)
@@ -1,4 +1,4 @@
-AliAnalysisTaskJetHBOM *AddTaskJetHBOM(char* bRec = "AOD",char* bGen = "",UInt_t filterMask = 272, UInt_t iPhysicsSelectionFlag = AliVEvent::kAny,Char_t *jf = "KT", Float_t radius = 0.4,Int_t kWriteAOD = kFALSE,char* deltaFile = "",Float_t ptTrackCut = 0.15, Float_t etaTrackWindow = 0.9,Float_t vertexWindow = 10.,Int_t fNHBOM = 0);
+AliAnalysisTaskJetHBOM *AddTaskJetHBOM(char* bRec = "AOD",char* bGen = "",UInt_t filterMask = 272, UInt_t iPhysicsSelectionFlag = AliVEvent::kAny,Char_t *jf = "KT", Float_t radius = 0.4,Int_t kWriteAOD = kFALSE,char* deltaFile = "",Float_t ptTrackCut = 0.15, Float_t etaTrackWindow = 0.9,Float_t vertexWindow = 10.,TString effLoc = "$ALICE_ROOT/OADB/PWGJE/HBOM/fastMCInput_LHC10h_110719a.root",Int_t fNHBOM = 0);
 
 Int_t kBackgroundModeCl = 0;
 Float_t kPtTrackCutCl = 0.15;
@@ -6,7 +6,7 @@ Float_t kTrackEtaWindowCl = 0.8;
 Float_t kVertexWindowCl = 10;
 
 
-AliAnalysisTaskJetHBOM *AddTaskJetHBOM(char* bRec,char* bGen ,UInt_t filterMask,UInt_t iPhysicsSelectionFlag,Char_t *jf,Float_t radius,Int_t kWriteAOD,char *deltaFile,Float_t ptTrackCut,Float_t etaTrackWindow,Float_t vertexWindow,Int_t fNHBOM)
+AliAnalysisTaskJetHBOM *AddTaskJetHBOM(char* bRec,char* bGen ,UInt_t filterMask,UInt_t iPhysicsSelectionFlag,Char_t *jf,Float_t radius,Int_t kWriteAOD,char *deltaFile,Float_t ptTrackCut,Float_t etaTrackWindow,Float_t vertexWindow,TString effLoc,Int_t fNHBOM)
  {
  // Creates a jet fider task, configures it and adds it to the analysis manager.
    kPtTrackCutCl = ptTrackCut;
@@ -121,7 +121,7 @@ AliAnalysisTaskJetHBOM *AddTaskJetHBOM(char* bRec,char* bGen ,UInt_t filterMask,
    hbom->SetfNHBOM(fNHBOM);
 
    //physics Selection
-   //if(iPhysicsSelectionFlag)hbom->SelectCollisionCandidates(iPhysicsSelectionFlag);
+   if(iPhysicsSelectionFlag)hbom->SelectCollisionCandidates(iPhysicsSelectionFlag);
 
    mgr->AddTask(hbom);
 
@@ -135,18 +135,17 @@ AliAnalysisTaskJetHBOM *AddTaskJetHBOM(char* bRec,char* bGen ,UInt_t filterMask,
    mgr->ConnectOutput (hbom,  1, coutput1_Spec );
    
    //loads efficiencies
-   hbom->SetEfficiencyPt(GetEfficiencyPt());
-   hbom->SetEfficiencyPhi(GetEfficiencyPhi());
+   hbom->SetEfficiencyPt(GetEfficiencyPt(effLoc));
+   hbom->SetEfficiencyPhi(GetEfficiencyPhi(effLoc));
 
    return hbom;
 }
 
 //loads single track pT efficiency from root file
-TH1F *GetEfficiencyPt(){
+TH1F *GetEfficiencyPt(TString effLoc){
   static TFile *fIn = 0;
   static TH1F *hEffPt = 0; 
 
-  TString effLoc = "$ALICE_ROOT/OADB/PWGJE/HBOM/fastMCInput_LHC10h_110719a.root";
   if(!fIn)fIn = TFile::Open(effLoc.Data());
   if(!hEffPt)hEffPt = (TH1F*)fIn->Get("hSingleTrackEffPt");
   if(!hEffPt) cout<<"Could not load hSingleTrackEffPt"<<endl; 
@@ -157,11 +156,10 @@ TH1F *GetEfficiencyPt(){
 }
 
 //loads phi-pT efficiency from root file
-TH2D *GetEfficiencyPhi(){
+TH2D *GetEfficiencyPhi(TString effLoc){
   static TFile *fIn = 0;
   static TH2D *hPhiPt = 0; 
 
-  TString effLoc = "$ALICE_ROOT/OADB/PWGJE/HBOM/fastMCInput_LHC10h_110719a.root";
   if(!fIn)fIn = TFile::Open(effLoc.Data());
   if(!hPhiPt)hPhiPt = (TH2D*)fIn->Get("h2TrackPtPhiNorm");
   if(!hPhiPt) cout<<"Could not load h2TrackPtPhiNorm"<<endl;