Skip to content

Commit

Permalink
Merge pull request #1 from gem-sw/from-CMSSW_6_1_2_SLHC8_patch1
Browse files Browse the repository at this point in the history
From cmssw 6 1 2 slhc8 patch1
  • Loading branch information
Sven Dildick committed Sep 17, 2013
2 parents 0c5f104 + 3acc765 commit e436b56
Show file tree
Hide file tree
Showing 12 changed files with 302 additions and 34 deletions.
15 changes: 13 additions & 2 deletions DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigi.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*
* Digi for Correlated LCT trigger primitives.
*
* $Date: 2011/02/02 13:27:20 $
* $Revision: 1.17 $
* $Date: 2013/05/21 11:41:36 $
* $Revision: 1.17.2.1 $
*
* \author L. Gray, UF
*/
Expand Down Expand Up @@ -86,6 +86,16 @@ class CSCCorrelatedLCTDigi
/// set quality code
void setQuality(unsigned int q) {quality=q;}

//------- GEM matching extras ---------
/// if has any sort of associated GEM pad
bool hasGEM() const {return gemDPhi > -9. && gemDPhi < 9.;}

/// LCT phi - gem pad phi for ME11
float getGEMDPhi() const {return gemDPhi;}

/// set gem pad deltaPhi for ME11
void setGEMDPhi(const float dphi) {gemDPhi = dphi;}

private:
uint16_t trknmb;
uint16_t valid;
Expand All @@ -99,6 +109,7 @@ class CSCCorrelatedLCTDigi
uint16_t bx0;
uint16_t syncErr;
uint16_t cscID;
float gemDPhi;
};

std::ostream & operator<<(std::ostream & o, const CSCCorrelatedLCTDigi& digi);
Expand Down
19 changes: 12 additions & 7 deletions DataFormats/CSCDigi/src/CSCCorrelatedLCTDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
*
* Digi for Correlated LCT trigger primitives.
*
* $Date: 2010/07/07 10:53:22 $
* $Revision: 1.14 $
* $Date: 2013/05/21 11:41:36 $
* $Revision: 1.14.2.1 $
*
* \author L.Gray, UF
*/
Expand Down Expand Up @@ -32,7 +32,8 @@ CSCCorrelatedLCTDigi::CSCCorrelatedLCTDigi(const int itrknmb, const int ivalid,
mpclink(impclink),
bx0(ibx0),
syncErr(isyncErr),
cscID(icscID)
cscID(icscID),
gemDPhi(-99.)
{}

/// Default
Expand All @@ -54,14 +55,16 @@ void CSCCorrelatedLCTDigi::clear() {
bx0 = 0;
syncErr = 0;
cscID = 0;
gemDPhi = -99.;
}

/// Comparison
bool CSCCorrelatedLCTDigi::operator==(const CSCCorrelatedLCTDigi &rhs) const {
return ((trknmb == rhs.trknmb) && (quality == rhs.quality) &&
(keywire == rhs.keywire) && (strip == rhs.strip) &&
(pattern == rhs.pattern) && (bend == rhs.bend) &&
(bx == rhs.bx) && (valid == rhs.valid) && (mpclink == rhs.mpclink) );
(bx == rhs.bx) && (valid == rhs.valid) && (mpclink == rhs.mpclink) &&
(gemDPhi == rhs.gemDPhi) );
}

