Particle ID and event selection
Classes | Public Member Functions | Static Public Member Functions | List of all members
KaonCandidate Class Reference
Inheritance diagram for KaonCandidate:
Candidate

Classes

enum  Cut
 This is the enum for Kaon cut types. More...
 

Public Member Functions

 KaonCandidate (int ipart)
 
LorentzVector getLorentzVector ()
 
boolean cut_FORWARD ()
 
boolean cut_CHI2PID ()
 
boolean cut_DC_FIDUCIAL_REG1 ()
 
boolean cut_DC_FIDUCIAL_REG2 ()
 
boolean cut_DC_FIDUCIAL_REG3 ()
 
boolean cut_DELTA_VZ ()
 
boolean isKm ()
 
boolean isKm (Cut ...applycuts)
 
boolean isKp ()
 
boolean isKp (Cut ...applycuts)
 
- Public Member Functions inherited from Candidate
 Candidate (int ipart)
 
void setINBENDING ()
 
void setOUTBENDING ()
 
void setPxyz (Number px, Number py, Number pz)
 
void setVZ (Number vz)
 
void setBETA (Number beta)
 
void setCHI2PID (Number chi2pid)
 
void setDVZ (Number dvz)
 
void setPID (Number pid)
 
void setStatus (Number status)
 
void setNPHE (Number nphe)
 
void setPCALsector (Number sector)
 
void setPCALenergy (Number energy)
 
void setECINenergy (Number energy)
 
void setECOUTenergy (Number energy)
 
void setPCALvw (Number lv, Number lw)
 
void setPCALxyz (Number x, Number y, Number z)
 
Integer getPCALsector ()
 
Integer getDCsector ()
 
Float getDC1x ()
 
Float getDC1y ()
 
Float getDC1z ()
 
void setDCxyz (int region, Number x, Number y, Number z)
 

Static Public Member Functions

static KaonCandidate getKaonCandidate (int ipart, Bank recbank, Bank trajbank, boolean isinbending)
 

Additional Inherited Members

- Public Attributes inherited from Candidate
final int ipart
 
- Protected Attributes inherited from Candidate
MagField field = MagField.INBENDING
 magnetic field, INBENDING by default
 
Float nphe = null
 number of photoelectrons
 
Integer pcal_sector = null
 pcal sector
 
Float pcal_energy = null
 energy deposited in PCAL
 
Float ecin_energy = 0f
 energy deposited in ECin
 
Float ecout_energy = 0f
 energy deposited in ECout
 
Float pcal_lv = null
 distance on V-side
 
Float pcal_lw = null
 distance on W-side
 
Float pcal_x = null
 X from PCAL.
 
Float pcal_y = null
 Y from PCAL.
 
Float pcal_z = null
 Z from PCAL.
 
Float p = null
 momentum
 
Float px = null
 px momentum
 
Float py = null
 px momentum
 
Float pz = null
 px momentum
 
Float vz = null
 z vertex
 
Float beta = null
 beta value
 
Float chi2pid = null
 chi2pid value
 
Float dvz = null
 the difference between trigger particle vz and candidate vz
 
Float traj_x1 = null
 x-position of the track at the detector surface (cm) at region 1
 
Float traj_y1 = null
 y-position of the track at the detector surface (cm) at region 1
 
Float traj_z1 = null
 z-position of the track at the detector surface (cm) at region 1
 
Float traj_x2 = null
 x-position of the track at the detector surface (cm) at region 2
 
Float traj_y2 = null
 y-position of the track at the detector surface (cm) at region 2
 
Float traj_z2 = null
 z-position of the track at the detector surface (cm) at region 2
 
Float traj_x3 = null
 x-position of the track at the detector surface (cm) at region 3
 
Float traj_y3 = null
 y-position of the track at the detector surface (cm) at region 3
 
Float traj_z3 = null
 z-position of the track at the detector surface (cm) at region 3
 
Integer pid = null
 particle PID
 
Integer dc_sector = null
 dc sector
 
Short status = null
 particle status
 

Class Documentation

◆ uconn::utils::pid::stefan::KaonCandidate::Cut

enum uconn::utils::pid::stefan::KaonCandidate::Cut

This is the enum for Kaon cut types.

Enumerator
CHI2PID_CUT cut on chi2pid
DC_FIDUCIAL_REG1 fiducial DC cut for region 1
DC_FIDUCIAL_REG2 fiducial DC cut for region 2
DC_FIDUCIAL_REG3 fiducial DC cut for region 3
DELTA_VZ cut on difference between VZ of Kaon candidate and trigger particle
FORWARD only forward detector
PID cut on PDG code

Constructor & Destructor Documentation

◆ KaonCandidate()

KaonCandidate ( int  ipart)
inline

A Constructor

Parameters
ipartparticle index
26 {
27 super(ipart);
28 }

Member Function Documentation

◆ cut_CHI2PID()

