58 (1,std::pair<int,float>(0,0.));
73 mySimEvent(aSimEvent),
75 theMuonEcalEffects(0), theMuonHcalEffects (0)
99 for(
unsigned ic=0;ic<62000;++ic)
157 for(
unsigned ic=0;ic<
size;++ic)
164 for(
unsigned ic=0;ic<
size;++ic)
171 for(
unsigned ic=0;ic<
size;++ic)
208 for(
int subdetn=1;subdetn<=4;++subdetn)
211 for (std::vector<DetId>::const_iterator
i=ids.begin();
i!=ids.end();
i++)
223 std::cout <<
" The preshower simulation has been turned on; but no preshower geometry is available " << std::endl;
224 std::cout <<
" Disabling the preshower simulation " << std::endl;
240 LogDebug(
"FastCalorimetry") <<
" ===> pid = " << pid << std::endl;
247 if ( pid == 11 || pid == 22 ) {
263 else if ( pid < 1000000 ) {
279 std::vector<const RawParticle*> thePart;
282 LogDebug(
"FastCalorimetry") <<
" EMShowerSimulation " <<myTrack << std::endl;
292 if ( myTrack.
type() == 22 &&
myPart.e()<0.055)
return;
296 int onEcal = myTrack.
onEcal();
297 int onHcal = myTrack.
onHcal();
310 XYZPoint layer1entrance,layer2entrance;
345 if ( myTrack.
type() == 22 ) {
351 double eMass = 0.000510998902;
353 double xm=eMass/
myPart.e();
359 weight = 1. - 4./3.*xe*(1.-xe);
360 }
while ( weight < random->flatShoot() );
363 if (
myPart.e()*xe < 0.055 ||
myPart.e()*(1.-xe) < 0.055 ) {
373 thePart.push_back(&
myElec);
374 thePart.push_back(&
myPosi);
385 if(thePart.size()==0)
387 if(myPreshower==
NULL)
return;
393 double maxEnergy=-1.;
394 for(
unsigned ip=0;ip < thePart.size();++ip)
395 if(thePart[ip]->
e() > maxEnergy) maxEnergy = thePart[ip]->
e();
399 if(maxEnergy>100) size=11;
407 if (maxShower > 20.) maxShower = 2.;
409 double depth((X0depth + maxShower) *
418 if(pivot.subdetId() == 0) {
419 edm::LogWarning(
"CalorimetryManager") <<
"Pivot for egamma e = " << myTrack.
hcalEntrance().e() <<
" is not found at depth " << depth <<
" and meanShower coordinates = " << meanShower << std::endl;
431 if(onLayer1 || onLayer2)
439 newRadiusFactor = a/(1.+b*maxdepth);
464 theShower.
setHcal(&myHcalHitMaker);
471 std::map<uint32_t,float>::const_iterator mapitr;
472 std::map<uint32_t,float>::const_iterator endmapitr=myGrid.
getHits().end();
473 for(mapitr=myGrid.
getHits().begin();mapitr!=endmapitr;++mapitr)
486 endmapitr=myHcalHitMaker.
getHits().end();
487 for(mapitr=myHcalHitMaker.
getHits().begin();mapitr!=endmapitr;++mapitr)
496 endmapitr=myPreshower->
getHits().end();
497 for(mapitr=myPreshower->
getHits().begin();mapitr!=endmapitr;++mapitr)
514 std::cout <<
"FASTEnergyReconstructor::reconstructECAL - " << std::endl
515 <<
" eta " << moment.eta() << std::endl
516 <<
" phi " << moment.phi() << std::endl
517 <<
" et " << moment.Et() << std::endl;
522 bool central=track.
onEcal()==1;
542 double pathEta = trackPosition.eta();
543 double pathPhi = trackPosition.phi();
554 sigma = response.second;
564 std::cout <<
"FASTEnergyReconstructor::reconstructECAL : "
565 <<
" on-calo eta, phi = " << pathEta <<
" " << pathPhi << std::endl
566 <<
" Egen = " << EGen << std::endl
567 <<
" Eres = " << e << std::endl
568 <<
" sigma = " << sigma << std::endl
569 <<
" Emeas = " << emeas << std::endl;
573 std::cout <<
"FASTEnergyReconstructor::reconstructECAL : "
574 <<
" Track position - " << trackPosition.Vect()
575 <<
" bool central - " << central
576 <<
" hit - " << hit << std::endl;
586 std::cout <<
"FASTEnergyReconstructor::reconstructECAL : "
587 <<
" CellID - " << detid.
rawId() << std::endl;
589 if( hit != 2 || emeas > 0.)
603 LogDebug(
"FastCalorimetry") <<
" reconstructHCAL " << myTrack << std::endl;
620 double pathEta = trackPosition.eta();
621 double pathPhi = trackPosition.phi();
633 emeas = response.first;
635 LogDebug(
"FastCalorimetry") <<
"CalorimetryManager::reconstructHCAL - MUON !!!" << std::endl;
637 else if( pid == 22 || pid == 11)
643 sigma = response.second;
648 LogDebug(
"FastCalorimetry") <<
"CalorimetryManager::reconstructHCAL - e/gamma !!!" << std::endl;
659 LogDebug(
"FastCalorimetry") <<
"CalorimetryManager::reconstructHCAL - on-calo "
660 <<
" eta = " << pathEta
661 <<
" phi = " << pathPhi
662 <<
" Egen = " << EGen
664 <<
" sigma = " << sigma
665 <<
" Emeas = " << emeas << std::endl;
680 <<
"CalorimetryManager::HDShowerSimulation - track param."
682 <<
" eta = " << moment.eta() << std::endl
683 <<
" phi = " << moment.phi() << std::endl
684 <<
" et = " << moment.Et() << std::endl
688 LogDebug(
"FastCalorimetry") <<
" HDShowerSimulation " << myTrack << std::endl;
700 }
else if ( myTrack.
onVFcal()) {
707 LogDebug(
"FastCalorimetry") <<
" The particle is not in the acceptance " << std::endl;
713 int onHCAL = hit + 1;
714 int onECAL = myTrack.
onEcal();
716 double pathEta = trackPosition.eta();
717 double pathPhi = trackPosition.phi();
720 double eint = moment.e();
757 <<
"CalorimetryManager::HDShowerSimulation - on-calo 1 "
759 <<
" onEcal = " << myTrack.
onEcal() << std::endl
760 <<
" onHcal = " << myTrack.
onHcal() << std::endl
761 <<
" onVFcal = " << myTrack.
onVFcal() << std::endl
762 <<
" position = " << caloentrance << std::endl;
769 true, myTrack.
onEcal()==1);
843 int showerType = 99 + myTrack.
onEcal();
844 double globalTime = 150.0;
846 Gflash3Vector gfpos(trackPosition.X(),trackPosition.Y(),trackPosition.Z());
855 std::vector<GflashHit>::const_iterator spotIter = gflashHitList.begin();
856 std::vector<GflashHit>::const_iterator spotIterEnd = gflashHitList.end();
861 for( ; spotIter != spotIterEnd; spotIter++){
864 + (30*100/eGen)*(spotIter->getTime() - globalTime);
871 Gflash3Vector positionAtCurrentDepth = trajectoryPoint.getPosition();
873 Gflash3Vector lateralDisplacement = positionAtCurrentDepth - spotIter->getPosition()/CLHEP::cm;
874 double rShower = lateralDisplacement.r();
875 double azimuthalAngle = lateralDisplacement.phi();
880 bool statusPad = myGrid.getPads(currentDepth,
true);
881 if(!statusPad)
continue;
882 myGrid.setSpotEnergy(1.2*spotIter->getEnergy()/CLHEP::GeV);
886 bool setHDdepth = myHcalHitMaker.
setDepth(currentDepth,
true);
887 if(!setHDdepth)
continue;
888 myHcalHitMaker.
setSpotEnergy(1.4*spotIter->getEnergy()/CLHEP::GeV);
911 sigma = response.second;
915 double correction = emeas / eGen;
922 <<
"CalorimetryManager::HDShowerSimulation - on-calo 2" << std::endl
923 <<
" eta = " << pathEta << std::endl
924 <<
" phi = " << pathPhi << std::endl
925 <<
" Egen = " << eGen << std::endl
926 <<
" Eres = " << e << std::endl
927 <<
" sigma = " << sigma << std::endl
928 <<
" Emeas = " << emeas << std::endl
929 <<
" corr = " << correction << std::endl
930 <<
" mip = " << mip << std::endl;
934 std::map<unsigned,float>::const_iterator mapitr;
935 std::map<unsigned,float>::const_iterator endmapitr;
936 if(myTrack.
onEcal() > 0) {
938 endmapitr=myGrid.getHits().end();
939 for(mapitr=myGrid.getHits().begin(); mapitr!=endmapitr; ++mapitr) {
940 double energy = mapitr->second;
941 energy *= correction;
944 if(energy > 0.000001) {
952 LogDebug(
"FastCalorimetry") <<
" ECAL cell " << mapitr->first <<
" added, E = "
953 << energy << std::endl;
959 endmapitr=myHcalHitMaker.
getHits().end();
960 for(mapitr=myHcalHitMaker.
getHits().begin(); mapitr!=endmapitr; ++mapitr) {
961 double energy = mapitr->second;
962 energy *= correction;
967 LogDebug(
"FastCalorimetry") <<
" HCAL cell "
968 << mapitr->first <<
" added E = "
969 << mapitr->second << std::endl;
982 LogDebug(
"FastCalorimetry") <<
" HCAL simple cell "
983 << cell.
rawId() <<
" added E = "
984 << emeas << std::endl;
991 LogDebug(
"FastCalorimetry") << std::endl <<
" FASTEnergyReconstructor::HDShowerSimulation finished "
1011 LogDebug(
"FastCalorimetry") <<
"CalorimetryManager::MuonMipSimulation - track param."
1013 <<
" eta = " << moment.eta() << std::endl
1014 <<
" phi = " << moment.phi() << std::endl
1015 <<
" et = " << moment.Et() << std::endl;
1021 if ( myTrack.
onEcal() ) {
1023 hit = myTrack.
onEcal()-1;
1025 }
else if ( myTrack.
onVFcal()) {
1032 LogDebug(
"FastCalorimetry") <<
" The particle is not in the acceptance " << std::endl;
1040 int onECAL = myTrack.
onEcal();
1058 else if(myTrack.
onHcal())
1073 true, myTrack.
onEcal()==1);
1075 else if(myTrack.
onHcal())
1092 const std::vector<CaloSegment>& segments=myGrid.getSegments();
1093 unsigned nsegments=segments.size();
1100 for(
unsigned iseg=0;iseg<nsegments&&ifirstHcal<0;++iseg)
1104 float segmentSizeinX0=segments[iseg].X0length();
1112 theMuon.
setID(-(
int)charge*13);
1113 if ( energyLossECAL ) {
1114 energyLossECAL->
updateState(theMuon, segmentSizeinX0);
1115 energy = energyLossECAL->
deltaMom().E();
1116 moment -= energyLossECAL->
deltaMom();
1123 myGrid.getPads(segments[iseg].sX0Entrance()+segmentSizeinX0*0.5);
1124 myGrid.setSpotEnergy(energy);
1125 myGrid.addHit(0.,0.);
1143 hcalEntrance=segments[ifirstHcal].entrance();
1148 hcalExit=segments[ifirstHcal].exit();
1162 float mipenergy=0.0;
1165 if(ifirstHcal>0 && energyLossHCAL){
1166 for(
unsigned iseg=ifirstHcal;iseg<nsegments;++iseg)
1168 float segmentSizeinX0=segments[iseg].X0length();
1173 theMuon.
setID(-(
int)charge*13);
1174 energyLossHCAL->
updateState(theMuon, segmentSizeinX0);
1175 mipenergy = energyLossHCAL->
deltaMom().E();
1176 moment -= energyLossHCAL->
deltaMom();
1178 myHcalHitMaker.
addHit(segments[iseg].entrance());
1187 hcalExit=segments[ilastHcal].exit();
1199 if(energyLossHCAL) {
1202 }
else if(energyLossECAL) {
1211 std::map<unsigned,float>::const_iterator mapitr;
1212 std::map<unsigned,float>::const_iterator endmapitr;
1213 if(myTrack.
onEcal() > 0) {
1215 endmapitr=myGrid.getHits().end();
1216 for(mapitr=myGrid.getHits().begin(); mapitr!=endmapitr; ++mapitr) {
1217 double energy = mapitr->second;
1228 LogDebug(
"FastCalorimetry") <<
" ECAL cell " << mapitr->first <<
" added, E = "
1229 << energy << std::endl;
1234 endmapitr=myHcalHitMaker.
getHits().end();
1235 for(mapitr=myHcalHitMaker.
getHits().begin(); mapitr!=endmapitr; ++mapitr) {
1236 double energy = mapitr->second;
1241 LogDebug(
"FastCalorimetry") <<
" HCAL cell "
1242 << mapitr->first <<
" added E = "
1243 << mapitr->second << std::endl;
1247 LogDebug(
"FastCalorimetry") << std::endl <<
" FASTEnergyReconstructor::MipShowerSimulation finished "
1273 if(gridSize_ <1) gridSize_= 7;
1274 if(pulledPadSurvivalProbability_ <0. || pulledPadSurvivalProbability_>1 ) pulledPadSurvivalProbability_= 1.;
1275 if(crackPadSurvivalProbability_ <0. || crackPadSurvivalProbability_>1 ) crackPadSurvivalProbability_= 0.9;
1277 LogInfo(
"FastCalorimetry") <<
" Fast ECAL simulation parameters " << std::endl;
1278 LogInfo(
"FastCalorimetry") <<
" =============================== " << std::endl;
1279 if(simulatePreshower_)
1280 LogInfo(
"FastCalorimetry") <<
" The preshower is present " << std::endl;
1282 LogInfo(
"FastCalorimetry") <<
" The preshower is NOT present " << std::endl;
1283 LogInfo(
"FastCalorimetry") <<
" Grid Size : " << gridSize_ << std::endl;
1284 if(spotFraction_>0.)
1285 LogInfo(
"FastCalorimetry") <<
" Spot Fraction : " << spotFraction_ << std::endl;
1288 LogInfo(
"FastCalorimetry") <<
" Core of the shower " << std::endl;
1289 for(
unsigned ir=0; ir < theCoreIntervals_.size()/2;++ir)
1291 LogInfo(
"FastCalorimetry") <<
" r < " << theCoreIntervals_[ir*2] <<
" R_M : " << theCoreIntervals_[ir*2+1] <<
" ";
1293 LogInfo(
"FastCalorimetry") << std::endl;
1295 LogInfo(
"FastCalorimetry") <<
" Tail of the shower " << std::endl;
1296 for(
unsigned ir=0; ir < theTailIntervals_.size()/2;++ir)
1298 LogInfo(
"FastCalorimetry") <<
" r < " << theTailIntervals_[ir*2] <<
" R_M : " << theTailIntervals_[ir*2+1] <<
" ";
1300 LogInfo(
"FastCalotimetry") <<
"Radius correction factor " << radiusFactor_ << std::endl;
1301 LogInfo(
"FastCalorimetry") << std::endl;
1302 if(mipValues_.size()>2) {
1303 LogInfo(
"FastCalorimetry") <<
"Improper number of parameters for the preshower ; using 95keV" << std::endl;
1305 mipValues_.resize(2,0.000095);
1309 LogInfo(
"FastCalorimetry") <<
" FrontLeakageProbability : " << pulledPadSurvivalProbability_ << std::endl;
1310 LogInfo(
"FastCalorimetry") <<
" GapLossProbability : " << crackPadSurvivalProbability_ << std::endl;
1316 rsp = CalorimeterParam.
getParameter<std::vector<double> >(
"RespCorrP");
1317 LogInfo(
"FastCalorimetry") <<
" RespCorrP (rsp) size " << rsp.size() << std::endl;
1319 if( rsp.size()%3 !=0 ) {
1321 <<
" RespCorrP size is wrong -> no corrections applied !!!"
1329 for(
unsigned i = 0;
i < rsp.size();
i += 3) {
1330 LogInfo(
"FastCalorimetry") <<
"i = " <<
i/3 <<
" p = " << rsp [
i]
1331 <<
" k_e(p) = " << rsp[
i+1]
1332 <<
" k_e(p) = " << rsp[
i+2] << std::endl;
1335 k_e.push_back (rsp[i+1]);
1336 k_h.push_back (rsp[i+2]);
1355 std::map<unsigned,std::vector<std::pair<int,float> > >::iterator cellitr;
1356 cellitr = mymap.find(cellid);
1358 if( cellitr==mymap.end())
1360 std::vector<std::pair<int,float> > myElement;
1361 myElement.push_back(std::pair<int,float> (
id,energy));
1362 mymap[cellid]=myElement;
1368 cellitr->second[0].second+=
energy;
1371 cellitr->second.push_back(std::pair<int,float>(
id,energy));
1381 if(mymap[hi].
size()==0)
1383 firedCells.push_back(hi);
1384 mymap[hi].push_back(std::pair<int,float>(0,energy));
1387 mymap[hi][0].second+=
energy;
1394 if(mymap[hi].
size()==0)
1397 firedCells.push_back(hi);
1400 mymap[hi].push_back(std::pair<int,float>(tid,energy));
1416 for (
int i = 0;
i < sizeP;
i++) {
1431 double y1 =
k_e[ip-1];
1432 double y2 =
k_e[ip];
1438 ecorr = (y1 + (y2 - y1) * (p - x1)/(x2 - x1));
1442 hcorr = (y1 + (y2 - y1) * (p - x1)/(x2 - x1));
1449 LogDebug(
"FastCalorimetry") <<
" p, ecorr, hcorr = " << p <<
" "
1459 for(
unsigned ic=0;ic<
size;++ic)
1471 for(
unsigned ip=0;ip<
npart;++ip)
1505 for(
unsigned ic=0;ic<
size;++ic)
1513 for(
unsigned ip=0;ip<
npart;++ip)
1528 for(
unsigned ic=0;ic<
size;++ic)
1536 for(
unsigned ip=0;ip<
npart;++ip)
1549 std::map<uint32_t,std::vector<std::pair< int,float> > >::const_iterator cellit;
1550 std::map<uint32_t,std::vector<std::pair <int,float> > >::const_iterator preshEnd=
ESMapping_.end();
1552 for(cellit=
ESMapping_.begin();cellit!=preshEnd;++cellit)
1555 c.push_back(
PCaloHit(cellit->first,cellit->second[0].second,0.,0));
1558 unsigned npart=cellit->second.size();
1559 for(
unsigned ip=0;ip<
npart;++ip)
1561 c.push_back(
PCaloHit(cellit->first,cellit->second[ip].second,0.,cellit->second[ip].first));
1572 unsigned size=muons.size();
1575 int id=muons[
i].trackId();
1576 if(
abs(muons[
i].
type())!=13)
continue;
1582 muons[
i].setTkPosition(itcheck->trackerSurfacePosition());
1583 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
void bookByNumber(const std::string &name, int n1, int n2, int nx, float xmin, float xmax, int ny=0, float ymin=0., float ymax=0.)
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 book(const std::string &name, int nx, float xmin, float xmax, int ny=0, float ymin=0., float ymax=0.)
Book an histogram (1D or 2D)
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.
static Histos * instance()
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 put(const std::string &file, std::string name="")
Write one or all histogram(s) in a file.
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)
Log< T >::type log(const T &t)
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.
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
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