nGenHits++;
cpvHit = (AliPHOSCPVHit*)cpvHits->UncheckedAt(ihit);
p = cpvHit->GetMomentum();
- xgen = cpvHit->GetX();
- zgen = cpvHit->GetY();
+ xgen = cpvHit->X();
+ zgen = cpvHit->Y();
ipart = cpvHit->GetIpart();
printf("CPV hit in module %d: ",iModule+1);
printf(" p = (%f, %f, %f, %f) GeV,\n",
for (Int_t ihit=0; ihit<nCPVhits; ihit++) {
cpvHit = (AliPHOSCPVHit*)cpvHits->UncheckedAt(ihit);
p = cpvHit->GetMomentum();
- xzgen[0] = cpvHit->GetX();
- xzgen[1] = cpvHit->GetY();
+ xzgen[0] = cpvHit->X();
+ xzgen[1] = cpvHit->Y();
ipart = cpvHit->GetIpart();
TClonesArray &lhits = *(TClonesArray *)hitsPerModule[iModule];
new(lhits[hitsPerModule[iModule]->GetEntriesFast()]) AliPHOSCPVHit(*cpvHit);
Int_t nCPVhits = cpvHits->GetEntriesFast();
for (Int_t ihit=0; ihit<nCPVhits; ihit++) {
cpvHit = (AliPHOSCPVHit*)cpvHits->UncheckedAt(ihit);
- xgen = cpvHit->GetX();
- zgen = cpvHit->GetY();
+ xgen = cpvHit->X();
+ zgen = cpvHit->Y();
r2 = TMath::Power((xgen-xrec),2) + TMath::Power((zgen-zrec),2);
if ( r2 < r2min ) {
r2min = r2;
/*
$Log$
+ Revision 1.1 2000/11/03 16:49:53 schutz
+ New class AliPHOSCPVHit
+
*/
////////////////////////////////////////////////
//______________________________________________________________________________
-AliPHOSCPVHit::AliPHOSCPVHit(TLorentzVector p, Float_t *xy, Int_t ipart)
+AliPHOSCPVHit::AliPHOSCPVHit(Int_t shunt, Int_t track, TLorentzVector p, Float_t *xy, Int_t ipart)
+ : AliHit(shunt, track)
{
//
// Create a CPV hit object
//
fMomentum = p;
- fXhit = xy[0];
- fYhit = xy[1];
+ fX = xy[0];
+ fY = xy[1];
fIpart = ipart;
}
//
printf("CPV hit: p = (% .4f, % .4f, % .4f, % .4f) GeV,\n",
- GetMomentum().Px(),GetMomentum().Py(),GetMomentum().Pz(),GetMomentum().E());
+ fMomentum.Px(),fMomentum.Py(),fMomentum.Pz(),fMomentum.E());
printf(" xy = (%8.4f, %8.4f) cm, ipart = %d\n",
- fXhit,fYhit,fIpart);
+ fX,fY,fIpart);
}
#include <TLorentzVector.h>
// --- galice header files ---
+#include <AliHit.h>
//==============================================================================
// AliPHOSCPVHit
//==============================================================================
-class AliPHOSCPVHit : public TObject {
+class AliPHOSCPVHit : public AliHit {
public:
virtual ~AliPHOSCPVHit() {}
AliPHOSCPVHit() {}
- AliPHOSCPVHit(TLorentzVector p, Float_t *xy, Int_t ipart);
+ AliPHOSCPVHit(Int_t shunt, Int_t track, TLorentzVector p, Float_t *xy, Int_t ipart);
TLorentzVector GetMomentum() { return fMomentum; }
- Float_t GetX() { return fXhit; }
- Float_t GetY() { return fYhit; }
Int_t GetIpart() { return fIpart; }
void Print();
private:
TLorentzVector fMomentum; // 4-momentum of the particle
- Float_t fXhit; // Hit's X-coordinates
- Float_t fYhit; // Hit's Y-coordinates
Int_t fIpart; // Hit's particle type
ClassDef(AliPHOSCPVHit,1) // Hit object in one CPV module
/*
$Log$
+ Revision 1.3 2000/11/13 11:45:36 schutz
+ DEC and HP compilers sufisfied
+
Revision 1.2 2000/11/13 09:34:11 martinez
Copy constructor and operator = changed
//______________________________________________________________________________
-void AliPHOSCPVModule::AddHit(TLorentzVector p, Float_t *xy, Int_t ipart)
+void AliPHOSCPVModule::AddHit(Int_t shunt, Int_t track, TLorentzVector p, Float_t *xy, Int_t ipart)
{
//
// Add this hit to the hit list in CPV detector.
//
TClonesArray &lhits = *(TClonesArray *)fHits;
- new(lhits[fHits->GetEntriesFast()]) AliPHOSCPVHit(p,xy,ipart);
+ new(lhits[fHits->GetEntriesFast()]) AliPHOSCPVHit(shunt,track,p,xy,ipart);
}
//______________________________________________________________________________
void Copy(AliPHOSCPVModule &module) const;
void Clear(Option_t *opt="");
void Print(Option_t *opt="");
- void AddHit(TLorentzVector p, Float_t *xy, Int_t ipart);
+ void AddHit(Int_t shunt, Int_t track, TLorentzVector p, Float_t *xy, Int_t ipart);
void MakeBranch(Int_t i);
void SetTreeAddress(Int_t i);
// Add the current particle in the list of the CPV hits.
- phos.GetCPVModule(moduleNumber).AddHit(pmom,xyd,ipart);
+ phos.GetCPVModule(moduleNumber).AddHit(fIshunt,tracknumber,pmom,xyd,ipart);
if (fDebugLevel == 1) {
printf("CPV hit added to module #%2d: p = (% .4f, % .4f, % .4f, % .4f) GeV,\n",
include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
PACKAGE = PHOS
+MYLIBDIR = ~/lib/tgt_$(ALICE_TARGET)
# C++ sources
##### COMMANDS #####
-SLIBRARY = $(LIBDIR)/libPHOS.$(SL)
+SLIBRARY = $(MYLIBDIR)/libPHOS.$(SL)
default: $(SLIBRARY)
-$(LIBDIR)/libPHOS.$(SL): $(OBJS) $(FOBJS)
+$(MYLIBDIR)/libPHOS.$(SL): $(OBJS) $(FOBJS)
$(DICT): $(HDRS)