Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion include/ChargedParticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class ChargedParticle: public TransientParticle {

// Group steps by radiator of course; in the easiest case an entry and exit points;
std::vector<std::pair<TRef, RadiatorHistory*> > m_RadiatorHistory;

bool m_StopTracing; //!

#ifndef DISABLE_ROOT_IO
Expand Down
2 changes: 1 addition & 1 deletion include/CherenkovDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class CherenkovDetector: public TObject {

// readout ID -> pixel position converter (for external usage)
std::function<TVector3(long long int)> m_ReadoutIDToPosition; //!

std::function<TVector3(long long int)> m_ReadoutIDToNormal; //!
private:
TString m_Name;
// This is needed for dd4hep cell index decoding;
Expand Down
14 changes: 11 additions & 3 deletions include/OpticalPhoton.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ class OpticalPhoton: public TransientParticle {
inline void SetVertexParentMomentum(const TVector3 &momentum){ m_VertexParentMomentum = momentum; };
inline void SetVolumeCopy(uint64_t copy) { m_VolumeCopy = copy; };
inline void SetDetectionPosition(const TVector3 &position) { m_DetectionPosition = position; };
//inline void SetDetectionMomentum(const TVector3 &momentum) { m_DetectionMomentum = momentum;} ///////////////////////////
inline void SetPhotonDetector(CherenkovPhotonDetector *pd) { m_PhotonDetector = pd; };

inline void SetNormalSurface(const TVector3 &nSurface) {m_NormalSurface = nSurface;};////////////////////////////////
inline void AddReflectionPoint(ReflectionPoint *reflection) {
m_ReflectionPoints.push_back(reflection);
};
Expand All @@ -54,7 +55,9 @@ class OpticalPhoton: public TransientParticle {
inline const TVector3 &GetVertexMomentum( void ) const { return m_VertexMomentum; };
inline const TVector3 &GetVertexParentMomentum( void ) const { return m_VertexParentMomentum; };
inline const TVector3 &GetDetectionPosition( void ) const { return m_DetectionPosition; };

//inline const TVector3 &GetDetectionMomentum( void ) const { return m_DetectionMomentum; };///////////////////////////
inline const TVector3 &GetNormalSurface( void ) const { return m_NormalSurface;};////////////////////////////////

inline bool WasDetected( void ) const { return m_Detected; };
inline uint64_t GetVolumeCopy( void ) const { return m_VolumeCopy; };

Expand All @@ -78,6 +81,8 @@ class OpticalPhoton: public TransientParticle {
TRef m_PhotonDetector;
uint64_t m_VolumeCopy;
TVector3 m_DetectionPosition;
//TVector3 m_DetectionMomentum;
TVector3 m_NormalSurface;
double m_DetectionTime;

// 'true' if the photon was actually detected; QE-based and geometric efficiency accounted;
Expand All @@ -92,7 +97,10 @@ class OpticalPhoton: public TransientParticle {

// Average estimated phi angle; no need to know it precisely (?);
std::map<CherenkovRadiator*, double> m_Phi; //!


//Incident angle
std::map<CherenkovRadiator*, float> m_Angle; //!

#ifndef DISABLE_ROOT_IO
ClassDef(OpticalPhoton, 3);
#endif
Expand Down
14 changes: 12 additions & 2 deletions source/ChargedParticle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void ChargedParticle::PIDReconstruction(CherenkovPID &pid)

auto pd = photon->GetPhotonDetector();
const auto irt = pd->GetIRT(photon->GetVolumeCopy());
if (!irt) {
if (!irt) {
printf("No photosensor with this cellID found!\n");
continue;
} //if
Expand All @@ -46,7 +46,17 @@ void ChargedParticle::PIDReconstruction(CherenkovPID &pid)
if (radiator->m_Locations.size() != zdim+1) continue;

TVector3 phx = photon->GetDetectionPosition();

// ADding Stuff
const auto norm = (photon->GetNormalSurface());
const auto mom = (1e9*photon->GetVertexMomentum());
photon->m_Angle[radiator]=norm.Dot(mom);
//float angle = photon->m_Angle[radiator];
//if((angle*(180/M_PI)) > 0)
//printf("-->IRT %lf %lf %lf %lf \n",norm.X(),norm.Y(),norm.Z(),180 - (angle*(180/M_PI)));
//if((angle*(180/M_PI)) < 0)
//printf("-->IRT %lf %lf %lf %lf \n",norm.X(),norm.Y(),norm.Z(),180 + (angle*(180/M_PI)));
// up to here

// Get effective attenuation length for this radiator, as well as the
// parameterization of its rear surface in this particular sector; this is
// not really a clean procedure for dRICH aerogel, but should be good enough
Expand Down