37 #include "TLorentzVector.h"
221 name =
"EBCLT BC energy";
225 name =
"EBCLT BC number";
229 name =
"EBCLT BC size";
233 name =
"EBCLT BC energy map";
234 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");
238 name =
"EBCLT BC number map";
243 name =
"EBCLT BC ET map";
244 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");
248 name =
"EBCLT BC size map";
249 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");
253 name =
"EBCLT BC energy projection eta";
258 name =
"EBCLT BC energy projection phi";
263 name =
"EBCLT BC number projection eta";
268 name =
"EBCLT BC number projection phi";
273 name =
"EBCLT BC ET projection eta";
278 name =
"EBCLT BC ET projection phi";
283 name =
"EBCLT BC size projection eta";
288 name =
"EBCLT BC size projection phi";
293 name =
"EBCLT SC energy";
297 name =
"EBCLT SC number";
301 name =
"EBCLT SC size";
305 name =
"EBCLT SC size (crystal)";
309 name =
"EBCLT SC seed crystal energy";
313 name =
"EBCLT SC e2";
317 name =
"EBCLT SC energy vs seed crystal energy";
322 name =
"EBCLT SC energy (low scale)";
326 name =
"EBCLT SC seed occupancy map";
331 name =
"EBCLT SC single crystal cluster seed occupancy map";
340 name =
"EBCLT s1s9 thr";
344 name =
"EBCLT s9s25";
348 name =
"EBCLT dicluster invariant mass Pi0";
352 name =
"EBCLT dicluster invariant mass JPsi";
356 name =
"EBCLT dicluster invariant mass Z0";
360 name =
"EBCLT dicluster invariant mass high";
364 name =
"EBCLT dicluster invariant mass Pi0 sel";
368 name =
"EBCLT dicluster invariant mass JPsi sel";
372 name =
"EBCLT dicluster invariant mass Z0 sel";
376 name =
"EBCLT dicluster invariant mass high sel";
386 if ( !
init_ )
return;
542 edm::LogWarning(
"EBClusterTask") <<
"EcalRawDataCollection not available";
546 if ( ! enable )
return;
565 edm::LogWarning(
"EBClusterTask") <<
"RecHit collection not available.";
570 std::vector<reco::CaloCluster const*> bcSel;
576 int nbcc = pBasicClusters->size();
584 float xphi = bCluster->phi();
585 if ( xphi >
M_PI*(9-1.5)/9 ) xphi = xphi -
M_PI*2;
599 meBCETMap_->
Fill(xphi, bCluster->eta(), float(bCluster->energy()) *
sin(bCluster->position().theta()));
607 float pt =
std::abs( bCluster->energy()*
sin(bCluster->position().theta()) );
615 for ( std::vector<reco::CaloCluster const*>::const_iterator bc1 = bcSel.begin(); bc1 != bcSel.end(); ++bc1 ) {
617 bc1P.SetPtEtaPhiE(
std::abs((*bc1)->energy()*
sin((*bc1)->position().theta())),
618 (*bc1)->eta(), (*bc1)->phi(), (*bc1)->energy());
619 for ( std::vector<reco::CaloCluster const*>::const_iterator bc2 = bc1+1; bc2 != bcSel.end(); ++bc2 ) {
621 bc2P.SetPtEtaPhiE(
std::abs((*bc2)->energy()*
sin((*bc2)->position().theta())),
622 (*bc2)->eta(), (*bc2)->phi(), (*bc2)->energy());
624 TLorentzVector candP = bc1P + bc2P;
627 float mass = candP.M();
628 if ( mass < 0.500 ) {
630 }
else if ( mass > 2.9 && mass < 3.3 ) {
632 }
else if ( mass > 40 && mass < 110 ) {
634 }
else if ( mass > 110 ) {
647 int nscc = pSuperClusters->size();
650 TLorentzVector sc1_p(0,0,0,0);
651 TLorentzVector sc2_p(0,0,0,0);
653 for ( reco::SuperClusterCollection::const_iterator sCluster = pSuperClusters->begin(); sCluster != pSuperClusters->end(); ++sCluster ) {
662 std::vector< std::pair<DetId,float> > sIds = sCluster->hitsAndFractions();
668 for(std::vector< std::pair<DetId,float> >::const_iterator idItr = sIds.begin(); idItr != sIds.end(); ++idItr) {
669 DetId id = idItr->first;
672 if(hitItr == ebRecHits->
end()) {
continue; }
673 if(hitItr->energy() > secondItr->energy()) { secondItr = hitItr; }
674 if(hitItr->energy() > seedItr->energy()) {
std::swap(seedItr,secondItr); }
677 eMax = seedItr->energy();
678 e2nd = secondItr->energy();
691 int ebeta = seedId.
ieta();
692 int ebphi = seedId.
iphi();
693 float xebeta = ebeta - 0.5 * seedId.
zside();
694 float xebphi = ebphi - 0.5;
706 if ( sCluster->energy() > sc1_p.Energy() ) {
708 sc1_p.SetPtEtaPhiE(
std::abs(sCluster->energy()*
sin(sCluster->position().theta())),
709 sCluster->eta(), sCluster->phi(), sCluster->energy());
710 }
else if ( sCluster->energy() > sc2_p.Energy() ) {
711 sc2_p.SetPtEtaPhiE(
std::abs(sCluster->energy()*
sin(sCluster->position().theta())),
712 sCluster->eta(), sCluster->phi(), sCluster->energy());
719 TLorentzVector sum = sc1_p+sc2_p;
720 float mass = sum.M();
721 if ( mass < 0.500 ) {
723 }
else if ( mass > 2.9 && mass < 3.3 ) {
725 }
else if ( mass > 40 && mass < 110 ) {
727 }
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
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
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)
edm::EDGetTokenT< reco::SuperClusterCollection > SuperClusterCollection_
MonitorElement * meBCSiz_
MonitorElement * meBCSizMapProjEta_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * meInvMassPi0Sel_
Some "id" conversions.
MonitorElement * mes9s25_
Sin< T >::type sin(const T &t)
std::vector< EcalDCCHeaderBlock >::const_iterator const_iterator
MonitorElement * mes1s9thr_
MonitorElement * meSCEne_
MonitorElement * meBCEneMap_
MonitorElement * meSCCrystalSiz_
MonitorElement * meBCEneMapProjEta_
edm::EDGetTokenT< EcalRawDataCollection > EcalRawDataCollection_
MonitorElement * meInvMassJPsiSel_
MonitorElement * meInvMassZ0_
int iphi() const
get the crystal iphi
MonitorElement * meSCNum_
MonitorElement * meInvMassPi0_
MonitorElement * meBCSizMapProjPhi_
EBClusterTask(const edm::ParameterSet &ps)
Constructor.
MonitorElement * meBCEne_
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
MonitorElement * meSCSeedMapOcc_
void removeElement(const std::string &name)
Abs< T >::type abs(const T &t)
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_
edm::EDGetTokenT< edm::View< reco::CaloCluster > > BasicClusterCollection_
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
edm::EDGetTokenT< EcalRecHitCollection > EcalRecHitCollection_
T const * product() const
MonitorElement * meSCEne2_
MonitorElement * meBCNum_
iterator find(key_type k)
MonitorElement * meBCETMapProjEta_
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")