AliPhysics  ced2227 (ced2227)

Fit invariant mass distributions. More...

#include "TString.h"
#include "TH2F.h"
#include "TH1F.h"
#include "TH3F.h"
#include "TH1D.h"
#include "TF1.h"
#include "TMath.h"
#include "TCanvas.h"
#include "TStyle.h"
#include "TPad.h"
#include "TFile.h"
#include "TLegend.h"
#include "TObject.h"
#include "TDirectoryFile.h"
#include "TGraphErrors.h"
#include "TList.h"
#include <TGaxis.h>
Include dependency graph for InvMassFit.C:

Go to the source code of this file.

Functions

Double_t pi0massP0 (Double_t *x, Double_t *par)
 
Double_t pi0massP1 (Double_t *x, Double_t *par)
 
Double_t pi0massP2 (Double_t *x, Double_t *par)
 
Double_t pi0massP3 (Double_t *x, Double_t *par)
 
Double_t truncatedPolPi0 (Double_t *x, Double_t *par)
 
Double_t truncatedPolEta (Double_t *x, Double_t *par)
 
Double_t CrystalBall (Double_t *x, Double_t *par)
 
Bool_t GetFileAndEvents (TString prodname, TString filename, TString dirName, TString listName)
 
void SetFitFun ()
 
void InvMassFit (TString prodname="LHC18c3_NystromOn", TString filename="AnalysisResults", TString histoDir="Pi0IM_GammaTrackCorr_EMCAL", TString histoList="default", TString calorimeter="DCAL", TString particle="Pi0", Bool_t mixed=0, Int_t pol=1, Int_t ncomb=1, Float_t nPairMin=20, TString fileFormat="eps")
 

Variables

Bool_t mix = kFALSE
 
TString part = "Eta"
 use mixed event to constrain combinatorial background More...
 
Int_t polN = 1
 define fitting and plotting ranges for particle More...
 
Bool_t sumw2 = kTRUE
 polinomyal type for residual background under the peak More...
 
Bool_t drawAllCombi = 0
 Apply Root method Sumw2() More...
 
Float_t nPairCut = 20
 Plot also many SM combinations. More...
 
Int_t nEvt = 0
 Minimum number of cluster pairs in pi0 or eta window. More...
 
TFile * fil = 0
 
TListlis = 0
 
TDirectoryFile * direc =0
 
TF1 * fitfun = 0
 

Detailed Description

Fit invariant mass distributions.

Macro using as input the 2D histograms mass vs pT of AliAnaPi0 For a given set of pT bins invariant mass plots are fitted and mass vs pT and width vs pT and neutral meson spectra plots are obtained

Based on old macros, to be properly cleaned

Author
Gustavo Conesa Balbastre Gusta.nosp@m.vo.C.nosp@m.onesa.nosp@m..Bal.nosp@m.bastr.nosp@m.e@ce.nosp@m.rn.ch, (LPSC-CNRS)

Definition in file InvMassFit.C.

Function Documentation

Double_t CrystalBall ( Double_t x,
Double_t par 
)

Definition at line 1597 of file InvMassFit.C.

Referenced by SetFitFun().

Bool_t GetFileAndEvents ( TString  prodname,
TString  filename,
TString  dirName,
TString  listName 
)

Open the file and the list and the number of analyzed events

Definition at line 1431 of file InvMassFit.C.

Referenced by InvMassFit().

void InvMassFit ( TString  prodname = "LHC18c3_NystromOn",
TString  filename = "AnalysisResults",
TString  histoDir = "Pi0IM_GammaTrackCorr_EMCAL",
TString  histoList = "default",
TString  calorimeter = "DCAL",
TString  particle = "Pi0",
Bool_t  mixed = 0,
Int_t  pol = 1,
Int_t  ncomb = 1,
Float_t  nPairMin = 20,
TString  fileFormat = "eps" 
)

Main method

