10 #include <analysis/variables/AcceptanceVariables.h>
11 #include <analysis/VariableManager/Manager.h>
24 double thetaInCDCAcceptance(
const Particle* particle)
26 double theta = particle->get4Vector().Theta() * 180. / TMath::Pi();
27 if (theta > 17. && theta < 150.) {
32 double thetaInTOPAcceptance(
const Particle* particle)
34 double theta = particle->get4Vector().Theta() * 180. / TMath::Pi();
35 if (theta > 31. && theta < 128.) {
40 double thetaInARICHAcceptance(
const Particle* particle)
42 double theta = particle->get4Vector().Theta() * 180. / TMath::Pi();
43 if (theta > 14. && theta < 30.) {
48 double thetaInECLAcceptance(
const Particle* particle)
50 double theta = particle->get4Vector().Theta() * 180. / TMath::Pi();
51 if (theta > 12.4 && theta < 31.4) {
53 }
else if (theta > 32.2 && theta < 128.7) {
55 }
else if (theta > 130.7 && theta < 155.1) {
60 double thetaInBECLAcceptance(
const Particle* particle)
62 double acceptance = thetaInECLAcceptance(particle);
63 if (acceptance == 2) {
68 double thetaInEECLAcceptance(
const Particle* particle)
70 double acceptance = thetaInECLAcceptance(particle);
71 if (acceptance == 1 || acceptance == 3) {
76 double thetaInKLMAcceptance(
const Particle* particle)
78 double theta = particle->get4Vector().Theta() * 180. / TMath::Pi();
79 if (theta < 18.)
return 0;
80 if (theta < 37.)
return 1;
81 if (theta < 47.)
return 2;
82 if (theta < 122.)
return 3;
83 if (theta < 130.)
return 4;
84 if (theta < 155.)
return 5;
88 double thetaInBKLMAcceptance(
const Particle* particle)
90 double acceptance = thetaInKLMAcceptance(particle);
91 if (acceptance == 2 || acceptance == 3 || acceptance == 4) {
96 double thetaInEKLMAcceptance(
const Particle* particle)
98 double acceptance = thetaInKLMAcceptance(particle);
99 if (acceptance != 0 && acceptance != 3) {
104 double thetaInKLMOverlapAcceptance(
const Particle* particle)
106 double acceptance = thetaInKLMAcceptance(particle);
107 if (acceptance == 2 || acceptance == 4) {
114 double ptInTOPAcceptance(
const Particle* particle)
116 if (particle->getCharge() == 0)
return 1;
117 double pt = particle->get4Vector().Pt();
118 if (pt > 0.27)
return 1;
122 double ptInBECLAcceptance(
const Particle* particle)
124 if (particle->getCharge() == 0)
return 1;
125 double pt = particle->get4Vector().Pt();
126 if (pt > 0.28)
return 1;
130 double ptInBKLMAcceptance(
const Particle* particle)
132 if (particle->getCharge() == 0)
return 1;
133 double pt = particle->get4Vector().Pt();
134 if (pt > 0.6)
return 1;
140 double inCDCAcceptance(
const Particle* particle)
142 return thetaInCDCAcceptance(particle);
145 double inTOPAcceptance(
const Particle* particle)
147 return (thetaInTOPAcceptance(particle) && ptInTOPAcceptance(particle));
150 double inARICHAcceptance(
const Particle* particle)
152 return thetaInARICHAcceptance(particle);
155 double inECLAcceptance(
const Particle* particle)
157 return (thetaInEECLAcceptance(particle) || (thetaInBECLAcceptance(particle) && ptInBECLAcceptance(particle)));
160 double inKLMAcceptance(
const Particle* particle)
162 return (thetaInEKLMAcceptance(particle) || (thetaInBKLMAcceptance(particle) && ptInBKLMAcceptance(particle)));
167 VARIABLE_GROUP(
"Acceptance");
169 REGISTER_VARIABLE(
"thetaInCDCAcceptance", thetaInCDCAcceptance, R
"DOC(
170 Returns 1.0 if particle is within CDC angular acceptance, 0.0 otherwise.
171 This variable checks if the particle polar angle :math:`\theta` is within the range :math:`17^\circ < \theta < 150^\circ`.
172 The polar angle is computed using only the initial particle momentum.
174 REGISTER_VARIABLE("thetaInTOPAcceptance", thetaInTOPAcceptance, R
"DOC(
175 Returns 1.0 if particle is within TOP angular acceptance, 0.0 otherwise.
176 This variable checks if the particle polar angle :math:`\theta` is within the range :math:`31^\circ < \theta < 128^\circ`.
177 The polar angle is computed using only the initial particle momentum.
179 REGISTER_VARIABLE("thetaInARICHAcceptance", thetaInARICHAcceptance, R
"DOC(
180 Returns 1.0 if particle is within ARICH angular acceptance, 0.0 otherwise.
181 This variable checks if the particle polar angle :math:`\theta` is within the range :math:`14^\circ < \theta < 30^\circ`.
182 The polar angle is computed using only the initial particle momentum.
184 REGISTER_VARIABLE("thetaInECLAcceptance", thetaInECLAcceptance, R
"DOC(
185 Checks if particle is within ECL angular acceptance.
186 This variable checks if the particle polar angle :math:`\theta` is within certain ranges.
187 Return values and the corresponding :math:`\theta` ranges are the following:
189 * 0: Outside of ECL acceptance, :math:`\theta < 12.4^\circ` or :math:`\theta < 155.1^\circ`.
190 * 1: Forward ECL, :math:`12.4^\circ < \theta < 31.4^\circ`;
191 * 2: Barrel ECL, :math:`32.2^\circ < \theta < 128.7^\circ`;
192 * 3: Backward ECL, :math:`130.7^\circ < \theta < 155.1^\circ`.
194 The polar angle is computed using only the initial particle momentum.
196 REGISTER_VARIABLE("thetaInBECLAcceptance", thetaInBECLAcceptance, R
"DOC(
197 Returns 1.0 if particle is within Barrel ECL angular acceptance, 0.0 otherwise.
198 This variable checks if the particle polar angle :math:`\theta` is within the range :math:`32.2^\circ < \theta < 128.7^\circ`.
199 The polar angle is computed using only the initial particle momentum.
201 REGISTER_VARIABLE("thetaInEECLAcceptance", thetaInEECLAcceptance, R
"DOC(
202 Returns 1.0 if particle is within Endcap ECL angular acceptance, 0.0 otherwise.
203 This variable checks if the particle polar angle :math:`\theta` is within the range :math:`12.4^\circ < \theta < 31.4^\circ`
204 or :math:`130.7^\circ < \theta < 155.1^\circ`.
205 The polar angle is computed using only the initial particle momentum.
207 REGISTER_VARIABLE("thetaInKLMAcceptance", thetaInKLMAcceptance, R
"DOC(
208 Checks if particle is within KLM angular acceptance.
209 This variable checks if the particle polar angle :math:`\theta` is within certain ranges.
210 Return values and the corresponding :math:`\theta` ranges are the following:
212 * 0: Outside of KLM acceptance, :math:`\theta < 18^\circ` or :math:`\theta < 155^\circ`.
213 * 1: Forward endcap, :math:`18^\circ < \theta < 37^\circ`;
214 * 2: Forward overlap, :math:`37^\circ < \theta < 47^\circ`;
215 * 3: Barrel, :math:`47^\circ < \theta < 122^\circ`;
216 * 4: Backward overlap, :math:`122^\circ < \theta < 130^\circ`;
217 * 5: Backward endcap, :math:`130^\circ < \theta < 155^\circ`.
219 The polar angle is computed using only the initial particle momentum.
222 REGISTER_VARIABLE("thetaInBKLMAcceptance", thetaInBKLMAcceptance, R
"DOC(
223 Returns 1.0 if particle is within Barrel KLM angular acceptance, 0.0 otherwise.
224 This variable checks if the particle polar angle :math:`\theta` is within the range :math:`37^\circ < \theta < 130^\circ`.
225 The polar angle is computed using only the initial particle momentum.
227 REGISTER_VARIABLE("thetaInEKLMAcceptance", thetaInEKLMAcceptance, R
"DOC(
228 Returns 1.0 if particle is within Endcap KLM angular acceptance, 0.0 otherwise.
229 This variable checks if the particle polar angle :math:`\theta` is within the range :math:`18^\circ < \theta < 47^\circ` or :math:`122^\circ < \theta < 155^\circ`.
230 The polar angle is computed using only the initial particle momentum.
232 REGISTER_VARIABLE("thetaInKLMOverlapAcceptance", thetaInKLMOverlapAcceptance, R
"DOC(
233 Returns 1.0 if particle is within the angular region where KLM barrel and endcaps overlap, 0.0 otherwise.
234 This variable checks if the particle polar angle :math:`\theta` is within the range :math:`37^\circ < \theta < 47^\circ` or :math:`122^\circ < \theta < 130^\circ`.
235 The polar angle is computed using only the initial particle momentum.
238 REGISTER_VARIABLE("ptInTOPAcceptance", ptInTOPAcceptance,
"Returns 1.0 if particle transverse momentum :math:`p_t` is within TOP acceptance, :math:`p_t > 0.27` GeV, 0.0 otherwise.");
239 REGISTER_VARIABLE(
"ptInBECLAcceptance", ptInBECLAcceptance,
"Returns 1.0 if particle transverse momentum :math:`p_t` is within Barrel ECL acceptance, :math:`p_t > 0.28` GeV, 0.0 otherwise.");
240 REGISTER_VARIABLE(
"ptInBKLMAcceptance", ptInBKLMAcceptance,
"Returns 1.0 if particle transverse momentum :math:`p_t` is within Barrel KLM acceptance, :math:`p_t > 0.6` GeV, 0.0 otherwise.");
242 REGISTER_VARIABLE(
"inCDCAcceptance", inCDCAcceptance, R
"DOC(
243 Returns 1.0 if particle is within CDC geometrical and kinematical acceptance, 0.0 otherwise.
244 This variable is an alias for :b2:var:`thetaInCDCAcceptance`.
246 REGISTER_VARIABLE("inTOPAcceptance", inTOPAcceptance, R
"DOC(
247 Returns 1.0 if particle is within TOP geometrical and kinematical acceptance, 0.0 otherwise.
248 This variable is a combination of :b2:var:`thetaInTOPAcceptance` and :b2:var:`ptInTOPAcceptance`.
250 REGISTER_VARIABLE("inARICHAcceptance", inARICHAcceptance, R
"DOC(
251 Returns 1.0 if particle is within ARICH geometrical and kinematical acceptance, 0.0 otherwise.
252 This variable is an alias for :b2:var:`thetaInARICHAcceptance`.
254 REGISTER_VARIABLE("inECLAcceptance", inECLAcceptance, R
"DOC(
255 Returns 1.0 if particle is within ECL geometrical and kinematical acceptance, 0.0 otherwise.");
256 This variable is a combination of :b2:var:`thetaInEECLAcceptance`, :b2:var:`thetaInBECLAcceptance` and :b2:var:`ptInBECLAcceptance`.
258 REGISTER_VARIABLE("inKLMAcceptance", inKLMAcceptance, R
"DOC(
259 Returns 1.0 if particle is within KLM geometrical and kinematical acceptance, 0.0 otherwise.
260 This variable is a combination of :b2:var:`thetaInEKLMAcceptance`, :b2:var:`thetaInBKLMAcceptance` and :b2:var:`ptInBKLMAcceptance`.
Abstract base class for different kinds of events.