@@ -100,6 +100,7 @@ struct CorrSparse {
100100 O2_DEFINE_CONFIGURABLE (processFT0A, bool , true , " Process FT0A correlations" )
101101 O2_DEFINE_CONFIGURABLE (processFT0C, bool , true , " Process FT0C correlations" )
102102 O2_DEFINE_CONFIGURABLE (processMFT, bool , true , " Process MFT correlations" )
103+ O2_DEFINE_CONFIGURABLE (withGain, bool , true , " Use gain for FT0A and FT0C" )
103104
104105 } cfgDetectorConfig;
105106
@@ -143,9 +144,7 @@ struct CorrSparse {
143144 O2_DEFINE_CONFIGURABLE (cfgRejectFT0CInside, bool , false , " Rejection of inner ring channels of the FT0C detector" )
144145 O2_DEFINE_CONFIGURABLE (cfgRejectFT0COutside, bool , false , " Rejection of outer ring channels of the FT0C detector" )
145146 O2_DEFINE_CONFIGURABLE (cfgRemapFT0ADeadChannels, bool , false , " If true, remap FT0A channels 60-63 to amplitudes from 92-95 respectively" )
146- O2_DEFINE_CONFIGURABLE (cfgRemapFT0CDeadChannels, bool , false , " If true, remap FT0C channels 177->145, 176->144, 178->146, 179->147, 139->115" )
147-
148- } cfgFITConfig;
147+ O2_DEFINE_CONFIGURABLE (cfgRemapFT0CDeadChannels, bool , false , " If true, remap FT0C channels 177->145, 176->144, 178->146, 179->147, 139->115" )} cfgFITConfig;
149148
150149 O2_DEFINE_CONFIGURABLE (cfgMinMixEventNum, int , 5 , " Minimum number of events to mix" )
151150 O2_DEFINE_CONFIGURABLE (cfgMergingCut, float , 0.02 , " Merging cut on track merge" )
@@ -157,7 +156,6 @@ struct CorrSparse {
157156 O2_DEFINE_CONFIGURABLE (cfgCentralityWeight, std::string, " " , " CCDB path to centrality weight object" )
158157 O2_DEFINE_CONFIGURABLE (cfgLocalEfficiency, bool , false , " Use local efficiency object" )
159158 O2_DEFINE_CONFIGURABLE (cfgUseEventWeights, bool , false , " Use event weights for mixed event" )
160- O2_DEFINE_CONFIGURABLE (cfgCollType, int , 0 , " Collision type: 0 = pp, 1 = pPb, 2 = pO, 3 = OO" )
161159
162160 struct : ConfigurableGroup {
163161 O2_DEFINE_CONFIGURABLE (cfgMultCentHighCutFunction, std::string, " [0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x + 10.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)" , " Functional for multiplicity correlation cut" );
@@ -190,6 +188,11 @@ struct CorrSparse {
190188 TF1* fT0AV0ASigma = nullptr ;
191189 } cfgFuncParas;
192190
191+ Configurable<float > cfgCutFV0{" cfgCutFV0" , 50 ., " FV0A threshold" };
192+ Configurable<float > cfgCutFT0A{" cfgCutFT0A" , 150 ., " FT0A threshold" };
193+ Configurable<float > cfgCutFT0C{" cfgCutFT0C" , 50 ., " FT0C threshold" };
194+ Configurable<float > cfgCutZDC{" cfgCutZDC" , 10 ., " ZDC threshold" };
195+
193196 SliceCache cache;
194197 SliceCache cacheNch;
195198
@@ -236,7 +239,7 @@ struct CorrSparse {
236239
237240 // make the filters and cuts.
238241 Filter collisionFilter = (nabs(aod::collision::posZ) < cfgZVtxCut);
239- Filter trackFilter = (nabs(aod::track::eta) < cfgTrackCuts.cfgEtaCut) && (cfgTrackCuts.cfgPtCutMin < aod::track::pt) && (cfgTrackCuts.cfgPtCutMax > aod::track::pt) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t ) true )) && (aod::track::tpcChi2NCl < cfgTrackCuts.cfgCutChi2prTPCcls) && (aod::track::dcaZ < cfgTrackCuts.cfgCutDCAz);
242+ Filter trackFilter = (nabs(aod::track::eta) < cfgTrackCuts.cfgEtaCut) && (cfgTrackCuts.cfgPtCutMin < aod::track::pt) && (cfgTrackCuts.cfgPtCutMax > aod::track::pt) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t )true )) && (aod::track::tpcChi2NCl < cfgTrackCuts.cfgCutChi2prTPCcls) && (aod::track::dcaZ < cfgTrackCuts.cfgCutDCAz);
240243
241244 Filter mftTrackEtaFilter = ((aod::fwdtrack::eta < cfgMftConfig.etaMftTrackMaxFilter) && (aod::fwdtrack::eta > cfgMftConfig.etaMftTrackMinFilter));
242245
@@ -399,22 +402,22 @@ struct CorrSparse {
399402 if (cfgDetectorConfig.processFT0A ) {
400403 registry.add (" deltaEta_deltaPhi_same_TPC_FT0A" , " " , {HistType::kTH2D , {axisDeltaPhi, axisDeltaEtaTpcFt0a}}); // check to see the delta eta and delta phi distribution
401404 registry.add (" deltaEta_deltaPhi_mixed_TPC_FT0A" , " " , {HistType::kTH2D , {axisDeltaPhi, axisDeltaEtaTpcFt0a}});
402- registry.add (" Assoc_amp_same_TPC_FT0A " , " " , {HistType::kTH2D , {axisChannelFt0aAxis, axisAmplitudeFt0a}});
403- registry.add (" Assoc_amp_mixed_TPC_FT0A " , " " , {HistType::kTH2D , {axisChannelFt0aAxis, axisAmplitudeFt0a}});
404- registry.add (" Trig_hist_TPC_FT0A " , " " , {HistType::kTHnSparseF , {{axisSample, axisVertex, axisPtTrigger}}});
405+ registry.add (" Assoc_amp_same " , " " , {HistType::kTH2D , {axisChannelFt0aAxis, axisAmplitudeFt0a}});
406+ registry.add (" Assoc_amp_mixed " , " " , {HistType::kTH2D , {axisChannelFt0aAxis, axisAmplitudeFt0a}});
407+ registry.add (" Trig_hist " , " " , {HistType::kTHnSparseF , {{axisSample, axisVertex, axisPtTrigger}}});
405408 }
406409 if (cfgDetectorConfig.processFT0C ) {
407410 registry.add (" deltaEta_deltaPhi_same_TPC_FT0C" , " " , {HistType::kTH2D , {axisDeltaPhi, axisDeltaEtaTpcFt0c}}); // check to see the delta eta and delta phi distribution
408411 registry.add (" deltaEta_deltaPhi_mixed_TPC_FT0C" , " " , {HistType::kTH2D , {axisDeltaPhi, axisDeltaEtaTpcFt0c}});
409- registry.add (" Assoc_amp_same_TPC_FT0C " , " " , {HistType::kTH2D , {axisChannelFt0aAxis, axisAmplitudeFt0a}});
410- registry.add (" Assoc_amp_mixed_TPC_FT0C " , " " , {HistType::kTH2D , {axisChannelFt0aAxis, axisAmplitudeFt0a}});
411- registry.add (" Trig_hist_TPC_FT0C " , " " , {HistType::kTHnSparseF , {{axisSample, axisVertex, axisPtTrigger}}});
412+ registry.add (" Assoc_amp_same " , " " , {HistType::kTH2D , {axisChannelFt0aAxis, axisAmplitudeFt0a}});
413+ registry.add (" Assoc_amp_mixed " , " " , {HistType::kTH2D , {axisChannelFt0aAxis, axisAmplitudeFt0a}});
414+ registry.add (" Trig_hist " , " " , {HistType::kTHnSparseF , {{axisSample, axisVertex, axisPtTrigger}}});
412415 }
413416 if (cfgDetectorConfig.processFV0 ) {
414417 registry.add (" deltaEta_deltaPhi_same_TPC_FV0" , " " , {HistType::kTH2D , {axisDeltaPhi, axisDeltaEtaTpcFv0}}); // check to see the delta eta and delta phi distribution
415418 registry.add (" deltaEta_deltaPhi_same_TPC_FV0" , " " , {HistType::kTH2D , {axisDeltaPhi, axisDeltaEtaTpcFv0}}); // check to see the delta eta and delta phi distribution
416419 registry.add (" deltaEta_deltaPhi_mixed_TPC_FV0" , " " , {HistType::kTH2D , {axisDeltaPhi, axisDeltaEtaTpcFv0}});
417- registry.add (" Trig_hist_FT0A_FT0C " , " " , {HistType::kTHnSparseF , {{axisSample, axisVertex, axisPtTrigger}}});
420+ registry.add (" Trig_hist " , " " , {HistType::kTHnSparseF , {{axisSample, axisVertex, axisPtTrigger}}});
418421 }
419422 }
420423
@@ -768,7 +771,7 @@ struct CorrSparse {
768771 auto theta = std::atan2 (r, z);
769772 return -std::log (std::tan (0.5 * theta));
770773 }
771-
774+ // checks if it is an accepted mft track
772775 template <typename TTrack>
773776 bool isAcceptedMftTrack (TTrack const & mftTrack)
774777 {
@@ -1065,13 +1068,23 @@ struct CorrSparse {
10651068 float deltaEta = track1.eta () - eta;
10661069
10671070 if (system == SameEvent) {
1071+ if (cfgDetectorConfig.processMFT ) {
1072+ registry.fill (HIST (" deltaEta_deltaPhi_same_MFT_FV0" ), deltaPhi, deltaEta, amplitude * triggerWeight);
1073+ } else {
1074+ registry.fill (HIST (" deltaEta_deltaPhi_same_TPC_FV0" ), deltaPhi, deltaEta, amplitude * triggerWeight);
1075+ }
1076+
10681077 registry.fill (HIST (" Assoc_amp_same" ), channelID, amplitude);
10691078 same->getPairHist ()->Fill (step, fSampleIndex , posZ, track1.pt (), track1.pt (), deltaPhi, deltaEta, amplitude * triggerWeight);
1070- registry. fill ( HIST ( " deltaEta_deltaPhi_same_MFT_FV0 " ), deltaPhi, deltaEta, amplitude * triggerWeight);
1079+
10711080 } else if (system == MixedEvent) {
1081+ if (cfgDetectorConfig.processMFT ) {
1082+ registry.fill (HIST (" deltaEta_deltaPhi_mixed_MFT_FV0" ), deltaPhi, deltaEta, amplitude);
1083+ } else {
1084+ registry.fill (HIST (" deltaEta_deltaPhi_mixed_TPC_FV0" ), deltaPhi, deltaEta, amplitude);
1085+ }
10721086 registry.fill (HIST (" Assoc_amp_mixed" ), channelID, amplitude);
10731087 mixed->getPairHist ()->Fill (step, fSampleIndex , posZ, track1.pt (), track1.pt (), deltaPhi, deltaEta, amplitude);
1074- registry.fill (HIST (" deltaEta_deltaPhi_mixed_MFT_FV0" ), deltaPhi, deltaEta, amplitude);
10751088 }
10761089 }
10771090 }
@@ -1091,7 +1104,11 @@ struct CorrSparse {
10911104 for (std::size_t iCh = 0 ; iCh < channelSize; iCh++) {
10921105 int channelID = 0 ;
10931106 float amplitude = 0 .;
1094- getChannelWithGain (tracks2, iCh, channelID, amplitude, corType);
1107+ if (cfgDetectorConfig.withGain ) {
1108+ getChannelWithGain (tracks2, iCh, channelID, amplitude, corType);
1109+ } else {
1110+ getChannelFT0 (tracks2, iCh, channelID, amplitude, corType);
1111+ }
10951112
10961113 // reject depending on FT0C/FT0A rings
10971114 if (corType == kFT0C ) {
@@ -1111,25 +1128,41 @@ struct CorrSparse {
11111128
11121129 if (system == SameEvent) {
11131130 if (corType == kFT0A ) {
1131+ if (cfgDetectorConfig.processMFT ) {
1132+ registry.fill (HIST (" deltaEta_deltaPhi_same_MFT_FT0A" ), deltaPhi, deltaEta, amplitude * triggerWeight);
1133+ } else {
1134+ registry.fill (HIST (" deltaEta_deltaPhi_same_TPC_FT0A" ), deltaPhi, deltaEta, amplitude * triggerWeight);
1135+ }
11141136 registry.fill (HIST (" Assoc_amp_same" ), channelID, amplitude);
11151137 same->getPairHist ()->Fill (step, fSampleIndex , posZ, track1.pt (), track1.pt (), deltaPhi, deltaEta, amplitude * triggerWeight);
1116- registry.fill (HIST (" deltaEta_deltaPhi_same_MFT_FT0A" ), deltaPhi, deltaEta, amplitude * triggerWeight);
11171138 }
11181139 if (corType == kFT0C ) {
1140+ if (cfgDetectorConfig.processMFT ) {
1141+ registry.fill (HIST (" deltaEta_deltaPhi_same_MFT_FT0C" ), deltaPhi, deltaEta, amplitude * triggerWeight);
1142+ } else {
1143+ registry.fill (HIST (" deltaEta_deltaPhi_same_TPC_FT0C" ), deltaPhi, deltaEta, amplitude * triggerWeight);
1144+ }
11191145 registry.fill (HIST (" Assoc_amp_same" ), channelID, amplitude);
11201146 same->getPairHist ()->Fill (step, fSampleIndex , posZ, track1.pt (), track1.pt (), deltaPhi, deltaEta, amplitude * triggerWeight);
1121- registry.fill (HIST (" deltaEta_deltaPhi_same_MFT_FT0C" ), deltaPhi, deltaEta, amplitude * triggerWeight);
11221147 }
11231148 } else if (system == MixedEvent) {
11241149 if (corType == kFT0A ) {
1150+ if (cfgDetectorConfig.processMFT ) {
1151+ registry.fill (HIST (" deltaEta_deltaPhi_mixed_MFT_FT0A" ), deltaPhi, deltaEta, amplitude);
1152+ } else {
1153+ registry.fill (HIST (" deltaEta_deltaPhi_mixed_TPC_FT0A" ), deltaPhi, deltaEta, amplitude);
1154+ }
11251155 registry.fill (HIST (" Assoc_amp_mixed" ), channelID, amplitude);
11261156 mixed->getPairHist ()->Fill (step, fSampleIndex , posZ, track1.pt (), track1.pt (), deltaPhi, deltaEta, amplitude);
1127- registry.fill (HIST (" deltaEta_deltaPhi_mixed_MFT_FT0A" ), deltaPhi, deltaEta, amplitude);
11281157 }
11291158 if (corType == kFT0C ) {
1159+ if (cfgDetectorConfig.processMFT ) {
1160+ registry.fill (HIST (" deltaEta_deltaPhi_mixed_MFT_FT0C" ), deltaPhi, deltaEta, amplitude);
1161+ } else {
1162+ registry.fill (HIST (" deltaEta_deltaPhi_mixed_TPC_FT0C" ), deltaPhi, deltaEta, amplitude);
1163+ }
11301164 registry.fill (HIST (" Assoc_amp_mixed" ), channelID, amplitude);
11311165 mixed->getPairHist ()->Fill (step, fSampleIndex , posZ, track1.pt (), track1.pt (), deltaPhi, deltaEta, amplitude);
1132- registry.fill (HIST (" deltaEta_deltaPhi_mixed_MFT_FT0C" ), deltaPhi, deltaEta, amplitude);
11331166 }
11341167 }
11351168 }
@@ -1482,7 +1515,10 @@ struct CorrSparse {
14821515 if (!collision.has_foundFT0 ())
14831516 return ;
14841517 loadAlignParam (bc.timestamp ());
1485- loadGain (bc);
1518+ if (cfgDetectorConfig.withGain ) {
1519+ loadGain (bc);
1520+ }
1521+
14861522 loadCorrection (bc.timestamp ());
14871523
14881524 if ((tpctracks.size () < cfgEventSelection.cfgMinMult || tpctracks.size () >= cfgEventSelection.cfgMaxMult )) {
@@ -1571,7 +1607,7 @@ struct CorrSparse {
15711607 }
15721608 }
15731609 }
1574- PROCESS_SWITCH (CorrSparse, processSameMftReassociated2DFIT, " Process same event for MFT-FIT correlation with reassociated tracks" , true );
1610+ PROCESS_SWITCH (CorrSparse, processSameMftReassociated2DFIT, " Process same event for MFT-FIT correlation with reassociated tracks" , false );
15751611
15761612 // ///////////////////////
15771613 // //////Mid-Mid//////////
@@ -1588,14 +1624,15 @@ struct CorrSparse {
15881624 if (cfgUseAdditionalEventCut && !eventSelected (collision, tracks.size (), true ))
15891625 return ;
15901626
1591- registry.fill (HIST (" eventcount" ), SameEvent); // because its same event i put it in the 1 bin
1627+ loadCorrection (bc.timestamp ());
1628+
1629+ fillYield (collision, tracks);
15921630
15931631 if (tracks.size () < cfgEventSelection.cfgMinMult || tracks.size () >= cfgEventSelection.cfgMaxMult ) {
15941632 return ;
15951633 }
15961634
1597- loadCorrection (bc.timestamp ());
1598- fillYield (collision, tracks);
1635+ registry.fill (HIST (" eventcount" ), SameEvent); // because its same event i put it in the 1 bin
15991636
16001637 fillCorrelations<CorrelationContainer::kCFStepReconstructed >(tracks, tracks, collision.posZ (), tracks.size (), SameEvent, getMagneticField (bc.timestamp ()));
16011638 }
@@ -1623,7 +1660,10 @@ struct CorrSparse {
16231660 }
16241661
16251662 loadAlignParam (bc.timestamp ());
1626- // loadGain(bc);
1663+ if (cfgDetectorConfig.withGain ) {
1664+ loadGain (bc);
1665+ }
1666+
16271667 loadCorrection (bc.timestamp ());
16281668
16291669 registry.fill (HIST (" eventcount" ), SameEvent); // because its same event i put it in the 1 bin
0 commit comments