Possibility to specify GEM readout option
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 3 Mar 2012 18:45:50 +0000 (18:45 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 3 Mar 2012 18:45:50 +0000 (18:45 +0000)
PRF for GEM readout  AliTPCprf2dGEM.root
PRF Generated by macro   AliTPCCreatePRFGEM.C
PRF approximated as a gaussian with width ~ 0.025 cm given by diffusion

To enable GEM readout modify the Config.C:

  AliTPC *TPC = new AliTPCv2("TPC", "Default");
        TPC->SetGEM(1);

Marian

TPC/AliTPC.cxx
TPC/AliTPC.h
TPC/AliTPCprf2dGEM.root [new file with mode: 0644]

index 16aaa94..5a39f88 100644 (file)
@@ -101,7 +101,8 @@ ClassImp(AliTPC)
                   fActiveSectors(0),
                    fGainFactor(1.),
                    fDebugStreamer(0),
-                   fLHCclockPhaseSw(0)
+                   fLHCclockPhaseSw(0),
+                  fIsGEM(0)
 
 {
   //
@@ -137,7 +138,8 @@ AliTPC::AliTPC(const char *name, const char *title)
                    fActiveSectors(0),
                    fGainFactor(1.),
                    fDebugStreamer(0),
-                   fLHCclockPhaseSw(0)
+    fLHCclockPhaseSw(0),
+    fIsGEM(0)
                   
 {
   //
@@ -1251,30 +1253,57 @@ void AliTPC::SetDefaults(){
   rf->SetParam(fgamma4,param->GetZWidth(), 1,0.2);
   rf->SetOffset(3*param->GetZSigma()); 
   rf->Update();
-
   TDirectory *savedir=gDirectory;
-  TFile *f=TFile::Open("$ALICE_ROOT/TPC/AliTPCprf2d.root");
-  if (!f->IsOpen()) 
-    AliFatal("Can't open $ALICE_ROOT/TPC/AliTPCprf2d.root !");
-
-  TString s;
-  prfinner->Read("prf_07504_Gati_056068_d02");
-  //PH Set different names
-  s=prfinner->GetGRF()->GetName();
-  s+="in";
-  prfinner->GetGRF()->SetName(s.Data());
-
-  prfouter1->Read("prf_10006_Gati_047051_d03");
-  s=prfouter1->GetGRF()->GetName();
-  s+="out1";
-  prfouter1->GetGRF()->SetName(s.Data());
-
-  prfouter2->Read("prf_15006_Gati_047051_d03");  
-  s=prfouter2->GetGRF()->GetName();
-  s+="out2";
-  prfouter2->GetGRF()->SetName(s.Data());
-
-  f->Close();
+
+  if (fIsGEM==0){
+    printf ("TPC MWPC readout\n");
+    TFile *f=TFile::Open("$ALICE_ROOT/TPC/AliTPCprf2d.root");
+    if (!f->IsOpen()) 
+      AliFatal("Can't open $ALICE_ROOT/TPC/AliTPCprf2d.root !");
+    
+    TString s;
+    prfinner->Read("prf_07504_Gati_056068_d02");
+    //PH Set different names
+    s=prfinner->GetGRF()->GetName();
+    s+="in";
+    prfinner->GetGRF()->SetName(s.Data());
+    
+    prfouter1->Read("prf_10006_Gati_047051_d03");
+    s=prfouter1->GetGRF()->GetName();
+    s+="out1";
+    prfouter1->GetGRF()->SetName(s.Data());
+    
+    prfouter2->Read("prf_15006_Gati_047051_d03");  
+    s=prfouter2->GetGRF()->GetName();
+    s+="out2";
+    prfouter2->GetGRF()->SetName(s.Data());    
+    f->Close();
+  }
+
+  if (fIsGEM==1){
+    printf ("TPC GEM readout\n");
+    TFile *f=TFile::Open("$ALICE_ROOT/TPC/AliTPCprf2dGEM.root");
+    if (!f->IsOpen()) 
+      AliFatal("Can't open $ALICE_ROOT/TPC/AliTPCprf2dGEM.root !");
+    
+    TString s;
+    prfinner->Read("prf0");
+    //PH Set different names
+    s=prfinner->GetGRF()->GetName();
+    s+="in";
+    prfinner->GetGRF()->SetName(s.Data());
+    
+    prfouter1->Read("prf1");
+    s=prfouter1->GetGRF()->GetName();
+    s+="out1";
+    prfouter1->GetGRF()->SetName(s.Data());
+    
+    prfouter2->Read("prf2");  
+    s=prfouter2->GetGRF()->GetName();
+    s+="out2";
+    prfouter2->GetGRF()->SetName(s.Data());    
+    f->Close();
+  }
   savedir->cd();
 
   param->SetInnerPRF(prfinner);
index 7e51922..3fc8a72 100644 (file)
@@ -59,7 +59,7 @@ public:
   virtual void  ResetDigits();
   virtual void  SetSens(Int_t sens);
   virtual void  SetSide(Float_t side);
-
+  virtual void SetGEM(Int_t isGEM) {fIsGEM=isGEM; }
 
   virtual void  StepManager()=0;
   AliTPCDigitsArray*  GetDigitsArray() {return fDigitsArray;} //MI change
@@ -138,6 +138,7 @@ protected:
   Float_t    fGainFactor; // scaling factor
   TTreeSRedirector *fDebugStreamer;     //!debug streamer
   Int_t fLHCclockPhaseSw; //! lhc clock phase switch
+  Int_t fIsGEM;        // flag isGEM readout
   ClassDef(AliTPC,14)  // Time Projection Chamber class
 };
 
diff --git a/TPC/AliTPCprf2dGEM.root b/TPC/AliTPCprf2dGEM.root
new file mode 100644 (file)
index 0000000..7b56b1a
Binary files /dev/null and b/TPC/AliTPCprf2dGEM.root differ