lcsim/src/org/lcsim/recon/muon
diff -u -r1.4 -r1.5
--- MuonCandidate.java 30 Jan 2006 21:58:51 -0000 1.4
+++ MuonCandidate.java 11 Oct 2006 00:10:03 -0000 1.5
@@ -10,10 +10,13 @@
{
public MuonCandidate(Track t,
- int nECalHits, int nECalLayers, Enumeration eCalHits,
- int nHCalHits, int nHCalLayers, Enumeration hCalHits,
- int nMuHits, int nMuLayers, Enumeration muHits)
-
+ int nECalHits, int nECalLayers, Enumeration eCalHits,
+ int nHCalHits, int nHCalLayers, Enumeration hCalHits,
+ int nMuHits,int nMuLayers, Enumeration muHits,
+ int nEmEndcapHits, int nEmEndcapcapLayers, Enumeration emEndcapHits,
+ int nHadEndcapHits, int nHadEndcapLayers, Enumeration hadEndcapHits,
+ int nMuEndcapHits, int nMuEndcapLayers, Enumeration muEndcapHits)
+
{
track = t;
nECalorimeterHits = nECalHits;
@@ -25,18 +28,29 @@
nMuonSystemHits = nMuHits;
nMuonSystemLayersHit = nMuLayers;
muonSystemHits = muHits;
-
-
+
+ this.nEmEndcapHits = nEmEndcapHits;
+ this.nEmEndcapLayersHit = nEmEndcapLayersHit;
+ this.emEndcapHits =emEndcapHits;
+ this.nHadEndcapHits = nHadEndcapHits;
+ this.nHadEndcapLayersHit = nHadEndcapLayersHit;
+ this.hadEndcapHits =hadEndcapHits;
+ this.nMuEndcapHits = nMuEndcapHits;
+ this.nMuEndcapLayersHit = nMuEndcapLayersHit;
+ this.muEndcapHits = muEndcapHits;
+
+
+
// new
+ //======================= Barrel
int ijy = 0;
Enumeration ee = ecalorimeterHits;
while(ee.hasMoreElements())
{
// CalorimeterHit class still not implemented. Use
// CalorimeterHit
-// CalorimeterHit hit = (CalorimeterHit) ee.nextElement();
CalorimeterHit hit = (CalorimeterHit) ee.nextElement();
-// int id = hit.getCellID();
+// int id = hit.getCellID();
myecalhits.add(hit);
ijy++;
}
@@ -47,79 +61,119 @@
while(eh.hasMoreElements())
{
CalorimeterHit hit = (CalorimeterHit) eh.nextElement();
-// int id = hit.getTowerID();
+// int id = hit.getTowerID();
myhcalhits.add(hit);
imy++;
}
//System.out.println("imy "+imy + " nHCalorimeterHits "+nHCalorimeterHits);
-
+
// MUSystem
int iny = 0;
Enumeration ef = muonSystemHits;
while(ef.hasMoreElements())
{
CalorimeterHit hitMU = (CalorimeterHit) ef.nextElement();
-// int id = hitMU.getTowerID();
+// int id = hitMU.getTowerID();
mymusyshits.add(hitMU);
iny++;
}
- System.out.println("iny " + iny + " nMuonSystemHits "+nMuonSystemHits);
+ //System.out.println("iny " + iny + " nMuonSystemHits "+nMuonSystemHits);
// (C.M.-End January 4,2003
-
-
+
+
+ // Calculate tranverse momentum
+
+ //============== Endcap
+
+ ijy = 0;
+ Enumeration eEmEndcap = emEndcapHits;
+ while(eEmEndcap.hasMoreElements())
+ {
+ // CalorimeterHit class still not implemented. Use
+ CalorimeterHit hit = (CalorimeterHit) eEmEndcap.nextElement();
+// int id = hit.getCellID();
+ myecalEndcaphits.add(hit);
+ ijy++;
+ }
+ // C. Milstene-January 4,2003
+ // HDCalorimeter
+ imy = 0;
+ Enumeration eHadEndcap = hadEndcapHits;
+ while(eHadEndcap.hasMoreElements())
+ {
+ CalorimeterHit hit = (CalorimeterHit) eHadEndcap.nextElement();
+// int id = hit.getTowerID();
+ myhcalEndcaphits.add(hit);
+ imy++;
+ }
+ //System.out.println("imy "+imy + " nHCalorimeterHits "+nHCalorimeterHits);
+
+ // MUSystem
+ iny = 0;
+ Enumeration eMuEndcap = muEndcapHits;
+ while(eMuEndcap.hasMoreElements())
+ {
+ CalorimeterHit hitMU = (CalorimeterHit) eMuEndcap.nextElement();
+// int id = hitMU.getTowerID();
+ mymuEndcapsyshits.add(hitMU);
+ iny++;
+ }
+ //System.out.println("iny " + iny + " nMuonSystemHits "+nMuonSystemHits);
+ // (C.M.-End January 4,2003
+
+
// Calculate tranverse momentum
-
-
+
pt = Math.sqrt(track.getPX()*track.getPX() + track.getPY()*track.getPY());
}
-
+
public Track getTrack()
{
// Return muon track
-
+
return(track);
}
-
-
+
+
public int getNECalorimeterHits()
{
// Return number of hits in electromagnetic calorimeter
-
+
return (nECalorimeterHits);
}
public int getNECalorimeterLayersHit()
{
// Return number of em calorimeter layers hit by the track
-
+
return(nECalorimeterLayersHit);
}
-
+
public Enumeration getECalorimeterHits()
{
// Return a list of electromagnetic calorimeter hits
-
+
//return(calorimeterHits);
return (myecalhits.elements()); //C.M.- January 4,2003
}
-
+
public int getNHCalorimeterHits()
{
// Return number of hits in hadronic calorimeter
-
+
return (nHCalorimeterHits);
}
-
+
public int getNHCalorimeterLayersHit()
{
// Return number of Had calorimeter layers hit by the track
-
+
return(nHCalorimeterLayersHit);
}
-
+
public Enumeration getHCalorimeterHits()
{
// Return a list of hadronic calorimeter hits
-
+
//return(calorimeterHits);
return (myhcalhits.elements()); //C.M.- January 4,2003
}
@@ -127,46 +181,123 @@
public int getNMuonSystemHits()
{
// Return number of hits in muon system
-
+
return (nMuonSystemHits);
}
public int getNMuonSystemLayersHit()
{
// Return number of muon system layers hit by the track
-
+
return(nMuonSystemLayersHit);
}
-
+
public Enumeration getMuonSystemHits()
{
// Return a list of muon system hits
-
+
//return(muonSystemHits);
return(mymusyshits.elements()); //C.M.-January 4,2003
}
-
+
+ //...........................EndCap Starts.............................
+
+ public int getNEmEndcapHits()
+ {
+ // Return number of hits in electromagnetic calorimeter
+
+ return (nEmEndcapHits);
+ }
+ public int getNEmEndcapLayersHit()
+ {
+ // Return number of em calorimeter layers hit by the track
+
+ return(nEmEndcapLayersHit);
+ }
+
+ public Enumeration getEmEndcapHits()
+ {
+ // Return a list of electromagnetic calorimeter hits
+
+ //return(calorimeterHits);
+ return (myecalEndcaphits.elements()); //C.M.- January 4,2003
+ }
+
+ public int getNHadEndcapHits()
+ {
+ // Return number of hits in hadronic calorimeter
+
+ return (nHadEndcapHits);
+ }
+
+ public int getNHadEndcapLayersHit()
+ {
+ // Return number of Had calorimeter layers hit by the track
+
+ return(nHadEndcapLayersHit);
+ }
+
+ public Enumeration getHadEndcapHits()
+ {
+ // Return a list of hadronic calorimeter hits
+
+ //return(calorimeterHits);
+ return (myhcalEndcaphits.elements()); //C.M.- January 4,2003
+ }
+
+ public int getNMuonEndcapSystemHits()
+ {
+ // Return number of hits in muon system
+
+ return (nMuEndcapHits);
+ }
+
+ public int getNMuonEndcapSystemLayersHit()
+ {
+ // Return number of muon system layers hit by the track
+
+ return(nMuEndcapLayersHit);
+ }
+
+ public Enumeration getMuonEndcapSystemHits()
+ {
+ // Return a list of muon system hits
+
+ //return(muonSystemHits);
+ return(mymuEndcapsyshits.elements()); //C.M.-January 4,2003
+ }
+
+ //...........................Endcap Ends............................
+
+
public void reset()
{
// Erase lists of hits
myecalhits.removeAllElements();
-
+
myhcalhits.removeAllElements();
-
+
mymusyshits.removeAllElements();
-
-
+
+ myecalEndcaphits.removeAllElements();
+
+ myhcalEndcaphits.removeAllElements();
+
+ mymuEndcapsyshits.removeAllElements();
+
+
+
}
-
+
public double getPT()
{
// return Pt of the track
-
+
return(pt);
}
-
+
private Track track;
-
+
private int nECalorimeterHits;
private int nECalorimeterLayersHit;
private Enumeration ecalorimeterHits;
@@ -176,11 +307,26 @@
private int nMuonSystemHits;
private int nMuonSystemLayersHit;
private Enumeration muonSystemHits;
+
+ private int nEmEndcapHits;
+ private int nEmEndcapLayersHit;
+ private Enumeration emEndcapHits;
+ private int nHadEndcapHits;
+ private int nHadEndcapLayersHit;
+ private Enumeration hadEndcapHits;
+ private int nMuEndcapHits;
+ private int nMuEndcapLayersHit;
+ private Enumeration muEndcapHits;
+
private double pt;
//C.Milstene- January 4,2003
private Vector myecalhits = new Vector();
private Vector myhcalhits = new Vector();
private Vector mymusyshits = new Vector();
+
+ private Vector myecalEndcaphits = new Vector();
+ private Vector myhcalEndcaphits = new Vector();
+ private Vector mymuEndcapsyshits = new Vector();
//(End January 4,2003)
}