61 (1,std::pair<int,float>(0,0.));
76 mySimEvent(aSimEvent),
78 theMuonEcalEffects(0), theMuonHcalEffects (0)
102 for(
unsigned ic=0;ic<62000;++ic)
162 for(
unsigned ic=0;ic<
size;++ic)
169 for(
unsigned ic=0;ic<
size;++ic)
176 for(
unsigned ic=0;ic<
size;++ic)
213 for(
int subdetn=1;subdetn<=4;++subdetn)
216 for (std::vector<DetId>::const_iterator
i=ids.begin();
i!=ids.end();
i++)
228 std::cout <<
" The preshower simulation has been turned on; but no preshower geometry is available " << std::endl;
229 std::cout <<
" Disabling the preshower simulation " << std::endl;
245 LogDebug(
"FastCalorimetry") <<
" ===> pid = " << pid << std::endl;
252 if ( pid == 11 || pid == 22 ) {
268 else if ( pid < 1000000 ) {
284 std::vector<const RawParticle*> thePart;
287 LogDebug(
"FastCalorimetry") <<
" EMShowerSimulation " <<myTrack << std::endl;
297 if ( myTrack.
type() == 22 &&
myPart.e()<0.055)
return;
301 int onEcal = myTrack.
onEcal();
302 int onHcal = myTrack.
onHcal();
315 XYZPoint layer1entrance,layer2entrance;
350 if ( myTrack.
type() == 22 ) {
356 double eMass = 0.000510998902;
358 double xm=eMass/
myPart.e();
364 weight = 1. - 4./3.*xe*(1.-xe);
365 }
while ( weight < random->flatShoot() );
368 if (
myPart.e()*xe < 0.055 ||
myPart.e()*(1.-xe) < 0.055 ) {
378 thePart.push_back(&
myElec);
379 thePart.push_back(&
myPosi);
390 if(thePart.size()==0)
392 if(myPreshower==
NULL)
return;
398 double maxEnergy=-1.;
399 for(
unsigned ip=0;ip < thePart.size();++ip)
400 if(thePart[ip]->e() > maxEnergy) maxEnergy = thePart[ip]->e();
404 if(maxEnergy>100) size=11;
412 if (maxShower > 20.) maxShower = 2.;
414 double depth((X0depth + maxShower) *
423 if(pivot.subdetId() == 0) {
424 edm::LogWarning(
"CalorimetryManager") <<
"Pivot for egamma e = " << myTrack.
hcalEntrance().e() <<
" is not found at depth " << depth <<
" and meanShower coordinates = " << meanShower << std::endl;
457 if( (onLayer1 || onLayer2) &&
myPart.e()<=250.)
491 theShower.
setHcal(&myHcalHitMaker);
496 std::map<uint32_t,float>::const_iterator mapitr;
497 std::map<uint32_t,float>::const_iterator endmapitr=myGrid.
getHits().end();
498 for(mapitr=myGrid.
getHits().begin();mapitr!=endmapitr;++mapitr)
511 endmapitr=myHcalHitMaker.
getHits().end();
512 for(mapitr=myHcalHitMaker.
getHits().begin();mapitr!=endmapitr;++mapitr)
521 endmapitr=myPreshower->
getHits().end();
522 for(mapitr=myPreshower->
getHits().begin();mapitr!=endmapitr;++mapitr)
539 std::cout <<
"FASTEnergyReconstructor::reconstructECAL - " << std::endl
540 <<
" eta " << moment.eta() << std::endl
541 <<
" phi " << moment.phi() << std::endl
542 <<
" et " << moment.Et() << std::endl;
547 bool central=track.
onEcal()==1;
567 double pathEta = trackPosition.eta();
568 double pathPhi = trackPosition.phi();
579 sigma = response.second;
589 std::cout <<
"FASTEnergyReconstructor::reconstructECAL : "
590 <<
" on-calo eta, phi = " << pathEta <<
" " << pathPhi << std::endl
591 <<
" Egen = " << EGen << std::endl
592 <<
" Eres = " << e << std::endl
593 <<
" sigma = " << sigma << std::endl
594 <<
" Emeas = " << emeas << std::endl;
598 std::cout <<
"FASTEnergyReconstructor::reconstructECAL : "
599 <<
" Track position - " << trackPosition.Vect()
600 <<
" bool central - " << central
601 <<
" hit - " << hit << std::endl;
611 std::cout <<
"FASTEnergyReconstructor::reconstructECAL : "
612 <<
" CellID - " << detid.
rawId() << std::endl;
614 if( hit != 2 || emeas > 0.)
628 LogDebug(
"FastCalorimetry") <<
" reconstructHCAL " << myTrack << std::endl;
645 double pathEta = trackPosition.eta();
646 double pathPhi = trackPosition.phi();
658 emeas = response.first;
660 LogDebug(
"FastCalorimetry") <<
"CalorimetryManager::reconstructHCAL - MUON !!!" << std::endl;
662 else if( pid == 22 || pid == 11)
668 sigma = response.second;
673 LogDebug(
"FastCalorimetry") <<
"CalorimetryManager::reconstructHCAL - e/gamma !!!" << std::endl;
684 LogDebug(
"FastCalorimetry") <<
"CalorimetryManager::reconstructHCAL - on-calo "
685 <<
" eta = " << pathEta
686 <<
" phi = " << pathPhi
687 <<
" Egen = " << EGen
689 <<
" sigma = " << sigma
690 <<
" Emeas = " << emeas << std::endl;
705 <<
"CalorimetryManager::HDShowerSimulation - track param."
707 <<
" eta = " << moment.eta() << std::endl
708 <<
" phi = " << moment.phi() << std::endl
709 <<
" et = " << moment.Et() << std::endl
713 LogDebug(
"FastCalorimetry") <<
" HDShowerSimulation " << myTrack << std::endl;
725 }
else if ( myTrack.
onVFcal()) {
732 LogDebug(
"FastCalorimetry") <<
" The particle is not in the acceptance " << std::endl;
738 int onHCAL = hit + 1;
739 int onECAL = myTrack.
onEcal();
741 double pathEta = trackPosition.eta();
742 double pathPhi = trackPosition.phi();
745 double eint = moment.e();
782 <<
"CalorimetryManager::HDShowerSimulation - on-calo 1 "
784 <<
" onEcal = " << myTrack.
onEcal() << std::endl
785 <<
" onHcal = " << myTrack.
onHcal() << std::endl
786 <<
" onVFcal = " << myTrack.
onVFcal() << std::endl
787 <<
" position = " << caloentrance << std::endl;
794 true, myTrack.
onEcal()==1);
862 int particleType = myTrack.
type();
868 int showerType = 99 + myTrack.
onEcal();
869 double globalTime = 150.0;
871 Gflash3Vector gfpos(trackPosition.X(),trackPosition.Y(),trackPosition.Z());
880 std::vector<GflashHit>::const_iterator spotIter = gflashHitList.begin();
881 std::vector<GflashHit>::const_iterator spotIterEnd = gflashHitList.end();
886 for( ; spotIter != spotIterEnd; spotIter++){
889 + (30*100/eGen)*(spotIter->getTime() - globalTime);
896 Gflash3Vector positionAtCurrentDepth = trajectoryPoint.getPosition();
898 Gflash3Vector lateralDisplacement = positionAtCurrentDepth - spotIter->getPosition()/CLHEP::cm;
899 double rShower = lateralDisplacement.r();
900 double azimuthalAngle = lateralDisplacement.phi();
905 bool statusPad = myGrid.getPads(currentDepth,
true);
906 if(!statusPad)
continue;
907 myGrid.setSpotEnergy(1.2*spotIter->getEnergy()/CLHEP::GeV);
911 bool setHDdepth = myHcalHitMaker.
setDepth(currentDepth,
true);
912 if(!setHDdepth)
continue;
913 myHcalHitMaker.
setSpotEnergy(1.4*spotIter->getEnergy()/CLHEP::GeV);
936 sigma = response.second;
940 double correction = emeas / eGen;
947 <<
"CalorimetryManager::HDShowerSimulation - on-calo 2" << std::endl
948 <<
" eta = " << pathEta << std::endl
949 <<
" phi = " << pathPhi << std::endl
950 <<
" Egen = " << eGen << std::endl
951 <<
" Eres = " << e << std::endl
952 <<
" sigma = " << sigma << std::endl
953 <<
" Emeas = " << emeas << std::endl
954 <<
" corr = " << correction << std::endl
955 <<
" mip = " << mip << std::endl;
959 std::map<unsigned,float>::const_iterator mapitr;
960 std::map<unsigned,float>::const_iterator endmapitr;
961 if(myTrack.
onEcal() > 0) {
963 endmapitr=myGrid.getHits().end();
964 for(mapitr=myGrid.getHits().begin(); mapitr!=endmapitr; ++mapitr) {
965 double energy = mapitr->second;
966 energy *= correction;
969 if(energy > 0.000001) {
977 LogDebug(
"FastCalorimetry") <<
" ECAL cell " << mapitr->first <<
" added, E = "
978 << energy << std::endl;
984 endmapitr=myHcalHitMaker.
getHits().end();
985 for(mapitr=myHcalHitMaker.
getHits().begin(); mapitr!=endmapitr; ++mapitr) {
986 double energy = mapitr->second;
987 energy *= correction;
992 LogDebug(
"FastCalorimetry") <<
" HCAL cell "
993 << mapitr->first <<
" added E = "
994 << mapitr->second << std::endl;
1007 LogDebug(
"FastCalorimetry") <<
" HCAL simple cell "
1008 << cell.
rawId() <<
" added E = "
1009 << emeas << std::endl;
1016 LogDebug(
"FastCalorimetry") << std::endl <<
" FASTEnergyReconstructor::HDShowerSimulation finished "
1036 LogDebug(
"FastCalorimetry") <<
"CalorimetryManager::MuonMipSimulation - track param."
1038 <<
" eta = " << moment.eta() << std::endl
1039 <<
" phi = " << moment.phi() << std::endl
1040 <<
" et = " << moment.Et() << std::endl;
1046 if ( myTrack.
onEcal() ) {
1048 hit = myTrack.
onEcal()-1;
1050 }
else if ( myTrack.
onVFcal()) {
1057 LogDebug(
"FastCalorimetry") <<
" The particle is not in the acceptance " << std::endl;
1065 int onECAL = myTrack.
onEcal();
1083 else if(myTrack.
onHcal())
1098 true, myTrack.
onEcal()==1);
1100 else if(myTrack.
onHcal())
1117 const std::vector<CaloSegment>& segments=myGrid.getSegments();
1118 unsigned nsegments=segments.size();
1130 for(
unsigned iseg=0;iseg<nsegments&&ifirstHcal<0;++iseg)
1134 float segmentSizeinX0=segments[iseg].X0length();
1142 theMuon.
setID(-(
int)charge*13);
1143 if ( energyLossECAL ) {
1144 energyLossECAL->
updateState(theMuon, segmentSizeinX0);
1145 energy = energyLossECAL->
deltaMom().E();
1146 moment -= energyLossECAL->
deltaMom();
1153 myGrid.getPads(segments[iseg].sX0Entrance()+segmentSizeinX0*0.5);
1154 myGrid.setSpotEnergy(energy);
1155 myGrid.addHit(0.,0.);
1173 hcalEntrance=segments[ifirstHcal].entrance();
1178 hcalExit=segments[ifirstHcal].exit();
1192 float mipenergy=0.0;
1202 if(ifirstHcal>0 && energyLossHCAL){
1203 for(
unsigned iseg=ifirstHcal;iseg<nsegments;++iseg)
1205 float segmentSizeinX0=segments[iseg].X0length();
1210 theMuon.
setID(-(
int)charge*13);
1211 energyLossHCAL->
updateState(theMuon, segmentSizeinX0);
1212 mipenergy = energyLossHCAL->
deltaMom().E();
1213 moment -= energyLossHCAL->
deltaMom();
1215 myHcalHitMaker.
addHit(segments[iseg].entrance());
1224 hcalExit=segments[ilastHcal].exit();
1236 if(energyLossHCAL) {
1239 }
else if(energyLossECAL) {
1248 std::map<unsigned,float>::const_iterator mapitr;
1249 std::map<unsigned,float>::const_iterator endmapitr;
1250 if(myTrack.
onEcal() > 0) {
1252 endmapitr=myGrid.getHits().end();
1253 for(mapitr=myGrid.getHits().begin(); mapitr!=endmapitr; ++mapitr) {
1254 double energy = mapitr->second;
1265 LogDebug(
"FastCalorimetry") <<
" ECAL cell " << mapitr->first <<
" added, E = "
1266 << energy << std::endl;
1271 endmapitr=myHcalHitMaker.
getHits().end();
1272 for(mapitr=myHcalHitMaker.
getHits().begin(); mapitr!=endmapitr; ++mapitr) {
1273 double energy = mapitr->second;
1278 LogDebug(
"FastCalorimetry") <<
" HCAL cell "
1279 << mapitr->first <<
" added E = "
1280 << mapitr->second << std::endl;
1284 LogDebug(
"FastCalorimetry") << std::endl <<
" FASTEnergyReconstructor::MipShowerSimulation finished "
1311 aTerm = 1.+radiusPreshowerCorrections_[1]*radiusPreshowerCorrections_[0];
1312 bTerm = radiusPreshowerCorrections_[0];
1316 if(gridSize_ <1) gridSize_= 7;
1317 if(pulledPadSurvivalProbability_ <0. || pulledPadSurvivalProbability_>1 ) pulledPadSurvivalProbability_= 1.;
1318 if(crackPadSurvivalProbability_ <0. || crackPadSurvivalProbability_>1 ) crackPadSurvivalProbability_= 0.9;
1320 LogInfo(
"FastCalorimetry") <<
" Fast ECAL simulation parameters " << std::endl;
1321 LogInfo(
"FastCalorimetry") <<
" =============================== " << std::endl;
1322 if(simulatePreshower_)
1323 LogInfo(
"FastCalorimetry") <<
" The preshower is present " << std::endl;
1325 LogInfo(
"FastCalorimetry") <<
" The preshower is NOT present " << std::endl;
1326 LogInfo(
"FastCalorimetry") <<
" Grid Size : " << gridSize_ << std::endl;
1327 if(spotFraction_>0.)
1328 LogInfo(
"FastCalorimetry") <<
" Spot Fraction : " << spotFraction_ << std::endl;
1331 LogInfo(
"FastCalorimetry") <<
" Core of the shower " << std::endl;
1332 for(
unsigned ir=0; ir < theCoreIntervals_.size()/2;++ir)
1334 LogInfo(
"FastCalorimetry") <<
" r < " << theCoreIntervals_[ir*2] <<
" R_M : " << theCoreIntervals_[ir*2+1] <<
" ";
1336 LogInfo(
"FastCalorimetry") << std::endl;
1338 LogInfo(
"FastCalorimetry") <<
" Tail of the shower " << std::endl;
1339 for(
unsigned ir=0; ir < theTailIntervals_.size()/2;++ir)
1341 LogInfo(
"FastCalorimetry") <<
" r < " << theTailIntervals_[ir*2] <<
" R_M : " << theTailIntervals_[ir*2+1] <<
" ";
1345 LogInfo(
"FastCalorimetry") <<
"Radius correction factors: EB & EE " << radiusFactorEB_ <<
" : "<< radiusFactorEE_ << std::endl;
1347 LogInfo(
"FastCalorimetry") << std::endl;
1349 LogInfo(
"FastCalorimetry") <<
"Improper number of parameters for the preshower ; using 95keV" << std::endl;
1355 LogInfo(
"FastCalorimetry") <<
" FrontLeakageProbability : " << pulledPadSurvivalProbability_ << std::endl;
1356 LogInfo(
"FastCalorimetry") <<
" GapLossProbability : " << crackPadSurvivalProbability_ << std::endl;
1362 rsp = CalorimeterParam.
getParameter<std::vector<double> >(
"RespCorrP");
1363 LogInfo(
"FastCalorimetry") <<
" RespCorrP (rsp) size " << rsp.size() << std::endl;
1365 if( rsp.size()%3 !=0 ) {
1367 <<
" RespCorrP size is wrong -> no corrections applied !!!"
1375 for(
unsigned i = 0;
i < rsp.size();
i += 3) {
1376 LogInfo(
"FastCalorimetry") <<
"i = " <<
i/3 <<
" p = " << rsp [
i]
1377 <<
" k_e(p) = " << rsp[
i+1]
1378 <<
" k_e(p) = " << rsp[
i+2] << std::endl;
1381 k_e.push_back (rsp[i+1]);
1382 k_h.push_back (rsp[i+2]);
1401 std::map<unsigned,std::vector<std::pair<int,float> > >::iterator cellitr;
1402 cellitr = mymap.find(cellid);
1404 if( cellitr==mymap.end())
1406 std::vector<std::pair<int,float> > myElement;
1407 myElement.push_back(std::pair<int,float> (
id,energy));
1408 mymap[cellid]=myElement;
1414 cellitr->second[0].second+=
energy;
1417 cellitr->second.push_back(std::pair<int,float>(
id,energy));
1427 if(mymap[hi].
size()==0)
1429 firedCells.push_back(hi);
1430 mymap[hi].push_back(std::pair<int,float>(0,energy));
1433 mymap[hi][0].second+=
energy;
1440 if(mymap[hi].
size()==0)
1443 firedCells.push_back(hi);
1446 mymap[hi].push_back(std::pair<int,float>(tid,energy));
1462 for (
int i = 0;
i < sizeP;
i++) {
1477 double y1 =
k_e[ip-1];
1478 double y2 =
k_e[ip];
1484 ecorr = (y1 + (y2 - y1) * (p - x1)/(x2 - x1));
1488 hcorr = (y1 + (y2 - y1) * (p - x1)/(x2 - x1));
1495 LogDebug(
"FastCalorimetry") <<
" p, ecorr, hcorr = " << p <<
" "
1505 for(
unsigned ic=0;ic<
size;++ic)
1517 for(
unsigned ip=0;ip<
npart;++ip)
1551 for(
unsigned ic=0;ic<
size;++ic)
1559 for(
unsigned ip=0;ip<
npart;++ip)
1574 for(
unsigned ic=0;ic<
size;++ic)
1582 for(
unsigned ip=0;ip<
npart;++ip)
1595 std::map<uint32_t,std::vector<std::pair< int,float> > >::const_iterator cellit;
1596 std::map<uint32_t,std::vector<std::pair <int,float> > >::const_iterator preshEnd=
ESMapping_.end();
1598 for(cellit=
ESMapping_.begin();cellit!=preshEnd;++cellit)
1601 c.push_back(
PCaloHit(cellit->first,cellit->second[0].second,0.,0));
1604 unsigned npart=cellit->second.size();
1605 for(
unsigned ip=0;ip<
npart;++ip)
1607 c.push_back(
PCaloHit(cellit->first,cellit->second[ip].second,0.,cellit->second[ip].first));
1618 unsigned size=muons.size();
1621 int id=muons[
i].trackId();
1622 if(
abs(muons[
i].
type())!=13)
continue;
1628 muons[
i].setTkPosition(itcheck->trackerSurfacePosition());
1629 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
MuonBremsstrahlungSimulator * muonBremsstrahlungSimulator() const
Return the Muon Bremsstrahlung engine.
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