/// Debug
Expand All @@ -75,7 +78,8 @@ void CSCCorrelatedLCTDigi::print() const {
<< " Pattern = " << getPattern()
<< " Bend = " << ( (getBend() == 0) ? 'L' : 'R' )
<< " BX = " << getBX()
<< " MPC Link = " << getMPCLink() << std::endl;
<< " MPC Link = " << getMPCLink()
<< " GEMDphi = " << getGEMDPhi() << std::endl;
}
else {
std::cout << "Not a valid correlated LCT." << std::endl;
Expand All @@ -88,9 +92,10 @@ std::ostream & operator<<(std::ostream & o,
<< ": Valid = " << digi.isValid()
<< " Quality = " << digi.getQuality()
<< " MPC Link = " << digi.getMPCLink()
<< " cscID = " << digi.getCSCID() << "\n"
<< " cscID = " << digi.getCSCID()
<< " GEMDphi = " << digi.getGEMDPhi() << "\n"
<<" cathode info: Strip = " << digi.getStrip()
<< " Pattern = " << digi.getPattern()
<< " Pattern = " << digi.getPattern()
<< " Bend = " << ((digi.getBend() == 0) ? 'L' : 'R') << "\n"
<<" anode info: Key wire = " << digi.getKeyWG()
<< " BX = " << digi.getBX()
Expand Down
4 changes: 2 additions & 2 deletions DataFormats/CSCDigi/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<class name="CSCComparatorDigi" ClassVersion="10">
<version ClassVersion="10" checksum="656608282"/>
</class>
<class name="CSCCorrelatedLCTDigi" ClassVersion="10">
<version ClassVersion="10" checksum="1301481852"/>
<class name="CSCCorrelatedLCTDigi" ClassVersion="11">
<version ClassVersion="11" checksum="3605618748"/>
</class>
<class name="CSCCLCTDigi" ClassVersion="10">
<version ClassVersion="10" checksum="3910057547"/>
Expand Down
16 changes: 8 additions & 8 deletions Geometry/MuonCommonData/data/v4/gemf_r08_v01.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<ConstantsSection label="gemf.xml" eval="true">
<Constant name="dzTot" value="50.820*cm"/>
<Constant name="rPos" value="(1338*mm+[dzTot])"/>
<Constant name="dzS1" value="5.056*cm"/>
<Constant name="dzS2" value="5.056*cm"/>
<Constant name="dzS3" value="5.190*cm"/>
<Constant name="dzS4" value="5.190*cm"/>
<Constant name="dzS5" value="6.188*cm"/>
<Constant name="dzS6" value="6.188*cm"/>
<Constant name="dzS7" value="7.630*cm"/>
<Constant name="dzS8" value="7.630*cm"/>
<Constant name="dzS1" value="7.630*cm"/>
<Constant name="dzS2" value="7.630*cm"/>
<Constant name="dzS3" value="6.188*cm"/>
<Constant name="dzS4" value="6.188*cm"/>
<Constant name="dzS5" value="5.190*cm"/>
<Constant name="dzS6" value="5.190*cm"/>
<Constant name="dzS7" value="5.056*cm"/>
<Constant name="dzS8" value="5.056*cm"/>
<Constant name="dzGap" value="0.2500*cm"/>
<Constant name="dzIn" value="([dzS1]+[dzS2]+[dzS3]+[dzS4]+[dzS5]+[dzS6]+[dzS7]+[dzS8]+7*[dzGap])"/>
<Constant name="z10" value="([dzIn]-[dzS1])"/>
Expand Down
1 change: 1 addition & 0 deletions L1Trigger/CSCTriggerPrimitives/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<use name="FWCore/ParameterSet"/>
<use name="FWCore/Utilities"/>
<use name="L1Trigger/CSCCommonTrigger"/>
<use name="Geometry/GEMGeometry"/>
<export>
<lib name="1"/>
</export>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
// Author List: S. Valuev, UCLA.
//
// $Id: CSCTriggerPrimitivesProducer.cc,v 1.16 2012/12/05 21:16:16 khotilov Exp $
// $Id: CSCTriggerPrimitivesProducer.cc,v 1.16.2.1 2013/05/21 12:02:24 khotilov Exp $
//
// Modifications:
//
Expand All @@ -23,6 +23,7 @@
#include "Geometry/Records/interface/MuonGeometryRecord.h"
#include "L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeometry.h"
#include "CondFormats/DataRecord/interface/CSCBadChambersRcd.h"
#include "Geometry/GEMGeometry/interface/GEMGeometry.h"

#include "DataFormats/CSCDigi/interface/CSCComparatorDigiCollection.h"
#include "DataFormats/CSCDigi/interface/CSCWireDigiCollection.h"
Expand All @@ -43,6 +44,7 @@ CSCTriggerPrimitivesProducer::CSCTriggerPrimitivesProducer(const edm::ParameterS

wireDigiProducer_ = conf.getParameter<edm::InputTag>("CSCWireDigiProducer");
compDigiProducer_ = conf.getParameter<edm::InputTag>("CSCComparatorDigiProducer");
gemPadProducer_ = conf.getUntrackedParameter<edm::InputTag>("gemPadProducer", edm::InputTag());
checkBadChambers_ = conf.getUntrackedParameter<bool>("checkBadChambers", true);

lctBuilder_ = new CSCTriggerPrimitivesBuilder(conf); // pass on the conf
Expand Down Expand Up @@ -75,6 +77,11 @@ void CSCTriggerPrimitivesProducer::produce(edm::Event& ev,
edm::ESHandle<CSCGeometry> h;
setup.get<MuonGeometryRecord>().get(h);
CSCTriggerGeometry::setGeometry(h);
lctBuilder_->setCSCGeometry(&*h);

edm::ESHandle<GEMGeometry> h_gem;
setup.get<MuonGeometryRecord>().get(h_gem);
lctBuilder_->setGEMGeometry(&*h_gem);
}

// Find conditions data for bad chambers.
Expand Down Expand Up @@ -102,6 +109,13 @@ void CSCTriggerPrimitivesProducer::produce(edm::Event& ev,
ev.getByLabel(compDigiProducer_.label(), compDigiProducer_.instance(), compDigis);
ev.getByLabel(wireDigiProducer_.label(), wireDigiProducer_.instance(), wireDigis);

const GEMCSCPadDigiCollection *gemPads = nullptr;
if (!gemPadProducer_.label().empty()) {
edm::Handle<GEMCSCPadDigiCollection> h_pads;
ev.getByLabel(gemPadProducer_, h_pads);
gemPads = h_pads.product();
}

// Create empty collections of ALCTs, CLCTs, and correlated LCTs upstream
// and downstream of MPC.
std::auto_ptr<CSCALCTDigiCollection> oc_alct(new CSCALCTDigiCollection);
Expand All @@ -128,7 +142,7 @@ void CSCTriggerPrimitivesProducer::produce(edm::Event& ev,
if (wireDigis.isValid() && compDigis.isValid()) {
const CSCBadChambers* temp = checkBadChambers_ ? pBadChambers.product() : new CSCBadChambers;
lctBuilder_->build(temp,
wireDigis.product(), compDigis.product(),
wireDigis.product(), compDigis.product(), gemPads,
*oc_alct, *oc_clct, *oc_pretrig, *oc_lct, *oc_sorted_lct);
if (!checkBadChambers_)
delete temp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* \author Slava Valuev, UCLA.
*
* $Id: CSCTriggerPrimitivesProducer.h,v 1.5 2012/12/05 21:16:16 khotilov Exp $
* $Id: CSCTriggerPrimitivesProducer.h,v 1.5.2.1 2013/05/21 12:02:24 khotilov Exp $
*
*/

Expand All @@ -42,6 +42,7 @@ class CSCTriggerPrimitivesProducer : public edm::EDProducer
int iev; // event number
edm::InputTag compDigiProducer_;
edm::InputTag wireDigiProducer_;
edm::InputTag gemPadProducer_;
// swich to force the use of parameters from config file rather then from DB
bool debugParameters_;
// switch to for enabling checking against the list of bad chambers
Expand Down
Loading

0 comments on commit e436b56

Please sign in to comment.