Skip to content

Commit

Permalink
Merge pull request #119 from dildick/master
Browse files Browse the repository at this point in the history
Merge
  • Loading branch information
Sven Dildick committed Jan 17, 2014
2 parents 1bc9cb9 + 7179106 commit b3015de
Show file tree
Hide file tree
Showing 12 changed files with 317 additions and 29 deletions.
4 changes: 2 additions & 2 deletions GEMValidation/scripts/produceDigiValidationPlots.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
OR(ok_gL2dg,ok_gL1dg), "P", kBlue)
draw_geff(targetDir, "eff_phi_track_dg_gem_l1and2", ext, treeTracks,
"Eff. for a SimTrack to have an associated GEM Digi in l1 and l2 with a matched SimHit;SimTrack #phi [rad];Eff.",
"h_", "(100,-3.141592654,3.141592654)", "phi", AND(ok_eta,AND(ok_gL1sh,ok_gL2sh)),
"h_", "(100,-3.141592654,3.141592654)", "phi", AND(ok_eta,ok_gL1sh,ok_gL2sh),
AND(ok_gL2dg,ok_gL1dg), "P", kBlue)

## pads
Expand Down Expand Up @@ -370,7 +370,7 @@
AND(ok_gL1pad,ok_gL2pad), "P", kBlue)
draw_geff(targetDir, "eff_phi_track_copad_sh_gem", ext, treeTracks,
"Eff. for a SimTrack to have an associated GEM CoPad with a matched SimHit;SimTrack #phi [rad];Eff.",
"h_", "(100,-3.141592654,3.141592654)", "phi", AND(ok_eta,AND(ok_gL1sh,ok_gL2sh)),
"h_", "(100,-3.141592654,3.141592654)", "phi", AND(ok_eta,ok_gL1sh,ok_gL2sh),
AND(ok_gL2pad,ok_gL1pad), "P", kBlue)


Expand Down
2 changes: 1 addition & 1 deletion GEMValidation/scripts/produceRecHitValidationPlots.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@
OR(ok_gL2rh,ok_gL1rh), "P", kBlue)
draw_geff(targetDir, "eff_phi_track_rh_gem_l1and2", ext, treeTracks,
"Eff. for a SimTrack to have an associated GEM RecHit in l1 and l2 with a matched SimHit;SimTrack #phi [rad];Eff.",
"h_", "(100,-3.141592654,3.141592654)", "phi", AND(ok_eta,AND(ok_gL1sh,ok_gL2sh)),
"h_", "(100,-3.141592654,3.141592654)", "phi", AND(ok_eta,ok_gL1sh,ok_gL2sh)),
AND(ok_gL2rh,ok_gL1rh), "P", kBlue)

file.Close()
Expand Down
3 changes: 1 addition & 2 deletions GEMValidation/scripts/produceSimHitValidationPlots.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"h_", "(200,-573,-564,110,130,240)", "sqrt(globalX*globalX+globalY*globalY):globalZ", AND(rm1,sel), "COLZ")
draw_occ(targetDir, "sh_zr_rp1" + suff, ext, treeHits, pre + " SimHit occupancy: region1;globalZ [cm];globalR [cm]",
"h_", "(200,564,573,110,130,240)", "sqrt(globalX*globalX+globalY*globalY):globalZ", AND(rp1,sel), "COLZ")

