24 for (
unsigned int icry=0;icry<25;icry++)
26 unsigned int row = icry / 5;
27 unsigned int column= icry %5;
30 int curr_eta=maxHitId.
ieta() + column - (5/2);
31 int curr_phi=maxHitId.
iphi() + row - (5/2);
33 if (curr_eta * maxHitId.
ieta() <= 0) {
if (maxHitId.
ieta() > 0) curr_eta--;
else curr_eta++; }
34 if (curr_phi < 1) curr_phi += 360;
35 if (curr_phi > 360) curr_phi -= 360;
44 std::cout <<
"Cannot construct 5x5 matrix around EBDetId " << maxHitId << std::endl;
57 for (
unsigned int icry=0;icry<9;icry++)
59 unsigned int row = icry / 3;
60 unsigned int column= icry %3;
69 std::cout <<
"Cannot construct 3x3 matrix around EBDetId " << maxHitId << std::endl;
82 int rowSize=maxEta-minEta+1;
83 int columnSize=maxPhi-minPhi+1;
84 int reducedSize=rowSize*columnSize;
87 for (
int icry=0;icry<reducedSize;icry++)
89 unsigned int eta = minEta + icry/columnSize;
90 unsigned int phi = minPhi + icry%columnSize;
99 std::cout <<
"Cannot construct full matrix !!! " << std::endl;
111 hits,
CalibMap & ReducedMap, std::vector<EBDetId> & XstalsNxN,
float & outBoundEnergy,
int & nXtalsOut){
113 energyVector.clear();
114 std::vector<EBDetId>::iterator it;
118 energyVector.resize(ReducedMap.size(),0.);
122 for(it=XstalsNxN.begin();it!=XstalsNxN.end();++it)
124 if(ReducedMap.find(*it) != ReducedMap.end()){
125 CalibMap::iterator it2 = ReducedMap.find(*it);
127 int icry = it2->second;
129 energyVector[icry]=(hits->
find(*it))->
energy();
CalibMap::value_type pippo
CalibMap getMap(int, int, int, int)
int iphi() const
get the crystal iphi
std::vector< float > getEnergyVector(const EBRecHitCollection *, CalibMap &, std::vector< EBDetId > &, float &, int &)
int ieta() const
get the crystal ieta
static const int ETAPHIMODE
std::vector< EBDetId > get3x3Id(EBDetId const &)
std::map< EBDetId, unsigned int > CalibMap
iterator find(key_type k)
std::vector< EBDetId > get5x5Id(EBDetId const &)