Parameters
prodname: name of directory with histogram file
filename: histogram file name
histoDir: TDirectoryFile folder name
histoList: TList folder name
calorimeter"EMCAL","DCAL"
particle: "Pi0","Eta", define fitting and plotting ranges for particle
mixed: bool, use mixed event to constrain combinatorial background
pol: int, polinomyal type for residual background under the peak
ncomb: total number of SM combinations (Single SM, same side 2 SM, same sector 2 SM)
nPairMin: minimum number of entries un the pi0 or eta peak integral to do the fits and plotting. Careful in MC scaled productions.
fileFormat: define the type of figures: eps, pdf, etc.

Definition at line 82 of file InvMassFit.C.

Double_t pi0massP0 ( Double_t x,
Double_t par 
)

Definition at line 1566 of file InvMassFit.C.

Referenced by SetFitFun().

Double_t pi0massP1 ( Double_t x,
Double_t par 
)

Definition at line 1557 of file InvMassFit.C.

Referenced by SetFitFun().

Double_t pi0massP2 ( Double_t x,
Double_t par 
)

Definition at line 1548 of file InvMassFit.C.

Referenced by SetFitFun().

Double_t pi0massP3 ( Double_t x,
Double_t par 
)

Definition at line 1539 of file InvMassFit.C.

Referenced by SetFitFun().

void SetFitFun ( )

Initialize the fitting function

Definition at line 1466 of file InvMassFit.C.

Referenced by InvMassFit().

Double_t truncatedPolEta ( Double_t x,
Double_t par 
)

Definition at line 1575 of file InvMassFit.C.

Double_t truncatedPolPi0 ( Double_t x,
Double_t par 
)

Definition at line 1586 of file InvMassFit.C.

Variable Documentation

TDirectoryFile* direc =0

Definition at line 62 of file InvMassFit.C.

Referenced by GetFileAndEvents(), and InvMassFit().

Bool_t drawAllCombi = 0

Apply Root method Sumw2()

Definition at line 55 of file InvMassFit.C.

Referenced by InvMassFit().

TF1* fitfun = 0

Definition at line 63 of file InvMassFit.C.

Referenced by InvMassFit(), Pi0CalibInvMassAnalysis3(), and SetFitFun().

TList* lis = 0

Definition at line 61 of file InvMassFit.C.

Int_t nEvt = 0

Minimum number of cluster pairs in pi0 or eta window.

Definition at line 59 of file InvMassFit.C.

Referenced by GetFileAndEvents(), and InvMassFit().

Float_t nPairCut = 20

Plot also many SM combinations.

Definition at line 56 of file InvMassFit.C.

Referenced by InvMassFit(), and SetFitFun().

TString part = "Eta"

use mixed event to constrain combinatorial background

Definition at line 52 of file InvMassFit.C.