draw_1D(targetDir, "sh_tof_rm1_l1" + suff, ext, treeHits, pre + " SimHit TOF: region-1, layer1;Time of flight [ns];entries",
"h_", "(40,18,22)", "timeOfFlight", AND(rm1,l1,sel))
draw_1D(targetDir, "sh_tof_rm1_l2" + suff, ext, treeHits, pre + " SimHit TOF: region-1, layer2;Time of flight [ns];entries",
Expand All @@ -163,7 +163,6 @@
draw_1D(targetDir, "sh_tof_rp1_l2" + suff, ext, treeHits, pre + " SimHit TOF: region1, layer2;Time of flight [ns];entries",
"h_", "(40,18,22)", "timeOfFlight", AND(rp1,l2,sel))


## momentum plot
c = TCanvas("c","c",600,600)
c.Clear()
Expand Down
72 changes: 72 additions & 0 deletions SimMuL1/interface/ALCT.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#ifndef SimMuL1_ALCT_h
#define SimMuL1_ALCT_h

/*
* Class for matched ALCTs
*/



#include <DataFormats/CSCDigi/interface/CSCALCTDigiCollection.h>
#include <Geometry/CSCGeometry/interface/CSCGeometry.h>
#include <DataFormats/MuonDetId/interface/CSCDetId.h>

class ALCT
{
public:
/// constructor
ALCT();
ALCT(const CSCALCTDigi*);
/// copy constructor
ALCT(const ACLT&);
/// destructor
~ALCT();

/// get the underlying trigger digi
const CSCALCTDigi* getTriggerDigi() const {return triggerDigi_;}
const int getDetId() const {return detId_;}
const int getBX() const {return bx_;}
const bool inReadout() const {return inReadout_;}
const bool isDeltaOk() const {return deltaOk_;}
const int getNumberHitsShared() const {return nHitsShared_;}
const int getMCWG() const {return mcWG_;}
const int getDeltaWire() const {return deltaWire_;}
const double getDeltaPhi() const {return deltaPhi_;}
const double getDeltaY() const {return deltaY_;}
const double getEta const {return eta_;}

std::vector<CSCAnodeLayerInfo>& getLayerInfo const {return layerInfo_;}
std::vector<PSimHit>& getSimHits const {return simHits_;}

private:
/// underlying trigger digi
const CSCALCTDigi* triggerDigi_;

/// layer info
std::vector<CSCAnodeLayerInfo> layerInfo_;
/// matching simhits
std::vector<PSimHit> simHits_;

/// detector ID
int detId_;
/// bunch crossing
int bx_;
/// is it in the readout collection?
bool inReadout_;
/// was properly matched
bool deltaOk_;
/// number of SimHits shared with SimTrack
int nHitsShared_;
/// SimHit's WG number
int mcWG_;
/// delta to SimTrack closest wire
int deltaWire_;
/// in (Z,R) -> (x,y) plane
double deltaPhi_;
/// deltas to SimTrack's 2D stub
double deltaY_;
/// center of wire group eta
double eta;
};

#endif
72 changes: 72 additions & 0 deletions SimMuL1/interface/CLCT.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# ifndef SimMuL1_CLCT_h
#define SimMuL1_CLCT_h

/*
* Class for matched CLCTs
*/



#include <DataFormats/CSCDigi/interface/CSCCLCTDigiCollection.h>
#include <Geometry/CSCGeometry/interface/CSCGeometry.h>
#include <DataFormats/MuonDetId/interface/CSCDetId.h>

class CLCT
{
public:
/// constructor
CLCT();
CLCT(const CSCCLCTDigi*);
/// copy constructor
CLCT(const ACLT&);
/// destructor
~CLCT();

/// get the underlying trigger digi
const CSCCLCTDigi* getTriggerDigi() const {return triggerDigi_;}
const int getDetId() const {return detId_;}
const int getBX() const {return bx_;}
const bool inReadout() const {return inReadout_;}
const bool isDeltaOk() const {return deltaOk_;}
const int getNumberHitsShared() const {return nHitsShared_;}
const int getMCStrip() const {return mcStrip_;}
const int getDeltaWire() const {return deltaWire_;}
const double getDeltaPhi() const {return deltaPhi_;}
const double getDeltaY() const {return deltaY_;}
const double getPhi const {return eta_;}

std::vector<CSCAnodeLayerInfo>& getLayerInfo const {return layerInfo_;}
std::vector<PSimHit>& getSimHits const {return simHits_;}

private:
/// underlying trigger digi
const CSCCLCTDigi* triggerDigi_;

/// layer info
std::vector<CSCAnodeLayerInfo> layerInfo_;
/// matching simhits
std::vector<PSimHit> simHits_;

/// detector ID
int detId_;
/// bunch crossing
int bx_;
/// is it in the readout collection?
bool inReadout_;
/// was properly matched
bool deltaOk_;
/// number of SimHits shared with SimTrack
int nHitsShared_;
/// SimHit's WG number
int mcWG_;
/// delta to SimTrack closest wire
int deltaStrip_;
/// in (Z,R) -> (x,y) plane
double deltaPhi_;
/// deltas to SimTrack's 2D stub
double deltaY_;
/// center of wire group eta
double phi;
};

#endif
Empty file added SimMuL1/interface/GMTCand.h
Empty file.
Empty file added SimMuL1/interface/GMTRegCand.h
Empty file.
Empty file added SimMuL1/interface/L1Extra.h
Empty file.
63 changes: 63 additions & 0 deletions SimMuL1/interface/LCT.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#ifndef SimMuL1_LCT_h
#define SimMuL1_LCT_h

/*
* Class LCT
*/

class LCT
{
public:
/// constructor
LCT();
/// copy constructor
LCT(const LCT&);
/// destructor
~LCT();

/// get the underlying trigger digi
const CSCCorrelatedDigi* getTriggerDigi() const {return triggerDigi_;}
/// get the alct
const ALCT* getALCT() const {return alct_;}
/// get the clct
const CLCT* getCLCT() const {return clct_;}
/// get the bunch crossing
const int getBX() const {return triggerDigi_->getBX();}
/// get the detector Id
const int getDetId() const {return detId_;}
/// is the LCT a ghost?
const bool isGhost() const {return isGhost_;}
/// does the LCT match?
const bool deltaOk() const {return deltaOk_;}
/// is the LCT in the readout?
const book inReadout() const {return inReadout_;}

/// set the underlying trigger digi
void setTriggerDigi(const CSCCorrelatedDigi* d) {triggerDigi_ = d;}
/// set the alct
void setALCT(const ALCT* alct) {return alct_;}
/// set the clct
void setCLCT(const CLCT* clct) {return clct_;}
/// set the bunch crossing
void setBX(const int bx) {return ;}
/// set the detector Id
void setDetId(const int detId) {return detId_;}
/// is the LCT a ghost?
void SetGhost(const bool ghost) {isGhost_ = ghost;}
/// does the LCT match?
void SetDeltaOk(const book ok) {deltaOk_ = ok;}
/// is the LCT in the readout?
void SetReadout(const bool inReadout) {inReadout_ = inReadout;}

private:
const CSCCorrelatedDigi triggerDigi_;
const ALCT* alct_;
const CLCT* clct_;
int bx_;
int detId_;
bool isGhost_;
bool deltaOk_;
bool inReadout_;
};

#endif
Empty file added SimMuL1/interface/TFCand.h
Empty file.
52 changes: 52 additions & 0 deletions SimMuL1/interface/TFTrack.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
class TFTrack
{
public:
/// constructor
TFTrack();
/// copy constructor
TFTrack(const TFTrack&);
/// destructor
~TFTrack();

/// L1 track
const csc::L1Track* getL1Track() const {return l1track_;}
/// collection of trigger digis
std::vector<const CSCCorrelatedLCTDigi* >&
getTriggerDigis() const {return return triggerDigis_;}
/// collection of MPC LCTs

/// track sign
bool sign() const {return l1track_->sign();}
/// bunch crossing
int getBX() const {return l1track_->bx();}
/// has stub in muon barrel?
bool hasStubBarrel();
/// has stub in muon endcap?
bool hasStubEndcap();
/// has stub in particular endcap station
bool hasStubEndcapStaion(int station);
///

private:
const csc::L1Track* l1track_;
std::vector < const CSCCorrelatedLCTDigi * > trgdigis;
std::vector < CSCDetId > trgids;
std::vector < std::pair<float, float> > trgetaphis;
std::vector < csctf::TrackStub > trgstubs;
std::vector < MPLCT* > mplcts;
std::vector < CSCDetId > ids; // chamber ids
unsigned phi_packed;
unsigned eta_packed;
unsigned pt_packed;
unsigned q_packed;
double phi;
double eta;
double pt;
double dr;
bool deltaOk1;
bool deltaOk2;
bool deltaOkME1;
bool debug;


};
Loading

0 comments on commit b3015de

Please sign in to comment.