Skip to content

Commit

Permalink
Merge pull request #142 from dildick/CSC-Trigger-Upgrade-GEM-RPC-forS…
Browse files Browse the repository at this point in the history
…LHC12

Csc trigger upgrade gem rpc for slhc12
  • Loading branch information
Sven Dildick committed Apr 25, 2014
2 parents cde325c + cd9a8b8 commit f9856e1
Show file tree
Hide file tree
Showing 23 changed files with 941 additions and 540 deletions.
32 changes: 32 additions & 0 deletions GeneratorInterface/ExternalDecays/data/Bu_chic1K_jpsigammaK.dec
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# $Id$
#
# This is the decay file for B -> Chi_c1(Jpsi ( -> mu mu ) gamma) K+
#
# Author: Alberto Sanchez-Hernandez
# Date: 1/13/14
#

Alias MyB+ B+
Alias MyB- B-
ChargeConj MyB- MyB+

Alias MyJ/psi J/psi
ChargeConj MyJ/psi MyJ/psi

Alias Mychi_c1 chi_c1
ChargeConj Mychi_c1 Mychi_c1

Decay MyJ/psi
1.0000 mu+ mu- PHOTOS VLL ;
Enddecay

Decay Mychi_c1
1.0000 MyJ/psi gamma VVP 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ;
Enddecay

Decay MyB+
0.0168 Mychi_c1 K+ SVS ;
Enddecay
CDecay MyB-

End
37 changes: 37 additions & 0 deletions GeneratorInterface/ExternalDecays/data/Onia_chic_jpsigamma.dec
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# $Id$
#
# This is the decay file for Pwave states -> (J/psi(1s) -> mu+ mu- ) gamma
#
# Author: Alberto Sanchez-Hernandez
# Date: 1/13/14
#

Alias MyJ/psi J/psi
ChargeConj MyJ/psi MyJ/psi

Alias Mychi_c0 chi_c0
ChargeConj Mychi_c0 Mychi_c0

Alias Mychi_c1 chi_c1
ChargeConj Mychi_c1 Mychi_c1

Alias Mychi_c2 chi_c2
ChargeConj Mychi_c2 Mychi_c2

Decay MyJ/psi
1.0000 mu+ mu- PHOTOS VLL ;
Enddecay

Decay Mychi_c0
1.0000 gamma MyJ/psi PHSP ;
Enddecay

Decay Mychi_c1
1.0000 MyJ/psi gamma VVP 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ;
Enddecay

Decay Mychi_c2
1.0000 gamma MyJ/psi PHSP ;
Enddecay

