30 hist[
i][0]->
Fill(phi);
31 if( hist[
i][1] !=
nullptr) hist[
i][1]->
Fill(phi);
34 hist[
i][0]->
Fill(phi);
35 if( hist[
i][2] !=
nullptr) hist[
i][2]->
Fill(phi);
44 if ( array[
i][0] ) hist[0][
i]->
Fill(value);
45 if ( array[i][1] ) hist[1][
i]->
Fill(value);
46 if ( array[i][0] || array[i][1] ) hist[2][
i]->
Fill(value);
47 if ( array[i][0] && array[i][1] ) hist[3][
i]->
Fill(value);
58 hist[0][
i][0]->
Fill(phi);
59 if ( hist[0][i][1] !=
nullptr) hist[0][
i][1]->
Fill(phi);
62 hist[1][
i][0]->
Fill(phi);
63 if( hist[1][i][1] !=
nullptr ) hist[1][
i][1]->
Fill(phi);
65 if ( array[i][0] || array[i][1] ) {
66 hist[2][
i][0]->
Fill(phi);
67 if ( hist[2][i][1] !=
nullptr) hist[2][
i][1]->
Fill(phi);
69 if ( array[i][0] && array[i][1] ) {
70 hist[3][
i][0]->
Fill(phi);
71 if ( hist[3][i][1] !=
nullptr) hist[3][
i][1]->
Fill(phi);
76 hist[0][
i][0]->
Fill(phi);
77 if ( hist[0][i][2]!=
nullptr) hist[0][
i][2]->
Fill(phi);
80 hist[1][
i][0]->
Fill(phi);
81 if( hist[1][i][2]!=
nullptr ) hist[1][
i][2]->
Fill(phi);
83 if ( array[i][0] || array[i][1] ) {
84 hist[2][
i][0]->
Fill(phi);
85 if( hist[2][i][2]!=
nullptr) hist[2][
i][2]->
Fill(phi);
87 if ( array[i][0] && array[i][1] ) {
88 hist[3][
i][0]->
Fill(phi);
89 if( hist[3][i][2]!=
nullptr) hist[3][
i][2]->
Fill(phi);
99 auto& ch =
gem_geom_->
regions()[0]->stations()[station-1]->rings()[0]->superChambers()[chamber-1]->chambers()[0];
100 auto& roll1 = ch->etaPartitions()[0];
101 auto& roll2 = ch->etaPartitions()[ch->nEtaPartitions()-1];
102 const BoundPlane& bSurface1(roll1->surface());
103 const BoundPlane& bSurface2(roll2->surface());
104 auto& parameters1( roll1->specs()->parameters());
105 float height1(parameters1[2]);
106 auto& parameters2( roll2->specs()->parameters());
107 float height2(parameters2[2]);
115 GlobalPoint gBottom2(bSurface2.toGlobal(lBottom2));
116 double eta1 = fabs(gTop1.eta()) - 0.01;
117 double eta2 = fabs(gBottom2.eta()) + 0.01;
118 return std::make_pair(eta1,eta2);
120 else {
std::cout<<
"Failed to get geometry information"<<std::endl;
121 return std::make_pair(0,0);
143 edm::LogInfo(
"GEMTrackMatch")<<
"max chamber "<<maxChamberId<<
"\n";
145 std::vector<int> pos_ids;
148 std::vector<int> neg_ids;
153 std::vector<float> phis;
155 for(
int i=1;
i<maxChamberId+1; ++
i)
159 phis.push_back(
i*10.);
169 bool isEvenOK =
true;
174 if ( !isEvenOK || !isOddOK)
useRoll_=2;
180 const float bottom_half_striplength = bottom_chamber->specs()->specificTopology().stripLength()/2.;
181 const LocalPoint lp_top(0., top_half_striplength, 0.);
182 const LocalPoint lp_bottom(0., -bottom_half_striplength, 0.);
183 const GlobalPoint gp_top = top_chamber->toGlobal(lp_top);
184 const GlobalPoint gp_bottom = bottom_chamber->toGlobal(lp_bottom);
189 const int maxChamberId = geom.
regions()[0]->stations()[0]->superChambers().size();
197 auto upper = std::upper_bound(phis.begin(), phis.end(),
phi);
199 return std::make_pair(LUT.at(
upper - phis.begin()), (LUT.at((
upper - phis.begin() + 1)%maxChamberId)));
204 std::pair<double, double> range;
T getUntrackedParameter(std::string const &, T const &) const
virtual float stripLength() const =0
void buildLUT(const int maxChamberId)
std::pair< std::vector< float >, std::vector< int > > negativeLUT_
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a GEMEtaPartition given its id.
std::vector< double > etaRangeForPhi
U second(std::pair< T, U > const &p)
void setGeometry(const GEMGeometry &geom)
virtual const GeomDetUnit * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const std::vector< const GEMRegion * > & regions() const
Return a vector of all GEM regions.
GEMTrackMatch(const edm::ParameterSet &cfg)
Abs< T >::type abs(const T &t)
std::pair< double, double > getEtaRange(int station, int chamber)
const GEMChamber * chamber(GEMDetId id) const
void FillWithTrigger(MonitorElement *me[3], Float_t eta)
int type() const
particle type (HEP PDT convension)
const GEMGeometry * gem_geom_
std::pair< int, int > getClosestChambers(const int maxChamberId, int region, float phi)
int nEtaPartitions() const
Retunr numbers of eta partitions.
const math::XYZTLorentzVectorD & momentum() const
std::pair< std::vector< float >, std::vector< int > > positiveLUT_
bool isSimTrackGood(const SimTrack &)
std::pair< double, double > getEtaRangeForPhi(int station)
std::vector< unsigned short int > LUT