Skip to content

Commit

Permalink
Add "aeta" as an acceptable free form cut
Browse files Browse the repository at this point in the history
aeta performs cuts on |eta| instead of plain eta. gaeta does the same
for generator quantities, and taeta does the same for trigger
quantities.

The "Combined Gen Cuts" ZDefinition now uses these in place of
("eta<2.4", "eta>-2.4").
  • Loading branch information
Alexander Gude committed May 7, 2014
1 parent 89f995d commit e49ab42
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
12 changes: 11 additions & 1 deletion ZFinder/Event/docs/ZDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ with 'g' makes the cut on the Truth Level info (and always fails for real
data), and a quantity that starts with 't' makes the cut on the Trigger Level
info.

There is also the variable 'aeta' which, instead of using normal eta, uses
|eta|. Like all variables it can have 'g' or 't' prefixed.

##### Allowed Values

A list of all allowed strings for `${Variable}`, `${Opperator}`, and `${Value}`
Expand All @@ -132,9 +135,16 @@ are given in the following table:
| eta | > | |
| phi | < | |
| charge | >= | |
| gpt | <= | |
| aeta | <= | |
| gpt | | |
| geta | | |
| gphi | | |
| gcharge | | |
| gaeta | | |
| tpt | | |
| teta | | |
| tphi | | |
| tcharge | | |
| taeta | | |

Note that this is a menu; pick one from each column!
5 changes: 4 additions & 1 deletion ZFinder/Event/interface/ZDefinition.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ namespace zf {
CV_TPHI,
CV_CHARGE,
CV_GCHARGE,
CV_TCHARGE
CV_TCHARGE,
CV_AETA,
CV_GAETA,
CV_TAETA
};

ComparisonType GetComparisonType(const std::string* cut);
Expand Down
8 changes: 4 additions & 4 deletions ZFinder/Event/python/ZDefinitions_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# ID cuts
cms.untracked.PSet(
name = cms.untracked.string("Combined Gen Cuts"),
cuts0 = cms.untracked.vstring("acc(ALL)", "gpt>30", "geta<2.1", "geta>-2.1"),
cuts1 = cms.untracked.vstring("acc(ALL)", "gpt>20", "geta<2.4", "geta>-2.4"),
cuts0 = cms.untracked.vstring("acc(ALL)", "gpt>30", "gaeta<2.1"),
cuts1 = cms.untracked.vstring("acc(ALL)", "gpt>20", "gaeta<2.4"),
min_mz = cms.untracked.double(MIN_MZ),
max_mz = cms.untracked.double(MAX_MZ),
use_truth_mass = cms.untracked.bool(True)
Expand Down Expand Up @@ -90,8 +90,8 @@
# ID cuts
cms.untracked.PSet(
name = cms.untracked.string("Combined Gen Cuts"),
cuts0 = cms.untracked.vstring("acc(ALL)", "gpt>30", "geta<2.1", "geta>-2.1"),
cuts1 = cms.untracked.vstring("acc(ALL)", "gpt>20", "geta<2.4", "geta>-2.4"),
cuts0 = cms.untracked.vstring("acc(ALL)", "gpt>30", "gaeta<2.1"),
cuts1 = cms.untracked.vstring("acc(ALL)", "gpt>20", "gaeta<2.4"),
min_mz = cms.untracked.double(MIN_MZ),
max_mz = cms.untracked.double(MAX_MZ),
use_truth_mass = cms.untracked.bool(True)
Expand Down
16 changes: 16 additions & 0 deletions ZFinder/Event/src/ZDefinition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,15 @@ namespace zf {
|| COMP_VAR == CV_GETA
|| COMP_VAR == CV_GPHI
|| COMP_VAR == CV_GCHARGE
|| COMP_VAR == CV_GAETA
) {
cut_type = TRUTH;
} else if (
COMP_VAR == CV_TPT
|| COMP_VAR == CV_TETA
|| COMP_VAR == CV_TPHI
|| COMP_VAR == CV_TCHARGE
|| COMP_VAR == CV_TAETA
){
cut_type = TRIG;
} else {
Expand Down Expand Up @@ -324,6 +326,11 @@ namespace zf {
case CV_TCHARGE:
e_val = zf_elec->charge;
break;
case CV_AETA:
case CV_GAETA:
case CV_TAETA:
e_val = fabs(zf_elec->eta);
break;
// Cases where it makes no sense to continue
case CV_NONE:
default:
Expand Down Expand Up @@ -434,6 +441,15 @@ namespace zf {
else if (cut->compare(0, 7, "tcharge") == 0 ) {
return CV_TCHARGE;
}
else if (cut->compare(0, 4, "aeta") == 0 ) {
return CV_AETA;
}
else if (cut->compare(0, 5, "gaeta") == 0 ) {
return CV_GAETA;
}
else if (cut->compare(0, 5, "taeta") == 0 ) {
return CV_TAETA;
}
return CV_NONE;
}

Expand Down

0 comments on commit e49ab42

Please sign in to comment.