End
7 changes: 5 additions & 2 deletions L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ CSCAnodeLCTProcessor::CSCAnodeLCTProcessor(unsigned endcap, unsigned station,
// run the ALCT processor for the Phase-II ME2/1 integrated local trigger
runME21ILT_ = conf.getUntrackedParameter<bool>("runME21ILT",false);

// run the ALCT processor for the Phase-II ME3/1-ME4/1 integrated local trigger
runME3141ILT_ = conf.getUntrackedParameter<bool>("runME3141ILT",false);

//if (theStation==1 && theRing==2) infoV = 3;

// Load appropriate pattern mask.
Expand Down Expand Up @@ -972,8 +975,8 @@ bool CSCAnodeLCTProcessor::patternDetection(const int key_wire) {
// Quality definition changed on 22 June 2007: it no longer depends
// on pattern_thresh.
if (temp_quality > 3) temp_quality -= 3;
// hack to run the Phase-II ME2/1 ILT
else if (temp_quality == 3 and runME21ILT_) temp_quality = 4;
// hack to run the Phase-II ME2/1, ME3/1 and ME4/1 ILT
else if (temp_quality == 3 and (runME21ILT_ or runME3141ILT_)) temp_quality = 4;
else temp_quality = 0; // quality code 0 is valid!
}

Expand Down
3 changes: 3 additions & 0 deletions L1Trigger/CSCTriggerPrimitives/src/CSCAnodeLCTProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ class CSCAnodeLCTProcessor
/** SLHC: run the ALCT processor for the Phase-II ME2/1 integrated local trigger */
bool runME21ILT_;

/** SLHC: run the ALCT processor for the Phase-II ME3/1(ME4/1) integrated local trigger */
bool runME3141ILT_;

/** Default values of configuration parameters. */
static const unsigned int def_fifo_tbins, def_fifo_pretrig;
static const unsigned int def_drift_delay;
Expand Down
59 changes: 8 additions & 51 deletions L1Trigger/CSCTriggerPrimitives/src/CSCMotherboardME11.cc
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,10 @@ void CSCMotherboardME11::run(const CSCWireDigiCollection* wiredc,
const int quality(clct->bestCLCT[bx_clct].getQuality());
if (debug_gem_matching) std::cout << "++Valid ME1b CLCT: " << clct->bestCLCT[bx_clct] << std::endl;

// pick the pad that corresponds
auto matchingPads(matchingGEMPads(clct->bestCLCT[bx_clct], alct->bestALCT[bx_alct], pads_[bx_clct], ME1B, false));
auto matchingCoPads(matchingGEMPads(clct->bestCLCT[bx_clct], alct->bestALCT[bx_alct], coPads_[bx_clct], ME1B, true));
if (runME11ILT_ and dropLowQualityCLCTsNoGEMs_ME1b_ and quality < 4 and hasPads){
// pick the pad that corresponds
auto matchingPads(matchingGEMPads(clct->bestCLCT[bx_clct], alct->bestALCT[bx_alct], pads_[bx_clct], ME1B, false));
int nFound(matchingPads.size());
const bool clctInEdge(clct->bestCLCT[bx_clct].getKeyStrip() < 5 or clct->bestCLCT[bx_clct].getKeyStrip() > 124);
if (clctInEdge){
Expand All @@ -757,7 +758,6 @@ void CSCMotherboardME11::run(const CSCWireDigiCollection* wiredc,

// check timing
if (runME11ILT_ and correctLCTtimingWithGEM_){
auto matchingCoPads(matchingGEMPads(clct->bestCLCT[bx_clct], alct->bestALCT[bx_alct], coPads_[bx_clct], ME1B, false));
int nFound(matchingCoPads.size());
if (nFound != 0 and bx_alct == 6 and bx_clct != 6){
if (debug_gem_matching) std::cout << "\tInfo: CLCT with incorrect timing" << std::endl;
Expand All @@ -772,7 +772,7 @@ void CSCMotherboardME11::run(const CSCWireDigiCollection* wiredc,
int mbx = bx_clct-bx_clct_start;
correlateLCTsGEM(alct->bestALCT[bx_alct], alct->secondALCT[bx_alct],
clct->bestCLCT[bx_clct], clct->secondCLCT[bx_clct],
allLCTs1b[bx_alct][mbx][0], allLCTs1b[bx_alct][mbx][1], ME1B, pads_[bx_clct], coPads_[bx_clct]);
allLCTs1b[bx_alct][mbx][0], allLCTs1b[bx_alct][mbx][1], ME1B, matchingPads, matchingCoPads);
if (debug_gem_matching) {
std::cout << "Successful ALCT-CLCT match in ME1b: bx_alct = " << bx_alct
<< "; match window: [" << bx_clct_start << "; " << bx_clct_stop
Expand Down Expand Up @@ -858,9 +858,10 @@ void CSCMotherboardME11::run(const CSCWireDigiCollection* wiredc,
const int quality(clct1a->bestCLCT[bx_clct].getQuality());
if (debug_gem_matching) std::cout << "++Valid ME1a CLCT: " << clct1a->bestCLCT[bx_clct] << std::endl;

// pick the pad that corresponds
auto matchingPads(matchingGEMPads(clct1a->bestCLCT[bx_clct], alct->bestALCT[bx_alct], pads_[bx_clct], ME1A, false));
auto matchingCoPads(matchingGEMPads(clct1a->bestCLCT[bx_clct], alct->bestALCT[bx_alct], coPads_[bx_clct], ME1A, true));
if (runME11ILT_ and dropLowQualityCLCTsNoGEMs_ME1a_ and quality < 4 and hasPads){
// pick the pad that corresponds
auto matchingPads(matchingGEMPads(clct1a->bestCLCT[bx_clct], alct->bestALCT[bx_alct], pads_[bx_clct], ME1A, false));
int nFound(matchingPads.size());
const bool clctInEdge(clct1a->bestCLCT[bx_clct].getKeyStrip() < 4 or clct1a->bestCLCT[bx_clct].getKeyStrip() > 93);
if (clctInEdge){
Expand All @@ -880,7 +881,7 @@ void CSCMotherboardME11::run(const CSCWireDigiCollection* wiredc,
int mbx = bx_clct-bx_clct_start;
correlateLCTsGEM(alct->bestALCT[bx_alct], alct->secondALCT[bx_alct],
clct1a->bestCLCT[bx_clct], clct1a->secondCLCT[bx_clct],
allLCTs1a[bx_alct][mbx][0], allLCTs1a[bx_alct][mbx][1], ME1A, pads_[bx_clct], coPads_[bx_clct]);
allLCTs1a[bx_alct][mbx][0], allLCTs1a[bx_alct][mbx][1], ME1A, matchingPads, matchingCoPads);
if (debug_gem_matching) {
std::cout << "Successful ALCT-CLCT match in ME1a: bx_alct = " << bx_alct
<< "; match window: [" << bx_clct_start << "; " << bx_clct_stop
Expand Down Expand Up @@ -1059,50 +1060,6 @@ void CSCMotherboardME11::run(const CSCWireDigiCollection* wiredc,
}
}// reduction per bx

/*
bool first = true;
for (int bx = 0; bx < MAX_LCT_BINS; bx++)
{
// counting
unsigned int n1a=0, n1b=0;
for (unsigned int mbx = 0; mbx < match_trig_window_size; mbx++)
for (int i=0;i<2;i++)
{
int cbx = bx + mbx - match_trig_window_size/2;
if (allLCTs1b[bx][mbx][i].isValid())
{
if (debug_gem_matching and first){
std::cout << "========================================================================" << std::endl;
std::cout << "Counting the final LCTs" << std::endl;
std::cout << "========================================================================" << std::endl;
first = false;
}
n1b++;
// if (infoV > 0) LogDebug("CSCMotherboard")
if (debug_gem_matching)
std::cout
<< "1b LCT"<<i+1<<" "<<bx<<"/"<<cbx<<": "<<allLCTs1b[bx][mbx][i]<<std::endl;
}
if (allLCTs1a[bx][mbx][i].isValid())
{
if (debug_gem_matching and first){
std::cout << "========================================================================" << std::endl;
std::cout << "Counting the final LCTs" << std::endl;
std::cout << "========================================================================" << std::endl;
first = false;
}
n1a++;
// if (infoV > 0) LogDebug("CSCMotherboard")
if (debug_gem_matching)
std::cout
<< "1a LCT"<<i+1<<" "<<bx<<"/"<<cbx<<": "<<allLCTs1a[bx][mbx][i]<<std::endl;
}
}
}
*/

bool first = true;
unsigned int n1b=0, n1a=0;
for (auto p : readoutLCTs1b())
Expand Down
Loading

0 comments on commit f9856e1

Please sign in to comment.