- changes by Pedro on Dalitz task
authorfbock <friederike.bock@cern.ch>
Tue, 8 Apr 2014 13:11:00 +0000 (15:11 +0200)
committerfbock <friederike.bock@cern.ch>
Tue, 8 Apr 2014 13:11:00 +0000 (15:11 +0200)
- different trigger selection for 11x, 12x periods
- additional option to cut in Photon quality

PWGGA/GammaConv/AliConversionCuts.cxx
PWGGA/GammaConv/AliConversionCuts.h
PWGGA/GammaConv/AliDalitzElectronCuts.cxx
PWGGA/GammaConv/AliV0ReaderV1.cxx
PWGGA/GammaConv/macros/AddTask_GammaConvDalitzQAV1_pPb.C
PWGGA/GammaConv/macros/AddTask_GammaConvV1_pPb.C

index e6d12b5..8284d2a 100644 (file)
@@ -165,6 +165,8 @@ AliConversionCuts::AliConversionCuts(const char *name,const char *title) :
    fRejectExtraSignals(0),
    fminV0Dist(200.),
    fDoSharedElecCut(kFALSE),
+   fDoPhotonQualitySelectionCut(kFALSE),
+   fPhotonQualityCut(0),
    fOfflineTriggerMask(0),
    fHasV0AND(kTRUE),
    fIsSDDFired(kTRUE),
@@ -319,6 +321,8 @@ AliConversionCuts::AliConversionCuts(const AliConversionCuts &ref) :
    fRejectExtraSignals(ref.fRejectExtraSignals),
    fminV0Dist(ref.fminV0Dist),
    fDoSharedElecCut(ref.fDoSharedElecCut),
+   fDoPhotonQualitySelectionCut(ref.fDoPhotonQualitySelectionCut),
+   fPhotonQualityCut(ref.fPhotonQualityCut),
    fOfflineTriggerMask(ref.fOfflineTriggerMask),
    fHasV0AND(ref.fHasV0AND),
    fIsSDDFired(ref.fIsSDDFired),
