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

Classes

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

Public Member Functions

 PhotonCandidate (int ipart)
 
LorentzVector getLorentzVector ()
 
boolean cut_PID ()
 
boolean cut_EC_FIDUCIAL ()
 
boolean cut_EC_FIDUCIAL (Level eclevel)
 
boolean cut_FORWARD ()
 
boolean cut_BETA ()
 
boolean isphoton ()
 
boolean isphoton (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 PhotonCandidate getPhotonCandidate (int ipart, Bank recbank, Bank calbank, 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::PhotonCandidate::Cut

enum uconn::utils::pid::stefan::PhotonCandidate::Cut

This is the enum for photon cut types.

Enumerator
BETA cut on beta
EC_FIDUCIAL fiducial EC cut
FORWARD only forward detector
PID cut on PDG code

Constructor & Destructor Documentation

◆ PhotonCandidate()

PhotonCandidate ( int  ipart)
inline

groovy script to use PhotonCandidate class for finding good photon A Constructor

Parameters
ipartparticle index
31 {
32 super(ipart);
33 }

Member Function Documentation

◆ cut_BETA()

boolean cut_BETA ( )
inline
Returns
beta cut
125 {
126 if(beta == null) return false;
127 return beta > 0.9 && beta < 1.1;
128 }
Float beta
beta value
Definition: Candidate.java:52

◆ cut_EC_FIDUCIAL() [1/2]

boolean cut_EC_FIDUCIAL ( )
inline
Returns
EC fiducial cut with loose cut
96 {
97 return cut_EC_FIDUCIAL(Level.LOOSE);
98 }
boolean cut_EC_FIDUCIAL()
Definition: PhotonCandidate.java:96

◆ cut_EC_FIDUCIAL() [2/2]

boolean cut_EC_FIDUCIAL ( Level  eclevel)
inline
Returns
EC fiducial cut
105 {
106 if(pcal_sector == null || pcal_lv == null || pcal_lw == null) return false;
107 return ElectronCuts.EC_hit_position_fiducial_cut_homogeneous(pcal_sector, pcal_lv, pcal_lw, eclevel);
108 }
Float pcal_lw
distance on W-side
Definition: Candidate.java:43
Integer pcal_sector
pcal sector
Definition: Candidate.java:38
Float pcal_lv
distance on V-side
Definition: Candidate.java:42

◆ cut_FORWARD()

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

◆ cut_PID()

boolean cut_PID ( )
inline
Returns
pid cut
86 {
87 if(pid == null) return false;
88 return pid == 22;
89 }
Integer pid
particle PID
Definition: Candidate.java:64

◆ getLorentzVector()

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

◆ getPhotonCandidate()

static PhotonCandidate getPhotonCandidate ( int  ipart,
Bank  recbank,
Bank  calbank,
boolean  isinbending 
)
inlinestatic

return PhotonCandidate instance

Parameters
ipartparticle index
recbank,calbankparticle and calorimeter banks
isinbendingtrue for inbending, false for outbending
43 {
44 PhotonCandidate candidate = new PhotonCandidate(ipart);
45 if(!isinbending) candidate.setOUTBENDING();
46
47 if(recbank!=null) {
48 candidate.setPID(recbank.getInt("pid",ipart));
49 candidate.setStatus(recbank.getShort("status",ipart));
50 candidate.setBETA(recbank.getFloat("beta",ipart));
51 candidate.setPxyz(recbank.getFloat("px",ipart), recbank.getFloat("py",ipart), recbank.getFloat("pz",ipart));
52 }
53
54 if(calbank!=null) IntStream.range(0,calbank.getRows())
55 .filter(i -> calbank.getShort("pindex",i) == ipart && calbank.getByte("detector",i) == DetectorType.ECAL.getDetectorId())
56 .forEach(i -> {
57 if(calbank.getByte("layer",i) == 1) {
58 candidate.setPCALsector(calbank.getByte("sector",i));
59 candidate.setPCALvw(calbank.getFloat("lv",i), calbank.getFloat("lw",i));
60 candidate.setPCALxyz(calbank.getFloat("x",i), calbank.getFloat("y",i), calbank.getFloat("z",i));
61 }
62 });
63
64 return candidate;
65 }
PhotonCandidate(int ipart)
Definition: PhotonCandidate.java:31

◆ isphoton() [1/2]

boolean isphoton ( )
inline

testing against all photon cuts

135 {
136 return isphoton(Cut.values());
137 }
boolean isphoton()
Definition: PhotonCandidate.java:135

◆ isphoton() [2/2]

boolean isphoton ( Cut ...  applycuts)
inline

assembly of multiple photon cuts

Parameters
applycutsthe list of cuts required to apply
145 {
146 for(Cut thiscut: applycuts) {
147
148 if(thiscut == Cut.PID) {
149 if(!cut_PID()) return false;
150
151 } else if(thiscut == Cut.FORWARD) {
152 if(!cut_FORWARD()) return false;
153
154 } else if(thiscut == Cut.EC_FIDUCIAL) {
155 if(!cut_EC_FIDUCIAL()) return false;
156
157 } else if(thiscut == Cut.BETA) {
158 if(!cut_BETA()) return false;
159
160 } else {
161 return false;
162 }
163 }
164 return true;
165 }
boolean cut_PID()
Definition: PhotonCandidate.java:86
boolean cut_FORWARD()
Definition: PhotonCandidate.java:115
boolean cut_BETA()
Definition: PhotonCandidate.java:125

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