boolean cut_CHI2PID ( )
inline
Returns
chi2pid cut
92 {
93 if(pid==null || chi2pid==null || p==null) return false;
94 return Math.abs(chi2pid)<3;
95 }
Float chi2pid
chi2pid value
Definition: Candidate.java:53
Float p
momentum
Definition: Candidate.java:47
Integer pid
particle PID
Definition: Candidate.java:64

◆ cut_DC_FIDUCIAL_REG1()

boolean cut_DC_FIDUCIAL_REG1 ( )
inline
Returns
DC fiducial region 1
101 {
102 if(dc_sector==null || traj_x1==null || traj_y1==null || traj_z1==null || pid==null) return false;
103 if(field==MagField.INBENDING)
104 return HadronCuts.DC_fiducial_cut_theta_phi(dc_sector, 1, traj_x1, traj_y1, traj_z1, pid, field==MagField.INBENDING);
105 return ElectronCuts.DC_fiducial_cut_XY(dc_sector, 1, traj_x1, traj_y1, pid, field==MagField.INBENDING);
106 }
Integer dc_sector
dc sector
Definition: Candidate.java:65
Float traj_y1
y-position of the track at the detector surface (cm) at region 1
Definition: Candidate.java:56
Float traj_z1
z-position of the track at the detector surface (cm) at region 1
Definition: Candidate.java:57
MagField field
magnetic field, INBENDING by default
Definition: Candidate.java:36
INBENDING
inbending
Definition: Candidate.java:12
Float traj_x1
x-position of the track at the detector surface (cm) at region 1
Definition: Candidate.java:55

◆ cut_DC_FIDUCIAL_REG2()

boolean cut_DC_FIDUCIAL_REG2 ( )
inline
Returns
DC fiducial region 2
112 {
113 if(dc_sector==null || traj_x2==null || traj_y2==null || traj_z2==null || pid==null) return false;
114 if(field==MagField.INBENDING)
115 return HadronCuts.DC_fiducial_cut_theta_phi(dc_sector, 2, traj_x2, traj_y2, traj_z2, pid, field==MagField.INBENDING);
116 return ElectronCuts.DC_fiducial_cut_XY(dc_sector, 2, traj_x2, traj_y2, pid, field==MagField.INBENDING);
117 }
Float traj_x2
x-position of the track at the detector surface (cm) at region 2
Definition: Candidate.java:58
Float traj_y2
y-position of the track at the detector surface (cm) at region 2
Definition: Candidate.java:59
Float traj_z2
z-position of the track at the detector surface (cm) at region 2
Definition: Candidate.java:60

◆ cut_DC_FIDUCIAL_REG3()

boolean cut_DC_FIDUCIAL_REG3 ( )
inline
Returns
DC fiducial region 3
123 {
124 if(dc_sector==null || traj_x3==null || traj_y3==null || traj_z3==null || pid==null) return false;
125 if(field==MagField.INBENDING)
126 return HadronCuts.DC_fiducial_cut_theta_phi(dc_sector, 3, traj_x3, traj_y3, traj_z3, pid, field==MagField.INBENDING);
127 return ElectronCuts.DC_fiducial_cut_XY(dc_sector, 3, traj_x3, traj_y3, pid, field==MagField.INBENDING);
128 }
Float traj_x3
x-position of the track at the detector surface (cm) at region 3
Definition: Candidate.java:61
Float traj_z3
z-position of the track at the detector surface (cm) at region 3
Definition: Candidate.java:63
Float traj_y3
y-position of the track at the detector surface (cm) at region 3
Definition: Candidate.java:62

◆ cut_DELTA_VZ()

boolean cut_DELTA_VZ ( )
inline
Returns
delta vz cut
134 {
135 if(pid==null || dvz==null) return false;
136 return HadronCuts.Delta_vz_cut(pid, dvz);
137 }
Float dvz
the difference between trigger particle vz and candidate vz
Definition: Candidate.java:54

◆ cut_FORWARD()

boolean cut_FORWARD ( )
inline
Returns
if it is detected in forward
83 {
84 if(status==null) return false;
85 return status>=2000 && status<4000;
86 }
Short status
particle status
Definition: Candidate.java:66

◆ getKaonCandidate()

static KaonCandidate getKaonCandidate ( int  ipart,
Bank  recbank,
Bank  trajbank,
boolean  isinbending 
)
inlinestatic

return KaonCandidate instance