@@ -496,7 +500,7 @@ void AliConversionCuts::InitCutHistograms(TString name, Bool_t preCut){
    fHistograms->Add(hTrackCuts);
 
    // Photon Cuts
-   hPhotonCuts=new TH1F(Form("PhotonCuts %s",GetCutNumber().Data()),"PhotonCuts",14,-0.5,13.5);
+   hPhotonCuts=new TH1F(Form("PhotonCuts %s",GetCutNumber().Data()),"PhotonCuts",15,-0.5,14.5);
    hPhotonCuts->GetXaxis()->SetBinLabel(1,"in");
    hPhotonCuts->GetXaxis()->SetBinLabel(2,"qtcut");
    hPhotonCuts->GetXaxis()->SetBinLabel(3,"chi2");
@@ -508,7 +512,8 @@ void AliConversionCuts::InitCutHistograms(TString name, Bool_t preCut){
    hPhotonCuts->GetXaxis()->SetBinLabel(9,"CosPAngle");
    hPhotonCuts->GetXaxis()->SetBinLabel(10,"DCA R");
    hPhotonCuts->GetXaxis()->SetBinLabel(11,"DCA Z");
-   hPhotonCuts->GetXaxis()->SetBinLabel(12,"out");
+   hPhotonCuts->GetXaxis()->SetBinLabel(12,"Photon Quality");
+   hPhotonCuts->GetXaxis()->SetBinLabel(13,"out");
    fHistograms->Add(hPhotonCuts);
 
    if(preCut){
@@ -1100,6 +1105,13 @@ Bool_t AliConversionCuts::PhotonCuts(AliConversionPhotonBase *photon,AliVEvent *
       cutIndex++; //10
    }
    cutIndex++; //11
+   if (photonAOD){
+               if (fDoPhotonQualitySelectionCut && photonAOD->GetPhotonQuality() != fPhotonQualityCut){
+                       if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //11
+                       return kFALSE;
+               }       
+   } 
+   cutIndex++; //12
    if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //11
 
    // Histos after Cuts
@@ -2986,16 +2998,30 @@ Bool_t AliConversionCuts::SetCosPAngleCut(Int_t cosCut) {
 ///________________________________________________________________________
 Bool_t AliConversionCuts::SetSharedElectronCut(Int_t sharedElec) {
 
-   switch(sharedElec){
-   case 0:
-      fDoSharedElecCut = kFALSE;
-      break;
-   case 1:
-      fDoSharedElecCut = kTRUE;
-      break;
-   default:
-      AliError(Form("Shared Electron Cut not defined %d",sharedElec));
-      return kFALSE;
+       switch(sharedElec){
+       case 0:
+               fDoSharedElecCut = kFALSE;
+               fDoPhotonQualitySelectionCut = kFALSE;
+               break;
+       case 1:
+               fDoSharedElecCut = kTRUE;
+               fDoPhotonQualitySelectionCut = kFALSE;
+               break;
+       case 2:
+               fDoSharedElecCut = kFALSE;
+               fDoPhotonQualitySelectionCut = kTRUE;
+               fPhotonQualityCut = 1;
+       case 3:
+               fDoSharedElecCut = kFALSE;
+               fDoPhotonQualitySelectionCut = kTRUE;     
+               fPhotonQualityCut = 2;
+       case 4:
+               fDoSharedElecCut = kFALSE;
+               fDoPhotonQualitySelectionCut = kTRUE;     
+               fPhotonQualityCut = 3;
+       default:
+               AliError(Form("Shared Electron Cut not defined %d",sharedElec));        
+               return kFALSE;
    }
 
    return kTRUE;
@@ -3384,14 +3410,18 @@ Bool_t AliConversionCuts::IsTriggerSelected(AliVEvent *fInputEvent)
    AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
 
    UInt_t isSelected = AliVEvent::kAny;
+   TString periodName = ((AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager()->GetTask("V0ReaderV1"))->GetPeriodName();
+//    cout <<  periodName.Data() << endl;
+   
    if (fInputHandler==NULL) return kFALSE;
    if( fInputHandler->GetEventSelection() || fInputEvent->IsA()==AliAODEvent::Class()) {
       if (!fTriggerSelectedManually){
          if (fPreSelCut) fOfflineTriggerMask = AliVEvent::kAny;
          else {
             if (fIsHeavyIon == 1) fOfflineTriggerMask = AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral;
-               else if (fIsHeavyIon == 2) fOfflineTriggerMask = AliVEvent::kINT7;
-               else fOfflineTriggerMask = AliVEvent::kMB;
+            else if (fIsHeavyIon == 2) fOfflineTriggerMask = AliVEvent::kINT7;
+            else if (periodName.CompareTo("LHC11c") == 0 || periodName.CompareTo("LHC11d") == 0 || periodName.CompareTo("LHC11e") == 0 || periodName.CompareTo("LHC11f") == 0 || periodName.CompareTo("LHC11g") == 0  || periodName.CompareTo("LHC12a") == 0 || periodName.CompareTo("LHC12b") == 0 || periodName.CompareTo("LHC12c") == 0 || periodName.CompareTo("LHC12d") == 0 || periodName.CompareTo("LHC11f") == 0  || periodName.CompareTo("LHC13g") == 0 ) fOfflineTriggerMask = AliVEvent::kINT7;      
+            else fOfflineTriggerMask = AliVEvent::kMB;
          }
       }
       // Get the actual offline trigger mask for the event and AND it with the
index a652257..6933a1d 100644 (file)
@@ -357,6 +357,8 @@ class AliConversionCuts : public AliAnalysisCuts {
    Int_t fRejectExtraSignals;//
    Double_t fminV0Dist; //
    Bool_t fDoSharedElecCut; //
+   Bool_t fDoPhotonQualitySelectionCut; //
+   Int_t fPhotonQualityCut; //
    UInt_t fOfflineTriggerMask;   //  Task processes collision candidates only
    Bool_t fHasV0AND; // V0AND Offline Trigger
    Bool_t fIsSDDFired; // SDD FIRED to select with SDD events
index e987cf7..3b80a1c 100644 (file)
@@ -1226,6 +1226,12 @@ Bool_t AliDalitzElectronCuts::SetITSClusterCut(Int_t clsITSCut){
        case 7: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kOff);
                 fesdTrackCuts->SetMinNClustersITS(4);
                break;
+       case 8: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kBoth);
+                break;
+        case 9: fesdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kBoth);
+               fesdTrackCuts->SetMinNClustersITS(4);
+                break;
+               
        default:
                cout<<"Warning: clsITSCut not defined "<<clsITSCut<<endl;
                return kFALSE;
index 313ef16..d7d4598 100644 (file)
@@ -868,7 +868,7 @@ void AliV0ReaderV1::CountTracks(){
       for(Int_t iTracks = 0; iTracks<fInputEvent->GetNumberOfTracks(); iTracks++){
          AliAODTrack* curTrack = (AliAODTrack*) fInputEvent->GetTrack(iTracks);
          if(curTrack->GetID()<0) continue; // Avoid double counting of tracks
-         if(!curTrack->IsPrimaryCandidate()) continue;
+         if(!curTrack->IsHybridGlobalConstrainedGlobal()) continue;
          if(abs(curTrack->Eta())>0.8) continue;
          if(curTrack->Pt()<0.15) continue;
          //if(fMCEvent && !(fConversionCuts->IsParticleFromBGEvent(abs(curTrack->GetLabel()),NULL,fInputEvent))) continue;
index cdb111d..bf2ebec 100644 (file)
@@ -259,8 +259,20 @@ if( trainConfig == 1 ) {  // No eta shift |Y| < 0.8
 }  else if ( trainConfig == 16 ) {
   
        ConvCutarray[0] = "8000012002093603007200000000"; ElecCutarray[0] = "9047540073310262371"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100  //Tracks 2011  + 4 ITScls no Any
-}
+       
+}  else if ( trainConfig == 17 ) {
+  
+       ConvCutarray[0] = "8000011002093603007200000000"; ElecCutarray[0] = "9047540083310262371"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100  //Tracks 2011 + kBoth
+       
+} else if ( trainConfig  == 18 ) {
 
+        ConvCutarray[0] = "8000011002093603007200000000"; ElecCutarray[0] = "9047540093310262371"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100  //Tracks 2011 + kBoth + 4ITS cls
+
+} else if ( trainConfig  == 19 ) {
+  
+       ConvCutarray[0] = "8000011002093603007200000000"; ElecCutarray[0] = "9047540013310262371"; MesonCutarray[0] = "01031035009000"; //standard cut Pi0 pPb 00-100  //Tracks 2011 + kFirts
+       
+}
 
 
    TList *ConvCutList  = new TList();
@@ -288,7 +300,7 @@ if( trainConfig == 1 ) {  // No eta shift |Y| < 0.8
           analysisCuts[i] = new AliConversionCuts();
       
 
-         if (  ( trainConfig >= 1 && trainConfig <= 6 ) || trainConfig == 9 || trainConfig == 11  || trainConfig == 13 || trainConfig == 14 ){
+         if (  ( trainConfig >= 1 && trainConfig <= 6 ) || trainConfig == 9 || trainConfig == 11  || trainConfig == 13 || trainConfig == 14 || trainConfig == 17 || trainConfig == 18 || trainConfig == 19 ){
            
            if (doWeighting){
              if (generatorName.CompareTo("DPMJET")==0){
index eaf355e..00dda25 100644 (file)
@@ -961,6 +961,17 @@ void AddTask_GammaConvV1_pPb(  Int_t trainConfig = 1,  //change different set of
                cutarray[ 1] = "8020012002092170008260400000"; mesonCutArray[ 1] = "01621035000000";  //new standard eta=0.9 y=0.8 //no MCP smearing      
                cutarray[ 2] = "8020012002093172003290000000"; mesonCutArray[ 2] = "01621035000000";  //old standard eta=0.9 y=0.8 
                cutarray[ 3] = "8020012002092170008260400000"; mesonCutArray[ 3] = "01621035008000";  //new standard eta=0.9 y=0.8 // fPSigSmearingCte=0.014;           
+       } else if (trainConfig == 173) {
+               cutarray[ 0] = "8000011002092170008260400000"; mesonCutArray[ 0] = "01621035009000"; //clean cuts ///New STANDARD CUT
+               cutarray[ 1] = "8000011002092170008260420000"; mesonCutArray[ 1] = "01621035009000";  //new standard eta=0.9 y=0.8 //no MCP smearing
+               cutarray[ 2] = "8000011002092170008260430000"; mesonCutArray[ 2] = "01621035009000";  //old standard eta=0.9 y=0.8 
+               cutarray[ 3] = "8000011002092170008260440000"; mesonCutArray[ 3] = "01621035009000";  //new standard eta=0.9 y=0.8 // fPSigSmearingCte=0.014;
+       } else if (trainConfig == 174) {
+               cutarray[ 0] = "8000012002092170008260400000"; mesonCutArray[ 0] = "01621035009000";  //new standard eta=0.9 y=0.8 // BG track multiplicity
+               cutarray[ 1] = "8000012002092170008260420000"; mesonCutArray[ 1] = "01621035009000";  //new standard eta=0.9 y=0.8 //no MCP smearing      
+               cutarray[ 2] = "8000012002092170008260430000"; mesonCutArray[ 2] = "01621035009000";  //old standard eta=0.9 y=0.8 
+               cutarray[ 3] = "8000012002092170008260440000"; mesonCutArray[ 3] = "01621035009000";  //new standard eta=0.9 y=0.8 // fPSigSmearingCte=0.014;           
+       
        } else {
                Error(Form("GammaConvV1_%i",trainConfig), "wrong trainConfig variable no cuts have been specified for the configuration");
                return;