|
42 | 42 | #include "ITSMFTBase/DPLAlpideParam.h" |
43 | 43 |
|
44 | 44 | #include "TGeoGlobalMagField.h" |
| 45 | +#include <TF1.h> |
45 | 46 | #include <TH1F.h> |
46 | 47 | #include <TH3F.h> |
47 | 48 | #include <THashList.h> |
48 | 49 | #include <TList.h> |
49 | 50 | #include <TObjString.h> |
| 51 | +#include <TRandom.h> |
50 | 52 | #include <TString.h> |
51 | 53 |
|
52 | 54 | #include <algorithm> |
@@ -3133,6 +3135,8 @@ struct AnalysisDileptonTrack { |
3133 | 3135 | Configurable<std::string> fConfigGeoPath{"geoPath", "GLO/Config/GeometryAligned", "Path of the geometry file"}; |
3134 | 3136 | Configurable<bool> fConfigUseRapcut{"cfgUseMCRapcut", false, "Use Rap cut for dileptons used in the triplet vertexing"}; |
3135 | 3137 | Configurable<bool> fConfigEnergycorrelator{"cfgEnergycorrelator", false, "Add some hist for energy correlator study"}; |
| 3138 | + Configurable<bool> fConfigApplyMassEC{"cfgApplyMassEC", false, "Apply fit mass for sideband for the energy correlator study"}; |
| 3139 | + Configurable<std::vector<float>> fConfigFitmassEC{"cfgTFitmassEC", std::vector<float>{61199.9144, -19417.7588, 1709.4958, 2.8, 3.2}, "parameter from the fit fuction and fit range"}; |
3136 | 3140 |
|
3137 | 3141 | int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc. |
3138 | 3142 | int fNCuts; // number of dilepton leg cuts |
@@ -3165,6 +3169,8 @@ struct AnalysisDileptonTrack { |
3165 | 3169 |
|
3166 | 3170 | NoBinningPolicy<aod::dqanalysisflags::MixingHash> fHashBin; |
3167 | 3171 |
|
| 3172 | + TF1* fMassBkg = nullptr; |
| 3173 | + |
3168 | 3174 | void init(o2::framework::InitContext& context) |
3169 | 3175 | { |
3170 | 3176 | bool isBarrel = context.mOptions.get<bool>("processBarrelSkimmed"); |
@@ -3389,6 +3395,12 @@ struct AnalysisDileptonTrack { |
3389 | 3395 | LOG(info) << "Loading geometry from CCDB in dilepton-track task"; |
3390 | 3396 | fCCDB->get<TGeoManager>(fConfigGeoPath); |
3391 | 3397 | } |
| 3398 | + |
| 3399 | + // the background mass distribution in signal region |
| 3400 | + std::vector<float> fMassBkgpar = fConfigFitmassEC; |
| 3401 | + fMassBkg = new TF1("fMassBkg", "[0]+[1]*x+[2]*x*x", fMassBkgpar[3], fMassBkgpar[4]); |
| 3402 | + fMassBkg->SetParameters(fMassBkgpar[0], fMassBkgpar[1], fMassBkgpar[2]); |
| 3403 | + fMassBkg->SetNpx(10000); |
3392 | 3404 | } |
3393 | 3405 |
|
3394 | 3406 | // init parameters from CCDB |
@@ -3490,6 +3502,10 @@ struct AnalysisDileptonTrack { |
3490 | 3502 | // compute needed quantities |
3491 | 3503 | VarManager::FillDileptonHadron(dilepton, track, fValuesHadron); |
3492 | 3504 | VarManager::FillDileptonTrackVertexing<TCandidateType, TEventFillMap, TTrackFillMap>(event, lepton1, lepton2, track, fValuesHadron); |
| 3505 | + |
| 3506 | + // for the energy correlator analysis |
| 3507 | + VarManager::FillEnergyCorrelator(dilepton, track, fValuesHadron, fConfigApplyMassEC, fMassBkg->GetRandom()); |
| 3508 | + |
3493 | 3509 | // table to be written out for ML analysis |
3494 | 3510 | BmesonsTable(event.runNumber(), event.globalIndex(), event.timestamp(), fValuesHadron[VarManager::kPairMass], dilepton.mass(), fValuesHadron[VarManager::kDeltaMass], fValuesHadron[VarManager::kPairPt], fValuesHadron[VarManager::kPairEta], fValuesHadron[VarManager::kPairPhi], fValuesHadron[VarManager::kPairRap], |
3495 | 3511 | fValuesHadron[VarManager::kVertexingLxy], fValuesHadron[VarManager::kVertexingLxyz], fValuesHadron[VarManager::kVertexingLz], |
@@ -3685,6 +3701,9 @@ struct AnalysisDileptonTrack { |
3685 | 3701 | // compute dilepton - track quantities |
3686 | 3702 | VarManager::FillDileptonHadron(dilepton, track, VarManager::fgValues); |
3687 | 3703 |
|
| 3704 | + // for the energy correlator analysis |
| 3705 | + VarManager::FillEnergyCorrelator(dilepton, track, VarManager::fgValues, fConfigApplyMassEC, fMassBkg->GetRandom()); |
| 3706 | + |
3688 | 3707 | // loop over dilepton leg cuts and track cuts and fill histograms separately for each combination |
3689 | 3708 | for (int icut = 0; icut < fNCuts; icut++) { |
3690 | 3709 | if (!dilepton.filterMap_bit(icut)) { |
|
0 commit comments