Parameters
ipartparticle index
recbank,trajbankparticle and trajectory banks
isinbendingtrue for inbending, false for outbending
38 {
39 KaonCandidate candidate = new KaonCandidate(ipart);
40 if(!isinbending) candidate.setOUTBENDING();
41
42 if(recbank!=null) {
43 candidate.setPID(recbank.getInt("pid",ipart));
44 candidate.setStatus(recbank.getShort("status",ipart));
45 candidate.setCHI2PID(recbank.getFloat("chi2pid",ipart));
46 candidate.setVZ(recbank.getFloat("vz",ipart));
47 candidate.setDVZ(recbank.getFloat("vz",ipart) - recbank.getFloat("vz",0));
48 candidate.setPxyz(recbank.getFloat("px",ipart), recbank.getFloat("py",ipart), recbank.getFloat("pz",ipart));
49 }
50
51 if(trajbank!=null) IntStream.range(0,trajbank.getRows())
52 .filter(i -> trajbank.getShort("pindex",i) == ipart && trajbank.getByte("detector",i) == DetectorType.DC.getDetectorId())
53 .forEach(i -> {
54 if(trajbank.getByte("layer",i) == 6)
55 candidate.setDCxyz(1, trajbank.getFloat("x",i), trajbank.getFloat("y",i), trajbank.getFloat("z",i));
56 else if(trajbank.getByte("layer",i) == 18)
57 candidate.setDCxyz(2, trajbank.getFloat("x",i), trajbank.getFloat("y",i), trajbank.getFloat("z",i));
58 else if(trajbank.getByte("layer",i) == 36)
59 candidate.setDCxyz(3, trajbank.getFloat("x",i), trajbank.getFloat("y",i), trajbank.getFloat("z",i));
60 });
61
62 return candidate;
63 }
KaonCandidate(int ipart)
Definition: KaonCandidate.java:26

◆ getLorentzVector()

LorentzVector getLorentzVector ( )
inline
Returns
LorentzVector instance
70 {
71 LorentzVector vec = null;
72 if(px!=null && py!=null && pz!=null) {
73 vec = new LorentzVector();
74 vec.setPxPyPzM(px,py,pz,0.493677);
75 }
76 return vec;
77 }
Float py
px momentum
Definition: Candidate.java:49
Float px
px momentum
Definition: Candidate.java:48
Float pz
px momentum
Definition: Candidate.java:50

◆ isKm() [1/2]

boolean isKm ( )
inline

testing against all K- cuts

143 {
144 return isKm(Cut.values());
145 }
boolean isKm()
Definition: KaonCandidate.java:143

◆ isKm() [2/2]

boolean isKm ( Cut ...  applycuts)
inline

assembly of multiple K- cuts

Parameters
applycutsthe list of cuts required to apply
153 {
154 for(Cut thiscut: applycuts) {
155 if(thiscut == Cut.PID) {
156 if(pid == null) return false;
157 else if(pid != -321) return false;
158
159 } else if(thiscut == Cut.FORWARD) {
160 if(!cut_FORWARD()) return false;
161
162 } else if(thiscut == Cut.CHI2PID_CUT) {
163 if(!cut_CHI2PID()) return false;
164
165 } else if(thiscut == Cut.DC_FIDUCIAL_REG1) {
166 if(!cut_DC_FIDUCIAL_REG1()) return false;
167
168 } else if(thiscut == Cut.DC_FIDUCIAL_REG2) {
169 if(!cut_DC_FIDUCIAL_REG2()) return false;
170
171 } else if(thiscut == Cut.DC_FIDUCIAL_REG3) {
172 if(!cut_DC_FIDUCIAL_REG3()) return false;
173
174 } else if(thiscut == Cut.DELTA_VZ) {
175 if(!cut_DELTA_VZ()) return false;
176
177 } else {
178 return false;
179 }
180 }
181 return true;
182 }
boolean cut_FORWARD()
Definition: KaonCandidate.java:83
boolean cut_DELTA_VZ()
Definition: KaonCandidate.java:134
boolean cut_CHI2PID()
Definition: KaonCandidate.java:92
boolean cut_DC_FIDUCIAL_REG3()
Definition: KaonCandidate.java:123
boolean cut_DC_FIDUCIAL_REG2()
Definition: KaonCandidate.java:112
boolean cut_DC_FIDUCIAL_REG1()
Definition: KaonCandidate.java:101

◆ isKp() [1/2]

boolean isKp ( )
inline

testing against all K+ cuts

189 {
190 return isKp(Cut.values());
191 }
boolean isKp()
Definition: KaonCandidate.java:189

◆ isKp() [2/2]

boolean isKp ( Cut ...  applycuts)
inline

assembly of multiple K+ cuts

Parameters
applycutsthe list of cuts required to apply
199 {
200 for(Cut thiscut: applycuts) {
201 if(thiscut == Cut.PID) {
202 if(pid == null) return false;
203 else if(pid != 321) return false;
204
205 } else if(thiscut == Cut.FORWARD) {
206 if(!cut_FORWARD()) return false;
207
208 } else if(thiscut == Cut.CHI2PID_CUT) {
209 if(!cut_CHI2PID()) return false;
210
211 } else if(thiscut == Cut.DC_FIDUCIAL_REG1) {
212 if(!cut_DC_FIDUCIAL_REG1()) return false;
213
214 } else if(thiscut == Cut.DC_FIDUCIAL_REG2) {
215 if(!cut_DC_FIDUCIAL_REG2()) return false;
216
217 } else if(thiscut == Cut.DC_FIDUCIAL_REG3) {
218 if(!cut_DC_FIDUCIAL_REG3()) return false;
219
220 } else if(thiscut == Cut.DELTA_VZ) {
221 if(!cut_DELTA_VZ()) return false;
222
223 } else {
224 return false;
225 }
226 }
227 return true;
228 }

The documentation for this class was generated from the following file: