diff --git a/examples/aod/createO2tables.C b/examples/aod/createO2tables.C index bdc14ff..d857c58 100644 --- a/examples/aod/createO2tables.C +++ b/examples/aod/createO2tables.C @@ -56,23 +56,24 @@ const double forward_tof_sigmat0 = 0.2; // [ns] Time spread of the vertex constexpr double rich_radius = 100.; // [cm] Radius of the RICH detector (used to compute acceptance) const double rich_length = 200.; // [cm] Length of the RICH detector (used to compute acceptance) const double rich_index = 1.03; // Refraction index of the RICH detector -const double rich_radiator_length = 2.; // Radiator length of the RICH detector +const double rich_radiator_length = 2.; // [cm] Radiator length of the RICH detector const double rich_efficiency = 0.4; // Efficiency of the RICH detector -const double rich_sigma = 7.e-3; // Resolution of the RICH detector +const double rich_sigma = 7.e-3; // [rad] Resolution of the RICH detector // Forward RICH const double forward_rich_radius = 100.; // [cm] Radius of the Forward RICH detector (used to compute acceptance) const double forward_rich_radius_in = 10.; // [cm] Inner radius of the Forward RICH detector (used to compute acceptance) const double forward_rich_length = 200.; // [cm] Length of the Forward RICH detector (used to compute acceptance) -const double forward_rich_index = 1.03; // Refraction index of the Forward RICH detector -const double forward_rich_radiator_length = 2.; // Radiator length of the Forward RICH detector -const double forward_rich_efficiency = 0.4; // Efficiency of the Forward RICH detector -const double forward_rich_sigma = 7.e-3; // Resolution of the Forward RICH detector +const double forward_rich_index = 1.0014; // Refraction index of the Forward RICH detector +const double forward_rich_radiator_length = 95; // [cm] Radiator length of the Forward RICH detector +const double forward_rich_efficiency = 0.2; // Efficiency of the Forward RICH detector +const double forward_rich_sigma = 1.5e-3; // [rad] Resolution of the Forward RICH detector // MID const char* inputFileAccMuonPID = "muonAccEffPID.root"; // Simulation parameters constexpr bool do_vertexing = true; // Vertexing with the O2 constexpr bool enable_nuclei = true; // Nuclei LUTs +constexpr bool enable_ecal = true; // Enable ECAL filling constexpr bool debug_qa = false; // Debug QA histograms constexpr int tof_mismatch = 0; // Flag to configure the TOF mismatch running mode: 0 off, 1 create, 2 use @@ -175,11 +176,11 @@ int createO2tables(const char* inputFile = "delphes.root", // Forward RICH layer o2::delphes::RICHdetector forward_rich_detector; - forward_rich_detector.setup(rich_radius, rich_length); - forward_rich_detector.setIndex(rich_index); - forward_rich_detector.setRadiatorLength(rich_radiator_length); - forward_rich_detector.setEfficiency(rich_efficiency); - forward_rich_detector.setSigma(rich_sigma); + forward_rich_detector.setup(forward_rich_radius, forward_rich_length); + forward_rich_detector.setIndex(forward_rich_index); + forward_rich_detector.setRadiatorLength(forward_rich_radiator_length); + forward_rich_detector.setEfficiency(forward_rich_efficiency); + forward_rich_detector.setSigma(forward_rich_sigma); forward_rich_detector.setType(o2::delphes::RICHdetector::kForward); forward_rich_detector.setRadiusIn(forward_rich_radius_in); @@ -293,22 +294,26 @@ int createO2tables(const char* inputFile = "delphes.root", FillTree(kMcParticle); // info for the ECAL - float posZ, posPhi; - if (ecal_detector.makeSignal(*particle, pECAL, posZ, posPhi)) { // to be updated 13.09.2021 - printf("ECAL particle: pid=%d, p=(%g,%g,%g,%g), posZ=%f, posPhi=%f\n", - particle->PID, particle->Px, particle->Py, particle->Pz, particle->E, posZ, posPhi); - printf("ECAL p=(%g,%g,%g,%g)\n", - pECAL.Px(), pECAL.Py(), pECAL.Pz(), pECAL.E()); - ecal.fIndexCollisions = ientry + eventOffset; - ecal.fIndexMcParticles = TMath::Abs(iparticle + fOffsetLabel); - ecal.fPx = pECAL.Px(); - ecal.fPy = pECAL.Py(); - ecal.fPz = pECAL.Pz(); - ecal.fE = pECAL.E(); - ecal.fPosZ = posZ; - ecal.fPosPhi = posPhi; - FillTree(kA3ECAL); + if constexpr (enable_ecal) { + float posZ, posPhi; + if (ecal_detector.makeSignal(*particle, pECAL, posZ, posPhi)) { // to be updated 13.09.2021 + printf("ECAL particle: pid=%d, p=(%g,%g,%g,%g), posZ=%f, posPhi=%f\n", + particle->PID, particle->Px, particle->Py, particle->Pz, particle->E, posZ, posPhi); + printf("ECAL p=(%g,%g,%g,%g)\n", + pECAL.Px(), pECAL.Py(), pECAL.Pz(), pECAL.E()); + ecal.fIndexCollisions = ientry + eventOffset; + ecal.fIndexMcParticles = TMath::Abs(iparticle + fOffsetLabel); + ecal.fPx = pECAL.Px(); + ecal.fPy = pECAL.Py(); + ecal.fPz = pECAL.Pz(); + ecal.fE = pECAL.E(); + ecal.fPosZ = posZ; + ecal.fPosPhi = posPhi; + FillTree(kA3ECAL); + } } + + // fill debug information if constexpr (debug_qa) { if (!debugEffDenPart[particle->PID]) { debugEffDenPart[particle->PID] = new TH1F(Form("denPart%i", particle->PID), Form("denPart%i;#it{p}_{T} (GeV/#it{c})", particle->PID), 1000, 0, 10); @@ -419,6 +424,7 @@ int createO2tables(const char* inputFile = "delphes.root", aod_track.fTrackEtaEMCAL = 0; //track->GetTrackEtaOnEMCal(); aod_track.fTrackPhiEMCAL = 0; //track->GetTrackPhiOnEMCal(); + aod_track.fLength = track->L * 0.1; // [cm] // check if has hit the TOF if (tof_layer.hasTOF(*track)) { @@ -442,7 +448,6 @@ int createO2tables(const char* inputFile = "delphes.root", } } - aod_track.fLength = track->L * 0.1; // [cm] aod_track.fTOFChi2 = 1.f; // Negative if TOF is not available aod_track.fTOFSignal = track->TOuter * 1.e12; // [ps] aod_track.fTrackTime = track->TOuter * 1.e9; // [ns] @@ -453,7 +458,6 @@ int createO2tables(const char* inputFile = "delphes.root", tof_tracks.push_back(track); } else { aod_track.fTOFChi2 = -1.f; - aod_track.fLength = -999.f; aod_track.fTOFSignal = -999.f; aod_track.fTrackTime = -999.f; aod_track.fTrackTimeRes = 2000 * 1.e9; diff --git a/examples/scripts/createO2tables.py b/examples/scripts/createO2tables.py index f8ce6da..b2a2c08 100755 --- a/examples/scripts/createO2tables.py +++ b/examples/scripts/createO2tables.py @@ -284,7 +284,7 @@ def set_config(config_file, config, value): # set rich_radius set_config("createO2tables.C", "constexpr double rich_radius =", f"{rich_radius}""\;/") - # set forward_rich_index + # set rich_index set_config("createO2tables.C", "const double rich_index =", f"{rich_index}""\;/") # set forward_rich_index @@ -538,7 +538,7 @@ def write_config(entry, prefix=""): type=int, default=0, help="Option to use the TOF mismatch in simulation, accepted values 0, 1, 2") - parser.add_argument("--avoid-config-copy", "--avoid_config_copy", + parser.add_argument("--avoid-config-copy", "--avoid_config_copy", "--grid", action="store_true", help="Option to avoid copying the configuration files and to use the ones directly in the current path e.g. for grid use") parser.add_argument("--use-preexisting-luts", "-l", diff --git a/examples/scripts/diagnostic_tools/o2_analysis_workflows.ini b/examples/scripts/diagnostic_tools/o2_analysis_workflows.ini index 8b0d08b..f1aff34 100644 --- a/examples/scripts/diagnostic_tools/o2_analysis_workflows.ini +++ b/examples/scripts/diagnostic_tools/o2_analysis_workflows.ini @@ -28,7 +28,15 @@ w = o2-analysis-spectra-tof o2-analysis-alice3-trackextension [RICH] -w = o2-analysis-alice3-pid-rich-qa +w = o2-analysis-alice3-pid-rich-qa --minEta -4 --maxEta 4 + o2-analysis-alice3-pid-tof + +[RICHSmallEta] +w = o2-analysis-alice3-pid-rich-qa --minEta -0.25 --maxEta 0.25 + o2-analysis-alice3-pid-tof + +[RICHLargeEta] +w = o2-analysis-alice3-pid-rich-qa --minEta 0.75 --maxEta 1.25 o2-analysis-alice3-pid-tof [Efficiency]