Referenced by AliFlowOnTheFlyEventGenerator::AddV2(), AliHFTrackContainer::ApplyTrackCuts(), AliFMDEventInspector::CacheConfiguredTriggerClasses(), AliAnalysisTaskDmesonJets::CalculateMassLimits(), AliAnalysisTaskJetsEvshape::CalculateSphericityT(), charmCutsOptimization(), AliAnalysisTaskSEDmesonsFilterCJ::CheckDecayChannel(), AliCFVertexingHF3Prong::CheckMCChannelDecay(), AliAnalysisTaskSEDmesonsFilterCJ::CheckOrigin(), AliTrackletTaskMulti::CheckReconstructables(), AliFlowBayesianPID::ComputeWeights(), AliEmcalMCTrackSelector::ConvertMCParticles(), AliEmcalMCTrackSelector::CopyMCParticles(), AliJetModelBaseTask::CopyMCParticles(), AliFlowOnTheFlyEventGenerator::DecayOnTheFlyTracks(), AliJetConstituentTagCopier::DoClusterLoop(), EmcalTriggerJets::AliAnalysisTaskEmcalJetSubstructureTree::DoConstituentQA(), AliJetConstituentTagCopier::DoParticleLoop(), AliAnalysisTaskJetSubstructure::DoTrackLoop(), AliAnalysisTaskEmcalSample::DoTrackLoop(), AliAnalysisTaskEmcalJetSample::DoTrackLoop(), AliAnalysisTaskJetCoreEmcal::DoTrackLoop(), AliAnalysisTaskEmcalJetHF::DoTrackLoop(), AliAnalysisTaskEmcalJetSpectra8TeVTriggerQA::DoTrackLoop(), AliAnalysisTaskEMCALAlig::DoTrackLoop(), AliKFParticleTest::Exec(), AliAnalysisTaskFullppJet::FillAODJets(), AliAnalysisTaskCombinHF::FillGenHistos(), AliAnalysisTaskBackFlucRandomCone::FillHistograms(), AliEmcalTrackingQATask::FillHistograms(), AliAnalysisTaskIDFragmentationFunction::FillHistograms(), AliAnalysisTaskCombinHF::FillHistos(), AliTrackletTaskMulti::FillHistos(), AliTrackletTaskMulti::FillMCPrimaries(), AliAnalysisTaskDmesonJets::FillPartonLevelHistograms(), AliAnalysisTaskFlowModes::FillPOIsVectors(), AliAnalysisTaskFlowModes::FillRefsVectors(), AliTrackletTaskMulti::FillSpecies(), AliAnalysisTaskPWGJEQA::FillTrackHistograms(), AliAnalysisTaskHJetEmbed::FindEnergyMatchedJet(), AliAnalysisTaskSELc2V0bachelorTMVA::FindLcLabel(), AliJetEmbeddingFromAODTask::FindParticleInRange(), AliAnalysisTaskSELc2V0bachelorTMVA::FindV0Label(), AliFlowOnTheFlyEventGenerator::GenerateOnTheFlyTracks(), AliAnalysisTaskFlavourJetCorrelations::GetBuildResponseMatrixEff(), AliAnalysisTaskEmcalJetPerformance::GetContributorType(), AliAnaCaloTrackCorrBaseClass::GetEventPlaneMethod(), AliHelperPID::GetfHasDoubleCounting(), AliVertexingHFUtils::GetGeneratedMultiplicityInEtaRange(), AliVertexingHFUtils::GetGeneratedPhysicalPrimariesInEtaRange(), AliVertexingHFUtils::GetGeneratedPrimariesInEtaRange(), AliVertexingHFUtils::GetGeneratedSpherocity(), AliCFVertexingHF3Prong::GetGeneratedValuesFromMCParticle(), AliAnalysisTaskCharmBaryonsMC::GetHistory(), AliAnalysisTaskSEDmesonsFilterCJ::GetKeepOnlyDfromB(), AliMCHFParticleSelector::GetKeepOnlyDStartoKpipi(), AliParticleContainer::GetLeadingParticle(), AliAnalysisTaskJetChem::GetListOfV0s(), AliJetResponseMaker::GetMCLabelMatchingLevel(), AliEmcalPicoTrackMaker::GetMCParticle(), AliHelperPID::GetMCParticleSpecie(), AliAnalysisTaskSELambdac::GetNBinsPt(), AliEmcalJet::GetNumberOfClusterConstituents(), HighPtTracks::AliHighPtReconstructionEfficiency::GetNumberOfTPCTrackReferences(), AliAnalysisTaskSED0MassCutVarFDSub::GetPIDCheck(), AliAnalysisTaskSED0MassNonPromptFraction::GetPIDCheck(), AliTrackletTaskMulti::GetPrimaryWeight(), AliAnalysisTaskV0sInJets::GetRandomCone(), AliAnalysisTaskV0sInJetsEmcal::GetRandomCone(), HighPtTracks::AliReducedHighPtEvent::GetRunNumber(), AliAnalysisTaskSED0MassCutVarFDSub::GetTrueImpactParameter(), AliAnalysisTaskSED0MassNonPromptFraction::GetTrueImpactParameter(), AliAnalysisTaskSED0Mass::GetTrueImpactParameter(), AliAnalysisTaskSEDplus::GetTrueImpactParameter(), AliAnalysisTaskSEDStarSpectra::GetTrueImpactParameterD0(), AliVertexingHFUtils::GetTrueImpactParameterDplus(), AliAnalysisTaskSEDs::GetTrueImpactParameterDstoPhiPi(), AliVertexingHFUtils::GetTrueImpactParameterDzero(), EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesMCTriggerMimic::HasObservable(), AliTrackletTaskMulti::HaveCommonParent(), EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesRefMC::InitializeTrackCuts(), AliAnalysisTaskSELambdac::Is3ProngFromPDG(), AliFilteredTreeEventCuts::IsHadronLevelSingleDiffractive(), AliAnalysisTaskEmcalLight::IsInhibit(), EMCalTriggerPtAnalysis::AliEMCalTriggerMCParticleAnalysisComponent::IsPhysicalPrimary(), AliAnalysisTaskParticleInJet::IsPhysicalPrimary(), EMCalTriggerPtAnalysis::AliAnalysisTaskTracksInJet::IsPhysicalPrimary(), EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesMCTriggerMimic::IsPhysicalPrimary(), HighPtTracks::AliHighPtReconstructionEfficiency::IsPhysicalPrimary(), AliAnalysisTaskSELambdac::IspiKpMC(), AliAnalysisTaskSELambdacTMVA::IspiKpMC(), AliAnalysisTaskSELambdac::IspKpiMC(), AliAnalysisTaskSELambdacTMVA::IspKpiMC(), AliAnalysisTaskPID::IsSecondaryWithStrangeMotherMC(), AliRDHFCutsLctopK0sfromAODtracks::IsSelected(), AliRDHFCutsOmegactoeleOmegafromAODtracks::IsSelectedCombinedPID(), AliRDHFCutsLctoeleLambdafromAODtracks::IsSelectedCombinedPID(), AliRDHFCutsXictoeleXifromAODtracks::IsSelectedCombinedPID(), AliRDHFCutsLctopK0sfromAODtracks::IsSelectedCombinedPID(), AliRDHFCutsOmegactoeleOmegafromAODtracks::IsSelectedPID(), AliRDHFCutsLctopK0sfromAODtracks::IsSelectedPID(), AliRDHFCutsXictoeleXifromAODtracks::IsSelectedPID(), AliRDHFCutsLctoeleLambdafromAODtracks::IsSelectedPID(), AliMCHFParticleSelector::IsSpecialPDGDaughter(), AliHFAODMCParticleContainer::IsSpecialPDGDaughter(), AliHFAODMCParticleContainer::IsSpecialPDGFound(), AliAnalysisTaskSELambdac::IsTrackFromPDG(), AliAODConversionMother::IsTrueMeson(), AliAnalysisTaskSED0Mass::LocalInit(), AliAnalysisTaskSEOmegac2eleOmegafromAODtracks::LocalInit(), AliAnalysisTaskSELc2V0bachelor::LocalInit(), AliAnalysisTaskSELc2pK0sfromAODtracks::LocalInit(), AliAnalysisTaskSELc2eleLambdafromAODtracks::LocalInit(), AliAnalysisTaskSEXic2eleXifromAODtracks::LocalInit(), AliAnalysisTaskSELc2V0bachelorTMVA::LocalInit(), AliAnalysisTaskSEB0toDStarPi::MatchCandidateToMonteCarlo(), AliAnalysisTaskSELambdac::MatchToMCLambdac(), AliAnalysisTaskSELambdacTMVA::MatchToMCLambdac(), AliAODRecoCascadeHF3Prong::MatchToMCXicPlus(), Merge2Bins(), AliAnalysisTaskIDFragmentationFunction::PerformJetMonteCarloAnalysisGeneratedYield(), AliEmcalJet::PrintConstituents(), AliAnalysisTaskFilteredTree::ProcessAll(), HighPtTracks::AliHighPtReconstructionEfficiency::ProcessJet(), AliAnalysisTaskMuonPerformance::RecoTrackMother(), GridRailway::RegisterRuns(), EMCalTriggerPtAnalysis::AliAnalysisTaskTracksInJet::JetData::Reset(), AliTrackletTaskMulti::ReweightStack(), EMCalTriggerPtAnalysis::AliAnalysisTaskPtEfficiencyJets::Run(), AliJetEmbeddingFromGenTask::Run(), EMCalTriggerPtAnalysis::AliAnalysisTaskPtEMCalTrigger::Run(), AliJetEmbeddingFromAODTask::Run(), AliAnalysisTaskEmcalJetHadEPpid::Run(), AliAnalysisTaskDmesonJets::AnalysisEngine::RunParticleLevelAnalysis(), AliAnalysisTaskHJetDphi::RunTrackQA(), AliAnalysisTaskSELc2V0bachelor::SearchForCommonMother(), EMCalTriggerPtAnalysis::AliAnalysisTaskPtEMCalTrigger::SelectAllTracks(), EmcalTriggerJets::AliAnalysisTaskEmcalJetSubstructureTree::SelectJet(), HighPtTracks::AliHighPtReconstructionEfficiency::SelectParticles(), HighPtTracks::AliHighPtReconstructionEfficiency::SelectParticlesForJetfinding(), AliAnalysisTaskJetCoreEmcal::SelectTrigger(), EMCalTriggerPtAnalysis::AliAnalysisTaskPtEfficiencyJets::SelectTrueParticle(), HighPtTracks::AliReducedJetInfo::Set(), AliFlowOnTheFlyEventGenerator::SetAfterBurnerPrecision(), AliAnalysisTaskSEDStarSpectra::SetAODMismatchProtection(), EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesRefMC::SetExclusiveMinBias(), AliHFAODMCParticleContainer::SetHistOrigin(), AliAnalysisTaskEmcalMissingEnergy::SetHoleWidth(), AliAnalysisTaskGammaPureMC::SetIsMC(), AliAnalysisTaskParticleInJet::SetJetContainerNameMC(), AliCFVertexingHF::SetLabelArray(), AliAnalysisTaskSELambdacTMVA::SetLambdacDaugh(), AliAnalysisTaskHadronicCocktailMC::SetLightOutput(), AliAnalysisTaskGammaCocktailMC::SetLightOutput(), HighPtTracks::AliReconstructedParticlePair::SetMCTrueParticle(), AliAnalysisTaskEmcalDijetImbalance::SetNPhiBins(), AliJetModelBaseTask::SetNTracks(), AliParticleContainer::SetParticlePhiLimits(), AliEmcalMCTrackSelector::SetParticlesOutName(), AliAnalysisTaskEmcalJetPerformance::SetPlotDCal(), AliAnalysisTaskEmcalVsPhos::SetPlotEventHistograms(), EMCalTriggerPtAnalysis::AliAnalysisTaskPtEfficiencyJets::SetTrackCuts(), HighPtTracks::AliHighPtReconstructionEfficiency::SetTrackCuts(), Cumulants::SetTracks(), TrackletdNdetaTrain::SetupReweighting(), MakeTrackletTrain::SetupReweighting(), AliAnalysisTaskIDFragmentationFunction::SetUseJetUEPIDtask(), NS_AliAnalysisTaskEmcalJetCDF::SortTracksPt(), TestParticleContainerIterator(), AliAnalysisTaskEmcal::TrackPtFactor(), EMCalTriggerPtAnalysis::AliAnalysisTaskEtaPhiEfficiency::UserExec(), AliAnalysisTaskCheckHFMCProd::UserExec(), HighPtTracks::AliHighPtReconstructionEfficiency::UserExec(), AliAnalysisTaskJetChem::UserExec(), AliAnalysisTaskSEDvsEventShapes::UserExec(), AliAnalysisTaskSEDvsMultiplicity::UserExec(), and EMCalTriggerPtAnalysis::AliEMCalTriggerMCParticleAnalysisComponent::~AliEMCalTriggerMCParticleAnalysisComponent().

Int_t polN = 1

define fitting and plotting ranges for particle

Definition at line 53 of file InvMassFit.C.

Referenced by InvMassFit(), Pi0CalibInvMassAnalysis3(), and SetFitFun().