19 std::cout<<
"CastorRecHitMonitor Constructor: "<<
this<<std::endl;
32 std::cout<<
"CastorRecHitMonitor::bookHistograms"<<std::endl;
39 double E0sec = 1./1024.;
40 ySec[0] = 0.; ySec[1] = E0sec;
41 double lnBsec =
log(2.);
42 for(
int j=1; j<nySec; j++) ySec[j+1] = E0sec*
exp(j*lnBsec);
43 for(
int i=0;
i<=N_Sec;
i++) xSec[
i]=
i;
45 sprintf(s,
"CastorRecHit by Sectors");
56 for(
int i=0;
i<=nxCh;
i++) xCh[
i]=
i;
59 yErh[0] = 0.; yErh[1] = E0;
60 for(
int j=1; j<nyE; j++) yErh[j+1] = E0*
exp(j*lnA);
62 sprintf(s,
"CastorTileRecHit");
68 sprintf(s,
"Reco all tiles");
72 sprintf(s,
"CastorRecHitMap(cumulative)");
78 sprintf(s,
"CastorRecHitOccMap");
84 sprintf(s,
"CastorRecHitEntriesMap");
90 sprintf(s,
"CastorRecHitTime");
93 sprintf(s,
"CASTORTowerDepth");
97 sprintf(s,
"CASTORTowerMultiplicity");
100 const int NEtow = 20;
101 float EhadTow[NEtow+1];
102 float EMTow[NEtow+1];
103 float ETower[NEtow+2];
104 double E0tow = 1./1024.;
105 EMTow[0] = 0.; EMTow[1] = E0tow;
106 EhadTow[0] = 0.; EhadTow[1] = E0tow;
107 ETower[0] = 0.; ETower[1] = E0tow;
108 double lnBtow =
log(2.);
109 for(
int j=1; j<NEtow; j++) EMTow[j+1] = E0tow*
exp(j*lnBtow);
110 for(
int j=1; j<NEtow; j++) EhadTow[j+1] = E0tow*
exp(j*lnBtow);
111 for(
int j=1; j<=NEtow; j++) ETower[j+1] = E0tow*
exp(j*lnBtow);
113 sprintf(s,
"CASTORTowerEMvsEhad");
119 sprintf(s,
"CASTORTowerTotalEnergy");
123 sprintf(s,
"CASTORJetsMultiplicity");
126 sprintf(s,
"CASTORJetEnergy");
129 sprintf(s,
"CASTORJetEta");
132 sprintf(s,
"CASTORJetPhi");
136 std::cout<<
"CastorRecHitMonitor::bookHistograms(end)"<<std::endl;
143 if(castorTowers.empty())
return;
146 for(reco::CastorTowerCollection::const_iterator iTower= castorTowers.begin();
147 iTower!= castorTowers.end(); iTower++) {
167 if(castorHits.
empty())
return;
172 for(CASTORiter=castorHits.
begin(); CASTORiter!=castorHits.
end(); ++CASTORiter)
174 float energy = CASTORiter->energy();
175 float time = CASTORiter->time();
177 if(time < -100.) time2 = -100.;
183 int sector = (
int)
id.sector();
193 for (
int z=0;
z<14;
z++) {
195 int ind =
phi*14 +
z +1;
198 if(rh < 0.)
continue;
208 for(
int sec=1; sec<=16;sec++) {
220 for(reco::BasicJetCollection::const_iterator ibegin = Jets.begin(),
221 iend = Jets.end(), ijet = ibegin; ijet!= iend; ++ijet) {
223 float energy = ijet->energy()*0.001;
T getUntrackedParameter(std::string const &, T const &) const
float energyInEachChannel[14][16]
std::vector< CastorRecHit >::const_iterator const_iterator
MonitorElement * h2RHvsSec
MonitorElement * h2RHentriesMap
void processEventJets(const reco::BasicJetCollection &Jets)
MonitorElement * hJetEnergy
MonitorElement * hJetsMultipl
std::string subsystemname
CastorRecHitMonitor(const edm::ParameterSet &ps)
MonitorElement * book1D(Args &&...args)
MonitorElement * hTowerDepth
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
const_iterator end() const
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
MonitorElement * h2RHoccmap
TH1F * getTH1F(void) const
void processEventTowers(const reco::CastorTowerCollection &castorTowers)
MonitorElement * h2TowerEMhad
MonitorElement * hallchan
void processEvent(const CastorRecHitCollection &castorHits)
MonitorElement * h2RHchan
TH2F * getTH2F(void) const
T mod(const T &a, const T &b)
std::vector< CastorTower > CastorTowerCollection
collection of CastorTower objects
const_iterator begin() const
std::vector< BasicJet > BasicJetCollection
collection of BasicJet objects
MonitorElement * hTowerMultipl