66 (1,std::pair<int,float>(0,0.));
81 mySimEvent(aSimEvent),
83 theMuonEcalEffects(0), theMuonHcalEffects (0), bFixedLength_(
false)
107 for(
unsigned ic=0;ic<62000;++ic)
124 dbe->
book1D(
"TransverseShape",
"Transverse Shape; #rho / Moliere radius; 1/E dE/d#rho",70, 0., 7.);
125 dbe->
book1D(
"LongitudinalShape",
"Longitudinal Shape; z / X0; 1/E dE/dz",26, 0.01, 26.01);
126 dbe->
book2D(
"ShapeRhoZ",
"2D Shape Ee = 10 GeV; #rho / Moliere radius; z / X0",70, 0., 7., 26, 0.01, 26.01);
128 dbe->
book1D(
"NumberOfParticles",
"Number Of Particles entering the Shower; #Particles; #Events", 6, -0.5, 5.5);
130 dbe->
book1D(
"ParticlesEnergy",
"Log Particles Energy; log10(E / GeV); #Particles", 30, 0, 3);
181 for(
unsigned ic=0;ic<
size;++ic)
188 for(
unsigned ic=0;ic<
size;++ic)
195 for(
unsigned ic=0;ic<
size;++ic)
230 for(
int subdetn=1;subdetn<=4;++subdetn)
233 for (std::vector<DetId>::const_iterator
i=ids.begin();
i!=ids.end();
i++)
245 std::cout <<
" The preshower simulation has been turned on; but no preshower geometry is available " << std::endl;
246 std::cout <<
" Disabling the preshower simulation " << std::endl;
262 LogDebug(
"FastCalorimetry") <<
" ===> pid = " << pid << std::endl;
269 if ( pid == 11 || pid == 22 ) {
285 else if ( pid < 1000000 ) {
301 std::vector<const RawParticle*> thePart;
304 LogDebug(
"FastCalorimetry") <<
" EMShowerSimulation " <<myTrack << std::endl;
314 if ( myTrack.
type() == 22 &&
myPart.e()<0.055)
return;
318 int onEcal = myTrack.
onEcal();
319 int onHcal = myTrack.
onHcal();
332 XYZPoint layer1entrance,layer2entrance;
367 if ( myTrack.
type() == 22 ) {
373 double eMass = 0.000510998902;
375 double xm=eMass/
myPart.e();
381 weight = 1. - 4./3.*xe*(1.-xe);
382 }
while ( weight < random->flatShoot() );
385 if (
myPart.e()*xe < 0.055 ||
myPart.e()*(1.-xe) < 0.055 ) {
395 thePart.push_back(&
myElec);
396 thePart.push_back(&
myPosi);
407 if(thePart.size()==0)
409 if(myPreshower==
NULL)
return;
415 double maxEnergy=-1.;
416 for(
unsigned ip=0;ip < thePart.size();++ip)
417 if(thePart[ip]->
e() > maxEnergy) maxEnergy = thePart[ip]->
e();
421 if(maxEnergy>100) size=11;
430 if (maxShower > 20.) maxShower = 2.;
432 double depth((X0depth + maxShower) *
441 if(pivot.subdetId() == 0) {
442 edm::LogWarning(
"CalorimetryManager") <<
"Pivot for egamma e = " << myTrack.
hcalEntrance().e() <<
" is not found at depth " << depth <<
" and meanShower coordinates = " << meanShower << std::endl;
443 if(myPreshower)
delete myPreshower;
476 if( (onLayer1 || onLayer2) &&
myPart.e()<=250.)
510 theShower.
setHcal(&myHcalHitMaker);
515 std::map<uint32_t,float>::const_iterator mapitr;
516 std::map<uint32_t,float>::const_iterator endmapitr=myGrid.
getHits().end();
517 for(mapitr=myGrid.
getHits().begin();mapitr!=endmapitr;++mapitr)
530 endmapitr=myHcalHitMaker.
getHits().end();
531 for(mapitr=myHcalHitMaker.
getHits().begin();mapitr!=endmapitr;++mapitr)
540 endmapitr=myPreshower->
getHits().end();
541 for(mapitr=myPreshower->
getHits().begin();mapitr!=endmapitr;++mapitr)
558 std::cout <<
"FASTEnergyReconstructor::reconstructECAL - " << std::endl
559 <<
" eta " << moment.eta() << std::endl
560 <<
" phi " << moment.phi() << std::endl
561 <<
" et " << moment.Et() << std::endl;
566 bool central=track.
onEcal()==1;
586 double pathEta = trackPosition.eta();
587 double pathPhi = trackPosition.phi();
598 sigma = response.second;
608 std::cout <<
"FASTEnergyReconstructor::reconstructECAL : "
609 <<
" on-calo eta, phi = " << pathEta <<
" " << pathPhi << std::endl
610 <<
" Egen = " << EGen << std::endl
611 <<
" Eres = " << e << std::endl
612 <<
" sigma = " << sigma << std::endl
613 <<
" Emeas = " << emeas << std::endl;
617 std::cout <<
"FASTEnergyReconstructor::reconstructECAL : "
618 <<
" Track position - " << trackPosition.Vect()
619 <<
" bool central - " << central
620 <<
" hit - " << hit << std::endl;
630 std::cout <<
"FASTEnergyReconstructor::reconstructECAL : "
631 <<
" CellID - " << detid.
rawId() << std::endl;
633 if( hit != 2 || emeas > 0.)
647 LogDebug(
"FastCalorimetry") <<
" reconstructHCAL " << myTrack << std::endl;
664 double pathEta = trackPosition.eta();
665 double pathPhi = trackPosition.phi();
677 emeas = response.first;
679 LogDebug(
"FastCalorimetry") <<
"CalorimetryManager::reconstructHCAL - MUON !!!" << std::endl;
681 else if( pid == 22 || pid == 11)
687 sigma = response.second;
692 LogDebug(
"FastCalorimetry") <<
"CalorimetryManager::reconstructHCAL - e/gamma !!!" << std::endl;
703 LogDebug(
"FastCalorimetry") <<
"CalorimetryManager::reconstructHCAL - on-calo "
704 <<
" eta = " << pathEta
705 <<
" phi = " << pathPhi
706 <<
" Egen = " << EGen
708 <<
" sigma = " << sigma
709 <<
" Emeas = " << emeas << std::endl;
724 <<
"CalorimetryManager::HDShowerSimulation - track param."
726 <<
" eta = " << moment.eta() << std::endl
727 <<
" phi = " << moment.phi() << std::endl
728 <<
" et = " << moment.Et() << std::endl
732 LogDebug(
"FastCalorimetry") <<
" HDShowerSimulation " << myTrack << std::endl;
744 }
else if ( myTrack.
onVFcal()) {
751 LogDebug(
"FastCalorimetry") <<
" The particle is not in the acceptance " << std::endl;
757 int onHCAL = hit + 1;
758 int onECAL = myTrack.
onEcal();
760 double pathEta = trackPosition.eta();
761 double pathPhi = trackPosition.phi();
764 double eint = moment.e();
801 <<
"CalorimetryManager::HDShowerSimulation - on-calo 1 "
803 <<
" onEcal = " << myTrack.
onEcal() << std::endl
804 <<
" onHcal = " << myTrack.
onHcal() << std::endl
805 <<
" onVFcal = " << myTrack.
onVFcal() << std::endl
806 <<
" position = " << caloentrance << std::endl;
813 true, myTrack.
onEcal()==1);
881 int particleType = myTrack.
type();
887 int showerType = 99 + myTrack.
onEcal();
888 double globalTime = 150.0;
890 Gflash3Vector gfpos(trackPosition.X(),trackPosition.Y(),trackPosition.Z());
899 std::vector<GflashHit>::const_iterator spotIter = gflashHitList.begin();
900 std::vector<GflashHit>::const_iterator spotIterEnd = gflashHitList.end();
904 for( ; spotIter != spotIterEnd; spotIter++){
907 + (30*100/eGen)*(spotIter->getTime() - globalTime);
914 Gflash3Vector positionAtCurrentDepth = trajectoryPoint.getPosition();
916 Gflash3Vector lateralDisplacement = positionAtCurrentDepth - spotIter->getPosition()/CLHEP::cm;
917 double rShower = lateralDisplacement.r();
918 double azimuthalAngle = lateralDisplacement.phi();
923 bool statusPad = myGrid.getPads(currentDepth,
true);
924 if(!statusPad)
continue;
925 myGrid.setSpotEnergy(1.2*spotIter->getEnergy()/CLHEP::GeV);
929 bool setHDdepth = myHcalHitMaker.
setDepth(currentDepth,
true);
930 if(!setHDdepth)
continue;
931 myHcalHitMaker.
setSpotEnergy(1.4*spotIter->getEnergy()/CLHEP::GeV);
954 sigma = response.second;
958 double correction = emeas / eGen;
965 <<
"CalorimetryManager::HDShowerSimulation - on-calo 2" << std::endl
966 <<
" eta = " << pathEta << std::endl
967 <<
" phi = " << pathPhi << std::endl
968 <<
" Egen = " << eGen << std::endl
969 <<
" Eres = " << e << std::endl
970 <<
" sigma = " << sigma << std::endl
971 <<
" Emeas = " << emeas << std::endl
972 <<
" corr = " << correction << std::endl
973 <<
" mip = " << mip << std::endl;
977 std::map<unsigned,float>::const_iterator mapitr;
978 std::map<unsigned,float>::const_iterator endmapitr;
979 if(myTrack.
onEcal() > 0) {
981 endmapitr=myGrid.getHits().end();
982 for(mapitr=myGrid.getHits().begin(); mapitr!=endmapitr; ++mapitr) {
983 double energy = mapitr->second;
984 energy *= correction;
987 if(energy > 0.000001) {
995 LogDebug(
"FastCalorimetry") <<
" ECAL cell " << mapitr->first <<
" added, E = "
996 << energy << std::endl;
1002 endmapitr=myHcalHitMaker.
getHits().end();
1003 for(mapitr=myHcalHitMaker.
getHits().begin(); mapitr!=endmapitr; ++mapitr) {
1004 double energy = mapitr->second;
1005 energy *= correction;
1010 LogDebug(
"FastCalorimetry") <<
" HCAL cell "
1011 << mapitr->first <<
" added E = "
1012 << mapitr->second << std::endl;
1025 LogDebug(
"FastCalorimetry") <<
" HCAL simple cell "
1026 << cell.
rawId() <<
" added E = "
1027 << emeas << std::endl;
1034 LogDebug(
"FastCalorimetry") << std::endl <<
" FASTEnergyReconstructor::HDShowerSimulation finished "
1054 LogDebug(
"FastCalorimetry") <<
"CalorimetryManager::MuonMipSimulation - track param."
1056 <<
" eta = " << moment.eta() << std::endl
1057 <<
" phi = " << moment.phi() << std::endl
1058 <<
" et = " << moment.Et() << std::endl;
1064 if ( myTrack.
onEcal() ) {
1068 }
else if ( myTrack.
onVFcal()) {
1075 LogDebug(
"FastCalorimetry") <<
" The particle is not in the acceptance " << std::endl;
1083 int onECAL = myTrack.
onEcal();
1101 else if(myTrack.
onHcal())
1116 true, myTrack.
onEcal()==1);
1118 else if(myTrack.
onHcal())
1135 const std::vector<CaloSegment>& segments=myGrid.getSegments();
1136 unsigned nsegments=segments.size();
1147 for(
unsigned iseg=0;iseg<nsegments&&ifirstHcal<0;++iseg)
1151 float segmentSizeinX0=segments[iseg].X0length();
1159 theMuon.
setID(-(
int)charge*13);
1160 if ( energyLossECAL ) {
1161 energyLossECAL->
updateState(theMuon, segmentSizeinX0);
1162 energy = energyLossECAL->
deltaMom().E();
1163 moment -= energyLossECAL->
deltaMom();
1170 myGrid.getPads(segments[iseg].sX0Entrance()+segmentSizeinX0*0.5);
1171 myGrid.setSpotEnergy(energy);
1172 myGrid.addHit(0.,0.);
1196 float mipenergy=0.0;
1204 if(ifirstHcal>0 && energyLossHCAL){
1205 for(
unsigned iseg=ifirstHcal;iseg<nsegments;++iseg)
1207 float segmentSizeinX0=segments[iseg].X0length();
1210 if (segmentSizeinX0>0.001) {
1214 theMuon.
setID(-(
int)charge*13);
1215 energyLossHCAL->
updateState(theMuon, segmentSizeinX0);
1216 mipenergy = energyLossHCAL->
deltaMom().E();
1217 moment -= energyLossHCAL->
deltaMom();
1219 myHcalHitMaker.
addHit(segments[iseg].entrance());
1235 if(energyLossHCAL && ilastHcal>=0) {
1239 }
else if(energyLossECAL && ilastEcal>=0) {
1249 std::map<unsigned,float>::const_iterator mapitr;
1250 std::map<unsigned,float>::const_iterator endmapitr;
1251 if(myTrack.
onEcal() > 0) {
1253 endmapitr=myGrid.getHits().end();
1254 for(mapitr=myGrid.getHits().begin(); mapitr!=endmapitr; ++mapitr) {
1255 double energy = mapitr->second;
1266 LogDebug(
"FastCalorimetry") <<
" ECAL cell " << mapitr->first <<
" added, E = "
1267 << energy << std::endl;
1272 endmapitr=myHcalHitMaker.
getHits().end();
1273 for(mapitr=myHcalHitMaker.
getHits().begin(); mapitr!=endmapitr; ++mapitr) {
1274 double energy = mapitr->second;
1279 LogDebug(
"FastCalorimetry") <<
" HCAL cell "
1280 << mapitr->first <<
" added E = "
1281 << mapitr->second << std::endl;
1285 LogDebug(
"FastCalorimetry") << std::endl <<
" FASTEnergyReconstructor::MipShowerSimulation finished "
1316 aTerm = 1.+radiusPreshowerCorrections_[1]*radiusPreshowerCorrections_[0];
1317 bTerm = radiusPreshowerCorrections_[0];
1321 if(gridSize_ <1) gridSize_= 7;
1322 if(pulledPadSurvivalProbability_ <0. || pulledPadSurvivalProbability_>1 ) pulledPadSurvivalProbability_= 1.;
1323 if(crackPadSurvivalProbability_ <0. || crackPadSurvivalProbability_>1 ) crackPadSurvivalProbability_= 0.9;
1325 LogInfo(
"FastCalorimetry") <<
" Fast ECAL simulation parameters " << std::endl;
1326 LogInfo(
"FastCalorimetry") <<
" =============================== " << std::endl;
1327 if(simulatePreshower_)
1328 LogInfo(
"FastCalorimetry") <<
" The preshower is present " << std::endl;
1330 LogInfo(
"FastCalorimetry") <<
" The preshower is NOT present " << std::endl;
1331 LogInfo(
"FastCalorimetry") <<
" Grid Size : " << gridSize_ << std::endl;
1332 if(spotFraction_>0.)
1333 LogInfo(
"FastCalorimetry") <<
" Spot Fraction : " << spotFraction_ << std::endl;
1336 LogInfo(
"FastCalorimetry") <<
" Core of the shower " << std::endl;
1337 for(
unsigned ir=0; ir < theCoreIntervals_.size()/2;++ir)
1339 LogInfo(
"FastCalorimetry") <<
" r < " << theCoreIntervals_[ir*2] <<
" R_M : " << theCoreIntervals_[ir*2+1] <<
" ";
1341 LogInfo(
"FastCalorimetry") << std::endl;
1343 LogInfo(
"FastCalorimetry") <<
" Tail of the shower " << std::endl;
1344 for(
unsigned ir=0; ir < theTailIntervals_.size()/2;++ir)
1346 LogInfo(
"FastCalorimetry") <<
" r < " << theTailIntervals_[ir*2] <<
" R_M : " << theTailIntervals_[ir*2+1] <<
" ";
1350 LogInfo(
"FastCalorimetry") <<
"Radius correction factors: EB & EE " << radiusFactorEB_ <<
" : "<< radiusFactorEE_ << std::endl;
1352 LogInfo(
"FastCalorimetry") << std::endl;
1354 LogInfo(
"FastCalorimetry") <<
"Improper number of parameters for the preshower ; using 95keV" << std::endl;
1360 LogInfo(
"FastCalorimetry") <<
" FrontLeakageProbability : " << pulledPadSurvivalProbability_ << std::endl;
1361 LogInfo(
"FastCalorimetry") <<
" GapLossProbability : " << crackPadSurvivalProbability_ << std::endl;
1367 rsp = CalorimeterParam.
getParameter<std::vector<double> >(
"RespCorrP");
1368 LogInfo(
"FastCalorimetry") <<
" RespCorrP (rsp) size " << rsp.size() << std::endl;
1370 if( rsp.size()%3 !=0 ) {
1372 <<
" RespCorrP size is wrong -> no corrections applied !!!"
1380 for(
unsigned i = 0;
i < rsp.size();
i += 3) {
1381 LogInfo(
"FastCalorimetry") <<
"i = " <<
i/3 <<
" p = " << rsp [
i]
1382 <<
" k_e(p) = " << rsp[
i+1]
1383 <<
" k_e(p) = " << rsp[
i+2] << std::endl;
1386 k_e.push_back (rsp[i+1]);
1387 k_h.push_back (rsp[i+2]);
1406 std::map<unsigned,std::vector<std::pair<int,float> > >::iterator cellitr;
1407 cellitr = mymap.find(cellid);
1409 if( cellitr==mymap.end())
1411 std::vector<std::pair<int,float> > myElement;
1412 myElement.push_back(std::pair<int,float> (
id,energy));
1413 mymap[cellid]=myElement;
1419 cellitr->second[0].second+=
energy;
1422 cellitr->second.push_back(std::pair<int,float>(
id,energy));
1432 if(mymap[hi].
size()==0)
1434 firedCells.push_back(hi);
1435 mymap[hi].push_back(std::pair<int,float>(0,energy));
1438 mymap[hi][0].second+=
energy;
1445 if(mymap[hi].
size()==0)
1448 firedCells.push_back(hi);
1451 mymap[hi].push_back(std::pair<int,float>(tid,energy));
1467 for (
int i = 0;
i < sizeP;
i++) {
1482 double y1 =
k_e[ip-1];
1483 double y2 =
k_e[ip];
1489 ecorr = (y1 + (y2 - y1) * (p - x1)/(x2 - x1));
1493 hcorr = (y1 + (y2 - y1) * (p - x1)/(x2 - x1));
1500 LogDebug(
"FastCalorimetry") <<
" p, ecorr, hcorr = " << p <<
" "
1510 for(
unsigned ic=0;ic<
size;++ic)
1522 for(
unsigned ip=0;ip<
npart;++ip)
1556 for(
unsigned ic=0;ic<
size;++ic)
1564 for(
unsigned ip=0;ip<
npart;++ip)
1579 for(
unsigned ic=0;ic<
size;++ic)
1587 for(
unsigned ip=0;ip<
npart;++ip)
1600 std::map<uint32_t,std::vector<std::pair< int,float> > >::const_iterator cellit;
1601 std::map<uint32_t,std::vector<std::pair <int,float> > >::const_iterator preshEnd=
ESMapping_.end();
1603 for(cellit=
ESMapping_.begin();cellit!=preshEnd;++cellit)
1606 c.push_back(
PCaloHit(cellit->first,cellit->second[0].second,0.,0));
1609 unsigned npart=cellit->second.size();
1610 for(
unsigned ip=0;ip<
npart;++ip)
1612 c.push_back(
PCaloHit(cellit->first,cellit->second[ip].second,0.,cellit->second[ip].first));
1623 unsigned size=muons.size();
1626 int id=muons[
i].trackId();
1627 if(
abs(muons[
i].
type())!=13)
continue;
1633 muons[
i].setTkPosition(itcheck->trackerSurfacePosition());
1634 muons[
i].setTkMomentum(itcheck->trackerSurfaceMomentum());
void setSpotEnergy(double e)
Set the spot energy.
double getHCALEnergyResponse(double e, int hit)
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< double > rsp
std::vector< double > k_h
bool noEndVertex() const
no end vertex
RawParticle myElec
A few pointers to save time.
int hashedIndex() const
get a compact index for arrays
float charge() const
charge
std::vector< PCaloHit > PCaloHitContainer
const ECALProperties * ecalProperties(int onEcal) const
ECAL properties.
const RawParticle & vfcalEntrance() const
The particle at VFCAL entrance.
GflashPiKShowerProfile * thePiKProfile
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void updateMap(uint32_t cellid, float energy, int id, std::map< uint32_t, std::vector< std::pair< int, float > > > &mymap)
std::map< uint32_t, std::vector< std::pair< int, float > > > ESMapping_
double pulledPadSurvivalProbability_
double radLenIncm() const
Radiation length in cm.
GflashTrajectory * getHelix()
MaterialEffects * theMuonEcalEffects
double crackPadSurvivalProbability_
MaterialEffects * theMuonHcalEffects
const XYZTLorentzVector & momentum() const
Temporary (until move of SimTrack to Mathcore) - No! Actually very useful.
void setCrackPadSurvivalProbability(double val)
std::vector< std::vector< std::pair< int, float > > > EBMapping_
response responseHCAL(int mip, double energy, double eta, int partype)
GflashHadronShowerProfile * theProfile
const RawParticle & layer1Entrance() const
The particle at Preshower Layer 1.
bool compute()
Compute the shower longitudinal and lateral development.
std::pair< double, double > response
void reconstructECAL(const FSimTrack &track)
void setPreshower(PreshowerHitMaker *const myPresh)
set the preshower address
void loadFromPreshower(edm::PCaloHitContainer &c) const
const CaloSubdetectorGeometry * getHcalGeometry() const
void readParameters(const edm::ParameterSet &fastCalo)
const PreshowerLayer1Properties * layer1Properties(int onLayer1) const
Preshower Layer1 properties.
void HDShowerSimulation(const FSimTrack &myTrack)
Hadronic Shower Simulation.
static EEDetId unhashIndex(int hi)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void MuonMipSimulation(const FSimTrack &myTrack)
std::vector< std::vector< std::pair< int, float > > > EEMapping_
std::vector< double > p_knots
void compute()
Compute the shower longitudinal and lateral development.
std::vector< int > firedCellsEB_
double gaussShoot(double mean=0.0, double sigma=1.0) const
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
std::vector< int > firedCellsHCAL_
std::vector< FSimTrack > muonSimTracks
uint32_t rawId() const
get the raw id
const RandomEngine * random
U second(std::pair< T, U > const &p)
const LandauFluctuationGenerator * aLandauGenerator
bool compute()
Compute the shower longitudinal and lateral development.
void setRadiusFactor(double r)
GflashAntiProtonShowerProfile * theAntiProtonProfile
math::XYZVector XYZVector
GflashShowino * getGflashShowino()
GflashProtonShowerProfile * theProtonProfile
const PreshowerLayer2Properties * layer2Properties(int onLayer2) const
Preshower Layer2 properties.
const T & max(const T &a, const T &b)
double getPathLengthAtShower()
virtual void loadParameters()
void setTrackParameters(const XYZNormal &normal, double X0depthoffset, const FSimTrack &theTrack)
void loadFromEcalEndcap(edm::PCaloHitContainer &c) const
const XYZTLorentzVector & deltaMom() const
Returns the actual energy lost.
std::vector< DetId > theDetIds_
std::vector< double > radiusPreshowerCorrections_
std::vector< int > firedCellsEE_
const HCALProperties * hcalProperties(int onHcal) const
HCAL properties.
const RawParticle & ecalEntrance() const
The particle at ECAL entrance.
const std::map< uint32_t, float > & getHits()
std::vector< double > theTailIntervals_
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::vector< std::vector< std::pair< int, float > > > HMapping_
void loadMuonSimTracks(edm::SimTrackContainer &m) const
unsigned int nTracks() const
Number of tracks.
HCALResponse * myHDResponse_
CaloGeometryHelper * myCalorimeter_
const std::map< unsigned, float > & getHits()
const double intLength[kNumberCalorimeter]
std::vector< double > theCoreIntervals_
void getGflashTrajectoryPoint(GflashTrajectoryPoint &point, double s) const
edm::EventID id() const
Method to return the EventId.
const XYZTLorentzVector & vertex() const
the vertex fourvector
void hadronicParameterization()
void loadFromHcal(edm::PCaloHitContainer &c) const
void updateState(ParticlePropagator &myTrack, double radlen)
Compute the material effect (calls the sub class)
void EMShowerSimulation(const FSimTrack &myTrack)
GammaFunctionGenerator * aGammaGenerator
XYZVectorD XYZVector
spatial vector with cartesian internal representation
CLHEP::Hep3Vector Gflash3Vector
std::vector< double > mipValues_
static std::vector< std::pair< int, float > > myZero_
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
bool null() const
is this a null id ?
CalorimeterNumber getCalorimeterNumber(const Gflash3Vector position)
void setTkPosition(const math::XYZVectorD &pos)
double flatShoot(double xmin=0.0, double xmax=1.0) const
double getPathLengthOnEcal()
int type() const
particle type (HEP PDT convension)
std::vector< unsigned int > evtsToDebug_
int id() const
the index in FBaseSimEvent and other vectors
bool preshowerPresent() const
void setPulledPadSurvivalProbability(double val)
const RawParticle & layer2Entrance() const
The particle at Preshower Layer 2.
std::vector< double > k_e
std::vector< GflashHit > & getGflashHitList()
void setTkMomentum(const math::XYZTLorentzVectorD &mom)
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
void setMipEnergy(double e1, double e2)
void setPreshowerPresent(bool ps)
double getHCALEnergyResolution(double e, int hit)
DetId getClosestCell(const XYZPoint &point, bool ecal, bool central) const
EnergyLossSimulator * energyLossSimulator() const
Return the Energy Loss engine.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
const std::map< uint32_t, float > & getHits()
not been done.
bool addHit(double r, double phi, unsigned layer=0)
add the hit in the HCAL in local coordinates
HSParameters * myHSParameters_
std::vector< SimTrack > SimTrackContainer
tuple size
Write out results.
void setVertex(const XYZTLorentzVector &vtx)
set the vertex
void setCurrentFolder(const std::string &fullpath)
bool setDepth(double, bool inCm=false)
set the depth in X0 or Lambda0 units depending on showerType
void initialize(int showerType, double energy, double globalTime, double charge, Gflash3Vector &position, Gflash3Vector &momentum)
void reconstructHCAL(const FSimTrack &myTrack)
math::XYZTLorentzVector XYZTLorentzVector
void print() const
print the FBaseSimEvent in an intelligible way
void setHcal(HcalHitMaker *const myHcal)
set the HCAL address
void setGrid(EcalHitMaker *const myGrid)
set the grid address
FSimTrack & track(int id) const
Return track with given Id.
double getMaximumOfShower() const
get the depth of the centre of gravity of the shower(s)
void loadFromEcalBarrel(edm::PCaloHitContainer &c) const