42 #include "TLorentzVector.h"
226 name =
"EBCLT BC energy";
230 name =
"EBCLT BC number";
234 name =
"EBCLT BC size";
238 name =
"EBCLT BC energy map";
239 meBCEneMap_ =
dqmStore_->
bookProfile2D(name, name, 72, -
M_PI*(9+1.5)/9,
M_PI*(9-1.5)/9, 34, -1.479, 1.479, 100, 0., 500.,
"s");
243 name =
"EBCLT BC number map";
248 name =
"EBCLT BC ET map";
249 meBCETMap_ =
dqmStore_->
bookProfile2D(name, name, 72, -
M_PI*(9+1.5)/9,
M_PI*(9-1.5)/9, 34, -1.479, 1.479, 100, 0., 500.,
"s");
253 name =
"EBCLT BC size map";
254 meBCSizMap_ =
dqmStore_->
bookProfile2D(name, name, 72, -
M_PI*(9+1.5)/9,
M_PI*(9-1.5)/9, 34, -1.479, 1.479, 100, 0., 100.,
"s");
258 name =
"EBCLT BC energy projection eta";
263 name =
"EBCLT BC energy projection phi";
268 name =
"EBCLT BC number projection eta";
273 name =
"EBCLT BC number projection phi";
278 name =
"EBCLT BC ET projection eta";
283 name =
"EBCLT BC ET projection phi";
288 name =
"EBCLT BC size projection eta";
293 name =
"EBCLT BC size projection phi";
298 name =
"EBCLT SC energy";
302 name =
"EBCLT SC number";
306 name =
"EBCLT SC size";
310 name =
"EBCLT SC size (crystal)";
314 name =
"EBCLT SC seed crystal energy";
318 name =
"EBCLT SC e2";
322 name =
"EBCLT SC energy vs seed crystal energy";
327 name =
"EBCLT SC energy (low scale)";
331 name =
"EBCLT SC seed occupancy map";
336 name =
"EBCLT SC single crystal cluster seed occupancy map";
345 name =
"EBCLT s1s9 thr";
349 name =
"EBCLT s9s25";
353 name =
"EBCLT dicluster invariant mass Pi0";
357 name =
"EBCLT dicluster invariant mass JPsi";
361 name =
"EBCLT dicluster invariant mass Z0";
365 name =
"EBCLT dicluster invariant mass high";
369 name =
"EBCLT dicluster invariant mass Pi0 sel";
373 name =
"EBCLT dicluster invariant mass JPsi sel";
377 name =
"EBCLT dicluster invariant mass Z0 sel";
381 name =
"EBCLT dicluster invariant mass high sel";
391 if ( !
init_ )
return;
551 if ( ! enable )
return;
581 int nbcc = pBasicClusters->size();
584 for ( reco::BasicClusterCollection::const_iterator bCluster = pBasicClusters->begin(); bCluster != pBasicClusters->end(); ++bCluster ) {
589 float xphi = bCluster->phi();
590 if ( xphi >
M_PI*(9-1.5)/9 ) xphi = xphi -
M_PI*2;
604 meBCETMap_->
Fill(xphi, bCluster->eta(), float(bCluster->energy()) *
sin(bCluster->position().theta()));
612 float pt =
std::abs( bCluster->energy()*
sin(bCluster->position().theta()) );
620 for ( reco::BasicClusterCollection::const_iterator bc1 = bcSel.begin(); bc1 != bcSel.end(); ++bc1 ) {
622 bc1P.SetPtEtaPhiE(
std::abs(bc1->energy()*
sin(bc1->position().theta())),
623 bc1->eta(), bc1->phi(), bc1->energy());
624 for ( reco::BasicClusterCollection::const_iterator bc2 = bc1+1; bc2 != bcSel.end(); ++bc2 ) {
626 bc2P.SetPtEtaPhiE(
std::abs(bc2->energy()*
sin(bc2->position().theta())),
627 bc2->eta(), bc2->phi(), bc2->energy());
629 TLorentzVector candP = bc1P + bc2P;
632 float mass = candP.M();
633 if ( mass < 0.500 ) {
635 }
else if ( mass > 2.9 && mass < 3.3 ) {
637 }
else if ( mass > 40 && mass < 110 ) {
639 }
else if ( mass > 110 ) {
652 int nscc = pSuperClusters->size();
655 TLorentzVector sc1_p(0,0,0,0);
656 TLorentzVector sc2_p(0,0,0,0);
658 for ( reco::SuperClusterCollection::const_iterator sCluster = pSuperClusters->begin(); sCluster != pSuperClusters->end(); ++sCluster ) {
667 std::vector< std::pair<DetId,float> > sIds = sCluster->hitsAndFractions();
673 for(std::vector< std::pair<DetId,float> >::const_iterator idItr = sIds.begin(); idItr != sIds.end(); ++idItr) {
674 DetId id = idItr->first;
677 if(hitItr == ebRecHits->
end()) {
continue; }
678 if(hitItr->energy() > secondItr->energy()) { secondItr = hitItr; }
679 if(hitItr->energy() > seedItr->energy()) {
std::swap(seedItr,secondItr); }
682 eMax = seedItr->energy();
683 e2nd = secondItr->energy();
696 int ebeta = seedId.
ieta();
697 int ebphi = seedId.
iphi();
698 float xebeta = ebeta - 0.5 * seedId.
zside();
699 float xebphi = ebphi - 0.5;
711 if ( sCluster->energy() > sc1_p.Energy() ) {
713 sc1_p.SetPtEtaPhiE(
std::abs(sCluster->energy()*
sin(sCluster->position().theta())),
714 sCluster->eta(), sCluster->phi(), sCluster->energy());
715 }
else if ( sCluster->energy() > sc2_p.Energy() ) {
716 sc2_p.SetPtEtaPhiE(
std::abs(sCluster->energy()*
sin(sCluster->position().theta())),
717 sCluster->eta(), sCluster->phi(), sCluster->energy());
724 TLorentzVector sum = sc1_p+sc2_p;
725 float mass = sum.M();
726 if ( mass < 0.500 ) {
728 }
else if ( mass > 2.9 && mass < 3.3 ) {
730 }
else if ( mass > 40 && mass < 110 ) {
732 }
else if ( mass > 110 ) {
T getParameter(std::string const &) const
MonitorElement * meBCSizMap_
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
edm::InputTag EcalRawDataCollection_
MonitorElement * meBCEneMapProjPhi_
MonitorElement * meBCNumMapProjPhi_
MonitorElement * meSCSiz_
MonitorElement * meSCSeedEne_
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void rmdir(const std::string &fullpath)
MonitorElement * meBCSiz_
MonitorElement * meBCSizMapProjEta_
MonitorElement * meInvMassPi0Sel_
Some "id" conversions.
MonitorElement * mes9s25_
Sin< T >::type sin(const T &t)
std::vector< T >::const_iterator const_iterator
MonitorElement * mes1s9thr_
MonitorElement * meSCEne_
MonitorElement * meBCEneMap_
MonitorElement * meSCCrystalSiz_
MonitorElement * meBCEneMapProjEta_
MonitorElement * meInvMassJPsiSel_
MonitorElement * meInvMassZ0_
int iphi() const
get the crystal iphi
MonitorElement * meSCNum_
MonitorElement * meInvMassPi0_
MonitorElement * meBCSizMapProjPhi_
EBClusterTask(const edm::ParameterSet &ps)
Constructor.
edm::InputTag BasicClusterCollection_
MonitorElement * meBCEne_
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
MonitorElement * meSCSeedMapOcc_
void removeElement(const std::string &name)
MonitorElement * meBCETMap_
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
int ieta() const
get the crystal ieta
MonitorElement * meSCEneVsEMax_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MonitorElement * meSCEneLowScale_
MonitorElement * meSCMapSingleCrystal_
const_iterator end() const
MonitorElement * meInvMassHigh_
MonitorElement * meInvMassHighSel_
MonitorElement * meBCNumMap_
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
void beginJob(void)
BeginJob.
MonitorElement * meBCNumMapProjEta_
T const * product() const
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
T const * product() const
edm::InputTag EcalRecHitCollection_
MonitorElement * meSCEne2_
MonitorElement * meBCNum_
iterator find(key_type k)
MonitorElement * meBCETMapProjEta_
edm::InputTag SuperClusterCollection_
static EcalSubdetector subDet(const EBDetId &id)
MonitorElement * meInvMassJPsi_
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void cleanup(void)
Cleanup.
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * meInvMassZ0Sel_
void setCurrentFolder(const std::string &fullpath)
const_iterator begin() const
MonitorElement * meBCETMapProjPhi_
int zside() const
get the z-side of the crystal (1/-1)
virtual ~EBClusterTask()
Destructor.
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")