// based on AddTaskIsoPhoton by Gustavo Conesa & Marie Germain.
//new macro
-TString kGammaJetCorrelationName = "";//done
+TString kGammaJetCorrelationName = "";
-AliAnalysisTaskCaloTrackCorrelation *AddTaskGammaJetCorrelation(const Float_t isoCone = 0.4,
- const Float_t isoPth = 0.5,
+AliAnalysisTaskCaloTrackCorrelation *AddTaskGammaJetCorrelation(const Float_t isoCone = 0.4,
+ const Float_t isoPth = 0.5,
+ const Double_t maxLambda0Cut = 0.5,
+ const Int_t maxNLMcut = 2,
const Bool_t timecut = kFALSE,
const TString calorimeter = "EMCAL",
const Bool_t simulation = kFALSE,
const Int_t maxCen = -1,
const TString jetBranchName = "clustersAOD_ANTIKT04_B0_Filter00272_Cut00150_Skip00",
const TString jetBkgBranchName = "jeteventbackground_clustersAOD_KT04_B0_Filter00768_Cut00150_Skip00",
+ const Float_t jetMinPt = 0,
+ const Float_t minDeltaPhi = 1.5,
+ const Float_t maxDeltaPhi = 4.5,
+ const Float_t minPtRatio = 0,
+ const Float_t maxPtRatio = 5,
const Int_t debug = -1,
const Bool_t printSettings = kFALSE,
const Double_t scaleFactor = -1
return NULL;
}
+ // Make sure the B field is enabled for track selection, some cuts need it
+ ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
+
// inputDataType = "AOD";
// if(!kData.Contains("delta"))
// inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
//input jets
- TString kDeltaAODJetName = "AliAOD.Jets.root"; //Jet input AOD name
- if(kDeltaAODJetName.Length()!=0)
+ TString deltaAODJetName = "AliAOD.Jets.root"; //Jet input AOD name
+ if(deltaAODJetName.Length()!=0)
{
// External file with Jets
- // aodHandler->AddFriend(kDeltaAODJetName.Data());
- mgr->RegisterExtraFile(kDeltaAODJetName.Data());
+ // aodHandler->AddFriend(deltaAODJetName.Data());
+ mgr->RegisterExtraFile(deltaAODJetName.Data());
cout<<"Jet file registered "<<endl;
cout<<"Extra files: "<<mgr->GetExtraFiles()<<endl;
}
maker->SetScaleFactor(scaleFactor); // for MC, negative (not scaled) by default
// General frame setting and configuration
- maker->SetReader (ConfigureReader(mgr->GetInputEventHandler()->GetDataType(),calorimeter,useKinematics,simulation,eventsel,nonlin,timecut,collision,trigger,firedTrigger,clustersArray,mix,minCen,maxCen,debug,printSettings) );
+ maker->SetReader (ConfigureReader(mgr->GetInputEventHandler()->GetDataType(),calorimeter,useKinematics,simulation,eventsel,nonlin,timecut,collision,trigger,firedTrigger,clustersArray,jetBranchName,jetBkgBranchName,mix,minCen,maxCen,debug,printSettings) );
maker->SetCaloUtils(ConfigureCaloUtils(clustersArray,collision,nonlin,exotic,simulation,timecut,debug,printSettings));
// Analysis tasks setting and configuration
//Float_t isoCone = -1;
//Float_t isoPth = -1;
- maker->AddAnalysis(ConfigurePhotonAnalysis(calorimeter,tm,simulation,debug,printSettings), n++); // Photon cluster selection
+ maker->AddAnalysis(ConfigurePhotonAnalysis(calorimeter,tm,simulation,maxLambda0Cut,maxNLMcut,debug,printSettings), n++); // Photon cluster selection
maker->AddAnalysis(ConfigureIsolationAnalysis(calorimeter,collision,"Photon", partInCone,thresType, isoCone, isoPth,tm,kFALSE,simulation,debug,printSettings), n++); // Photon isolation
- maker->AddAnalysis(ConfigurePhotonJetAnalysis(simulation,debug,printSettings), n++);// photon-jet correlation analysis
+ maker->AddAnalysis(ConfigurePhotonJetAnalysis(calorimeter,isoCone,jetMinPt,minDeltaPhi,maxDeltaPhi,minPtRatio,maxPtRatio,simulation,debug,printSettings), n++);// photon-jet correlation analysis
maker->SetAnaDebug(debug) ;
maker->SwitchOnHistogramsMaker() ;
}
//____________________________________
-AliCaloTrackReader * ConfigureReader(TString inputDataType = "AOD",TString calorimeter = "EMCAL",Bool_t useKinematics = kFALSE,Bool_t simulation = kFALSE,Bool_t eventsel = kFALSE,Bool_t nonlin = kTRUE, Bool_t timecut = kFALSE,
+AliCaloTrackReader * ConfigureReader(TString inputDataType = "AOD",TString calorimeter = "EMCAL",Bool_t useKinematics = kFALSE,
+ Bool_t simulation = kFALSE,Bool_t eventsel = kFALSE,Bool_t nonlin = kTRUE, Bool_t timecut = kFALSE,
TString collision = "pp",TString trigger="MB",TString firedTrigger="EG1",
- TString clustersArray = "V1",
- Bool_t mix = kFALSE;
+ TString clustersArray = "V1", TString jetBranchName = "jets", TString jetBkgBranchName = "jets",
+ Bool_t mix = kFALSE,
Float_t minCen = -1, Float_t maxCen = -1,
Int_t debug = -1,Bool_t printSettings = kFALSE)
{
- if(simu)
+ Bool_t useTender=kTRUE;
+
+ if(simulation)
{
if (!useKinematics && inputDataType=="AOD") useKinematics = kTRUE; //AOD primary should be available ...
}
else printf("AliCaloTrackReader::ConfigureReader() - Data not known InputData=%s\n",inputDataType.Data());
reader->SetDebug(debug);//10 for lots of messages
- //reader->SetDebug(10);//10 for lots of messages
- //reader->SetDebug(2);//10 for lots of messages
+
+ if(useTender){
+ reader->SwitchOffTriggerPatchMatching();
+ reader->SwitchOffBadTriggerEventsRemoval();
+ }
if(simulation)
{
printf("Set time cut \n");
reader->SwitchOnUseEMCALTimeCut();
//Absolute window
- reader->SetEMCALTimeCut(-20.,20.); // default is -25ns-20ns
+ reader->SetEMCALTimeCut(-30.,30.); // default is -25ns-20ns
}
else
{
// reader->SwitchOffCTS();//here changed 0n->off
reader->SwitchOnCTS();//here changed 0n->off
+ reader->SwitchOffRecalculateVertexBC();
+ reader->SwitchOffVertexBCEventSelection();
+
+ reader->SwitchOffUseTrackTimeCut();
+ reader->SetTrackTimeCut(0,50);
+
if(inputDataType=="ESD")
{
- gROOT->LoadMacro("$ALICE_ROOT/PWGJE/macros/CreateTrackCutsPWGJE.C");
- AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
+ //Hybrids 2011
+ AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008);
reader->SetTrackCuts(esdTrackCuts);
- reader->SwitchOnConstrainTrackToVertex();
+ AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
+ reader->SetTrackComplementaryCuts(esdTrackCuts2);
+
+ //Hybrids 2010
+ //AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001006);
+ //reader->SetTrackCuts(esdTrackCuts);
+ //AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10041006);
+ //reader->SetTrackComplementaryCuts(esdTrackCuts2);
}
else if(inputDataType=="AOD")
{
// Calorimeter
reader->SetEMCALClusterListName(clustersArray);
- // if(clustersArray == "" && !kTender)
- if(clustersArray == "")
+ if(clustersArray == "" && !useTender)
{
printf("**************** Standard EMCAL clusters branch analysis **************** \n");
reader->SwitchOnClusterRecalculation();
}
if(printSettings) reader->Print("");
- reader->Print("");
return reader;
}
//_______________________________________
-AliCalorimeterUtils* ConfigureCaloUtils( TString clustersArray = "V1",TString collision = "pp",Bool_t nonlin = kTRUE,Bool_t exotic = kTRUE ,Bool_t simulation = kFALSE,Bool_t timecut = kFALSE,Int_t debug = -1,Bool_t print = kFALSE)
+AliCalorimeterUtils* ConfigureCaloUtils( TString clustersArray = "V1",TString collision = "pp",Bool_t nonlin = kTRUE,Bool_t exotic = kTRUE ,Bool_t simulation = kFALSE,Bool_t timecut = kFALSE,Int_t debug = -1,Bool_t printSettings = kFALSE)
{
+ Bool_t useTender=kTRUE;
+
AliCalorimeterUtils *cu = new AliCalorimeterUtils;
cu->SetDebug(debug);
//else
cu->SwitchOffRecalculateClusterTrackMatching();
- cu->SwitchOnBadChannelsRemoval() ;
- //cu->SwitchOffBadChannelsRemoval() ;// <<<----changed here
-
- //EMCAL settings
+ if(useTender)
+ cu->SwitchOffBadChannelsRemoval() ;
+ else
+ cu->SwitchOnBadChannelsRemoval() ;
+ //EMCAL settings
if(!simulation)
cu->SwitchOnLoadOwnEMCALGeometryMatrices();
-
- AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
-
- if(!simulation)
- {
- cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
- //if(clustersArray == "" && !kTender) cu->SwitchOnRunDepCorrection();
- if(clustersArray == "") cu->SwitchOnRunDepCorrection();
- }
-
- cu->SwitchOnEMCALOADB();//FIX ME!!!
- gROOT->LoadMacro("$ALICE_ROOT/PWGGA/EMCALTasks/macros/ConfigureEMCALRecoUtils.C");
- ConfigureEMCALRecoUtils(recou,
- simulation,
- exotic,
- nonlin,
- kFALSE, // e calib
- kFALSE, // bad map
- kFALSE); // time calib
+ if(!useTender){
+ AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
+
+ if(!simulation)
+ {
+ cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
+ //if(clustersArray == "" && !kTender) cu->SwitchOnRunDepCorrection();
+ if(clustersArray == "") cu->SwitchOnRunDepCorrection();
+ }
+
+ cu->SwitchOnEMCALOADB();//FIX ME!!!
+
+ gROOT->LoadMacro("$ALICE_ROOT/PWGGA/EMCALTasks/macros/ConfigureEMCALRecoUtils.C");
+ ConfigureEMCALRecoUtils(recou,
+ simulation,
+ exotic,
+ nonlin,
+ kFALSE, // e calib
+ kFALSE, // bad map
+ kFALSE); // time calib
//kCalibE,
//kBadMap,
//kCalibT);
- recou->SetExoticCellDiffTimeCut(1e10);
- if(timecut) recou->SetExoticCellDiffTimeCut(50.);
-
+ recou->SetExoticCellDiffTimeCut(1e10);
+ if(timecut) recou->SetExoticCellDiffTimeCut(50.);
+ }//end tender
+
+
if( nonlin )
{
// printf("ConfigureCaloUtils() - Apply non linearity to EMCAL\n");
cu->SwitchOnCorrectClusterLinearity();
}
-
- printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
- printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
-
-
+ if(!useTender){
+ printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
+ printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
+ }
+
+ cu->SetNumberOfSuperModulesUsed(10);
// PHOS
cu->SwitchOffLoadOwnPHOSGeometryMatrices();
}
//_____________________________________
-AliAnaPhoton* ConfigurePhotonAnalysis(TString calorimeter = "EMCAL",Bool_t tm = kFALSE,Bool_t simulation = kFALSE,Int_t debug = -1,Bool_t printSettings = kFALSE)
+AliAnaPhoton* ConfigurePhotonAnalysis(TString calorimeter = "EMCAL",Bool_t tm = kFALSE,Bool_t simulation = kFALSE,Double_t maxLambda0Cut=0.5,Int_t maxNLMcut=2,Int_t debug = -1,Bool_t printSettings = kFALSE)
{
AliAnaPhoton *ana = new AliAnaPhoton();
else
{//EMCAL
ana->SetNCellCut(1);// At least 2 cells
- //ana->SetNCellCut(0);// At least 2 cells <<<----changed here
ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
ana->SetMaxEnergy(1000);
- ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off
+ //ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off //<<<---modified here
// restrict to less than 100 ns when time calibration is on
ana->SetMinDistanceToBadChannel(2, 4, 6);
// Not useful if M02 cut is already strong
- //ana->SetNLMCut(1, 2) ;
+ ana->SetNLMCut(1, maxNLMcut) ;//[1,2]
//ana->SetNLMCut(1, 10) ;//<<<----changed here
- ana->SetNLMCut(1, 1) ;//<<<----changed here
+ //ana->SetNLMCut(1, 1) ;//<<<----changed here
}
if(tm)
//PID cuts (shower shape)
- //ana->SwitchOffCaloPID(); //<<<----changed here
ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
AliCaloPID* caloPID = ana->GetCaloPID();
//Not used in bayesian
//EMCAL
- caloPID->SetEMCALLambda0CutMax(0.50);//0.27 was before//0.50//<<<----changed here
+ caloPID->SetEMCALLambda0CutMax(maxLambda0Cut);//0.27 was before//0.50//<<<----changed here
caloPID->SetEMCALLambda0CutMin(0.10);
caloPID->SetEMCALDEtaCut(0.025);
//PHOS
caloPID->SetPHOSDispersionCut(2.5);
caloPID->SetPHOSRCut(2.);
- if(kInputData=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored
+ //if(kInputData=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored
ana->SwitchOnFillShowerShapeHistograms(); // Filled before photon shower shape selection <<<--- changed here
//ana->SwitchOffFillShowerShapeHistograms(); // Filled before photon shower shape selection
//if(!kData.Contains("delta"))
//{
- // ana->SetOutputAODName(Form("Photon%s",kGammaJetCorrelationName.Data()));
- // ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
+ ana->SetOutputAODName(Form("Photon%s",kGammaJetCorrelationName.Data()));
+ ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
// //ana->SetOutputAODClassName("AliAODPWG4Particle"); // use if no correlation done
//}
//else
{
AliAnaParticleIsolation *ana = new AliAnaParticleIsolation();
- //ana->SetDebug(debug);
ana->SetDebug(debug);
ana->SwitchOnFiducialCut();
ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 0, 360) ;
}
- ana->SetMinPt(3);//<<---changed here
+ ana->SetMinPt(10);//<<---changed here
// Input / output delta AOD settings
SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter); // see method below
- ana->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
- ana->SetHistoPtSumRangeAndNBins (0, 100, 250);
-
if(particle=="Hadron" || particle.Contains("CTS"))
{
ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,5000,500);
+ // Isolation
+ histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
+ histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 250);
+
}
//_________________
}
-AliAnaParticleJetFinderCorrelation* ConfigurePhotonJetAnalysis(Bool_t simulation = kFALSE,Int_t debug = -1,Bool_t printSettings = kFALSE){
+AliAnaParticleJetFinderCorrelation* ConfigurePhotonJetAnalysis(TString calorimeter = "EMCAL",Float_t gammaConeSize = 0.3, Float_t jetMinPt = 0,
+ Float_t minDeltaPhi = 1.5,Float_t maxDeltaPhi = 4.5,
+ Float_t minPtRatio = 0,Float_t maxPtRatio = 5,
+ Bool_t simulation = kFALSE,Int_t debug = -1,Bool_t printSettings = kFALSE){
AliAnaParticleJetFinderCorrelation *ana = new AliAnaParticleJetFinderCorrelation();
ana->SetDebug(debug);
ana->SelectIsolated(kTRUE); // do correlation with isolated photons <<---changed here
ana->SetMakeCorrelationInHistoMaker(kFALSE);
ana->SetPtThresholdInCone(0.150);//<<---- change here
- ana->SetDeltaPhiCutRange(TMath::Pi()/2.,TMath::Pi()*3./2.);//Mostly Open Cuts
+ //ana->SetDeltaPhiCutRange(TMath::Pi()/2.,TMath::Pi()*3./2.);//Mostly Open Cuts
+ ana->SetDeltaPhiCutRange(minDeltaPhi,maxDeltaPhi); // Delta phi cut for correlation
ana->SetJetConeSize(0.4);//jet cone size / check the reco jet name
- ana->SetJetMinPt(5);//min jet pt
+ ana->SetJetMinPt(jetMinPt);//min jet pt
ana->SetJetAreaFraction(0.8);//min area fraction was 0.6
ana->SetMinPt(0.3);//min cluster pt repeated from reader
- ana->SetGammaConeSize(0.3);//isolation cone repeated from isolation ana
-
+ ana->SetGammaConeSize(gammaConeSize);//isolation cone repeated from isolation ana
+ //ana->SetRatioCutRange(0.01,5.); //Mostly Open Cuts //0.01-5//<<---- change here
+ ana->SetRatioCutRange(minPtRatio,maxPtRatio); // Delta pt cut for correlation
- ana->SetRatioCutRange(0.01,5.); //Mostly Open Cuts //0.01-5//<<---- change here
ana->UseJetRefTracks(kTRUE); //Working now
//Set Histograms bins and ranges
SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter); // see method below 0,100,200
// ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
// ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
- ana->SwitchOnNonStandardJetFromReader();
+ // ana->SwitchOnNonStandardJetFromReader();
ana->SwitchOnBackgroundJetFromReader();
//background subtraction for photons
//ana->SwitchOnBackgroundSubtractionGamma();
ana->SwitchOffBackgroundSubtractionGamma();
ana->SwitchOnSaveGJTree();
- //ana->SwitchOnMostOpposite();
- ana->SwitchOnMostEnergetic();
+ ana->SwitchOnMostOpposite();
+ //ana->SwitchOnMostEnergetic();
//if(useKinematics) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms