150 map<EcalTrigTowerDetId, float> mapTow_Et;
157 float Etsum=((*rechit_EB_col.
product())[
i].energy())*
sin(theta);
158 bool test_alreadyin=
false;
159 map<EcalTrigTowerDetId, float>::iterator ittest= mapTow_Et.find(towid1);
160 if (ittest!= mapTow_Et.end()) test_alreadyin=
true;
161 if (test_alreadyin)
continue;
164 unsigned int count=0;
165 while( j<rechit_EB_col.
product()->
size() && !loopend){
169 if( towid1==towid2 ) {
170 float theta=theBarrelGeometry->
getGeometry(myid2)->getPosition().theta();
171 Etsum += (*rechit_EB_col.
product())[j].energy()*
sin(theta);
174 if (count>1800) loopend=
true;
176 mapTow_Et.insert(pair<EcalTrigTowerDetId,float>(towid1, Etsum));
183 float theta=theEndcapGeometry->
getGeometry(myid1)->getPosition().theta();
184 float Etsum=(*rechit_EE_col.
product())[
i].energy()*
sin(theta);
185 bool test_alreadyin=
false;
186 map<EcalTrigTowerDetId, float>::iterator ittest= mapTow_Et.find(towid1);
187 if (ittest!= mapTow_Et.end()) test_alreadyin=
true;
188 if (test_alreadyin)
continue;
191 unsigned int count=0;
192 while( j<rechit_EE_col.
product()->
size() && !loopend){
195 if( towid1==towid2 ) {
196 float theta=theEndcapGeometry->
getGeometry(myid2)->getPosition().theta();
197 Etsum += (*rechit_EE_col.
product())[j].energy()*
sin(theta);
201 if (count>500) loopend=
true;
204 mapTow_Et.insert(pair<EcalTrigTowerDetId,float>(towid1, Etsum));
213 map<EcalTrigTowerDetId, float>::iterator it= mapTow_Et.find(TPtowid);
222 if (it!= mapTow_Et.end()) {
void setEventSetup(const edm::EventSetup &evtSetup)
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
double getTPGInGeV(const EcalTriggerPrimitiveDigi &tpDigi)
int ieta() const
get the tower ieta
int compressedEt() const
get the encoded/compressed Et of interesting sample
int ietaAbs() const
get the absolute value of the tower ieta
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
int iphi() const
get the tower iphi
const EcalTrigTowerDetId & id() const
T const * product() const
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
edm::InputTag rechits_labelEE_
edm::InputTag rechits_labelEB_
EcalSubdetector subDet() const
get the subDetector associated to the Trigger Tower
bool fineGrain() const
get the fine-grain bit of interesting sample
int ttFlag() const
get the Trigger tower Flag of interesting sample
T const * product() const