update for mass study
authorssakai <ssakai@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 May 2013 13:31:20 +0000 (13:31 +0000)
committerssakai <ssakai@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 2 May 2013 13:31:20 +0000 (13:31 +0000)
PWGHF/hfe/AliAnalysisTaskHFECal.cxx
PWGHF/hfe/AliAnalysisTaskHFECal.h
PWGHF/hfe/macros/AddTaskHFECal.C
PWGHF/hfe/macros/configs/PbPb/ConfigHFECal.C

index 13403a5..7c1761b 100644 (file)
@@ -105,8 +105,8 @@ AliAnalysisTaskHFECal::AliAnalysisTaskHFECal(const char *name)
   ,fPID(0)
   ,fPIDqa(0)          
   ,fOpeningAngleCut(0.1)
-  ,fInvmassCut(0.05)   
-  //,fInvmassCut(0.1)   // no mass
+  ,fInvmassCut(0)       // no mass
+  ,fSetMassConstraint(kTRUE)
   ,fNoEvents(0)
   ,fEMCAccE(0)
   ,hEMCAccE(0)
@@ -231,8 +231,8 @@ AliAnalysisTaskHFECal::AliAnalysisTaskHFECal()
   ,fPID(0)       
   ,fPIDqa(0)          
   ,fOpeningAngleCut(0.1)
-  ,fInvmassCut(0.05)   
-  //,fInvmassCut(0.1)  
+  ,fInvmassCut(0)       // no mass
+  ,fSetMassConstraint(kTRUE)
   ,fNoEvents(0)
   ,fEMCAccE(0)
   ,hEMCAccE(0)
@@ -1048,9 +1048,9 @@ void AliAnalysisTaskHFECal::UserCreateOutputObjects()
   fIncpTM20 = new TH2F("fIncpTM20","HFE pid electro vs. centrality with M20",200,0,100,100,0,50);
   fOutputList->Add(fIncpTM20);
   
-  Int_t nBinspho[9] =  { 200, 100, 500, 12,   50,    4, 200,   8, 100};
-  Double_t minpho[9] = {  0.,  0.,  0., -2.5,  0, -0.5,   0,-1.5,   0};   
-  Double_t maxpho[9] = {100., 50., 0.5, 3.5,   1,  3.5,   2, 6.5,  50};   
+  Int_t nBinspho[9] =  { 10,  30,   600, 12,   50,    4,  40,   8,  30};
+  Double_t minpho[9] = {  0.,  0., -0.1, -2.5,  0, -0.5,   0,-1.5,   0};   
+  Double_t maxpho[9] = {100., 30.,  0.5, 3.5,   1,  3.5,   2, 6.5,  30};   
 
   fInvmassLS = new THnSparseD("fInvmassLS", "Inv mass of LS (e,e); cent; p_{T} (GeV/c); mass(GeV/c^2); nSigma; angle; m20cut; eop; Mcele;", 9, nBinspho,minpho, maxpho);
   if(fqahist==1)fOutputList->Add(fInvmassLS);
