@@ -76,7 +76,7 @@ struct JetFinderTask {
7676 o2::framework::Configurable<std::string> particleSelections{" particleSelections" , " PhysicalPrimary" , " set particle selections" };
7777
7878 // cluster level configurables
79- o2::framework::Configurable<std::string> clusterDefinitionS{ " clusterDefinition " , " kV3Default" , " cluster definition to be selected, e.g. V3Default" };
79+ o2::framework::Configurable<std::string> clusterDefinitions{ " clusterDefinitions " , " kV3Default" , " cluster definition to be selected, e.g. V3Default" };
8080 o2::framework::Configurable<float > clusterEtaMin{" clusterEtaMin" , -0.71 , " minimum cluster eta" }; // For ECMAL: |eta| < 0.7, phi = 1.40 - 3.26
8181 o2::framework::Configurable<float > clusterEtaMax{" clusterEtaMax" , 0.71 , " maximum cluster eta" }; // For ECMAL: |eta| < 0.7, phi = 1.40 - 3.26
8282 o2::framework::Configurable<float > clusterPhiMin{" clusterPhiMin" , 1.39 , " minimum cluster phi" };
@@ -85,7 +85,7 @@ struct JetFinderTask {
8585 o2::framework::Configurable<float > clusterTimeMin{" clusterTimeMin" , -25 ., " minimum Cluster time (ns)" };
8686 o2::framework::Configurable<float > clusterTimeMax{" clusterTimeMax" , 25 ., " maximum Cluster time (ns)" };
8787 o2::framework::Configurable<bool > clusterRejectExotics{" clusterRejectExotics" , true , " Reject exotic clusters" };
88- o2::framework::Configurable<int > hadronicCorrectionType{ " hadronicCorrectionType " , 0 , " 0 = no correction, 1 = CorrectedOneTrack1, 2 = CorrectedOneTrack2, 3 = CorrectedAllTracks1, 4 = CorrectedAllTracks2" };
88+ o2::framework::Configurable<std::vector< int >> hadronicCorrectionTypes{ " hadronicCorrectionTypes " , { 0 } , " 0 = no correction, 1 = CorrectedOneTrack1, 2 = CorrectedOneTrack2, 3 = CorrectedAllTracks1, 4 = CorrectedAllTracks2 note :analyses should only use one " };
8989 o2::framework::Configurable<bool > doEMCALEventSelection{" doEMCALEventSelection" , true , " apply the selection to the event alias_bit for full and neutral jets" };
9090 o2::framework::Configurable<bool > doEMCALEventSelectionChargedJets{" doEMCALEventSelectionChargedJets" , false , " apply the selection to the event alias_bit for charged jets" };
9191
@@ -119,16 +119,18 @@ struct JetFinderTask {
119119
120120 std::vector<int > triggerMaskBits;
121121
122- o2::aod::EMCALClusterDefinition clusterDefinition;
122+ std::vector<int > clusterDefinitionsVec;
123+ std::vector<int > hadronicCorrectionTypesVec;
123124
124125 void init (o2::framework::InitContext const &)
125126 {
127+ hadronicCorrectionTypesVec = (std::vector<int >)hadronicCorrectionTypes;
126128 eventSelectionBits = jetderiveddatautilities::initialiseEventSelectionBits (static_cast <std::string>(eventSelections));
127129 triggerMaskBits = jetderiveddatautilities::initialiseTriggerMaskBits (triggerMasks);
128130 trackSelection = jetderiveddatautilities::initialiseTrackSelection (static_cast <std::string>(trackSelections));
129131 particleSelection = static_cast <std::string>(particleSelections);
130132
131- clusterDefinition = o2::aod::emcalcluster::getClusterDefinitionFromString (clusterDefinitionS .value );
133+ clusterDefinitionsVec = jetderiveddatautilities::initialiseClusterDefinitions (clusterDefinitions .value );
132134
133135 jetFinder.etaMin = trackEtaMin;
134136 jetFinder.etaMax = trackEtaMax;
@@ -185,7 +187,7 @@ struct JetFinderTask {
185187 o2::framework::expressions::Filter mcCollisionFilter = (nabs(o2::aod::jmccollision::posZ) < vertexZCut);
186188 o2::framework::expressions::Filter trackCuts = (o2::aod::jtrack::pt >= trackPtMin && o2::aod::jtrack::pt < trackPtMax && o2::aod::jtrack::eta >= trackEtaMin && o2::aod::jtrack::eta <= trackEtaMax && o2::aod::jtrack::phi >= trackPhiMin && o2::aod::jtrack::phi <= trackPhiMax); // do we need eta cut both here and in globalselection?
187189 o2::framework::expressions::Filter partCuts = (o2::aod::jmcparticle::pt >= trackPtMin && o2::aod::jmcparticle::pt < trackPtMax && o2::aod::jmcparticle::eta >= trackEtaMin && o2::aod::jmcparticle::eta <= trackEtaMax && o2::aod::jmcparticle::phi >= trackPhiMin && o2::aod::jmcparticle::phi <= trackPhiMax);
188- o2::framework::expressions::Filter clusterFilter = (o2::aod::jcluster::definition == static_cast < int >(clusterDefinition) && o2::aod::jcluster:: eta >= clusterEtaMin && o2::aod::jcluster::eta <= clusterEtaMax && o2::aod::jcluster::phi >= clusterPhiMin && o2::aod::jcluster::phi <= clusterPhiMax && o2::aod::jcluster::energy >= clusterEnergyMin && o2::aod::jcluster::time > clusterTimeMin && o2::aod::jcluster::time < clusterTimeMax && (!clusterRejectExotics || o2::aod::jcluster::isExotic != true ));
190+ o2::framework::expressions::Filter clusterFilter = (o2::aod::jcluster::eta >= clusterEtaMin && o2::aod::jcluster::eta <= clusterEtaMax && o2::aod::jcluster::phi >= clusterPhiMin && o2::aod::jcluster::phi <= clusterPhiMax && o2::aod::jcluster::energy >= clusterEnergyMin && o2::aod::jcluster::time > clusterTimeMin && o2::aod::jcluster::time < clusterTimeMax && (!clusterRejectExotics || o2::aod::jcluster::isExotic != true ));
189191
190192 void processChargedJets (o2::soa::Filtered<o2::aod::JetCollisions>::iterator const & collision,
191193 o2::soa::Filtered<o2::aod::JetTracks> const & tracks)
@@ -219,9 +221,13 @@ struct JetFinderTask {
219221 if ((doEMCALEventSelection && !jetderiveddatautilities::eventEMCAL (collision)) || !jetderiveddatautilities::selectCollision (collision, eventSelectionBits, skipMBGapEvents, applyRCTSelections, " CBT_calo" ) || !jetderiveddatautilities::selectTrigger (collision, triggerMaskBits)) {
220222 return ;
221223 }
222- inputParticles.clear ();
223- jetfindingutilities::analyseClusters (inputParticles, &clusters);
224- jetfindingutilities::findJets (jetFinder, inputParticles, jetPtMin, jetPtMax, jetRadius, jetAreaFractionMin, collision, jetsTable, constituentsTable, fillTHnSparse ? registry.get <THn>(HIST (" hJet" )) : std::shared_ptr<THn>(nullptr ), fillTHnSparse);
224+ for (auto const & clusterDefinition : clusterDefinitionsVec) {
225+ for (auto const & hadronicCorrectionType : hadronicCorrectionTypesVec) {
226+ inputParticles.clear ();
227+ jetfindingutilities::analyseClusters (inputParticles, clusters, clusterDefinition, hadronicCorrectionType);
228+ jetfindingutilities::findJets (jetFinder, inputParticles, jetPtMin, jetPtMax, jetRadius, jetAreaFractionMin, collision, jetsTable, constituentsTable, fillTHnSparse ? registry.get <THn>(HIST (" hJet" )) : std::shared_ptr<THn>(nullptr ), fillTHnSparse);
229+ }
230+ }
225231 }
226232 PROCESS_SWITCH (JetFinderTask, processNeutralJets, " Data and reco level jet finding for neutral jets" , false );
227233
@@ -232,10 +238,14 @@ struct JetFinderTask {
232238 if ((doEMCALEventSelection && !jetderiveddatautilities::eventEMCAL (collision)) || !jetderiveddatautilities::selectCollision (collision, eventSelectionBits, skipMBGapEvents, applyRCTSelections, " CBT_calo" ) || !jetderiveddatautilities::selectTrigger (collision, triggerMaskBits)) {
233239 return ;
234240 }
235- inputParticles.clear ();
236- jetfindingutilities::analyseTracks<o2::soa::Filtered<o2::aod::JetTracks>, o2::soa::Filtered<o2::aod::JetTracks>::iterator>(inputParticles, tracks, trackSelection);
237- jetfindingutilities::analyseClusters (inputParticles, &clusters, hadronicCorrectionType);
238- jetfindingutilities::findJets (jetFinder, inputParticles, jetPtMin, jetPtMax, jetRadius, jetAreaFractionMin, collision, jetsTable, constituentsTable, fillTHnSparse ? registry.get <THn>(HIST (" hJet" )) : std::shared_ptr<THn>(nullptr ), fillTHnSparse);
241+ for (auto const & clusterDefinition : clusterDefinitionsVec) {
242+ for (auto const & hadronicCorrectionType : hadronicCorrectionTypesVec) {
243+ inputParticles.clear ();
244+ jetfindingutilities::analyseTracks<o2::soa::Filtered<o2::aod::JetTracks>, o2::soa::Filtered<o2::aod::JetTracks>::iterator>(inputParticles, tracks, trackSelection);
245+ jetfindingutilities::analyseClusters (inputParticles, clusters, clusterDefinition, hadronicCorrectionType);
246+ jetfindingutilities::findJets (jetFinder, inputParticles, jetPtMin, jetPtMax, jetRadius, jetAreaFractionMin, collision, jetsTable, constituentsTable, fillTHnSparse ? registry.get <THn>(HIST (" hJet" )) : std::shared_ptr<THn>(nullptr ), fillTHnSparse);
247+ }
248+ }
239249 }
240250 PROCESS_SWITCH (JetFinderTask, processFullJets, " Data and reco level jet finding for full and neutral jets" , false );
241251
0 commit comments