36 #include "TLorentzVector.h"
263 name =
"EECLT BC energy";
267 name =
"EECLT BC number";
271 name =
"EECLT BC size";
275 name =
"EECLT BC energy map EE +";
276 meBCEneFwdMap_ =
dqmStore_->
bookProfile2D(name, name, 20, -150., 150., 20, -150., 150., 100, 0., 500.,
"s");
280 name =
"EECLT BC number map EE +";
285 name =
"EECLT BC ET map EE +";
286 meBCETFwdMap_ =
dqmStore_->
bookProfile2D(name, name, 20, -150., 150., 20, -150., 150., 100, 0., 500.,
"s");
290 name =
"EECLT BC size map EE +";
291 meBCSizFwdMap_ =
dqmStore_->
bookProfile2D(name, name, 20, -150., 150., 20, -150., 150., 100, 0., 100.,
"s");
295 name =
"EECLT BC energy projection eta EE +";
300 name =
"EECLT BC energy projection phi EE +";
305 name =
"EECLT BC number projection eta EE +";
310 name =
"EECLT BC number projection phi EE +";
315 name =
"EECLT BC ET projection eta EE +";
320 name =
"EECLT BC ET projection phi EE +";
325 name =
"EECLT BC size projection eta EE +";
330 name =
"EECLT BC size projection phi EE +";
335 name =
"EECLT BC energy map EE -";
336 meBCEneBwdMap_ =
dqmStore_->
bookProfile2D(name, name, 20, -150., 150., 20, -150., 150., 100, 0., 500.,
"s");
340 name =
"EECLT BC number map EE -";
345 name =
"EECLT BC ET map EE -";
346 meBCETBwdMap_ =
dqmStore_->
bookProfile2D(name, name, 20, -150., 150., 20, -150., 150., 100, 0., 500.,
"s");
350 name =
"EECLT BC size map EE -";
351 meBCSizBwdMap_ =
dqmStore_->
bookProfile2D(name, name, 20, -150., 150., 20, -150., 150., 100, 0., 100.,
"s");
355 name =
"EECLT BC energy projection eta EE -";
360 name =
"EECLT BC energy projection phi EE -";
365 name =
"EECLT BC number projection eta EE -";
370 name =
"EECLT BC number projection phi EE -";
375 name =
"EECLT BC ET projection eta EE -";
380 name =
"EECLT BC ET projection phi EE -";
385 name =
"EECLT BC size projection eta EE -";
390 name =
"EECLT BC size projection phi EE -";
395 name =
"EECLT SC energy";
399 name =
"EECLT SC number";
403 name =
"EECLT SC size";
407 name =
"EECLT SC size (crystal)";
411 name =
"EECLT SC seed crystal energy";
415 name =
"EECLT SC e2";
419 name =
"EECLT SC energy vs seed crystal energy";
424 name =
"EECLT SC energy (low scale)";
428 name =
"EECLT SC seed occupancy map EE -";
433 name =
"EECLT SC seed occupancy map EE +";
438 name =
"EECLT SC single crystal cluster seed occupancy map EE -";
443 name =
"EECLT SC single crystal cluster seed occupancy map EE +";
452 name =
"EECLT s1s9 thr";
456 name =
"EECLT s9s25";
460 name =
"EECLT dicluster invariant mass Pi0";
464 name =
"EECLT dicluster invariant mass JPsi";
468 name =
"EECLT dicluster invariant mass Z0";
472 name =
"EECLT dicluster invariant mass high";
476 name =
"EECLT dicluster invariant mass Pi0 sel";
480 name =
"EECLT dicluster invariant mass JPsi sel";
484 name =
"EECLT dicluster invariant mass Z0 sel";
488 name =
"EECLT dicluster invariant mass high sel";
498 if ( !
init_ )
return;
696 edm::LogWarning(
"EEClusterTask") <<
"EcalRawDataCollection not available";
700 if ( ! enable )
return;
719 edm::LogWarning(
"EEClusterTask") <<
"RecHit collection not available.";
724 std::vector<reco::CaloCluster const*> bcSel;
730 int nbcc = pBasicClusters->size();
738 if ( bCluster->eta() > 0 ) {
747 meBCETFwdMap_->
Fill(bCluster->x(), bCluster->y(), bCluster->energy() *
sin(bCluster->position().theta()) );
763 meBCETBwdMap_->
Fill(bCluster->x(), bCluster->y(), bCluster->energy() *
sin(bCluster->position().theta()) );
771 float e2x2 = EcalClusterTools::e2x2( *bCluster, eeRecHits, topology );
772 float e3x3 = EcalClusterTools::e3x3( *bCluster, eeRecHits, topology );
775 float pt =
std::abs( bCluster->energy()*
sin(bCluster->position().theta()) );
787 for ( std::vector<reco::CaloCluster const*>::const_iterator bc1 = bcSel.begin(); bc1 != bcSel.end(); ++bc1 ) {
789 bc1P.SetPtEtaPhiE(
std::abs((*bc1)->energy()*
sin((*bc1)->position().theta())),
790 (*bc1)->eta(), (*bc1)->phi(), (*bc1)->energy());
791 for ( std::vector<reco::CaloCluster const*>::const_iterator bc2 = bc1+1; bc2 != bcSel.end(); ++bc2 ) {
793 bc2P.SetPtEtaPhiE(
std::abs((*bc2)->energy()*
sin((*bc2)->position().theta())),
794 (*bc2)->eta(), (*bc2)->phi(), (*bc2)->energy());
796 TLorentzVector candP = bc1P + bc2P;
799 float mass = candP.M();
800 if ( mass < 0.500 ) {
802 }
else if ( mass > 2.9 && mass < 3.3 ) {
804 }
else if ( mass > 40 && mass < 110 ) {
806 }
else if ( mass > 110 ) {
819 int nscc = pSuperClusters->size();
822 TLorentzVector sc1_p(0,0,0,0);
823 TLorentzVector sc2_p(0,0,0,0);
827 for ( reco::SuperClusterCollection::const_iterator sCluster = pSuperClusters->begin(); sCluster != pSuperClusters->end(); sCluster++ ) {
836 std::vector< std::pair<DetId,float> > sIds = sCluster->hitsAndFractions();
842 for(std::vector< std::pair<DetId,float> >::const_iterator idItr = sIds.begin(); idItr != sIds.end(); ++idItr) {
843 DetId id = idItr->first;
846 if(hitItr == eeRecHits->
end()) {
continue; }
847 if(hitItr->energy() > secondItr->energy()) { secondItr = hitItr; }
848 if(hitItr->energy() > seedItr->energy()) {
std::swap(seedItr,secondItr); }
851 eMax = seedItr->energy();
852 e2nd = secondItr->energy();
855 float e3x3 = EcalClusterTools::e3x3( *theSeed, eeRecHits, topology );
856 float e5x5 = EcalClusterTools::e5x5( *theSeed, eeRecHits, topology );
867 if( ism >= 1 && ism <= 9)
871 int eex = seedId.
ix();
872 int eey = seedId.
iy();
873 float xeex = eex - 0.5;
874 float xeey = eey - 0.5;
885 if ( sCluster->energy() > sc1_p.Energy() ) {
887 sc1_p.SetPtEtaPhiE(sCluster->energy()*
sin(sCluster->position().theta()),
888 sCluster->eta(), sCluster->phi(), sCluster->energy());
889 }
else if ( sCluster->energy() > sc2_p.Energy() ) {
890 sc2_p.SetPtEtaPhiE(sCluster->energy()*
sin(sCluster->position().theta()),
891 sCluster->eta(), sCluster->phi(), sCluster->energy());
897 TLorentzVector sum = sc1_p+sc2_p;
898 float mass = sum.M();
899 if ( mass < 0.500 ) {
901 }
else if ( mass > 2.9 && mass < 3.3 ) {
903 }
else if ( mass > 40 && mass < 110 ) {
905 }
else if ( mass > 110 ) {
MonitorElement * meBCETFwdMap_
edm::EDGetTokenT< EcalRawDataCollection > EcalRawDataCollection_
MonitorElement * mes9s25_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
MonitorElement * meBCETBwdMapProjEta_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void rmdir(const std::string &fullpath)
MonitorElement * meBCNum_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Some "id" conversions.
MonitorElement * meBCNumFwdMap_
MonitorElement * meInvMassPi0_
MonitorElement * meInvMassHigh_
void beginJob(void)
BeginJob.
Sin< T >::type sin(const T &t)
std::vector< EcalDCCHeaderBlock >::const_iterator const_iterator
MonitorElement * meBCEneBwdMap_
MonitorElement * meBCSizFwdMapProjEta_
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
void cleanup(void)
Cleanup.
EEClusterTask(const edm::ParameterSet &ps)
Constructor.
MonitorElement * meSCNum_
MonitorElement * meBCNumBwdMapProjPhi_
MonitorElement * meBCETBwdMapProjPhi_
MonitorElement * meBCEneFwdMapProjPhi_
MonitorElement * meBCEneFwdMapProjEta_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
MonitorElement * meBCNumFwdMapProjPhi_
MonitorElement * meBCNumBwdMapProjEta_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
MonitorElement * meInvMassZ0Sel_
MonitorElement * meBCEneBwdMapProjEta_
void removeElement(const std::string &name)
MonitorElement * meBCSizBwdMap_
MonitorElement * meBCEneBwdMapProjPhi_
Abs< T >::type abs(const T &t)
MonitorElement * meInvMassJPsiSel_
MonitorElement * meBCSizFwdMapProjPhi_
MonitorElement * meBCETFwdMapProjPhi_
MonitorElement * meBCSiz_
MonitorElement * meBCNumFwdMapProjEta_
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
edm::EDGetTokenT< EcalRecHitCollection > EcalRecHitCollection_
MonitorElement * meSCEneVsEMax_
MonitorElement * meSCSiz_
MonitorElement * meBCSizFwdMap_
MonitorElement * meSCEne_
MonitorElement * meSCMapSingleCrystal_[2]
MonitorElement * meSCSeedEne_
MonitorElement * meInvMassJPsi_
MonitorElement * meBCETFwdMapProjEta_
MonitorElement * meSCEneLowScale_
const_iterator end() const
MonitorElement * meSCCrystalSiz_
MonitorElement * meBCNumBwdMap_
MonitorElement * meBCSizBwdMapProjPhi_
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
MonitorElement * meInvMassPi0Sel_
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
T const * product() const
MonitorElement * meBCEneFwdMap_
T const * product() const
MonitorElement * meSCSeedMapOcc_[2]
iterator find(key_type k)
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
edm::EDGetTokenT< reco::SuperClusterCollection > SuperClusterCollection_
MonitorElement * meBCEne_
static EcalSubdetector subDet(const EBDetId &id)
MonitorElement * meBCETBwdMap_
MonitorElement * meSCEne2_
MonitorElement * meInvMassHighSel_
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
edm::EDGetTokenT< edm::View< reco::CaloCluster > > BasicClusterCollection_
int ism(int ieta, int iphi)
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)
void setCurrentFolder(const std::string &fullpath)
const_iterator begin() const
virtual ~EEClusterTask()
Destructor.
MonitorElement * mes1s9thr_
MonitorElement * meInvMassZ0_
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")
MonitorElement * meBCSizBwdMapProjEta_