@@ -1449,16 +1449,18 @@ void AliAnalysisTaskHFECal::SelectPhotonicElectron(Int_t itrack, Double_t cent,
     
     // check chi2
     if(recg.GetNDF()<1) continue;
+    Double_t chi2recg = recg.GetChi2()/recg.GetNDF();
+    Double_t chi2cut = 3.0;
 
-    // mass const.
-    recg.SetMassConstraint(0,0.0001);
-    // v5-04-50-AN no constrain
+    // mass.
+    if(fSetMassConstraint)
+      {
+       recg.SetMassConstraint(0,0.0001);
+       chi2cut = 30.0;
+      }
     recg.GetMass(mass,width);
 
-    Double_t chi2recg = recg.GetChi2()/recg.GetNDF();
-    if(TMath::Sqrt(TMath::Abs(chi2recg))>30.) continue;
-
-    // angle   
+        // angle   
     openingAngle = ge1.GetAngle(ge2);
     if(fFlagLS) fOpeningAngleLS->Fill(openingAngle);
     if(fFlagULS) fOpeningAngleULS->Fill(openingAngle);
@@ -1489,7 +1491,11 @@ void AliAnalysisTaskHFECal::SelectPhotonicElectron(Int_t itrack, Double_t cent,
 
     // angle cut
     if(openingAngle > fOpeningAngleCut) continue;
-    
+    // chi2 cut
+    if(TMath::Sqrt(TMath::Abs(chi2recg))>chi2cut) continue;
+
+   
+
     // for real data  
     //printf("mce =%f\n",mce);
     if(mce<-0.5) // mce==-1. is real
index d9ba0fe..8e1a81f 100644 (file)
@@ -52,6 +52,7 @@ class AliAnalysisTaskHFECal : public AliAnalysisTaskSE {
   void SetHFECuts(AliHFEcuts * const cuts) { fCuts = cuts; };
   void SetOpeningAngleCut (Double_t openingAngle) {fOpeningAngleCut = openingAngle;};
   void SetInvariantMassCut (Double_t invmass) {fInvmassCut = invmass;};
+  void SetMassConstraint       (Bool_t MassConstraint)         { fSetMassConstraint    = MassConstraint; };
   void SetQAHist (int qahist) {fqahist = qahist;};
   AliHFEpid *GetPID() const { return fPID; }
   void SetRejectKinkMother(Bool_t rejectKinkMother = kFALSE) { fRejectKinkMother = rejectKinkMother; };
@@ -86,6 +87,7 @@ class AliAnalysisTaskHFECal : public AliAnalysisTaskSE {
   AliHFEpidQAmanager   *fPIDqa;                //! PID QA manager
   Double_t             fOpeningAngleCut;       //openingAngle cut value
   Double_t             fInvmassCut;            //invariant mass cut value
+  Bool_t                fSetMassConstraint;            // Set mass constraint
  
   int ftriggers[48][60];//!
   int ftriggersCut[48][60];//!
index 8c17456..ce542c5 100644 (file)
@@ -1,4 +1,4 @@
-AliAnalysisTask *AddTaskHFECal()
+AliAnalysisTask *AddTaskHFECal(Bool_t MassConst)
 {
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   if (!mgr) {
@@ -27,9 +27,9 @@ AliAnalysisTask *AddTaskHFECal()
   //analysis task 
   gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/ConfigHFECal.C");
 
-  AliAnalysisTaskHFECal *hfetaskCent = ConfigHFECal(MCthere);
-  AliAnalysisTaskHFECal *hfetaskTrig= ConfigHFECal(MCthere);
-  AliAnalysisTaskHFECal *hfetaskTrig2= ConfigHFECal(MCthere);
+  AliAnalysisTaskHFECal *hfetaskCent = ConfigHFECal(MCthere,MassConst);
+  AliAnalysisTaskHFECal *hfetaskTrig= ConfigHFECal(MCthere,MassConst);
+  AliAnalysisTaskHFECal *hfetaskTrig2= ConfigHFECal(MCthere,MassConst);
  
   mgr->AddTask(hfetaskCent);
   mgr->AddTask(hfetaskTrig);
@@ -74,7 +74,7 @@ AliAnalysisTask *AddTaskHFECal()
   //if(MCthere)
     //{
     //MB trigger
-    AliAnalysisTaskHFECal *hfetaskMB = ConfigHFECal(MCthere);
+    AliAnalysisTaskHFECal *hfetaskMB = ConfigHFECal(MCthere,MassConst);
     mgr->AddTask(hfetaskMB);
     hfetaskMB->SelectCollisionCandidates(AliVEvent::kMB);
 
index 0a38539..7ce0f3f 100644 (file)
@@ -1,4 +1,4 @@
-AliAnalysisTaskHFECal* ConfigHFECal(Bool_t useMC){\r
+AliAnalysisTaskHFECal* ConfigHFECal(Bool_t useMC,Bool_t MassConst){\r
   //\r
   // HFE standard task configuration\r
   //\r
@@ -21,7 +21,10 @@ AliAnalysisTaskHFECal* ConfigHFECal(Bool_t useMC){
   AliAnalysisTaskHFECal *task = new AliAnalysisTaskHFECal("HFEanalysisEMCal");\r
   printf("task ------------------------ %p\n ", task);\r
   task->SetHFECuts(hfecuts);\r
-  task->SetInvariantMassCut(0.05);\r
+  task->SetMassConstraint(MassConst);\r
+  Double_t masscut = 0.05;\r
+  if(!MassConst)masscut = 0.1;\r
+  task->SetInvariantMassCut(masscut);\r
 \r
   // Define PID\r
   AliHFEpid *pid = task->GetPID();\r