#include <SingleWedgePadTrigger.h>
Definition at line 28 of file SingleWedgePadTrigger.h.
◆ SingleWedgePadTrigger()
NSWL1::SingleWedgePadTrigger::SingleWedgePadTrigger |
( |
const std::string & |
pattern, |
|
|
const std::vector< std::shared_ptr< PadOfflineData >> & |
pads, |
|
|
const std::vector< size_t > & |
padIndices |
|
) |
| |
◆ alreadyCombined()
bool NSWL1::SingleWedgePadTrigger::alreadyCombined |
( |
| ) |
const |
|
inline |
◆ areInnerOuterConsistent()
Determine whether two single-wedge triggers are consistent with each other.
'Consistent' here means that the difference in half-pad indices is what we expect for a track ~pointing to the center of the detector.
- Todo:
- We need a way to check (enforce) that the single-wedge triggers are one inner and one outer.
Definition at line 158 of file SingleWedgePadTrigger.cxx.
163 bool mismatchEta(outer.ieta < inner.ieta - 4 || outer.ieta > inner.ieta + 4);
164 bool mismatchPhi(outer.iphi < inner.iphi - 4 || outer.iphi > inner.iphi + 4);
165 bool mismatch(mismatchEta || mismatchPhi);
◆ bandIndices()
Definition at line 169 of file SingleWedgePadTrigger.cxx.
171 bool sameEta(inner.ieta == outer.ieta), samePhi(inner.iphi == outer.iphi);
172 return EtaPhiHalf((sameEta ? inner.ieta * 2 : inner.ieta * 2 + 1),
173 (samePhi ? inner.iphi * 2 : inner.iphi * 2 + 1));
◆ halfPadCoordinates()
Definition at line 35 of file SingleWedgePadTrigger.cxx.
36 const std::vector<std::shared_ptr<PadOfflineData>> &
pads =
m_pads;
39 int l0(pad0->gasGapId()),
l1(pad1->gasGapId()),
l2(pad2->gasGapId());
46 EtaPhiHalf
pos(-999,-999);
47 EtaPhi posA(-999,-999), posB(-999,-999);
49 posA = EtaPhi(pad0->padEtaId(), pad0->padPhiId());
50 posB = EtaPhi(pad1->padEtaId(), pad1->padPhiId());
53 posA = EtaPhi(pad0->padEtaId(), pad0->padPhiId());
54 posB = EtaPhi(pad2->padEtaId(), pad2->padPhiId());
57 posA = EtaPhi(pad1->padEtaId(), pad1->padPhiId());
58 posB = EtaPhi(pad0->padEtaId(), pad0->padPhiId());
62 pos.ieta = ((posA.ieta==posB.ieta) ? (posA.ieta * 2) : (posA.ieta * 2 + 1));
63 pos.iphi = ((posA.iphi==posB.iphi) ? (posA.iphi * 2) : (posA.iphi * 2 + 1));
65 pos.ieta = pad0->padEtaId()+pad2->padEtaId() -1;
67 if(pad0->sectorType()==1 && pad0->moduleId()==1)
pos.ieta +=1;
68 if(pad0->sectorType()==0 && pad0->moduleId()!=1)
pos.ieta +=1;
◆ is3outOf4Layers()
bool NSWL1::SingleWedgePadTrigger::is3outOf4Layers |
( |
| ) |
const |
|
inline |
◆ is4outOf4Layers()
bool NSWL1::SingleWedgePadTrigger::is4outOf4Layers |
( |
| ) |
const |
|
inline |
◆ isInTransitionRegion()
bool NSWL1::SingleWedgePadTrigger::isInTransitionRegion |
( |
const std::pair< double, double > & |
Zratio | ) |
const |
determine whether we are in the transition region
The current implementation relies on the information from the first pad DG In the future, we might want to use some geometric pad info (center?)...good enough for now
Definition at line 80 of file SingleWedgePadTrigger.cxx.
82 if(
area(ROI)==0)
return false;
88 auto vector = ROOT::Math::DisplacementVector2D<ROOT::Math::Cartesian2D<float>>(ROIx,ROIy);
92 float TransitonSmall[7] ={2104,2243,3248,3445,4216,4411,ROILocalY};
93 float TransitonLarge[7] ={2144,2278,3294,3483,4406,4596,ROILocalY};
94 if(
m_pads[0]->multipletId()==2){
95 for(
int i= 0;
i<6;
i++){
96 TransitonSmall[
i] = TransitonSmall[
i]*Zratio.second;
97 TransitonLarge[
i] = TransitonLarge[
i]*Zratio.first;
102 std::sort(TransitonSmall, TransitonSmall + 7);
103 if(TransitonSmall[1]==ROILocalY || TransitonSmall[3]==ROILocalY || TransitonSmall[5]==ROILocalY)
return true;
106 std::sort(TransitonLarge, TransitonLarge + 7);
107 if(TransitonLarge[1]==ROILocalY || TransitonLarge[3]==ROILocalY || TransitonLarge[5]==ROILocalY)
return true;
◆ isLargeSector()
bool NSWL1::SingleWedgePadTrigger::isLargeSector |
( |
| ) |
const |
|
inline |
◆ isSmallSector()
bool NSWL1::SingleWedgePadTrigger::isSmallSector |
( |
| ) |
const |
use the first pad to determine whether it's a small/large sector
Definition at line 72 of file SingleWedgePadTrigger.cxx.
73 const std::shared_ptr<PadOfflineData> &firstPad =
m_pads[0];
74 bool isEven = (firstPad->sectorType())==0;
◆ padIndices()
const std::vector<size_t>& NSWL1::SingleWedgePadTrigger::padIndices |
( |
| ) |
const |
|
inline |
◆ padOverlap3()
area that is overlapping between the pads that cause the trigger (pads are staggered)
Definition at line 113 of file SingleWedgePadTrigger.cxx.
114 size_t nPads(
pads.size());
115 bool haveEnoughPads(nPads>2);
116 if(not haveEnoughPads){
117 std::cerr<<
"SingleWedgePadTrigger::halfPadCoordinates: need at least 3 pads"<<std::endl;
119 assert(haveEnoughPads);
120 const std::shared_ptr<PadOfflineData> &pad0=
pads[0], &pad1=
pads[1], &pad2=
pads[2];
121 int l0(pad0->gasGapId()),
l1(pad1->gasGapId()),
l2(pad2->gasGapId());
126 bool validLayerCombination(hasL1L2 || hasL1L4 || hasL2L3);
129 assert(validLayerCombination);
130 (void) validLayerCombination;
134 std::vector<Polygon> projected_pads;
139 constexpr std::array<int,4> vertexordering={0,1,3,2};
141 float Zproj=
pads[0]->m_cornerXyz[1][2];
142 for(
const auto& pad :
pads){
144 for(
unsigned int i=0;
i<4;
i++){
145 int icorner=vertexordering[
i];
146 float x=pad->m_cornerXyz[icorner][0];
147 float y=pad->m_cornerXyz[icorner][1];
151 projected_pads.push_back(
Project(padPolygon,pad->m_cornerXyz[2][2],Zproj));
◆ pads()
const std::vector<std::shared_ptr<PadOfflineData> >& NSWL1::SingleWedgePadTrigger::pads |
( |
| ) |
const |
|
inline |
◆ pattern()
const std::string& NSWL1::SingleWedgePadTrigger::pattern |
( |
| ) |
const |
|
inline |
◆ setCombined()
◆ m_alreadyCombined
bool NSWL1::SingleWedgePadTrigger::m_alreadyCombined |
|
private |
flag to keep track of whether this has already been combined w/ another wedge
Definition at line 78 of file SingleWedgePadTrigger.h.
◆ m_halfPadIndices
EtaPhiHalf NSWL1::SingleWedgePadTrigger::m_halfPadIndices |
|
private |
◆ m_padIndices
std::vector<size_t> NSWL1::SingleWedgePadTrigger::m_padIndices |
|
private |
◆ m_pads
std::vector<std::shared_ptr<PadOfflineData> > NSWL1::SingleWedgePadTrigger::m_pads |
|
private |
◆ m_pattern
std::string NSWL1::SingleWedgePadTrigger::m_pattern |
|
private |
The documentation for this class was generated from the following files:
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.